repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
aws/aws-sdk-java
aws-java-sdk-connect/src/main/java/com/amazonaws/services/connect/model/UpdateContactAttributesRequest.java
UpdateContactAttributesRequest.withAttributes
public UpdateContactAttributesRequest withAttributes(java.util.Map<String, String> attributes) { """ <p> Specify a custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes. </p> <p> There ca...
java
public UpdateContactAttributesRequest withAttributes(java.util.Map<String, String> attributes) { setAttributes(attributes); return this; }
[ "public", "UpdateContactAttributesRequest", "withAttributes", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "attributes", ")", "{", "setAttributes", "(", "attributes", ")", ";", "return", "this", ";", "}" ]
<p> Specify a custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes. </p> <p> There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanume...
[ "<p", ">", "Specify", "a", "custom", "key", "-", "value", "pair", "using", "an", "attribute", "map", ".", "The", "attributes", "are", "standard", "Amazon", "Connect", "attributes", "and", "can", "be", "accessed", "in", "contact", "flows", "just", "like", "...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-connect/src/main/java/com/amazonaws/services/connect/model/UpdateContactAttributesRequest.java#L223-L226
opsmatters/opsmatters-core
src/main/java/com/opsmatters/core/documents/Workbook.java
Workbook.createWorkbook
public static Workbook createWorkbook(FileFormat format, OutputStream os) throws IOException { """ Creates a new workbook object. @param format The format of the workbook (XLS or XLSX) @param os The output stream to write the workbook to @return The new workbook created @throws IOException if the file ...
java
public static Workbook createWorkbook(FileFormat format, OutputStream os) throws IOException { return createWorkbook(format, os, null); }
[ "public", "static", "Workbook", "createWorkbook", "(", "FileFormat", "format", ",", "OutputStream", "os", ")", "throws", "IOException", "{", "return", "createWorkbook", "(", "format", ",", "os", ",", "null", ")", ";", "}" ]
Creates a new workbook object. @param format The format of the workbook (XLS or XLSX) @param os The output stream to write the workbook to @return The new workbook created @throws IOException if the file cannot be written
[ "Creates", "a", "new", "workbook", "object", "." ]
train
https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/documents/Workbook.java#L114-L118
davidcarboni-archive/httpino
src/main/java/com/github/davidcarboni/httpino/Http.java
Http.deserialiseResponseMessage
protected <T> T deserialiseResponseMessage(CloseableHttpResponse response, Class<T> responseClass) throws IOException { """ Deserialises the given {@link CloseableHttpResponse} to the specified type. @param response The response. @param responseClass The type to deserialise to. This can be null, in which ...
java
protected <T> T deserialiseResponseMessage(CloseableHttpResponse response, Class<T> responseClass) throws IOException { T body = null; HttpEntity entity = response.getEntity(); if (entity != null && responseClass != null) { try (InputStream inputStream = entity.getContent()) { ...
[ "protected", "<", "T", ">", "T", "deserialiseResponseMessage", "(", "CloseableHttpResponse", "response", ",", "Class", "<", "T", ">", "responseClass", ")", "throws", "IOException", "{", "T", "body", "=", "null", ";", "HttpEntity", "entity", "=", "response", "....
Deserialises the given {@link CloseableHttpResponse} to the specified type. @param response The response. @param responseClass The type to deserialise to. This can be null, in which case {@link EntityUtils#consume(HttpEntity)} will be used to consume the response body (if any). @param <T> The type to de...
[ "Deserialises", "the", "given", "{", "@link", "CloseableHttpResponse", "}", "to", "the", "specified", "type", "." ]
train
https://github.com/davidcarboni-archive/httpino/blob/a78c91874e6d9b2e452cf3aa68d4fea804d977ca/src/main/java/com/github/davidcarboni/httpino/Http.java#L475-L494
ocelotds/ocelot
ocelot-web/src/main/java/org/ocelotds/core/mtc/MessageToClientManager.java
MessageToClientManager.getDataService
Object getDataService(T session, Class cls) throws DataServiceException { """ Get Dataservice, store dataservice in session if session scope.<br> @param session @param cls @return @throws DataServiceException """ String dataServiceClassName = cls.getName(); logger.debug("Looking for dataservice : {...
java
Object getDataService(T session, Class cls) throws DataServiceException { String dataServiceClassName = cls.getName(); logger.debug("Looking for dataservice : {}", dataServiceClassName); if (cls.isAnnotationPresent(DataService.class)) { return _getDataService(session, cls); } else { throw new DataSe...
[ "Object", "getDataService", "(", "T", "session", ",", "Class", "cls", ")", "throws", "DataServiceException", "{", "String", "dataServiceClassName", "=", "cls", ".", "getName", "(", ")", ";", "logger", ".", "debug", "(", "\"Looking for dataservice : {}\"", ",", "...
Get Dataservice, store dataservice in session if session scope.<br> @param session @param cls @return @throws DataServiceException
[ "Get", "Dataservice", "store", "dataservice", "in", "session", "if", "session", "scope", ".", "<br", ">" ]
train
https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-web/src/main/java/org/ocelotds/core/mtc/MessageToClientManager.java#L75-L83
radkovo/CSSBox
src/main/java/org/fit/cssbox/demo/ImageRenderer.java
ImageRenderer.renderURL
public boolean renderURL(String urlstring, OutputStream out, Type type) throws IOException, SAXException { """ Renders the URL and prints the result to the specified output stream in the specified format. @param urlstring the source URL @param out output stream @param type output type @return true in case of ...
java
public boolean renderURL(String urlstring, OutputStream out, Type type) throws IOException, SAXException { if (!urlstring.startsWith("http:") && !urlstring.startsWith("https:") && !urlstring.startsWith("ftp:") && !urlstring.startsWith("file:")) urlstring =...
[ "public", "boolean", "renderURL", "(", "String", "urlstring", ",", "OutputStream", "out", ",", "Type", "type", ")", "throws", "IOException", ",", "SAXException", "{", "if", "(", "!", "urlstring", ".", "startsWith", "(", "\"http:\"", ")", "&&", "!", "urlstrin...
Renders the URL and prints the result to the specified output stream in the specified format. @param urlstring the source URL @param out output stream @param type output type @return true in case of success, false otherwise @throws SAXException
[ "Renders", "the", "URL", "and", "prints", "the", "result", "to", "the", "specified", "output", "stream", "in", "the", "specified", "format", "." ]
train
https://github.com/radkovo/CSSBox/blob/38aaf8f22d233d7b4dbc12a56cdbc72b447bc559/src/main/java/org/fit/cssbox/demo/ImageRenderer.java#L94-L146
alkacon/opencms-core
src-gwt/org/opencms/gwt/rebind/CmsCommandInitGenerator.java
CmsCommandInitGenerator.generateClass
public void generateClass(TreeLogger logger, GeneratorContext context, List<JClassType> subclasses) { """ This method generates the source code for the class initializer class.<p> @param logger the logger to be used @param context the generator context @param subclasses the classes for which the generated cod...
java
public void generateClass(TreeLogger logger, GeneratorContext context, List<JClassType> subclasses) { PrintWriter printWriter = context.tryCreate(logger, PACKAGE_NAME, CLASS_NAME); if (printWriter == null) { return; } ClassSourceFileComposerFactory composer = new ClassSource...
[ "public", "void", "generateClass", "(", "TreeLogger", "logger", ",", "GeneratorContext", "context", ",", "List", "<", "JClassType", ">", "subclasses", ")", "{", "PrintWriter", "printWriter", "=", "context", ".", "tryCreate", "(", "logger", ",", "PACKAGE_NAME", "...
This method generates the source code for the class initializer class.<p> @param logger the logger to be used @param context the generator context @param subclasses the classes for which the generated code should the initClass() method
[ "This", "method", "generates", "the", "source", "code", "for", "the", "class", "initializer", "class", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/rebind/CmsCommandInitGenerator.java#L106-L139
moparisthebest/beehive
beehive-netui-compiler/src/main/java/org/apache/beehive/netui/compiler/LocalFileEntityResolver.java
LocalFileEntityResolver.resolveEntity
public InputSource resolveEntity(String publicID, String systemID) throws SAXException, IOException { """ Resolve the entity. First try to find it locally, then fallback to the network. """ InputSource localFileInput = resolveLocalEntity(systemID); return localFileInput != null ? localFileInpu...
java
public InputSource resolveEntity(String publicID, String systemID) throws SAXException, IOException { InputSource localFileInput = resolveLocalEntity(systemID); return localFileInput != null ? localFileInput : new InputSource(systemID); }
[ "public", "InputSource", "resolveEntity", "(", "String", "publicID", ",", "String", "systemID", ")", "throws", "SAXException", ",", "IOException", "{", "InputSource", "localFileInput", "=", "resolveLocalEntity", "(", "systemID", ")", ";", "return", "localFileInput", ...
Resolve the entity. First try to find it locally, then fallback to the network.
[ "Resolve", "the", "entity", ".", "First", "try", "to", "find", "it", "locally", "then", "fallback", "to", "the", "network", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-compiler/src/main/java/org/apache/beehive/netui/compiler/LocalFileEntityResolver.java#L47-L50
geomajas/geomajas-project-client-gwt
common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java
HtmlBuilder.divClassHtmlContent
public static String divClassHtmlContent(String clazz, String... content) { """ Build a HTML DIV with given CSS class for a string. Use this method if given content contains HTML snippets, prepared with {@link HtmlBuilder#htmlEncode(String)}. @param clazz class for div element @param content content string @...
java
public static String divClassHtmlContent(String clazz, String... content) { return tagClassHtmlContent(Html.Tag.DIV, clazz, content); }
[ "public", "static", "String", "divClassHtmlContent", "(", "String", "clazz", ",", "String", "...", "content", ")", "{", "return", "tagClassHtmlContent", "(", "Html", ".", "Tag", ".", "DIV", ",", "clazz", ",", "content", ")", ";", "}" ]
Build a HTML DIV with given CSS class for a string. Use this method if given content contains HTML snippets, prepared with {@link HtmlBuilder#htmlEncode(String)}. @param clazz class for div element @param content content string @return HTML DIV element as string
[ "Build", "a", "HTML", "DIV", "with", "given", "CSS", "class", "for", "a", "string", ".", "Use", "this", "method", "if", "given", "content", "contains", "HTML", "snippets", "prepared", "with", "{", "@link", "HtmlBuilder#htmlEncode", "(", "String", ")", "}", ...
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java#L226-L228
googleads/googleads-java-lib
modules/ads_lib_appengine/src/main/java/com/google/api/ads/common/lib/soap/jaxws/JaxWsHandler.java
JaxWsHandler.setCompression
@Override public void setCompression(BindingProvider soapClient, boolean compress) { """ Set whether SOAP requests should use compression. @param soapClient the client to set compression settings for @param compress whether or not to use compression """ Map<String, String> headersMap = Maps.newHashMa...
java
@Override public void setCompression(BindingProvider soapClient, boolean compress) { Map<String, String> headersMap = Maps.newHashMap(); if (compress) { headersMap.put("Accept-Encoding", "gzip"); headersMap.put("Content-Encoding", "gzip"); putAllHttpHeaders(soapClient, headersMap); } els...
[ "@", "Override", "public", "void", "setCompression", "(", "BindingProvider", "soapClient", ",", "boolean", "compress", ")", "{", "Map", "<", "String", ",", "String", ">", "headersMap", "=", "Maps", ".", "newHashMap", "(", ")", ";", "if", "(", "compress", "...
Set whether SOAP requests should use compression. @param soapClient the client to set compression settings for @param compress whether or not to use compression
[ "Set", "whether", "SOAP", "requests", "should", "use", "compression", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib_appengine/src/main/java/com/google/api/ads/common/lib/soap/jaxws/JaxWsHandler.java#L175-L193
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/metadata/datasource/DataSourceMetaDataFactory.java
DataSourceMetaDataFactory.newInstance
public static DataSourceMetaData newInstance(final DatabaseType databaseType, final String url) { """ Create new instance of data source meta data. @param databaseType database type @param url data source URL @return data source meta data """ switch (databaseType) { case H2: ...
java
public static DataSourceMetaData newInstance(final DatabaseType databaseType, final String url) { switch (databaseType) { case H2: return new H2DataSourceMetaData(url); case MySQL: return new MySQLDataSourceMetaData(url); case Oracle: ...
[ "public", "static", "DataSourceMetaData", "newInstance", "(", "final", "DatabaseType", "databaseType", ",", "final", "String", "url", ")", "{", "switch", "(", "databaseType", ")", "{", "case", "H2", ":", "return", "new", "H2DataSourceMetaData", "(", "url", ")", ...
Create new instance of data source meta data. @param databaseType database type @param url data source URL @return data source meta data
[ "Create", "new", "instance", "of", "data", "source", "meta", "data", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/metadata/datasource/DataSourceMetaDataFactory.java#L44-L59
igniterealtime/REST-API-Client
src/main/java/org/igniterealtime/restclient/RestApiClient.java
RestApiClient.deleteAdminGroup
public Response deleteAdminGroup(String roomName, String groupName) { """ Delete admin group from chatroom. @param roomName the room name @param groupName the groupName @return the response """ return restClient.delete("chatrooms/" + roomName + "/admins/group/" + groupName, new H...
java
public Response deleteAdminGroup(String roomName, String groupName) { return restClient.delete("chatrooms/" + roomName + "/admins/group/" + groupName, new HashMap<String, String>()); }
[ "public", "Response", "deleteAdminGroup", "(", "String", "roomName", ",", "String", "groupName", ")", "{", "return", "restClient", ".", "delete", "(", "\"chatrooms/\"", "+", "roomName", "+", "\"/admins/group/\"", "+", "groupName", ",", "new", "HashMap", "<", "St...
Delete admin group from chatroom. @param roomName the room name @param groupName the groupName @return the response
[ "Delete", "admin", "group", "from", "chatroom", "." ]
train
https://github.com/igniterealtime/REST-API-Client/blob/fd544dd770ec2ababa47fef51579522ddce09f05/src/main/java/org/igniterealtime/restclient/RestApiClient.java#L396-L399
zxing/zxing
core/src/main/java/com/google/zxing/datamatrix/decoder/BitMatrixParser.java
BitMatrixParser.readModule
private boolean readModule(int row, int column, int numRows, int numColumns) { """ <p>Reads a bit of the mapping matrix accounting for boundary wrapping.</p> @param row Row to read in the mapping matrix @param column Column to read in the mapping matrix @param numRows Number of rows in the mapping matrix @pa...
java
private boolean readModule(int row, int column, int numRows, int numColumns) { // Adjust the row and column indices based on boundary wrapping if (row < 0) { row += numRows; column += 4 - ((numRows + 4) & 0x07); } if (column < 0) { column += numColumns; row += 4 - ((numColumns + ...
[ "private", "boolean", "readModule", "(", "int", "row", ",", "int", "column", ",", "int", "numRows", ",", "int", "numColumns", ")", "{", "// Adjust the row and column indices based on boundary wrapping", "if", "(", "row", "<", "0", ")", "{", "row", "+=", "numRows...
<p>Reads a bit of the mapping matrix accounting for boundary wrapping.</p> @param row Row to read in the mapping matrix @param column Column to read in the mapping matrix @param numRows Number of rows in the mapping matrix @param numColumns Number of columns in the mapping matrix @return value of the given bit in the ...
[ "<p", ">", "Reads", "a", "bit", "of", "the", "mapping", "matrix", "accounting", "for", "boundary", "wrapping", ".", "<", "/", "p", ">" ]
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/datamatrix/decoder/BitMatrixParser.java#L154-L166
openbase/jul
exception/src/main/java/org/openbase/jul/exception/StackTracePrinter.java
StackTracePrinter.printAllStackTrackes
@Deprecated public static void printAllStackTrackes(final Logger logger, final LogLevel logLevel) { """ Marked as deprecated because of the erroneous name. Call printAllStackTraces instead. @param logger the logger used for printing. @param logLevel the level to print. """ printAllStackTraces...
java
@Deprecated public static void printAllStackTrackes(final Logger logger, final LogLevel logLevel) { printAllStackTraces(null, logger, logLevel); }
[ "@", "Deprecated", "public", "static", "void", "printAllStackTrackes", "(", "final", "Logger", "logger", ",", "final", "LogLevel", "logLevel", ")", "{", "printAllStackTraces", "(", "null", ",", "logger", ",", "logLevel", ")", ";", "}" ]
Marked as deprecated because of the erroneous name. Call printAllStackTraces instead. @param logger the logger used for printing. @param logLevel the level to print.
[ "Marked", "as", "deprecated", "because", "of", "the", "erroneous", "name", ".", "Call", "printAllStackTraces", "instead", "." ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/exception/src/main/java/org/openbase/jul/exception/StackTracePrinter.java#L116-L119
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/IndianCalendar.java
IndianCalendar.IndianToJD
private static double IndianToJD(int year, int month, int date) { """ /* This routine converts an Indian date to the corresponding Julian date" @param year The year in Saka Era according to Indian calendar. @param month The month according to Indian calendar (between 1 to 12) @param date The date in month...
java
private static double IndianToJD(int year, int month, int date) { int leapMonth, gyear, m; double start, jd; gyear = year + INDIAN_ERA_START; if(isGregorianLeap(gyear)) { leapMonth = 31; start = gregorianToJD(gyear, 3, 21); } else { leapMonth = 30; ...
[ "private", "static", "double", "IndianToJD", "(", "int", "year", ",", "int", "month", ",", "int", "date", ")", "{", "int", "leapMonth", ",", "gyear", ",", "m", ";", "double", "start", ",", "jd", ";", "gyear", "=", "year", "+", "INDIAN_ERA_START", ";", ...
/* This routine converts an Indian date to the corresponding Julian date" @param year The year in Saka Era according to Indian calendar. @param month The month according to Indian calendar (between 1 to 12) @param date The date in month
[ "/", "*", "This", "routine", "converts", "an", "Indian", "date", "to", "the", "corresponding", "Julian", "date" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/IndianCalendar.java#L439-L469
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/appdev/PackageUrl.java
PackageUrl.getFileUrl
public static MozuUrl getFileUrl(String applicationKey, String fileName) { """ Get Resource Url for GetFile @param applicationKey The application key uniquely identifies the developer namespace, application ID, version, and package in Dev Center. The format is {Dev Account namespace}.{Application ID}.{Application...
java
public static MozuUrl getFileUrl(String applicationKey, String fileName) { UrlFormatter formatter = new UrlFormatter("/api/platform/appdev/filebasedpackage/packages/{applicationKey}?fileName={fileName}"); formatter.formatUrl("applicationKey", applicationKey); formatter.formatUrl("fileName", fileName); ret...
[ "public", "static", "MozuUrl", "getFileUrl", "(", "String", "applicationKey", ",", "String", "fileName", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/platform/appdev/filebasedpackage/packages/{applicationKey}?fileName={fileName}\"", ")", ";"...
Get Resource Url for GetFile @param applicationKey The application key uniquely identifies the developer namespace, application ID, version, and package in Dev Center. The format is {Dev Account namespace}.{Application ID}.{Application Version}.{Package name}. @param fileName @return String Resource Url
[ "Get", "Resource", "Url", "for", "GetFile" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/appdev/PackageUrl.java#L22-L28
marklogic/java-client-api
marklogic-client-api/src/main/java/com/marklogic/client/example/cookbook/datamovement/JobInformationRecorder.java
JobInformationRecorder.withProperty
public JobInformationRecorder withProperty(String key, String value) { """ Sets the key value pair to the job information. This would be persisted along with the other job information like start time, end time etc @param key key of the key value pair @param value value of the key value pair @return this ob...
java
public JobInformationRecorder withProperty(String key, String value) { if(sourceBatcher.isStarted()) throw new IllegalStateException("Configuration cannot be changed after startJob has been called"); properties.put(key, value); return this; }
[ "public", "JobInformationRecorder", "withProperty", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "sourceBatcher", ".", "isStarted", "(", ")", ")", "throw", "new", "IllegalStateException", "(", "\"Configuration cannot be changed after startJob has b...
Sets the key value pair to the job information. This would be persisted along with the other job information like start time, end time etc @param key key of the key value pair @param value value of the key value pair @return this object for chaining
[ "Sets", "the", "key", "value", "pair", "to", "the", "job", "information", ".", "This", "would", "be", "persisted", "along", "with", "the", "other", "job", "information", "like", "start", "time", "end", "time", "etc" ]
train
https://github.com/marklogic/java-client-api/blob/acf60229a928abd4a8cc4b21b641d56957467da7/marklogic-client-api/src/main/java/com/marklogic/client/example/cookbook/datamovement/JobInformationRecorder.java#L201-L205
CloudSlang/score
score-api/src/main/java/io/cloudslang/score/lang/ExecutionRuntimeServices.java
ExecutionRuntimeServices.addEvent
public void addEvent(String eventType, Serializable eventData) { """ add event - for score to fire @param eventType - string which is the key you can listen to @param eventData - the event data """ @SuppressWarnings("unchecked") Queue<ScoreEvent> eventsQueue = getFromMap(SCORE_EVENTS_QUEUE)...
java
public void addEvent(String eventType, Serializable eventData) { @SuppressWarnings("unchecked") Queue<ScoreEvent> eventsQueue = getFromMap(SCORE_EVENTS_QUEUE); if (eventsQueue == null) { eventsQueue = new ArrayDeque<>(); contextMap.put(SCORE_EVENTS_QUEUE, (ArrayDeque) eve...
[ "public", "void", "addEvent", "(", "String", "eventType", ",", "Serializable", "eventData", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "Queue", "<", "ScoreEvent", ">", "eventsQueue", "=", "getFromMap", "(", "SCORE_EVENTS_QUEUE", ")", ";", "if"...
add event - for score to fire @param eventType - string which is the key you can listen to @param eventData - the event data
[ "add", "event", "-", "for", "score", "to", "fire" ]
train
https://github.com/CloudSlang/score/blob/796134e917843f4d95a90f7740d69dc5257a1a0e/score-api/src/main/java/io/cloudslang/score/lang/ExecutionRuntimeServices.java#L327-L335
imsweb/naaccr-xml
src/main/java/com/imsweb/naaccrxml/NaaccrErrorUtils.java
NaaccrErrorUtils.getValidationError
public static String getValidationError(String code, Object... msgValues) { """ Returns the error message for the given error code @param code error code @param msgValues optional values to plug into the message @return the corresponding error message, never null (will throw an runtime exception if unknown code...
java
public static String getValidationError(String code, Object... msgValues) { if (!_MESSAGES.containsKey(code)) throw new RuntimeException("Unknown code: " + code); return fillMessage(_MESSAGES.get(code), msgValues); }
[ "public", "static", "String", "getValidationError", "(", "String", "code", ",", "Object", "...", "msgValues", ")", "{", "if", "(", "!", "_MESSAGES", ".", "containsKey", "(", "code", ")", ")", "throw", "new", "RuntimeException", "(", "\"Unknown code: \"", "+", ...
Returns the error message for the given error code @param code error code @param msgValues optional values to plug into the message @return the corresponding error message, never null (will throw an runtime exception if unknown code)
[ "Returns", "the", "error", "message", "for", "the", "given", "error", "code" ]
train
https://github.com/imsweb/naaccr-xml/blob/a3a501faa2a0c3411dd5248b2c1379f279131696/src/main/java/com/imsweb/naaccrxml/NaaccrErrorUtils.java#L49-L53
advantageous/konf
src/main/java/io/advantageous/config/ConfigFromObject.java
ConfigFromObject.parseDurationUsingTypeSafeSpec
private Duration parseDurationUsingTypeSafeSpec(final String path, final String durationString) { """ Parses a string into duration type safe spec format if possible. @param path property path @param durationString duration string using "10 seconds", "10 days", etc. format from type safe. @return Du...
java
private Duration parseDurationUsingTypeSafeSpec(final String path, final String durationString) { /* Check to see if any of the postfixes are at the end of the durationString. */ final Optional<Map.Entry<TimeUnit, List<String>>> entry = timeUnitMap.entrySet().stream() .filter(timeUnitLi...
[ "private", "Duration", "parseDurationUsingTypeSafeSpec", "(", "final", "String", "path", ",", "final", "String", "durationString", ")", "{", "/* Check to see if any of the postfixes are at the end of the durationString. */", "final", "Optional", "<", "Map", ".", "Entry", "<",...
Parses a string into duration type safe spec format if possible. @param path property path @param durationString duration string using "10 seconds", "10 days", etc. format from type safe. @return Duration parsed from typesafe config format.
[ "Parses", "a", "string", "into", "duration", "type", "safe", "spec", "format", "if", "possible", "." ]
train
https://github.com/advantageous/konf/blob/51f773fdee0467d8e4b3aaed3567b8b40b5ca9a7/src/main/java/io/advantageous/config/ConfigFromObject.java#L381-L430
m-m-m/util
cli/src/main/java/net/sf/mmm/util/cli/api/AbstractMain.java
AbstractMain.handleError
protected int handleError(Exception exception, CliParser parser) { """ This method is invoked if an {@link Exception} occurred. It implements how to handle the error. You may override to add a custom handling. @param exception is the actual error that occurred. @param parser is the {@link CliParser}. @return...
java
protected int handleError(Exception exception, CliParser parser) { int exitCode; AppendableWriter writer = new AppendableWriter(this.standardError); PrintWriter printStream = new PrintWriter(writer); if (exception instanceof CliException) { // TODO: NLS printStream.println("Error: " + excep...
[ "protected", "int", "handleError", "(", "Exception", "exception", ",", "CliParser", "parser", ")", "{", "int", "exitCode", ";", "AppendableWriter", "writer", "=", "new", "AppendableWriter", "(", "this", ".", "standardError", ")", ";", "PrintWriter", "printStream",...
This method is invoked if an {@link Exception} occurred. It implements how to handle the error. You may override to add a custom handling. @param exception is the actual error that occurred. @param parser is the {@link CliParser}. @return the error-code (NOT {@code 0}).
[ "This", "method", "is", "invoked", "if", "an", "{", "@link", "Exception", "}", "occurred", ".", "It", "implements", "how", "to", "handle", "the", "error", ".", "You", "may", "override", "to", "add", "a", "custom", "handling", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/cli/src/main/java/net/sf/mmm/util/cli/api/AbstractMain.java#L94-L113
netarchivesuite/heritrix3-wrapper
src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java
Heritrix3Wrapper.exitJavaProcess
public EngineResult exitJavaProcess(List<String> ignoreJobs) { """ Send JVM shutdown action to Heritrix 3. If there are any running jobs they must be included in the ignored jobs list passed as argument. Otherwise the shutdown action is ignored. @return <code>EngineResult</code>, but only in case the shutdown w...
java
public EngineResult exitJavaProcess(List<String> ignoreJobs) { HttpPost postRequest = new HttpPost(baseUrl); List<NameValuePair> nvp = new LinkedList<NameValuePair>(); // 3.2.x //nvp.add(new BasicNameValuePair("action", "Exit Java Process")); // 3.3.x nvp.add(new BasicNam...
[ "public", "EngineResult", "exitJavaProcess", "(", "List", "<", "String", ">", "ignoreJobs", ")", "{", "HttpPost", "postRequest", "=", "new", "HttpPost", "(", "baseUrl", ")", ";", "List", "<", "NameValuePair", ">", "nvp", "=", "new", "LinkedList", "<", "NameV...
Send JVM shutdown action to Heritrix 3. If there are any running jobs they must be included in the ignored jobs list passed as argument. Otherwise the shutdown action is ignored. @return <code>EngineResult</code>, but only in case the shutdown was not performed
[ "Send", "JVM", "shutdown", "action", "to", "Heritrix", "3", ".", "If", "there", "are", "any", "running", "jobs", "they", "must", "be", "included", "in", "the", "ignored", "jobs", "list", "passed", "as", "argument", ".", "Otherwise", "the", "shutdown", "act...
train
https://github.com/netarchivesuite/heritrix3-wrapper/blob/e53ec5736cbac0bdd3925b5331737dc905871629/src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java#L175-L199
Azure/azure-sdk-for-java
storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java
StorageAccountsInner.createOrUpdateManagementPoliciesAsync
public Observable<StorageAccountManagementPoliciesInner> createOrUpdateManagementPoliciesAsync(String resourceGroupName, String accountName, Object policy) { """ Sets the data policy rules associated with the specified storage account. @param resourceGroupName The name of the resource group within the user's su...
java
public Observable<StorageAccountManagementPoliciesInner> createOrUpdateManagementPoliciesAsync(String resourceGroupName, String accountName, Object policy) { return createOrUpdateManagementPoliciesWithServiceResponseAsync(resourceGroupName, accountName, policy).map(new Func1<ServiceResponse<StorageAccountManage...
[ "public", "Observable", "<", "StorageAccountManagementPoliciesInner", ">", "createOrUpdateManagementPoliciesAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "Object", "policy", ")", "{", "return", "createOrUpdateManagementPoliciesWithServiceResponseA...
Sets the data policy rules associated with the specified storage account. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3...
[ "Sets", "the", "data", "policy", "rules", "associated", "with", "the", "specified", "storage", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java#L1400-L1407
hdbeukel/james-core
src/main/java/org/jamesframework/core/subset/algo/LRSubsetSearch.java
LRSubsetSearch.greedyMoves
private int greedyMoves(int n, SubsetNeighbourhood neigh) { """ Greedily apply a series of n moves generated by the given neighbourhood, where the move yielding the most improvement (or smallest decline) is iteratively selected. Returns the actual number of performed moves, which is always lower than or equal to...
java
private int greedyMoves(int n, SubsetNeighbourhood neigh){ int applied = 0; boolean cont = true; while(applied < n && cont){ // go through all moves to find the best one Move<? super SubsetSolution> bestMove = null; double bestDelta = -Double.MAX_VALUE, delta;...
[ "private", "int", "greedyMoves", "(", "int", "n", ",", "SubsetNeighbourhood", "neigh", ")", "{", "int", "applied", "=", "0", ";", "boolean", "cont", "=", "true", ";", "while", "(", "applied", "<", "n", "&&", "cont", ")", "{", "// go through all moves to fi...
Greedily apply a series of n moves generated by the given neighbourhood, where the move yielding the most improvement (or smallest decline) is iteratively selected. Returns the actual number of performed moves, which is always lower than or equal to the requested number of moves. It may be strictly lower in case no mor...
[ "Greedily", "apply", "a", "series", "of", "n", "moves", "generated", "by", "the", "given", "neighbourhood", "where", "the", "move", "yielding", "the", "most", "improvement", "(", "or", "smallest", "decline", ")", "is", "iteratively", "selected", ".", "Returns"...
train
https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/subset/algo/LRSubsetSearch.java#L235-L277
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java
CmsDomUtil.getFirstChildWithClass
public static Element getFirstChildWithClass(Element element, String className) { """ Returns the first direct child matching the given class name.<p> @param element the parent element @param className the class name to match @return the child element """ NodeList<Node> children = element.getCh...
java
public static Element getFirstChildWithClass(Element element, String className) { NodeList<Node> children = element.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { if (children.getItem(i).getNodeType() == Node.ELEMENT_NODE) { Element child = (Element)child...
[ "public", "static", "Element", "getFirstChildWithClass", "(", "Element", "element", ",", "String", "className", ")", "{", "NodeList", "<", "Node", ">", "children", "=", "element", ".", "getChildNodes", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", ...
Returns the first direct child matching the given class name.<p> @param element the parent element @param className the class name to match @return the child element
[ "Returns", "the", "first", "direct", "child", "matching", "the", "given", "class", "name", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java#L1397-L1410
kiswanij/jk-util
src/main/java/com/jk/util/JK.java
JK.addToSystemConfig
public static void addToSystemConfig(String prefix, Properties prop) { """ Adds the to system config. @param prefix the prefix @param prop the prop """ for (Entry<Object, Object> entry : prop.entrySet()) { String key = prefix.concat(entry.getKey().toString()); String value = entry.getValue().t...
java
public static void addToSystemConfig(String prefix, Properties prop) { for (Entry<Object, Object> entry : prop.entrySet()) { String key = prefix.concat(entry.getKey().toString()); String value = entry.getValue().toString(); System.setProperty(key, value); } }
[ "public", "static", "void", "addToSystemConfig", "(", "String", "prefix", ",", "Properties", "prop", ")", "{", "for", "(", "Entry", "<", "Object", ",", "Object", ">", "entry", ":", "prop", ".", "entrySet", "(", ")", ")", "{", "String", "key", "=", "pre...
Adds the to system config. @param prefix the prefix @param prop the prop
[ "Adds", "the", "to", "system", "config", "." ]
train
https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/JK.java#L414-L420
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/labeling/SARLImages.java
SARLImages.forAgent
public ImageDescriptor forAgent(JvmVisibility visibility, int flags) { """ Replies the image descriptor for the "agents". @param visibility the visibility of the agent. @param flags the mark flags. See {@link JavaElementImageDescriptor#setAdornments(int)} for a description of the available flags. @return the...
java
public ImageDescriptor forAgent(JvmVisibility visibility, int flags) { return getDecorated(getTypeImageDescriptor( SarlElementType.AGENT, false, false, toFlags(visibility), USE_LIGHT_ICONS), flags); }
[ "public", "ImageDescriptor", "forAgent", "(", "JvmVisibility", "visibility", ",", "int", "flags", ")", "{", "return", "getDecorated", "(", "getTypeImageDescriptor", "(", "SarlElementType", ".", "AGENT", ",", "false", ",", "false", ",", "toFlags", "(", "visibility"...
Replies the image descriptor for the "agents". @param visibility the visibility of the agent. @param flags the mark flags. See {@link JavaElementImageDescriptor#setAdornments(int)} for a description of the available flags. @return the image descriptor for the agents.
[ "Replies", "the", "image", "descriptor", "for", "the", "agents", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/labeling/SARLImages.java#L127-L130
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/StringUtils.java
StringUtils.dequoteFull
public static String dequoteFull(String str, char quote) { """ Removes the surrounding quote and any double quote inside the string <br> Example:<br> <pre> "hello""world" becomes hello"world </pre> @param str input string to dequote @param quote the quoting char @return dequoted String """ i...
java
public static String dequoteFull(String str, char quote) { if (str == null) { return null; } return dequoteFull(str, 0, str.length(), quote); }
[ "public", "static", "String", "dequoteFull", "(", "String", "str", ",", "char", "quote", ")", "{", "if", "(", "str", "==", "null", ")", "{", "return", "null", ";", "}", "return", "dequoteFull", "(", "str", ",", "0", ",", "str", ".", "length", "(", ...
Removes the surrounding quote and any double quote inside the string <br> Example:<br> <pre> "hello""world" becomes hello"world </pre> @param str input string to dequote @param quote the quoting char @return dequoted String
[ "Removes", "the", "surrounding", "quote", "and", "any", "double", "quote", "inside", "the", "string", "<br", ">", "Example", ":", "<br", ">", "<pre", ">", "hello", "world", "becomes", "hello", "world", "<", "/", "pre", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/StringUtils.java#L306-L314
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/BarcodePostnet.java
BarcodePostnet.placeBarcode
public Rectangle placeBarcode(PdfContentByte cb, Color barColor, Color textColor) { """ Places the barcode in a <CODE>PdfContentByte</CODE>. The barcode is always placed at coordinates (0, 0). Use the translation matrix to move it elsewhere.<p> The bars and text are written in the following colors:<p> <P><TABL...
java
public Rectangle placeBarcode(PdfContentByte cb, Color barColor, Color textColor) { if (barColor != null) cb.setColorFill(barColor); byte bars[] = getBarsPostnet(code); byte flip = 1; if (codeType == PLANET) { flip = 0; bars[0] = 0; bars[ba...
[ "public", "Rectangle", "placeBarcode", "(", "PdfContentByte", "cb", ",", "Color", "barColor", ",", "Color", "textColor", ")", "{", "if", "(", "barColor", "!=", "null", ")", "cb", ".", "setColorFill", "(", "barColor", ")", ";", "byte", "bars", "[", "]", "...
Places the barcode in a <CODE>PdfContentByte</CODE>. The barcode is always placed at coordinates (0, 0). Use the translation matrix to move it elsewhere.<p> The bars and text are written in the following colors:<p> <P><TABLE BORDER=1> <TR> <TH><P><CODE>barColor</CODE></TH> <TH><P><CODE>textColor</CODE></TH> <TH><P>Resu...
[ "Places", "the", "barcode", "in", "a", "<CODE", ">", "PdfContentByte<", "/", "CODE", ">", ".", "The", "barcode", "is", "always", "placed", "at", "coordinates", "(", "0", "0", ")", ".", "Use", "the", "translation", "matrix", "to", "move", "it", "elsewhere...
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/BarcodePostnet.java#L159-L176
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/comp/Annotate.java
Annotate.getContainingType
private Type getContainingType(Attribute.Compound currentAnno, DiagnosticPosition pos, boolean reportError) { """ Fetches the actual Type that should be the containing annotation. """ Type origAnnoType = currentAnno.type; TypeSymbol origAnnoDecl = origAnnoType.tsym; ...
java
private Type getContainingType(Attribute.Compound currentAnno, DiagnosticPosition pos, boolean reportError) { Type origAnnoType = currentAnno.type; TypeSymbol origAnnoDecl = origAnnoType.tsym; // Fetch the Repeatable annotation from the current // annotation'...
[ "private", "Type", "getContainingType", "(", "Attribute", ".", "Compound", "currentAnno", ",", "DiagnosticPosition", "pos", ",", "boolean", "reportError", ")", "{", "Type", "origAnnoType", "=", "currentAnno", ".", "type", ";", "TypeSymbol", "origAnnoDecl", "=", "o...
Fetches the actual Type that should be the containing annotation.
[ "Fetches", "the", "actual", "Type", "that", "should", "be", "the", "containing", "annotation", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/comp/Annotate.java#L556-L574
apereo/cas
support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java
LdapUtils.getLong
public static Long getLong(final LdapEntry entry, final String attribute, final Long nullValue) { """ Reads a Long value from the LdapEntry. @param entry the ldap entry @param attribute the attribute name @param nullValue the value which should be returning in case of a null value @return the long value ...
java
public static Long getLong(final LdapEntry entry, final String attribute, final Long nullValue) { val v = getString(entry, attribute, nullValue.toString()); if (NumberUtils.isCreatable(v)) { return Long.valueOf(v); } return nullValue; }
[ "public", "static", "Long", "getLong", "(", "final", "LdapEntry", "entry", ",", "final", "String", "attribute", ",", "final", "Long", "nullValue", ")", "{", "val", "v", "=", "getString", "(", "entry", ",", "attribute", ",", "nullValue", ".", "toString", "(...
Reads a Long value from the LdapEntry. @param entry the ldap entry @param attribute the attribute name @param nullValue the value which should be returning in case of a null value @return the long value
[ "Reads", "a", "Long", "value", "from", "the", "LdapEntry", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java#L175-L181
apiman/apiman
manager/api/es/src/main/java/io/apiman/manager/api/es/EsMarshalling.java
EsMarshalling.unmarshallDownload
public static DownloadBean unmarshallDownload(Map<String, Object> source) { """ Unmarshals the given map source into a bean. @param source the source @return the gateway bean """ if (source == null) { return null; } DownloadBean bean = new DownloadBean(); bean.setI...
java
public static DownloadBean unmarshallDownload(Map<String, Object> source) { if (source == null) { return null; } DownloadBean bean = new DownloadBean(); bean.setId(asString(source.get("id"))); bean.setPath(asString(source.get("path"))); bean.setType(asEnum(sou...
[ "public", "static", "DownloadBean", "unmarshallDownload", "(", "Map", "<", "String", ",", "Object", ">", "source", ")", "{", "if", "(", "source", "==", "null", ")", "{", "return", "null", ";", "}", "DownloadBean", "bean", "=", "new", "DownloadBean", "(", ...
Unmarshals the given map source into a bean. @param source the source @return the gateway bean
[ "Unmarshals", "the", "given", "map", "source", "into", "a", "bean", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/es/src/main/java/io/apiman/manager/api/es/EsMarshalling.java#L724-L735
JavaMoney/jsr354-api
src/main/java/javax/money/RoundingContextBuilder.java
RoundingContextBuilder.setCurrency
public RoundingContextBuilder setCurrency(CurrencyUnit currencyUnit) { """ Get the basic {@link CurrencyUnit}, which is based for this rounding type. @param currencyUnit the target currency unit not null. @return the target CurrencyUnit, or null. """ Objects.requireNonNull(currencyUnit); retu...
java
public RoundingContextBuilder setCurrency(CurrencyUnit currencyUnit) { Objects.requireNonNull(currencyUnit); return set(CurrencyUnit.class, currencyUnit); }
[ "public", "RoundingContextBuilder", "setCurrency", "(", "CurrencyUnit", "currencyUnit", ")", "{", "Objects", ".", "requireNonNull", "(", "currencyUnit", ")", ";", "return", "set", "(", "CurrencyUnit", ".", "class", ",", "currencyUnit", ")", ";", "}" ]
Get the basic {@link CurrencyUnit}, which is based for this rounding type. @param currencyUnit the target currency unit not null. @return the target CurrencyUnit, or null.
[ "Get", "the", "basic", "{" ]
train
https://github.com/JavaMoney/jsr354-api/blob/49a7ae436eaf45cac1040879185531ef22de5525/src/main/java/javax/money/RoundingContextBuilder.java#L60-L63
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/SolutionUtils.java
SolutionUtils.getBestSolution
public static <S extends Solution<?>> S getBestSolution(S solution1, S solution2, Comparator<S> comparator, BinaryOperator<S> equalityPolicy) { """ Return the best solution between those passed as arguments. If they are equal or incomparable one of them is chosen based on the given policy. @return The best sol...
java
public static <S extends Solution<?>> S getBestSolution(S solution1, S solution2, Comparator<S> comparator, BinaryOperator<S> equalityPolicy) { S result; int flag = comparator.compare(solution1, solution2); if (flag == -1) { result = solution1; } else if (flag == 1) { result = solution2; ...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "S", "getBestSolution", "(", "S", "solution1", ",", "S", "solution2", ",", "Comparator", "<", "S", ">", "comparator", ",", "BinaryOperator", "<", "S", ">", "equalityPolicy", ")", "{...
Return the best solution between those passed as arguments. If they are equal or incomparable one of them is chosen based on the given policy. @return The best solution
[ "Return", "the", "best", "solution", "between", "those", "passed", "as", "arguments", ".", "If", "they", "are", "equal", "or", "incomparable", "one", "of", "them", "is", "chosen", "based", "on", "the", "given", "policy", "." ]
train
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/SolutionUtils.java#L44-L56
ludovicianul/selenium-on-steroids
src/main/java/com/insidecoding/sos/webdriver/WebDriverHelper.java
WebDriverHelper.assertText
public void assertText(final By by, final String text) { """ Verifies that the given element contains the given text. Please not that the method will do a JUNIT Assert causing the test to fail. @param by the method of identifying the element @param text the text to be matched """ WebElement element = ...
java
public void assertText(final By by, final String text) { WebElement element = driver.findElement(by); Assert.assertEquals("Element: " + element + " does NOT contain the given text: " + text, text, element.getText()); }
[ "public", "void", "assertText", "(", "final", "By", "by", ",", "final", "String", "text", ")", "{", "WebElement", "element", "=", "driver", ".", "findElement", "(", "by", ")", ";", "Assert", ".", "assertEquals", "(", "\"Element: \"", "+", "element", "+", ...
Verifies that the given element contains the given text. Please not that the method will do a JUNIT Assert causing the test to fail. @param by the method of identifying the element @param text the text to be matched
[ "Verifies", "that", "the", "given", "element", "contains", "the", "given", "text", ".", "Please", "not", "that", "the", "method", "will", "do", "a", "JUNIT", "Assert", "causing", "the", "test", "to", "fail", "." ]
train
https://github.com/ludovicianul/selenium-on-steroids/blob/f89d91c59f686114f94624bfc55712f278005bfa/src/main/java/com/insidecoding/sos/webdriver/WebDriverHelper.java#L402-L408
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/core/OntopProtegeReasoner.java
OntopProtegeReasoner.getEmptyEntitiesChecker
public QuestOWLEmptyEntitiesChecker getEmptyEntitiesChecker() throws Exception { """ Methods to get the empty concepts and roles in the ontology using the given mappings. It generates SPARQL queries to check for entities. @return QuestOWLEmptyEntitiesChecker class to get empty concepts and roles @throws Excepti...
java
public QuestOWLEmptyEntitiesChecker getEmptyEntitiesChecker() throws Exception { OWLOntology rootOntology = getRootOntology(); Ontology mergeOntology = owlapiTranslator.translateAndClassify(rootOntology); ClassifiedTBox tBox = mergeOntology.tbox(); return new QuestOWLEmptyEntitiesChecke...
[ "public", "QuestOWLEmptyEntitiesChecker", "getEmptyEntitiesChecker", "(", ")", "throws", "Exception", "{", "OWLOntology", "rootOntology", "=", "getRootOntology", "(", ")", ";", "Ontology", "mergeOntology", "=", "owlapiTranslator", ".", "translateAndClassify", "(", "rootOn...
Methods to get the empty concepts and roles in the ontology using the given mappings. It generates SPARQL queries to check for entities. @return QuestOWLEmptyEntitiesChecker class to get empty concepts and roles @throws Exception
[ "Methods", "to", "get", "the", "empty", "concepts", "and", "roles", "in", "the", "ontology", "using", "the", "given", "mappings", ".", "It", "generates", "SPARQL", "queries", "to", "check", "for", "entities", "." ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/core/OntopProtegeReasoner.java#L328-L334
mgormley/pacaya
src/main/java/edu/jhu/pacaya/gm/data/LibDaiFgIo.java
LibDaiFgIo.configIdToLibDaiIx
public static int configIdToLibDaiIx(int configId, VarSet vs) { """ converts the internal pacaya index of a config on the varset into the libdai index corresponding to the same configuration """ int[] indices = vs.getVarConfigAsArray(configId); int[] dims = vs.getDims(); return Tensor....
java
public static int configIdToLibDaiIx(int configId, VarSet vs) { int[] indices = vs.getVarConfigAsArray(configId); int[] dims = vs.getDims(); return Tensor.ravelIndexMatlab(indices, dims); }
[ "public", "static", "int", "configIdToLibDaiIx", "(", "int", "configId", ",", "VarSet", "vs", ")", "{", "int", "[", "]", "indices", "=", "vs", ".", "getVarConfigAsArray", "(", "configId", ")", ";", "int", "[", "]", "dims", "=", "vs", ".", "getDims", "(...
converts the internal pacaya index of a config on the varset into the libdai index corresponding to the same configuration
[ "converts", "the", "internal", "pacaya", "index", "of", "a", "config", "on", "the", "varset", "into", "the", "libdai", "index", "corresponding", "to", "the", "same", "configuration" ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/gm/data/LibDaiFgIo.java#L158-L162
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VpnConnectionsInner.java
VpnConnectionsInner.listByVpnGatewayWithServiceResponseAsync
public Observable<ServiceResponse<Page<VpnConnectionInner>>> listByVpnGatewayWithServiceResponseAsync(final String resourceGroupName, final String gatewayName) { """ Retrieves all vpn connections for a particular virtual wan vpn gateway. @param resourceGroupName The resource group name of the VpnGateway. @para...
java
public Observable<ServiceResponse<Page<VpnConnectionInner>>> listByVpnGatewayWithServiceResponseAsync(final String resourceGroupName, final String gatewayName) { return listByVpnGatewaySinglePageAsync(resourceGroupName, gatewayName) .concatMap(new Func1<ServiceResponse<Page<VpnConnectionInner>>, Obs...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "VpnConnectionInner", ">", ">", ">", "listByVpnGatewayWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "gatewayName", ")", "{", "return", "listByVpnGatewaySi...
Retrieves all vpn connections for a particular virtual wan vpn gateway. @param resourceGroupName The resource group name of the VpnGateway. @param gatewayName The name of the gateway. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;VpnConnectionInner...
[ "Retrieves", "all", "vpn", "connections", "for", "a", "particular", "virtual", "wan", "vpn", "gateway", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VpnConnectionsInner.java#L599-L611
google/closure-compiler
src/com/google/javascript/jscomp/ProcessClosureProvidesAndRequires.java
ProcessClosureProvidesAndRequires.validateAliasiablePrimitiveCall
private boolean validateAliasiablePrimitiveCall(NodeTraversal t, Node n, String methodName) { """ Verifies that a) the call is in the global scope and b) the return value is unused <p>This method is for primitives that do return a value in modules, but not in scripts/ goog.provide files """ return vali...
java
private boolean validateAliasiablePrimitiveCall(NodeTraversal t, Node n, String methodName) { return validatePrimitiveCallWithMessage( t, n, methodName, ProcessClosurePrimitives.CLOSURE_CALL_CANNOT_BE_ALIASED_OUTSIDE_MODULE_ERROR); }
[ "private", "boolean", "validateAliasiablePrimitiveCall", "(", "NodeTraversal", "t", ",", "Node", "n", ",", "String", "methodName", ")", "{", "return", "validatePrimitiveCallWithMessage", "(", "t", ",", "n", ",", "methodName", ",", "ProcessClosurePrimitives", ".", "C...
Verifies that a) the call is in the global scope and b) the return value is unused <p>This method is for primitives that do return a value in modules, but not in scripts/ goog.provide files
[ "Verifies", "that", "a", ")", "the", "call", "is", "in", "the", "global", "scope", "and", "b", ")", "the", "return", "value", "is", "unused" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/ProcessClosureProvidesAndRequires.java#L264-L270
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/ChromosomeSequence.java
ChromosomeSequence.addGene
public GeneSequence addGene(AccessionID accession, int bioBegin, int bioEnd, Strand strand) { """ Add a gene to the chromosome sequence using bioIndexing starts at 1 instead of 0. The GeneSequence that is returned will have a reference to parent chromosome sequence which actually contains the sequence data. Stra...
java
public GeneSequence addGene(AccessionID accession, int bioBegin, int bioEnd, Strand strand) { GeneSequence geneSequence = new GeneSequence(this, bioBegin, bioEnd, strand); geneSequence.setAccession(accession); geneSequenceHashMap.put(accession.toString(), geneSequence); return geneSequence; }
[ "public", "GeneSequence", "addGene", "(", "AccessionID", "accession", ",", "int", "bioBegin", ",", "int", "bioEnd", ",", "Strand", "strand", ")", "{", "GeneSequence", "geneSequence", "=", "new", "GeneSequence", "(", "this", ",", "bioBegin", ",", "bioEnd", ",",...
Add a gene to the chromosome sequence using bioIndexing starts at 1 instead of 0. The GeneSequence that is returned will have a reference to parent chromosome sequence which actually contains the sequence data. Strand is important for positive and negative direction where negative strand means we need reverse complemen...
[ "Add", "a", "gene", "to", "the", "chromosome", "sequence", "using", "bioIndexing", "starts", "at", "1", "instead", "of", "0", ".", "The", "GeneSequence", "that", "is", "returned", "will", "have", "a", "reference", "to", "parent", "chromosome", "sequence", "w...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/ChromosomeSequence.java#L136-L141
looly/hutool
hutool-core/src/main/java/cn/hutool/core/text/StrBuilder.java
StrBuilder.append
public StrBuilder append(char[] src, int srcPos, int length) { """ 追加一个字符数组 @param src 字符数组 @param srcPos 开始位置(包括) @param length 长度 @return this """ return insert(this.position, src, srcPos, length); }
java
public StrBuilder append(char[] src, int srcPos, int length) { return insert(this.position, src, srcPos, length); }
[ "public", "StrBuilder", "append", "(", "char", "[", "]", "src", ",", "int", "srcPos", ",", "int", "length", ")", "{", "return", "insert", "(", "this", ".", "position", ",", "src", ",", "srcPos", ",", "length", ")", ";", "}" ]
追加一个字符数组 @param src 字符数组 @param srcPos 开始位置(包括) @param length 长度 @return this
[ "追加一个字符数组" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/text/StrBuilder.java#L128-L130
alkacon/opencms-core
src/org/opencms/ui/apps/sessions/CmsSessionsApp.java
CmsSessionsApp.getUserNames
protected static String getUserNames(Set<String> ids, String andLocalized) { """ Get user names as String from set of sessions.<p> @param ids to gain usernames from @param andLocalized String @return user names as string """ List<String> userNames = new ArrayList<String>(); for (String i...
java
protected static String getUserNames(Set<String> ids, String andLocalized) { List<String> userNames = new ArrayList<String>(); for (String id : ids) { CmsSessionInfo session = OpenCms.getSessionManager().getSessionInfo(new CmsUUID(id)); try { String name = A_Cms...
[ "protected", "static", "String", "getUserNames", "(", "Set", "<", "String", ">", "ids", ",", "String", "andLocalized", ")", "{", "List", "<", "String", ">", "userNames", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "for", "(", "String", ...
Get user names as String from set of sessions.<p> @param ids to gain usernames from @param andLocalized String @return user names as string
[ "Get", "user", "names", "as", "String", "from", "set", "of", "sessions", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/sessions/CmsSessionsApp.java#L136-L171
grails/grails-core
grails-core/src/main/groovy/org/grails/core/AbstractGrailsClass.java
AbstractGrailsClass.getPropertyOrStaticPropertyOrFieldValue
protected <T> T getPropertyOrStaticPropertyOrFieldValue(String name, Class<T> type) { """ <p>Looks for a property of the reference instance with a given name and type.</p> <p>If found its value is returned. We follow the Java bean conventions with augmentation for groovy support and static fields/properties. We ...
java
protected <T> T getPropertyOrStaticPropertyOrFieldValue(String name, Class<T> type) { return ClassPropertyFetcher.getStaticPropertyValue(getClazz(), name, type); }
[ "protected", "<", "T", ">", "T", "getPropertyOrStaticPropertyOrFieldValue", "(", "String", "name", ",", "Class", "<", "T", ">", "type", ")", "{", "return", "ClassPropertyFetcher", ".", "getStaticPropertyValue", "(", "getClazz", "(", ")", ",", "name", ",", "typ...
<p>Looks for a property of the reference instance with a given name and type.</p> <p>If found its value is returned. We follow the Java bean conventions with augmentation for groovy support and static fields/properties. We will therefore match, in this order: </p> <ol> <li>Public static field <li>Public static property...
[ "<p", ">", "Looks", "for", "a", "property", "of", "the", "reference", "instance", "with", "a", "given", "name", "and", "type", ".", "<", "/", "p", ">", "<p", ">", "If", "found", "its", "value", "is", "returned", ".", "We", "follow", "the", "Java", ...
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/core/AbstractGrailsClass.java#L227-L229
spring-projects/spring-android
spring-android-rest-template/src/main/java/org/springframework/http/client/HttpComponentsAndroidClientHttpRequestFactory.java
HttpComponentsAndroidClientHttpRequestFactory.createHttpRequest
protected HttpUriRequest createHttpRequest(HttpMethod httpMethod, URI uri) { """ Create a HttpComponents HttpUriRequest object for the given HTTP method and URI specification. @param httpMethod the HTTP method @param uri the URI @return the HttpComponents HttpUriRequest object """ switch (httpMethod) { ...
java
protected HttpUriRequest createHttpRequest(HttpMethod httpMethod, URI uri) { switch (httpMethod) { case GET: return new HttpGet(uri); case DELETE: return new HttpDelete(uri); case HEAD: return new HttpHead(uri); case OPTIONS: return new HttpOptions(uri); case POST: return new HttpPo...
[ "protected", "HttpUriRequest", "createHttpRequest", "(", "HttpMethod", "httpMethod", ",", "URI", "uri", ")", "{", "switch", "(", "httpMethod", ")", "{", "case", "GET", ":", "return", "new", "HttpGet", "(", "uri", ")", ";", "case", "DELETE", ":", "return", ...
Create a HttpComponents HttpUriRequest object for the given HTTP method and URI specification. @param httpMethod the HTTP method @param uri the URI @return the HttpComponents HttpUriRequest object
[ "Create", "a", "HttpComponents", "HttpUriRequest", "object", "for", "the", "given", "HTTP", "method", "and", "URI", "specification", "." ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-rest-template/src/main/java/org/springframework/http/client/HttpComponentsAndroidClientHttpRequestFactory.java#L147-L166
gallandarakhneorg/afc
advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileWriter.java
DBaseFileWriter.writeDBFString
private void writeDBFString(String str, int size, byte fillingChar) throws IOException { """ Write a string inside the current <var>stream</var>. Each character of the string will be written as bytes. No terminal null character is written. The string area will be filled with the given byte. @param str is the...
java
private void writeDBFString(String str, int size, byte fillingChar) throws IOException { assert this.language != null; // Be sure that the encoding will be the right one int strSize = 0; if (str != null) { final Charset encodingCharset = this.language.getChatset(); if (encodingCharset == null) { throw...
[ "private", "void", "writeDBFString", "(", "String", "str", ",", "int", "size", ",", "byte", "fillingChar", ")", "throws", "IOException", "{", "assert", "this", ".", "language", "!=", "null", ";", "// Be sure that the encoding will be the right one", "int", "strSize"...
Write a string inside the current <var>stream</var>. Each character of the string will be written as bytes. No terminal null character is written. The string area will be filled with the given byte. @param str is the string to write @param size if the max size of the string to write. If <var>str</var> is longer than, ...
[ "Write", "a", "string", "inside", "the", "current", "<var", ">", "stream<", "/", "var", ">", ".", "Each", "character", "of", "the", "string", "will", "be", "written", "as", "bytes", ".", "No", "terminal", "null", "character", "is", "written", ".", "The",...
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileWriter.java#L184-L205
aspectran/aspectran
core/src/main/java/com/aspectran/core/activity/CoreActivity.java
CoreActivity.newTranslet
private void newTranslet(MethodType requestMethod, String requestName, TransletRule transletRule, Translet parentTranslet) { """ Create a new {@code CoreTranslet} instance. @param requestMethod the request method @param requestName the request name @param transletRule the translet...
java
private void newTranslet(MethodType requestMethod, String requestName, TransletRule transletRule, Translet parentTranslet) { translet = new CoreTranslet(transletRule, this); translet.setRequestName(requestName); translet.setRequestMethod(requestMethod); if (p...
[ "private", "void", "newTranslet", "(", "MethodType", "requestMethod", ",", "String", "requestName", ",", "TransletRule", "transletRule", ",", "Translet", "parentTranslet", ")", "{", "translet", "=", "new", "CoreTranslet", "(", "transletRule", ",", "this", ")", ";"...
Create a new {@code CoreTranslet} instance. @param requestMethod the request method @param requestName the request name @param transletRule the translet rule @param parentTranslet the process result that was created earlier
[ "Create", "a", "new", "{", "@code", "CoreTranslet", "}", "instance", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/activity/CoreActivity.java#L622-L630
gsi-upm/Shanks
shanks-core/src/main/java/es/upm/dit/gsi/shanks/agent/capability/reasoning/bayes/smile/ShanksAgentBayesianReasoningCapability.java
ShanksAgentBayesianReasoningCapability.clearEvidence
public static void clearEvidence(Network bn, int node) { """ Clear a hard evidence fixed in a given node @param bn @param node """ if (bn.isEvidence(node)) { bn.clearEvidence(node); bn.updateBeliefs(); } }
java
public static void clearEvidence(Network bn, int node) { if (bn.isEvidence(node)) { bn.clearEvidence(node); bn.updateBeliefs(); } }
[ "public", "static", "void", "clearEvidence", "(", "Network", "bn", ",", "int", "node", ")", "{", "if", "(", "bn", ".", "isEvidence", "(", "node", ")", ")", "{", "bn", ".", "clearEvidence", "(", "node", ")", ";", "bn", ".", "updateBeliefs", "(", ")", ...
Clear a hard evidence fixed in a given node @param bn @param node
[ "Clear", "a", "hard", "evidence", "fixed", "in", "a", "given", "node" ]
train
https://github.com/gsi-upm/Shanks/blob/35d87a81c22731f4f83bbd0571c9c6d466bd16be/shanks-core/src/main/java/es/upm/dit/gsi/shanks/agent/capability/reasoning/bayes/smile/ShanksAgentBayesianReasoningCapability.java#L330-L335
eclipse/xtext-core
org.eclipse.xtext/xtend-gen/org/eclipse/xtext/generator/trace/node/GeneratorNodeExtensions.java
GeneratorNodeExtensions.appendNewLine
public CompositeGeneratorNode appendNewLine(final CompositeGeneratorNode parent, final String lineSeparator) { """ Appends a line separator node to the given parent. @return the given parent node """ List<IGeneratorNode> _children = parent.getChildren(); NewLineNode _newLineNode = new NewLineNode(li...
java
public CompositeGeneratorNode appendNewLine(final CompositeGeneratorNode parent, final String lineSeparator) { List<IGeneratorNode> _children = parent.getChildren(); NewLineNode _newLineNode = new NewLineNode(lineSeparator, false); _children.add(_newLineNode); return parent; }
[ "public", "CompositeGeneratorNode", "appendNewLine", "(", "final", "CompositeGeneratorNode", "parent", ",", "final", "String", "lineSeparator", ")", "{", "List", "<", "IGeneratorNode", ">", "_children", "=", "parent", ".", "getChildren", "(", ")", ";", "NewLineNode"...
Appends a line separator node to the given parent. @return the given parent node
[ "Appends", "a", "line", "separator", "node", "to", "the", "given", "parent", "." ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/xtend-gen/org/eclipse/xtext/generator/trace/node/GeneratorNodeExtensions.java#L109-L114
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/compiler/JBBPCompilerUtils.java
JBBPCompilerUtils.assertFieldIsNotArrayOrInArray
public static void assertFieldIsNotArrayOrInArray(final JBBPNamedFieldInfo fieldToCheck, final List<JBBPNamedFieldInfo> namedFieldList, final byte[] compiledScript) { """ Check a field in a compiled list defined by its named field info, that the field is not an array and it is not inside a structure array. @par...
java
public static void assertFieldIsNotArrayOrInArray(final JBBPNamedFieldInfo fieldToCheck, final List<JBBPNamedFieldInfo> namedFieldList, final byte[] compiledScript) { // check that the field is not array if ((compiledScript[fieldToCheck.getFieldOffsetInCompiledBlock()] & FLAG_ARRAY) != 0) { throw new JBBP...
[ "public", "static", "void", "assertFieldIsNotArrayOrInArray", "(", "final", "JBBPNamedFieldInfo", "fieldToCheck", ",", "final", "List", "<", "JBBPNamedFieldInfo", ">", "namedFieldList", ",", "final", "byte", "[", "]", "compiledScript", ")", "{", "// check that the field...
Check a field in a compiled list defined by its named field info, that the field is not an array and it is not inside a structure array. @param fieldToCheck a named field info to be checked, must not be null @param namedFieldList a named field info list, must not be null. @param compiledScript a compiled script body
[ "Check", "a", "field", "in", "a", "compiled", "list", "defined", "by", "its", "named", "field", "info", "that", "the", "field", "is", "not", "an", "array", "and", "it", "is", "not", "inside", "a", "structure", "array", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/compiler/JBBPCompilerUtils.java#L82-L103
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/Calc.java
Calc.calcRotationAngleInDegrees
public static double calcRotationAngleInDegrees(Atom centerPt, Atom targetPt) { """ Calculates the angle from centerPt to targetPt in degrees. The return should range from [0,360), rotating CLOCKWISE, 0 and 360 degrees represents NORTH, 90 degrees represents EAST, etc... Assumes all points are in the same coo...
java
public static double calcRotationAngleInDegrees(Atom centerPt, Atom targetPt) { // calculate the angle theta from the deltaY and deltaX values // (atan2 returns radians values from [-PI,PI]) // 0 currently points EAST. // NOTE: By preserving Y and X param order to atan2, we are expecting // a CLOCKWISE angle...
[ "public", "static", "double", "calcRotationAngleInDegrees", "(", "Atom", "centerPt", ",", "Atom", "targetPt", ")", "{", "// calculate the angle theta from the deltaY and deltaX values", "// (atan2 returns radians values from [-PI,PI])", "// 0 currently points EAST.", "// NOTE: By prese...
Calculates the angle from centerPt to targetPt in degrees. The return should range from [0,360), rotating CLOCKWISE, 0 and 360 degrees represents NORTH, 90 degrees represents EAST, etc... Assumes all points are in the same coordinate space. If they are not, you will need to call SwingUtilities.convertPointToScreen or ...
[ "Calculates", "the", "angle", "from", "centerPt", "to", "targetPt", "in", "degrees", ".", "The", "return", "should", "range", "from", "[", "0", "360", ")", "rotating", "CLOCKWISE", "0", "and", "360", "degrees", "represents", "NORTH", "90", "degrees", "repres...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/Calc.java#L1125-L1153
eserating/siren4j
src/main/java/com/google/code/siren4j/util/ReflectionUtils.java
ReflectionUtils.setFieldValue
public static void setFieldValue(Object obj, ReflectedInfo info, Object value) throws Siren4JException { """ Sets the fields value, first by attempting to call the setter method if it exists and then falling back to setting the field directly. @param obj the object instance to set the value on, cannot be <code...
java
public static void setFieldValue(Object obj, ReflectedInfo info, Object value) throws Siren4JException { if (obj == null) { throw new IllegalArgumentException("obj cannot be null"); } if (info == null) { throw new IllegalArgumentException("info cannot be null"); ...
[ "public", "static", "void", "setFieldValue", "(", "Object", "obj", ",", "ReflectedInfo", "info", ",", "Object", "value", ")", "throws", "Siren4JException", "{", "if", "(", "obj", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"obj c...
Sets the fields value, first by attempting to call the setter method if it exists and then falling back to setting the field directly. @param obj the object instance to set the value on, cannot be <code>null</code>. @param info the fields reflected info object, cannot be <code>null</code>. @param value the value to se...
[ "Sets", "the", "fields", "value", "first", "by", "attempting", "to", "call", "the", "setter", "method", "if", "it", "exists", "and", "then", "falling", "back", "to", "setting", "the", "field", "directly", "." ]
train
https://github.com/eserating/siren4j/blob/f12e3185076ad920352ec4f6eb2a071a3683505f/src/main/java/com/google/code/siren4j/util/ReflectionUtils.java#L529-L553
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/AbstractPrintQuery.java
AbstractPrintQuery.getMsgPhrase
public String getMsgPhrase(final UUID _msgPhrase) throws EFapsException { """ Get the String representation of a phrase. @param _msgPhrase the msg phrase @return String representation of the phrase @throws EFapsException on error """ return getMsgPhrase(null, MsgPhrase.get(_msgPhrase)); ...
java
public String getMsgPhrase(final UUID _msgPhrase) throws EFapsException { return getMsgPhrase(null, MsgPhrase.get(_msgPhrase)); }
[ "public", "String", "getMsgPhrase", "(", "final", "UUID", "_msgPhrase", ")", "throws", "EFapsException", "{", "return", "getMsgPhrase", "(", "null", ",", "MsgPhrase", ".", "get", "(", "_msgPhrase", ")", ")", ";", "}" ]
Get the String representation of a phrase. @param _msgPhrase the msg phrase @return String representation of the phrase @throws EFapsException on error
[ "Get", "the", "String", "representation", "of", "a", "phrase", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/AbstractPrintQuery.java#L577-L581
GCRC/nunaliit
nunaliit2-jdbc/src/main/java/ca/carleton/gcrc/jdbc/JdbcUtils.java
JdbcUtils.extractStringResult
static public String extractStringResult(ResultSet rs, ResultSetMetaData rsmd, int index) throws Exception { """ This method returns a String result at a given index. @param stmt Statement that has been successfully executed @param index Index of expected column @return A string returned at the specified index ...
java
static public String extractStringResult(ResultSet rs, ResultSetMetaData rsmd, int index) throws Exception { int count = rsmd.getColumnCount(); if( index > count || index < 1 ) { throw new Exception("Invalid index"); } int type = rsmd.getColumnType(index); switch (type) { case java.sql.Types.VARCHAR...
[ "static", "public", "String", "extractStringResult", "(", "ResultSet", "rs", ",", "ResultSetMetaData", "rsmd", ",", "int", "index", ")", "throws", "Exception", "{", "int", "count", "=", "rsmd", ".", "getColumnCount", "(", ")", ";", "if", "(", "index", ">", ...
This method returns a String result at a given index. @param stmt Statement that has been successfully executed @param index Index of expected column @return A string returned at the specified index @throws Exception If there is no column at index
[ "This", "method", "returns", "a", "String", "result", "at", "a", "given", "index", "." ]
train
https://github.com/GCRC/nunaliit/blob/0b4abfc64eef2eb8b94f852ce697de2e851d8e67/nunaliit2-jdbc/src/main/java/ca/carleton/gcrc/jdbc/JdbcUtils.java#L106-L121
apache/flink
flink-core/src/main/java/org/apache/flink/core/io/SimpleVersionedSerialization.java
SimpleVersionedSerialization.readVersionAndDeSerialize
public static <T> T readVersionAndDeSerialize(SimpleVersionedSerializer<T> serializer, byte[] bytes) throws IOException { """ Deserializes the version and datum from a byte array. The first four bytes will be read as the version, in <i>big-endian</i> encoding. The remaining bytes will be passed to the serializer ...
java
public static <T> T readVersionAndDeSerialize(SimpleVersionedSerializer<T> serializer, byte[] bytes) throws IOException { checkNotNull(serializer, "serializer"); checkNotNull(bytes, "bytes"); checkArgument(bytes.length >= 4, "byte array below minimum length (4 bytes)"); final byte[] dataOnly = Arrays.copyOfRan...
[ "public", "static", "<", "T", ">", "T", "readVersionAndDeSerialize", "(", "SimpleVersionedSerializer", "<", "T", ">", "serializer", ",", "byte", "[", "]", "bytes", ")", "throws", "IOException", "{", "checkNotNull", "(", "serializer", ",", "\"serializer\"", ")", ...
Deserializes the version and datum from a byte array. The first four bytes will be read as the version, in <i>big-endian</i> encoding. The remaining bytes will be passed to the serializer for deserialization, via {@link SimpleVersionedSerializer#deserialize(int, byte[])}. @param serializer The serializer to deserializ...
[ "Deserializes", "the", "version", "and", "datum", "from", "a", "byte", "array", ".", "The", "first", "four", "bytes", "will", "be", "read", "as", "the", "version", "in", "<i", ">", "big", "-", "endian<", "/", "i", ">", "encoding", ".", "The", "remainin...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/io/SimpleVersionedSerialization.java#L146-L170
httl/httl
httl/src/main/java/httl/Engine.java
Engine.getTemplate
public Template getTemplate(String name, Locale locale, Object args) throws IOException, ParseException { """ Get template. @param name - template name @param locale - template locale @return template instance @throws IOException - If an I/O error occurs @throws ParseException - If the template cannot ...
java
public Template getTemplate(String name, Locale locale, Object args) throws IOException, ParseException { if (args instanceof String) return getTemplate(name, locale, (String) args); return getTemplate(name, locale, null, args); }
[ "public", "Template", "getTemplate", "(", "String", "name", ",", "Locale", "locale", ",", "Object", "args", ")", "throws", "IOException", ",", "ParseException", "{", "if", "(", "args", "instanceof", "String", ")", "return", "getTemplate", "(", "name", ",", "...
Get template. @param name - template name @param locale - template locale @return template instance @throws IOException - If an I/O error occurs @throws ParseException - If the template cannot be parsed @see #getEngine()
[ "Get", "template", "." ]
train
https://github.com/httl/httl/blob/e13e00f4ab41252a8f53d6dafd4a6610be9dcaad/httl/src/main/java/httl/Engine.java#L416-L420
unic/neba
core/src/main/java/io/neba/core/resourcemodels/mapping/FieldValueMappingCallback.java
FieldValueMappingCallback.postProcessResolvedValue
private Object postProcessResolvedValue(FieldData fieldData, Object value) { """ Implements the NEBA contracts for fields, for instance guarantees that collection-typed fields are never <code>null</code>. Applies {@link AnnotatedFieldMapper custom field mappers}. @param fieldData must not be <code>null</code>....
java
private Object postProcessResolvedValue(FieldData fieldData, Object value) { // For convenience, NEBA guarantees that any mappable collection-typed field is never <code>null</code> but rather // an empty collection, in case no non-<code>null</code> default value was provided and the field is not Lazy. ...
[ "private", "Object", "postProcessResolvedValue", "(", "FieldData", "fieldData", ",", "Object", "value", ")", "{", "// For convenience, NEBA guarantees that any mappable collection-typed field is never <code>null</code> but rather", "// an empty collection, in case no non-<code>null</code> de...
Implements the NEBA contracts for fields, for instance guarantees that collection-typed fields are never <code>null</code>. Applies {@link AnnotatedFieldMapper custom field mappers}. @param fieldData must not be <code>null</code>. @param value can be <code>null</code>. @return the post-processed value, can be <cod...
[ "Implements", "the", "NEBA", "contracts", "for", "fields", "for", "instance", "guarantees", "that", "collection", "-", "typed", "fields", "are", "never", "<code", ">", "null<", "/", "code", ">", ".", "Applies", "{", "@link", "AnnotatedFieldMapper", "custom", "...
train
https://github.com/unic/neba/blob/4d762e60112a1fcb850926a56a9843d5aa424c4b/core/src/main/java/io/neba/core/resourcemodels/mapping/FieldValueMappingCallback.java#L154-L170
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/jboss/logging/Logger.java
Logger.warnv
public void warnv(String format, Object... params) { """ Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. @param format the message format string @param params the parameters """ doLog(Level.WARN, FQCN, format, params, null); }
java
public void warnv(String format, Object... params) { doLog(Level.WARN, FQCN, format, params, null); }
[ "public", "void", "warnv", "(", "String", "format", ",", "Object", "...", "params", ")", "{", "doLog", "(", "Level", ".", "WARN", ",", "FQCN", ",", "format", ",", "params", ",", "null", ")", ";", "}" ]
Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting. @param format the message format string @param params the parameters
[ "Issue", "a", "log", "message", "with", "a", "level", "of", "WARN", "using", "{", "@link", "java", ".", "text", ".", "MessageFormat", "}", "-", "style", "formatting", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/jboss/logging/Logger.java#L1293-L1295
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/style/ColorUtils.java
ColorUtils.toColorShorthand
public static String toColorShorthand(String red, String green, String blue) { """ Convert the hex color values to a hex color, shorthanded when possible @param red red hex color in format RR or R @param green green hex color in format GG or G @param blue blue hex color in format BB or B @return hex col...
java
public static String toColorShorthand(String red, String green, String blue) { return shorthandHex(toColor(red, green, blue)); }
[ "public", "static", "String", "toColorShorthand", "(", "String", "red", ",", "String", "green", ",", "String", "blue", ")", "{", "return", "shorthandHex", "(", "toColor", "(", "red", ",", "green", ",", "blue", ")", ")", ";", "}" ]
Convert the hex color values to a hex color, shorthanded when possible @param red red hex color in format RR or R @param green green hex color in format GG or G @param blue blue hex color in format BB or B @return hex color in format #RGB or #RRGGBB
[ "Convert", "the", "hex", "color", "values", "to", "a", "hex", "color", "shorthanded", "when", "possible" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/style/ColorUtils.java#L56-L58
UrielCh/ovh-java-sdk
ovh-java-sdk-support/src/main/java/net/minidev/ovh/api/ApiOvhSupport.java
ApiOvhSupport.tickets_GET
public ArrayList<Long> tickets_GET(Boolean archived, OvhTicketCategoryEnum category, Date maxCreationDate, Date minCreationDate, OvhTicketProductEnum product, String serviceName, OvhTicketStatusEnum status, String subject, String ticketNumber) throws IOException { """ List support tickets identifiers for this serv...
java
public ArrayList<Long> tickets_GET(Boolean archived, OvhTicketCategoryEnum category, Date maxCreationDate, Date minCreationDate, OvhTicketProductEnum product, String serviceName, OvhTicketStatusEnum status, String subject, String ticketNumber) throws IOException { String qPath = "/support/tickets"; StringBuilder sb...
[ "public", "ArrayList", "<", "Long", ">", "tickets_GET", "(", "Boolean", "archived", ",", "OvhTicketCategoryEnum", "category", ",", "Date", "maxCreationDate", ",", "Date", "minCreationDate", ",", "OvhTicketProductEnum", "product", ",", "String", "serviceName", ",", "...
List support tickets identifiers for this service REST: GET /support/tickets @param serviceName [required] Ticket message service name @param subject [required] Search by ticket subject @param maxCreationDate [required] Maximum creation date @param status [required] Status of ticket @param product [required] Search by...
[ "List", "support", "tickets", "identifiers", "for", "this", "service" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-support/src/main/java/net/minidev/ovh/api/ApiOvhSupport.java#L142-L156
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerCommunicationLinksInner.java
ServerCommunicationLinksInner.createOrUpdateAsync
public Observable<ServerCommunicationLinkInner> createOrUpdateAsync(String resourceGroupName, String serverName, String communicationLinkName, String partnerServer) { """ Creates a server communication link. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this ...
java
public Observable<ServerCommunicationLinkInner> createOrUpdateAsync(String resourceGroupName, String serverName, String communicationLinkName, String partnerServer) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, communicationLinkName, partnerServer).map(new Func1<ServiceResponse<...
[ "public", "Observable", "<", "ServerCommunicationLinkInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "communicationLinkName", ",", "String", "partnerServer", ")", "{", "return", "createOrUpdateWithServiceRe...
Creates a server communication link. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param communicationLinkName The name of the server communication link. @param ...
[ "Creates", "a", "server", "communication", "link", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerCommunicationLinksInner.java#L306-L313
strator-dev/greenpepper
greenpepper-open/extensions-external/php/src/main/java/com/greenpepper/phpsud/compiler/CompilerWrapper.java
CompilerWrapper.addField
public void addField(String fieldName, Class<?> fildType, boolean isPublic, boolean isStatic, boolean isFinal) throws CannotCompileException, NotFoundException { """ <p>addField.</p> @param fieldName a {@link java.lang.String} object. @param fildType a {@link java.lang.Class} object. @param isPublic a boolean...
java
public void addField(String fieldName, Class<?> fildType, boolean isPublic, boolean isStatic, boolean isFinal) throws CannotCompileException, NotFoundException { addField(fieldName, fildType, isPublic, isStatic, isFinal, null); }
[ "public", "void", "addField", "(", "String", "fieldName", ",", "Class", "<", "?", ">", "fildType", ",", "boolean", "isPublic", ",", "boolean", "isStatic", ",", "boolean", "isFinal", ")", "throws", "CannotCompileException", ",", "NotFoundException", "{", "addFiel...
<p>addField.</p> @param fieldName a {@link java.lang.String} object. @param fildType a {@link java.lang.Class} object. @param isPublic a boolean. @param isStatic a boolean. @param isFinal a boolean. @throws javassist.CannotCompileException if any. @throws javassist.NotFoundException if any.
[ "<p", ">", "addField", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper-open/extensions-external/php/src/main/java/com/greenpepper/phpsud/compiler/CompilerWrapper.java#L128-L130
grandstaish/paperparcel
paperparcel-compiler/src/main/java/paperparcel/Utils.java
Utils.getClassArg
static TypeMirror getClassArg(Elements elements, Types types, DeclaredType classType) { """ Returns the {@link TypeMirror} argument found in a given {@link Class} type. """ TypeElement classElement = elements.getTypeElement(Class.class.getName()); TypeParameterElement param = classElement.getTypeParame...
java
static TypeMirror getClassArg(Elements elements, Types types, DeclaredType classType) { TypeElement classElement = elements.getTypeElement(Class.class.getName()); TypeParameterElement param = classElement.getTypeParameters().get(0); return paramAsMemberOf(types, classType, param); }
[ "static", "TypeMirror", "getClassArg", "(", "Elements", "elements", ",", "Types", "types", ",", "DeclaredType", "classType", ")", "{", "TypeElement", "classElement", "=", "elements", ".", "getTypeElement", "(", "Class", ".", "class", ".", "getName", "(", ")", ...
Returns the {@link TypeMirror} argument found in a given {@link Class} type.
[ "Returns", "the", "{" ]
train
https://github.com/grandstaish/paperparcel/blob/917686ced81b335b6708d81d6cc0e3e496f7280d/paperparcel-compiler/src/main/java/paperparcel/Utils.java#L248-L252
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_LongestLine.java
ST_LongestLine.longestLine
public static Geometry longestLine(Geometry geomA, Geometry geomB) { """ Return the longest line between the points of two geometries. @param geomA @param geomB @return """ Coordinate[] coords = new MaxDistanceOp(geomA, geomB).getCoordinatesDistance(); if(coords!=null){ return ge...
java
public static Geometry longestLine(Geometry geomA, Geometry geomB) { Coordinate[] coords = new MaxDistanceOp(geomA, geomB).getCoordinatesDistance(); if(coords!=null){ return geomA.getFactory().createLineString(coords); } return null; }
[ "public", "static", "Geometry", "longestLine", "(", "Geometry", "geomA", ",", "Geometry", "geomB", ")", "{", "Coordinate", "[", "]", "coords", "=", "new", "MaxDistanceOp", "(", "geomA", ",", "geomB", ")", ".", "getCoordinatesDistance", "(", ")", ";", "if", ...
Return the longest line between the points of two geometries. @param geomA @param geomB @return
[ "Return", "the", "longest", "line", "between", "the", "points", "of", "two", "geometries", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_LongestLine.java#L50-L56
Patreon/patreon-java
src/main/java/com/patreon/PatreonAPI.java
PatreonAPI.fetchPageOfPledges
public JSONAPIDocument<List<Pledge>> fetchPageOfPledges(String campaignId, int pageSize, String pageCursor) throws IOException { """ Retrieve pledges for the specified campaign @param campaignId id for campaign to retrieve @param pageSize how many pledges to return @param pageCursor A cursor retreived from ...
java
public JSONAPIDocument<List<Pledge>> fetchPageOfPledges(String campaignId, int pageSize, String pageCursor) throws IOException { return fetchPageOfPledges(campaignId, pageSize, pageCursor, null); }
[ "public", "JSONAPIDocument", "<", "List", "<", "Pledge", ">", ">", "fetchPageOfPledges", "(", "String", "campaignId", ",", "int", "pageSize", ",", "String", "pageCursor", ")", "throws", "IOException", "{", "return", "fetchPageOfPledges", "(", "campaignId", ",", ...
Retrieve pledges for the specified campaign @param campaignId id for campaign to retrieve @param pageSize how many pledges to return @param pageCursor A cursor retreived from a previous API call, or null for the initial page. See {@link #getNextCursorFromDocument(JSONAPIDocument)} @return the page of pledges @throws...
[ "Retrieve", "pledges", "for", "the", "specified", "campaign" ]
train
https://github.com/Patreon/patreon-java/blob/669104b3389f19635ffab75c593db9c022334092/src/main/java/com/patreon/PatreonAPI.java#L128-L130
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/util/Utils.java
Utils.escapeString
public static String escapeString(String value, boolean noBackslashEscapes) { """ Escape String. @param value value to escape @param noBackslashEscapes must backslash be escaped @return escaped string. """ if (!value.contains("'")) { if (noBackslashEscapes) { return value; ...
java
public static String escapeString(String value, boolean noBackslashEscapes) { if (!value.contains("'")) { if (noBackslashEscapes) { return value; } if (!value.contains("\\")) { return value; } } String escaped = value.replace("'", "''"); if (noBackslashEscapes) { ...
[ "public", "static", "String", "escapeString", "(", "String", "value", ",", "boolean", "noBackslashEscapes", ")", "{", "if", "(", "!", "value", ".", "contains", "(", "\"'\"", ")", ")", "{", "if", "(", "noBackslashEscapes", ")", "{", "return", "value", ";", ...
Escape String. @param value value to escape @param noBackslashEscapes must backslash be escaped @return escaped string.
[ "Escape", "String", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/util/Utils.java#L149-L163
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.unset_request
private base_response unset_request(nitro_service service, options option, String args[]) throws Exception { """ Use this method to perform an Unset operation on netscaler resource. @param service nitro_service object. @param option options class object. @param args string. @return status of the operation per...
java
private base_response unset_request(nitro_service service, options option, String args[]) throws Exception { String sessionid = service.get_sessionid(); String request = unset_string(service, sessionid, option, args); return post_data(service,request); }
[ "private", "base_response", "unset_request", "(", "nitro_service", "service", ",", "options", "option", ",", "String", "args", "[", "]", ")", "throws", "Exception", "{", "String", "sessionid", "=", "service", ".", "get_sessionid", "(", ")", ";", "String", "req...
Use this method to perform an Unset operation on netscaler resource. @param service nitro_service object. @param option options class object. @param args string. @return status of the operation performed. @throws Exception
[ "Use", "this", "method", "to", "perform", "an", "Unset", "operation", "on", "netscaler", "resource", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L139-L144
google/closure-compiler
src/com/google/javascript/jscomp/ProcessClosureProvidesAndRequires.java
ProcessClosureProvidesAndRequires.registerAnyProvidedPrefixes
private void registerAnyProvidedPrefixes(String ns, Node node, JSModule module) { """ Registers ProvidedNames for prefix namespaces if they haven't already been defined. The prefix namespaces must be registered in order from shortest to longest. @param ns The namespace whose prefixes may need to be provided. ...
java
private void registerAnyProvidedPrefixes(String ns, Node node, JSModule module) { int pos = ns.indexOf('.'); while (pos != -1) { String prefixNs = ns.substring(0, pos); pos = ns.indexOf('.', pos + 1); if (providedNames.containsKey(prefixNs)) { providedNames.get(prefixNs).addProvide(nod...
[ "private", "void", "registerAnyProvidedPrefixes", "(", "String", "ns", ",", "Node", "node", ",", "JSModule", "module", ")", "{", "int", "pos", "=", "ns", ".", "indexOf", "(", "'", "'", ")", ";", "while", "(", "pos", "!=", "-", "1", ")", "{", "String"...
Registers ProvidedNames for prefix namespaces if they haven't already been defined. The prefix namespaces must be registered in order from shortest to longest. @param ns The namespace whose prefixes may need to be provided. @param node The EXPR of the provide call. @param module The current module.
[ "Registers", "ProvidedNames", "for", "prefix", "namespaces", "if", "they", "haven", "t", "already", "been", "defined", ".", "The", "prefix", "namespaces", "must", "be", "registered", "in", "order", "from", "shortest", "to", "longest", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/ProcessClosureProvidesAndRequires.java#L587-L601
nohana/Amalgam
amalgam/src/main/java/com/amalgam/widget/ToastUtils.java
ToastUtils.showOnUiThread
public static void showOnUiThread(final Context applicationContext, final String message, final int duration, Handler handler) { """ Show toast on the UI thread. @param applicationContext the application context. @param message the message to show. @param duration the display duration. @param handler the main ...
java
public static void showOnUiThread(final Context applicationContext, final String message, final int duration, Handler handler) { handler.post(new Runnable() { @Override public void run() { Toast.makeText(applicationContext, message, duration).show(); } ...
[ "public", "static", "void", "showOnUiThread", "(", "final", "Context", "applicationContext", ",", "final", "String", "message", ",", "final", "int", "duration", ",", "Handler", "handler", ")", "{", "handler", ".", "post", "(", "new", "Runnable", "(", ")", "{...
Show toast on the UI thread. @param applicationContext the application context. @param message the message to show. @param duration the display duration. @param handler the main handler.
[ "Show", "toast", "on", "the", "UI", "thread", "." ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/widget/ToastUtils.java#L73-L80
Appendium/objectlabkit
utils/src/main/java/net/objectlab/kit/util/BigDecimalUtil.java
BigDecimalUtil.doAdd
private static BigDecimal doAdd(final BigDecimal v1, final BigDecimal v2) { """ Add 2 BigDecimal safely (i.e. handles nulls as zeros) @param v1 the nullable BigDecimal @param v2 the nullable BigDecimal @return the sum of the 2 BigDecimal """ BigDecimal total = v1; if (v1 != null && v2 != n...
java
private static BigDecimal doAdd(final BigDecimal v1, final BigDecimal v2) { BigDecimal total = v1; if (v1 != null && v2 != null) { total = v1.add(v2); } else if (v2 != null) { total = v2; } return total; }
[ "private", "static", "BigDecimal", "doAdd", "(", "final", "BigDecimal", "v1", ",", "final", "BigDecimal", "v2", ")", "{", "BigDecimal", "total", "=", "v1", ";", "if", "(", "v1", "!=", "null", "&&", "v2", "!=", "null", ")", "{", "total", "=", "v1", "....
Add 2 BigDecimal safely (i.e. handles nulls as zeros) @param v1 the nullable BigDecimal @param v2 the nullable BigDecimal @return the sum of the 2 BigDecimal
[ "Add", "2", "BigDecimal", "safely", "(", "i", ".", "e", ".", "handles", "nulls", "as", "zeros", ")" ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/utils/src/main/java/net/objectlab/kit/util/BigDecimalUtil.java#L179-L187
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
SqlValidatorImpl.setValidatedNodeType
@SuppressWarnings("deprecation") public final void setValidatedNodeType(SqlNode node, RelDataType type) { """ Saves the type of a {@link SqlNode}, now that it has been validated. <p>Unlike the base class method, this method is not deprecated. It is available from within Calcite, but is not part of the public ...
java
@SuppressWarnings("deprecation") public final void setValidatedNodeType(SqlNode node, RelDataType type) { Objects.requireNonNull(type); Objects.requireNonNull(node); if (type.equals(unknownType)) { // don't set anything until we know what it is, and don't overwrite // a known type with the unknown type ...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "public", "final", "void", "setValidatedNodeType", "(", "SqlNode", "node", ",", "RelDataType", "type", ")", "{", "Objects", ".", "requireNonNull", "(", "type", ")", ";", "Objects", ".", "requireNonNull", "(",...
Saves the type of a {@link SqlNode}, now that it has been validated. <p>Unlike the base class method, this method is not deprecated. It is available from within Calcite, but is not part of the public API. @param node A SQL parse tree node, never null @param type Its type; must not be null
[ "Saves", "the", "type", "of", "a", "{", "@link", "SqlNode", "}", "now", "that", "it", "has", "been", "validated", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L1598-L1608
liferay/com-liferay-commerce
commerce-shipping-engine-fixed-service/src/main/java/com/liferay/commerce/shipping/engine/fixed/service/persistence/impl/CommerceShippingFixedOptionRelPersistenceImpl.java
CommerceShippingFixedOptionRelPersistenceImpl.findAll
@Override public List<CommerceShippingFixedOptionRel> findAll() { """ Returns all the commerce shipping fixed option rels. @return the commerce shipping fixed option rels """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceShippingFixedOptionRel> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceShippingFixedOptionRel", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce shipping fixed option rels. @return the commerce shipping fixed option rels
[ "Returns", "all", "the", "commerce", "shipping", "fixed", "option", "rels", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-shipping-engine-fixed-service/src/main/java/com/liferay/commerce/shipping/engine/fixed/service/persistence/impl/CommerceShippingFixedOptionRelPersistenceImpl.java#L1736-L1739
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java
XLogPDescriptor.getOxygenCount
private int getOxygenCount(IAtomContainer ac, IAtom atom) { """ Gets the oxygenCount attribute of the XLogPDescriptor object. @param ac Description of the Parameter @param atom Description of the Parameter @return The carbonsCount value """ List<IAtom> neighbours = ac.getConnectedAtoms...
java
private int getOxygenCount(IAtomContainer ac, IAtom atom) { List<IAtom> neighbours = ac.getConnectedAtomsList(atom); int ocounter = 0; for (IAtom neighbour : neighbours) { if (neighbour.getSymbol().equals("O")) { if (!neighbour.getFlag(CDKConstants.ISAROMATIC)) { ...
[ "private", "int", "getOxygenCount", "(", "IAtomContainer", "ac", ",", "IAtom", "atom", ")", "{", "List", "<", "IAtom", ">", "neighbours", "=", "ac", ".", "getConnectedAtomsList", "(", "atom", ")", ";", "int", "ocounter", "=", "0", ";", "for", "(", "IAtom...
Gets the oxygenCount attribute of the XLogPDescriptor object. @param ac Description of the Parameter @param atom Description of the Parameter @return The carbonsCount value
[ "Gets", "the", "oxygenCount", "attribute", "of", "the", "XLogPDescriptor", "object", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1112-L1123
hibernate/hibernate-ogm
neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/dialect/impl/BaseNeo4jAssociationQueries.java
BaseNeo4jAssociationQueries.removeAssociation
public void removeAssociation(GraphDatabaseService executionEngine, AssociationKey associationKey) { """ Removes the relationship(s) representing the given association. If the association refers to an embedded entity (collection), the referenced entities are removed as well. @param executionEngine the {@link G...
java
public void removeAssociation(GraphDatabaseService executionEngine, AssociationKey associationKey) { executionEngine.execute( removeAssociationQuery, params( associationKey.getEntityKey().getColumnValues() ) ); }
[ "public", "void", "removeAssociation", "(", "GraphDatabaseService", "executionEngine", ",", "AssociationKey", "associationKey", ")", "{", "executionEngine", ".", "execute", "(", "removeAssociationQuery", ",", "params", "(", "associationKey", ".", "getEntityKey", "(", ")...
Removes the relationship(s) representing the given association. If the association refers to an embedded entity (collection), the referenced entities are removed as well. @param executionEngine the {@link GraphDatabaseService} used to run the query @param associationKey represents the association
[ "Removes", "the", "relationship", "(", "s", ")", "representing", "the", "given", "association", ".", "If", "the", "association", "refers", "to", "an", "embedded", "entity", "(", "collection", ")", "the", "referenced", "entities", "are", "removed", "as", "well"...
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/dialect/impl/BaseNeo4jAssociationQueries.java#L229-L231
QSFT/Doradus
doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DDBTransaction.java
DDBTransaction.mapColumnValue
private AttributeValue mapColumnValue(String storeName, DColumn col) { """ Create the appropriate AttributeValue for the given column value type and length. """ AttributeValue attrValue = new AttributeValue(); if (!DBService.isSystemTable(storeName)) { if (col.getRawValue().length =...
java
private AttributeValue mapColumnValue(String storeName, DColumn col) { AttributeValue attrValue = new AttributeValue(); if (!DBService.isSystemTable(storeName)) { if (col.getRawValue().length == 0) { attrValue.setS(DynamoDBService.NULL_COLUMN_MARKER); } else { ...
[ "private", "AttributeValue", "mapColumnValue", "(", "String", "storeName", ",", "DColumn", "col", ")", "{", "AttributeValue", "attrValue", "=", "new", "AttributeValue", "(", ")", ";", "if", "(", "!", "DBService", ".", "isSystemTable", "(", "storeName", ")", ")...
Create the appropriate AttributeValue for the given column value type and length.
[ "Create", "the", "appropriate", "AttributeValue", "for", "the", "given", "column", "value", "type", "and", "length", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DDBTransaction.java#L120-L136
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/CmsGalleryControllerHandler.java
CmsGalleryControllerHandler.setGalleriesTabContent
public void setGalleriesTabContent(List<CmsGalleryFolderBean> galleryInfos, List<String> selectedGalleries) { """ Sets the list content of the galleries tab.<p> @param galleryInfos the gallery info beans @param selectedGalleries the selected galleries """ m_galleryDialog.getGalleriesTab().fillCont...
java
public void setGalleriesTabContent(List<CmsGalleryFolderBean> galleryInfos, List<String> selectedGalleries) { m_galleryDialog.getGalleriesTab().fillContent(galleryInfos, selectedGalleries); }
[ "public", "void", "setGalleriesTabContent", "(", "List", "<", "CmsGalleryFolderBean", ">", "galleryInfos", ",", "List", "<", "String", ">", "selectedGalleries", ")", "{", "m_galleryDialog", ".", "getGalleriesTab", "(", ")", ".", "fillContent", "(", "galleryInfos", ...
Sets the list content of the galleries tab.<p> @param galleryInfos the gallery info beans @param selectedGalleries the selected galleries
[ "Sets", "the", "list", "content", "of", "the", "galleries", "tab", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/CmsGalleryControllerHandler.java#L449-L452
google/closure-compiler
src/com/google/javascript/jscomp/DependencyOptions.java
DependencyOptions.pruneForEntryPoints
public static DependencyOptions pruneForEntryPoints(Iterable<ModuleIdentifier> entryPoints) { """ Returns a {@link DependencyOptions} using the {@link DependencyMode#PRUNE} mode with the given entry points. """ checkState( !Iterables.isEmpty(entryPoints), "DependencyMode.PRUNE requires at least on...
java
public static DependencyOptions pruneForEntryPoints(Iterable<ModuleIdentifier> entryPoints) { checkState( !Iterables.isEmpty(entryPoints), "DependencyMode.PRUNE requires at least one entry point"); return new AutoValue_DependencyOptions(DependencyMode.PRUNE, ImmutableList.copyOf(entryPoints)); }
[ "public", "static", "DependencyOptions", "pruneForEntryPoints", "(", "Iterable", "<", "ModuleIdentifier", ">", "entryPoints", ")", "{", "checkState", "(", "!", "Iterables", ".", "isEmpty", "(", "entryPoints", ")", ",", "\"DependencyMode.PRUNE requires at least one entry p...
Returns a {@link DependencyOptions} using the {@link DependencyMode#PRUNE} mode with the given entry points.
[ "Returns", "a", "{" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/DependencyOptions.java#L142-L146
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/util/ARCCreator.java
ARCCreator.directoryToArc
public void directoryToArc(File srcDir, File tgtDir, String prefix) throws IOException { """ Reads all component files (.meta, .body, .sh) in srcDir, and writes one or more ARC files in tgtDir with names beginning with prefix. @param srcDir @param tgtDir @param prefix @throws IOException """ File...
java
public void directoryToArc(File srcDir, File tgtDir, String prefix) throws IOException { File target[] = {tgtDir}; ARCWriter writer = new ARCWriter(new AtomicInteger(), getSettings(true,prefix,Arrays.asList(target))); File sources[] = srcDir.listFiles(); LOGGER.info("Found " + sources.length + " files...
[ "public", "void", "directoryToArc", "(", "File", "srcDir", ",", "File", "tgtDir", ",", "String", "prefix", ")", "throws", "IOException", "{", "File", "target", "[", "]", "=", "{", "tgtDir", "}", ";", "ARCWriter", "writer", "=", "new", "ARCWriter", "(", "...
Reads all component files (.meta, .body, .sh) in srcDir, and writes one or more ARC files in tgtDir with names beginning with prefix. @param srcDir @param tgtDir @param prefix @throws IOException
[ "Reads", "all", "component", "files", "(", ".", "meta", ".", "body", ".", "sh", ")", "in", "srcDir", "and", "writes", "one", "or", "more", "ARC", "files", "in", "tgtDir", "with", "names", "beginning", "with", "prefix", "." ]
train
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/util/ARCCreator.java#L99-L125
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/slider2/Slider2.java
Slider2.compareValues
protected boolean compareValues(Object previous, Object value) { """ <p> Return <code>true</code> if the new value is different from the previous value. First compare the two values by passing <em>value</em> to the <code>equals</code> method on argument <em>previous</em>. If that method returns <code>true</cod...
java
protected boolean compareValues(Object previous, Object value) { if (previous instanceof String && value instanceof Double) { previous = Double.valueOf((String) previous); } return super.compareValues(previous, value); }
[ "protected", "boolean", "compareValues", "(", "Object", "previous", ",", "Object", "value", ")", "{", "if", "(", "previous", "instanceof", "String", "&&", "value", "instanceof", "Double", ")", "{", "previous", "=", "Double", ".", "valueOf", "(", "(", "String...
<p> Return <code>true</code> if the new value is different from the previous value. First compare the two values by passing <em>value</em> to the <code>equals</code> method on argument <em>previous</em>. If that method returns <code>true</code>, return <code>true</code>. If that method returns <code>false</code>, and b...
[ "<p", ">", "Return", "<code", ">", "true<", "/", "code", ">", "if", "the", "new", "value", "is", "different", "from", "the", "previous", "value", ".", "First", "compare", "the", "two", "values", "by", "passing", "<em", ">", "value<", "/", "em", ">", ...
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/slider2/Slider2.java#L94-L99
gfk-ba/senbot
SenBotRunner/src/main/java/com/gfk/senbot/framework/context/SenBotContext.java
SenBotContext.getOrCreateFile
public static File getOrCreateFile(String url, boolean createIfNotFound) throws IOException { """ Get a File on the class path or file system or create it if it does not exist """ File file = null; if (url.contains(ResourceUtils.CLASSPATH_URL_PREFIX)) { url = url.replaceAll(Resourc...
java
public static File getOrCreateFile(String url, boolean createIfNotFound) throws IOException { File file = null; if (url.contains(ResourceUtils.CLASSPATH_URL_PREFIX)) { url = url.replaceAll(ResourceUtils.CLASSPATH_URL_PREFIX, ""); if (url.startsWith("/")) { url = u...
[ "public", "static", "File", "getOrCreateFile", "(", "String", "url", ",", "boolean", "createIfNotFound", ")", "throws", "IOException", "{", "File", "file", "=", "null", ";", "if", "(", "url", ".", "contains", "(", "ResourceUtils", ".", "CLASSPATH_URL_PREFIX", ...
Get a File on the class path or file system or create it if it does not exist
[ "Get", "a", "File", "on", "the", "class", "path", "or", "file", "system", "or", "create", "it", "if", "it", "does", "not", "exist" ]
train
https://github.com/gfk-ba/senbot/blob/e9a152aa67be48b1bb13a4691655caf6d873b553/SenBotRunner/src/main/java/com/gfk/senbot/framework/context/SenBotContext.java#L197-L217
samskivert/samskivert
src/main/java/com/samskivert/servlet/SiteIdentifiers.java
SiteIdentifiers.single
public static SiteIdentifier single (final int siteId, final String siteString) { """ Returns a site identifier that returns the specified site always. """ return new SiteIdentifier() { public int identifySite (HttpServletRequest req) { return siteId; } ...
java
public static SiteIdentifier single (final int siteId, final String siteString) { return new SiteIdentifier() { public int identifySite (HttpServletRequest req) { return siteId; } public String getSiteString (int siteId) { return siteString; ...
[ "public", "static", "SiteIdentifier", "single", "(", "final", "int", "siteId", ",", "final", "String", "siteString", ")", "{", "return", "new", "SiteIdentifier", "(", ")", "{", "public", "int", "identifySite", "(", "HttpServletRequest", "req", ")", "{", "retur...
Returns a site identifier that returns the specified site always.
[ "Returns", "a", "site", "identifier", "that", "returns", "the", "specified", "site", "always", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/servlet/SiteIdentifiers.java#L23-L38
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/ComparatorCompat.java
ComparatorCompat.comparing
@NotNull public static <T, U> ComparatorCompat<T> comparing( @NotNull final Function<? super T, ? extends U> keyExtractor, @NotNull final Comparator<? super U> keyComparator) { """ Returns a comparator that uses a function that extracts a sort key to be compared with the specified comp...
java
@NotNull public static <T, U> ComparatorCompat<T> comparing( @NotNull final Function<? super T, ? extends U> keyExtractor, @NotNull final Comparator<? super U> keyComparator) { Objects.requireNonNull(keyExtractor); Objects.requireNonNull(keyComparator); return new Com...
[ "@", "NotNull", "public", "static", "<", "T", ",", "U", ">", "ComparatorCompat", "<", "T", ">", "comparing", "(", "@", "NotNull", "final", "Function", "<", "?", "super", "T", ",", "?", "extends", "U", ">", "keyExtractor", ",", "@", "NotNull", "final", ...
Returns a comparator that uses a function that extracts a sort key to be compared with the specified comparator. @param <T> the type of the objects compared by the comparator @param <U> the type of the sort key @param keyExtractor the function that extracts the sort key @param keyComparator the comparator used to co...
[ "Returns", "a", "comparator", "that", "uses", "a", "function", "that", "extracts", "a", "sort", "key", "to", "be", "compared", "with", "the", "specified", "comparator", "." ]
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/ComparatorCompat.java#L111-L126
samskivert/pythagoras
src/main/java/pythagoras/d/Box.java
Box.intersectsZ
protected boolean intersectsZ (IRay3 ray, double z) { """ Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box at the plane where z equals the value specified. """ IVector3 origin = ray.origin(), dir = ray.direction(); double t = (z - origin.z()) / dir.z()...
java
protected boolean intersectsZ (IRay3 ray, double z) { IVector3 origin = ray.origin(), dir = ray.direction(); double t = (z - origin.z()) / dir.z(); if (t < 0f) { return false; } double ix = origin.x() + t*dir.x(), iy = origin.y() + t*dir.y(); return ix >= _min...
[ "protected", "boolean", "intersectsZ", "(", "IRay3", "ray", ",", "double", "z", ")", "{", "IVector3", "origin", "=", "ray", ".", "origin", "(", ")", ",", "dir", "=", "ray", ".", "direction", "(", ")", ";", "double", "t", "=", "(", "z", "-", "origin...
Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box at the plane where z equals the value specified.
[ "Helper", "method", "for", "{" ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/Box.java#L464-L473
Whiley/WhileyCompiler
src/main/java/wyc/io/WhileyFileParser.java
WhileyFileParser.parseLifetime
private Identifier parseLifetime(EnclosingScope scope, boolean terminated) { """ Parse a currently declared lifetime. @return the matched lifetime name """ Identifier id = parseOptionalLifetimeIdentifier(scope, terminated); if (id != null) { return id; } else { syntaxError("expecting lifetime id...
java
private Identifier parseLifetime(EnclosingScope scope, boolean terminated) { Identifier id = parseOptionalLifetimeIdentifier(scope, terminated); if (id != null) { return id; } else { syntaxError("expecting lifetime identifier", tokens.get(index)); } throw new RuntimeException("deadcode"); // dead-code ...
[ "private", "Identifier", "parseLifetime", "(", "EnclosingScope", "scope", ",", "boolean", "terminated", ")", "{", "Identifier", "id", "=", "parseOptionalLifetimeIdentifier", "(", "scope", ",", "terminated", ")", ";", "if", "(", "id", "!=", "null", ")", "{", "r...
Parse a currently declared lifetime. @return the matched lifetime name
[ "Parse", "a", "currently", "declared", "lifetime", "." ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L4107-L4115
lucee/Lucee
core/src/main/java/lucee/runtime/text/xml/XMLCaster.java
XMLCaster.toNode
@Deprecated public static Node toNode(Object o) throws PageException { """ casts a value to a XML Node @param doc XML Document @param o Object to cast @return XML Element Object @throws PageException @deprecated replaced with toRawNode """ if (o instanceof XMLStruct) return ((XMLStruct) o).toNode()...
java
@Deprecated public static Node toNode(Object o) throws PageException { if (o instanceof XMLStruct) return ((XMLStruct) o).toNode(); if (o instanceof Node) return (Node) o; throw new CasterException(o, "node"); }
[ "@", "Deprecated", "public", "static", "Node", "toNode", "(", "Object", "o", ")", "throws", "PageException", "{", "if", "(", "o", "instanceof", "XMLStruct", ")", "return", "(", "(", "XMLStruct", ")", "o", ")", ".", "toNode", "(", ")", ";", "if", "(", ...
casts a value to a XML Node @param doc XML Document @param o Object to cast @return XML Element Object @throws PageException @deprecated replaced with toRawNode
[ "casts", "a", "value", "to", "a", "XML", "Node" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java#L331-L336
Azure/autorest-clientruntime-for-java
client-runtime/src/main/java/com/microsoft/rest/interceptors/CustomHeadersInterceptor.java
CustomHeadersInterceptor.addHeaderMap
public CustomHeadersInterceptor addHeaderMap(Map<String, String> headers) { """ Add all headers in a header map. @param headers a map of headers. @return the interceptor instance itself. """ for (Map.Entry<String, String> header : headers.entrySet()) { this.headers.put(header.getKey(), ...
java
public CustomHeadersInterceptor addHeaderMap(Map<String, String> headers) { for (Map.Entry<String, String> header : headers.entrySet()) { this.headers.put(header.getKey(), Collections.singletonList(header.getValue())); } return this; }
[ "public", "CustomHeadersInterceptor", "addHeaderMap", "(", "Map", "<", "String", ",", "String", ">", "headers", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "header", ":", "headers", ".", "entrySet", "(", ")", ")", "{", ...
Add all headers in a header map. @param headers a map of headers. @return the interceptor instance itself.
[ "Add", "all", "headers", "in", "a", "header", "map", "." ]
train
https://github.com/Azure/autorest-clientruntime-for-java/blob/04621e07dbb0456dd5459dd641f06a9fd4f3abad/client-runtime/src/main/java/com/microsoft/rest/interceptors/CustomHeadersInterceptor.java#L103-L108
paoding-code/paoding-rose
paoding-rose-web/src/main/java/net/paoding/rose/web/impl/thread/ModuleEngine.java
ModuleEngine.cleanupMultipart
protected void cleanupMultipart(Invocation inv) { """ Clean up any resources used by the given multipart request (if any). @see MultipartResolver#cleanupMultipart """ HttpServletRequest src = inv.getRequest(); while (src != null && !(src instanceof MultipartHttpServletRequest) ...
java
protected void cleanupMultipart(Invocation inv) { HttpServletRequest src = inv.getRequest(); while (src != null && !(src instanceof MultipartHttpServletRequest) && src instanceof HttpServletRequestWrapper) { src = (HttpServletRequest) ((HttpServletRequestWrapper) src).getRequ...
[ "protected", "void", "cleanupMultipart", "(", "Invocation", "inv", ")", "{", "HttpServletRequest", "src", "=", "inv", ".", "getRequest", "(", ")", ";", "while", "(", "src", "!=", "null", "&&", "!", "(", "src", "instanceof", "MultipartHttpServletRequest", ")", ...
Clean up any resources used by the given multipart request (if any). @see MultipartResolver#cleanupMultipart
[ "Clean", "up", "any", "resources", "used", "by", "the", "given", "multipart", "request", "(", "if", "any", ")", "." ]
train
https://github.com/paoding-code/paoding-rose/blob/8b512704174dd6cba95e544c7d6ab66105cb8ec4/paoding-rose-web/src/main/java/net/paoding/rose/web/impl/thread/ModuleEngine.java#L219-L243
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java
FeatureOverlayQuery.queryFeatures
public FeatureIndexResults queryFeatures(BoundingBox boundingBox, Projection projection) { """ Query for features in the bounding box @param boundingBox query bounding box @param projection bounding box projection @return feature index results, must be closed """ if (projection == null) { ...
java
public FeatureIndexResults queryFeatures(BoundingBox boundingBox, Projection projection) { if (projection == null) { projection = ProjectionFactory.getProjection(ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM); } // Query for features FeatureIndexManager indexManager = feat...
[ "public", "FeatureIndexResults", "queryFeatures", "(", "BoundingBox", "boundingBox", ",", "Projection", "projection", ")", "{", "if", "(", "projection", "==", "null", ")", "{", "projection", "=", "ProjectionFactory", ".", "getProjection", "(", "ProjectionConstants", ...
Query for features in the bounding box @param boundingBox query bounding box @param projection bounding box projection @return feature index results, must be closed
[ "Query", "for", "features", "in", "the", "bounding", "box" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java#L299-L312
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/MapDataStores.java
MapDataStores.createWriteThroughStore
public static <K, V> MapDataStore<K, V> createWriteThroughStore(MapStoreContext mapStoreContext) { """ Creates a write through data store. @param mapStoreContext context for map store operations @param <K> type of key to store @param <V> type of value to store @return new write throug...
java
public static <K, V> MapDataStore<K, V> createWriteThroughStore(MapStoreContext mapStoreContext) { final MapStoreWrapper store = mapStoreContext.getMapStoreWrapper(); final MapServiceContext mapServiceContext = mapStoreContext.getMapServiceContext(); final NodeEngine nodeEngine = mapServiceConte...
[ "public", "static", "<", "K", ",", "V", ">", "MapDataStore", "<", "K", ",", "V", ">", "createWriteThroughStore", "(", "MapStoreContext", "mapStoreContext", ")", "{", "final", "MapStoreWrapper", "store", "=", "mapStoreContext", ".", "getMapStoreWrapper", "(", ")"...
Creates a write through data store. @param mapStoreContext context for map store operations @param <K> type of key to store @param <V> type of value to store @return new write through store manager
[ "Creates", "a", "write", "through", "data", "store", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/MapDataStores.java#L86-L95
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/h2internal/H2StreamProcessor.java
H2StreamProcessor.completeConnectionPreface
protected void completeConnectionPreface() throws Http2Exception { """ Complete the connection preface. At this point, we should have received the client connection preface string. Now we need to make sure that the client sent a settings frame along with the preface, update our settings, and send an empty settin...
java
protected void completeConnectionPreface() throws Http2Exception { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "completeConnectionPreface entry: about to send preface SETTINGS frame"); } FrameSettings settings; // send out a settings frame ...
[ "protected", "void", "completeConnectionPreface", "(", ")", "throws", "Http2Exception", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "{", "Tr", ".", "debug", "(", "tc", ",", "\"comp...
Complete the connection preface. At this point, we should have received the client connection preface string. Now we need to make sure that the client sent a settings frame along with the preface, update our settings, and send an empty settings frame in response to the client preface. @throws Http2Exception
[ "Complete", "the", "connection", "preface", ".", "At", "this", "point", "we", "should", "have", "received", "the", "client", "connection", "preface", "string", ".", "Now", "we", "need", "to", "make", "sure", "that", "the", "client", "sent", "a", "settings", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/h2internal/H2StreamProcessor.java#L161-L181
tango-controls/JTango
common/src/main/java/org/tango/utils/ArrayUtils.java
ArrayUtils.fromArrayTo2DArray
public static Object fromArrayTo2DArray(final Object array, final int dimX, final int dimY) throws DevFailed { """ Convert an array to a 2D array @param array @param dimX @param dimY @return @throws DevFailed """ Object array2D = null; // final Profiler profilerPeriod = new Profiler("fro...
java
public static Object fromArrayTo2DArray(final Object array, final int dimX, final int dimY) throws DevFailed { Object array2D = null; // final Profiler profilerPeriod = new Profiler("fromArrayTo2DArray"); // profilerPeriod.start("fromArrayTo2DArray"); if (array.getClass().isArray()) { ...
[ "public", "static", "Object", "fromArrayTo2DArray", "(", "final", "Object", "array", ",", "final", "int", "dimX", ",", "final", "int", "dimY", ")", "throws", "DevFailed", "{", "Object", "array2D", "=", "null", ";", "// final Profiler profilerPeriod = new Profiler(\"...
Convert an array to a 2D array @param array @param dimX @param dimY @return @throws DevFailed
[ "Convert", "an", "array", "to", "a", "2D", "array" ]
train
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/common/src/main/java/org/tango/utils/ArrayUtils.java#L271-L292
rythmengine/rythmengine
src/main/java/org/rythmengine/template/TemplateBase.java
TemplateBase.__getRenderProperty
protected final <T> T __getRenderProperty(String name, T def) { """ Get render property by name. And do type case by the left value of the expression. <p/> <p>If no property found by name then return the default value specified</p> @param name @param def @param <T> @return a render property """ ...
java
protected final <T> T __getRenderProperty(String name, T def) { Object o = __renderArgs.get(name); return (T) (__isDefVal(o) ? def : o); }
[ "protected", "final", "<", "T", ">", "T", "__getRenderProperty", "(", "String", "name", ",", "T", "def", ")", "{", "Object", "o", "=", "__renderArgs", ".", "get", "(", "name", ")", ";", "return", "(", "T", ")", "(", "__isDefVal", "(", "o", ")", "?"...
Get render property by name. And do type case by the left value of the expression. <p/> <p>If no property found by name then return the default value specified</p> @param name @param def @param <T> @return a render property
[ "Get", "render", "property", "by", "name", ".", "And", "do", "type", "case", "by", "the", "left", "value", "of", "the", "expression", ".", "<p", "/", ">", "<p", ">", "If", "no", "property", "found", "by", "name", "then", "return", "the", "default", "...
train
https://github.com/rythmengine/rythmengine/blob/064b565f08d9da07378bf77a9dd856ea5831cc92/src/main/java/org/rythmengine/template/TemplateBase.java#L1081-L1084
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/util/ArrayUtil.java
ArrayUtil.writeInt
public static void writeInt(byte[] b, int offset, int value) { """ Serializes an int into a byte array at a specific offset in big-endian order @param b byte array in which to write an int value. @param offset offset within byte array to start writing. @param value int to write to byte array. """ b[of...
java
public static void writeInt(byte[] b, int offset, int value) { b[offset++] = (byte) (value >>> 24); b[offset++] = (byte) (value >>> 16); b[offset++] = (byte) (value >>> 8); b[offset] = (byte)value; }
[ "public", "static", "void", "writeInt", "(", "byte", "[", "]", "b", ",", "int", "offset", ",", "int", "value", ")", "{", "b", "[", "offset", "++", "]", "=", "(", "byte", ")", "(", "value", ">>>", "24", ")", ";", "b", "[", "offset", "++", "]", ...
Serializes an int into a byte array at a specific offset in big-endian order @param b byte array in which to write an int value. @param offset offset within byte array to start writing. @param value int to write to byte array.
[ "Serializes", "an", "int", "into", "a", "byte", "array", "at", "a", "specific", "offset", "in", "big", "-", "endian", "order" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/util/ArrayUtil.java#L104-L109
fabric8io/kubernetes-client
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/ApiVersionUtil.java
ApiVersionUtil.apiGroup
public static <T> String apiGroup(T item, String apiGroup) { """ Extracts apiGroupName from apiGroupVersion when in resource for apiGroupName/apiGroupVersion combination @param <T> Template argument provided @param item resource which is being used @param apiGroup apiGroupName present if any @retur...
java
public static <T> String apiGroup(T item, String apiGroup) { if (item instanceof HasMetadata && Utils.isNotNullOrEmpty(((HasMetadata) item).getApiVersion())) { return trimGroupOrNull(((HasMetadata) item).getApiVersion()); } else if (apiGroup != null && !apiGroup.isEmpty()) { return trimGroup(api...
[ "public", "static", "<", "T", ">", "String", "apiGroup", "(", "T", "item", ",", "String", "apiGroup", ")", "{", "if", "(", "item", "instanceof", "HasMetadata", "&&", "Utils", ".", "isNotNullOrEmpty", "(", "(", "(", "HasMetadata", ")", "item", ")", ".", ...
Extracts apiGroupName from apiGroupVersion when in resource for apiGroupName/apiGroupVersion combination @param <T> Template argument provided @param item resource which is being used @param apiGroup apiGroupName present if any @return Just the apiGroupName part without apiGroupVersion
[ "Extracts", "apiGroupName", "from", "apiGroupVersion", "when", "in", "resource", "for", "apiGroupName", "/", "apiGroupVersion", "combination" ]
train
https://github.com/fabric8io/kubernetes-client/blob/141668a882ed8e902c045a5cd0a80f14bd17d132/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/ApiVersionUtil.java#L29-L36
watson-developer-cloud/java-sdk
text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/util/WaveUtils.java
WaveUtils.writeInt
private static void writeInt(int value, byte[] array, int offset) { """ Writes an number into an array using 4 bytes. @param value the number to write @param array the byte array @param offset the offset """ for (int i = 0; i < 4; i++) { array[offset + i] = (byte) (value >>> (8 * i)); } }
java
private static void writeInt(int value, byte[] array, int offset) { for (int i = 0; i < 4; i++) { array[offset + i] = (byte) (value >>> (8 * i)); } }
[ "private", "static", "void", "writeInt", "(", "int", "value", ",", "byte", "[", "]", "array", ",", "int", "offset", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "4", ";", "i", "++", ")", "{", "array", "[", "offset", "+", "i", "]...
Writes an number into an array using 4 bytes. @param value the number to write @param array the byte array @param offset the offset
[ "Writes", "an", "number", "into", "an", "array", "using", "4", "bytes", "." ]
train
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/util/WaveUtils.java#L46-L50
aws/aws-sdk-java
aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/AutomationExecution.java
AutomationExecution.withParameters
public AutomationExecution withParameters(java.util.Map<String, java.util.List<String>> parameters) { """ <p> The key-value map of execution parameters, which were supplied when calling StartAutomationExecution. </p> @param parameters The key-value map of execution parameters, which were supplied when callin...
java
public AutomationExecution withParameters(java.util.Map<String, java.util.List<String>> parameters) { setParameters(parameters); return this; }
[ "public", "AutomationExecution", "withParameters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "java", ".", "util", ".", "List", "<", "String", ">", ">", "parameters", ")", "{", "setParameters", "(", "parameters", ")", ";", "return", "this", ...
<p> The key-value map of execution parameters, which were supplied when calling StartAutomationExecution. </p> @param parameters The key-value map of execution parameters, which were supplied when calling StartAutomationExecution. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "key", "-", "value", "map", "of", "execution", "parameters", "which", "were", "supplied", "when", "calling", "StartAutomationExecution", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/AutomationExecution.java#L634-L637
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/CmsListItem.java
CmsListItem.addDecoration
protected void addDecoration(Widget widget, int width, boolean first) { """ Helper method for adding a decoration widget and updating the decoration width accordingly.<p> @param widget the decoration widget to add @param width the intended width of the decoration widget @param first if true, inserts the widge...
java
protected void addDecoration(Widget widget, int width, boolean first) { m_decorationWidgets.add(widget); m_decorationWidth += width; }
[ "protected", "void", "addDecoration", "(", "Widget", "widget", ",", "int", "width", ",", "boolean", "first", ")", "{", "m_decorationWidgets", ".", "add", "(", "widget", ")", ";", "m_decorationWidth", "+=", "width", ";", "}" ]
Helper method for adding a decoration widget and updating the decoration width accordingly.<p> @param widget the decoration widget to add @param width the intended width of the decoration widget @param first if true, inserts the widget at the front of the decorations, else at the end.
[ "Helper", "method", "for", "adding", "a", "decoration", "widget", "and", "updating", "the", "decoration", "width", "accordingly", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsListItem.java#L585-L589
MorphiaOrg/morphia
morphia/src/main/java/dev/morphia/utils/ReflectionUtils.java
ReflectionUtils.convertToArray
public static Object convertToArray(final Class type, final List<?> values) { """ Converts a List to an array @param type the Class type of the elements of the List @param values the List to convert @return the array """ final Object exampleArray = Array.newInstance(type, values.size()); ...
java
public static Object convertToArray(final Class type, final List<?> values) { final Object exampleArray = Array.newInstance(type, values.size()); try { return values.toArray((Object[]) exampleArray); } catch (ClassCastException e) { for (int i = 0; i < values.size(); i++)...
[ "public", "static", "Object", "convertToArray", "(", "final", "Class", "type", ",", "final", "List", "<", "?", ">", "values", ")", "{", "final", "Object", "exampleArray", "=", "Array", ".", "newInstance", "(", "type", ",", "values", ".", "size", "(", ")"...
Converts a List to an array @param type the Class type of the elements of the List @param values the List to convert @return the array
[ "Converts", "a", "List", "to", "an", "array" ]
train
https://github.com/MorphiaOrg/morphia/blob/667c30bdc7c6f1d9f2e2eb8774835d6137b52d12/morphia/src/main/java/dev/morphia/utils/ReflectionUtils.java#L699-L709
Alluxio/alluxio
job/server/src/main/java/alluxio/worker/job/task/TaskExecutorManager.java
TaskExecutorManager.notifyTaskCompletion
public synchronized void notifyTaskCompletion(long jobId, int taskId, Object result) { """ Notifies the completion of the task. @param jobId the job id @param taskId the task id @param result the task execution result """ Pair<Long, Integer> id = new Pair<>(jobId, taskId); TaskInfo.Builder taskInf...
java
public synchronized void notifyTaskCompletion(long jobId, int taskId, Object result) { Pair<Long, Integer> id = new Pair<>(jobId, taskId); TaskInfo.Builder taskInfo = mUnfinishedTasks.get(id); taskInfo.setStatus(Status.COMPLETED); try { taskInfo.setResult(ByteString.copyFrom(SerializationUtils.ser...
[ "public", "synchronized", "void", "notifyTaskCompletion", "(", "long", "jobId", ",", "int", "taskId", ",", "Object", "result", ")", "{", "Pair", "<", "Long", ",", "Integer", ">", "id", "=", "new", "Pair", "<>", "(", "jobId", ",", "taskId", ")", ";", "T...
Notifies the completion of the task. @param jobId the job id @param taskId the task id @param result the task execution result
[ "Notifies", "the", "completion", "of", "the", "task", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/job/server/src/main/java/alluxio/worker/job/task/TaskExecutorManager.java#L73-L87
OpenLiberty/open-liberty
dev/com.ibm.ws.request.probes/src/com/ibm/wsspi/requestContext/RequestContext.java
RequestContext.dumpTree
public static String dumpTree(Event event, boolean includeContextInfo) { """ This method is used to dump the event in Tree structure. Currently used for Request Timing where it will keep a log of timing of request execution, in case it exceeds it will call this method and dump the tree of Request Dumping would ...
java
public static String dumpTree(Event event, boolean includeContextInfo) { return new EventStackFormatter().getStackFormat(event, includeContextInfo).toString(); }
[ "public", "static", "String", "dumpTree", "(", "Event", "event", ",", "boolean", "includeContextInfo", ")", "{", "return", "new", "EventStackFormatter", "(", ")", ".", "getStackFormat", "(", "event", ",", "includeContextInfo", ")", ".", "toString", "(", ")", "...
This method is used to dump the event in Tree structure. Currently used for Request Timing where it will keep a log of timing of request execution, in case it exceeds it will call this method and dump the tree of Request Dumping would be for log file or into Fight Data Recorder @param event
[ "This", "method", "is", "used", "to", "dump", "the", "event", "in", "Tree", "structure", ".", "Currently", "used", "for", "Request", "Timing", "where", "it", "will", "keep", "a", "log", "of", "timing", "of", "request", "execution", "in", "case", "it", "e...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.request.probes/src/com/ibm/wsspi/requestContext/RequestContext.java#L151-L153
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/ace/SourceFile.java
SourceFile.setDocuments
public void setDocuments(int i, Document v) { """ indexed setter for documents - sets an indexed value - @generated @param i index in the array to set @param v value to set into the array """ if (SourceFile_Type.featOkTst && ((SourceFile_Type)jcasType).casFeat_documents == null) jcasType.jcas.thr...
java
public void setDocuments(int i, Document v) { if (SourceFile_Type.featOkTst && ((SourceFile_Type)jcasType).casFeat_documents == null) jcasType.jcas.throwFeatMissing("documents", "de.julielab.jules.types.ace.SourceFile"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((SourceFile_Typ...
[ "public", "void", "setDocuments", "(", "int", "i", ",", "Document", "v", ")", "{", "if", "(", "SourceFile_Type", ".", "featOkTst", "&&", "(", "(", "SourceFile_Type", ")", "jcasType", ")", ".", "casFeat_documents", "==", "null", ")", "jcasType", ".", "jcas"...
indexed setter for documents - sets an indexed value - @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "documents", "-", "sets", "an", "indexed", "value", "-" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/ace/SourceFile.java#L226-L230
craigwblake/redline
src/main/java/org/redline_rpm/Builder.java
Builder.addURL
public void addURL( final String path, final URL source, final int mode, final int dirmode) throws NoSuchAlgorithmException, IOException { """ Add the specified file to the repository payload in order by URL. The required header entries will automatically be generated to record the directory names and file names...
java
public void addURL( final String path, final URL source, final int mode, final int dirmode) throws NoSuchAlgorithmException, IOException { contents.addURL( path, source, mode, null, null, null, dirmode); }
[ "public", "void", "addURL", "(", "final", "String", "path", ",", "final", "URL", "source", ",", "final", "int", "mode", ",", "final", "int", "dirmode", ")", "throws", "NoSuchAlgorithmException", ",", "IOException", "{", "contents", ".", "addURL", "(", "path"...
Add the specified file to the repository payload in order by URL. The required header entries will automatically be generated to record the directory names and file names, as well as their digests. @param path the absolute path at which this file will be installed. @param source the file content to include in this rpm...
[ "Add", "the", "specified", "file", "to", "the", "repository", "payload", "in", "order", "by", "URL", ".", "The", "required", "header", "entries", "will", "automatically", "be", "generated", "to", "record", "the", "directory", "names", "and", "file", "names", ...
train
https://github.com/craigwblake/redline/blob/b2fee5eb6c8150e801a132a4478a643f9ec0df04/src/main/java/org/redline_rpm/Builder.java#L1029-L1031