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
mozilla/rhino
src/org/mozilla/javascript/UintMap.java
UintMap.put
public void put(int key, int value) { """ Set int value of the key. If key does not exist, also set its object value to null. """ if (key < 0) Kit.codeBug(); int index = ensureIndex(key, true); if (ivaluesShift == 0) { int N = 1 << power; // keys.length can be N...
java
public void put(int key, int value) { if (key < 0) Kit.codeBug(); int index = ensureIndex(key, true); if (ivaluesShift == 0) { int N = 1 << power; // keys.length can be N * 2 after clear which set ivaluesShift to 0 if (keys.length != N * 2) { i...
[ "public", "void", "put", "(", "int", "key", ",", "int", "value", ")", "{", "if", "(", "key", "<", "0", ")", "Kit", ".", "codeBug", "(", ")", ";", "int", "index", "=", "ensureIndex", "(", "key", ",", "true", ")", ";", "if", "(", "ivaluesShift", ...
Set int value of the key. If key does not exist, also set its object value to null.
[ "Set", "int", "value", "of", "the", "key", ".", "If", "key", "does", "not", "exist", "also", "set", "its", "object", "value", "to", "null", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/UintMap.java#L126-L140
alkacon/opencms-core
src/org/opencms/workplace/tools/CmsToolManager.java
CmsToolManager.jspForwardTool
public void jspForwardTool(CmsWorkplace wp, String toolPath, Map<String, String[]> params) throws IOException, ServletException { """ Redirects to the given tool with the given parameters.<p> @param wp the workplace object @param toolPath the path to the tool to redirect to @param params the parameters to...
java
public void jspForwardTool(CmsWorkplace wp, String toolPath, Map<String, String[]> params) throws IOException, ServletException { Map<String, String[]> newParams; if (params == null) { newParams = new HashMap<String, String[]>(); } else { newParams = new HashMap<Stri...
[ "public", "void", "jspForwardTool", "(", "CmsWorkplace", "wp", ",", "String", "toolPath", ",", "Map", "<", "String", ",", "String", "[", "]", ">", "params", ")", "throws", "IOException", ",", "ServletException", "{", "Map", "<", "String", ",", "String", "[...
Redirects to the given tool with the given parameters.<p> @param wp the workplace object @param toolPath the path to the tool to redirect to @param params the parameters to send @throws IOException in case of errors during forwarding @throws ServletException in case of errors during forwarding
[ "Redirects", "to", "the", "given", "tool", "with", "the", "given", "parameters", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/tools/CmsToolManager.java#L502-L514
SonarSource/sonarqube
server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDao.java
ComponentDao.scrollForIndexing
public void scrollForIndexing(DbSession session, @Nullable String projectUuid, ResultHandler<ComponentDto> handler) { """ Selects all components that are relevant for indexing. The result is not returned (since it is usually too big), but handed over to the <code>handler</code> @param session the database s...
java
public void scrollForIndexing(DbSession session, @Nullable String projectUuid, ResultHandler<ComponentDto> handler) { mapper(session).scrollForIndexing(projectUuid, handler); }
[ "public", "void", "scrollForIndexing", "(", "DbSession", "session", ",", "@", "Nullable", "String", "projectUuid", ",", "ResultHandler", "<", "ComponentDto", ">", "handler", ")", "{", "mapper", "(", "session", ")", ".", "scrollForIndexing", "(", "projectUuid", "...
Selects all components that are relevant for indexing. The result is not returned (since it is usually too big), but handed over to the <code>handler</code> @param session the database session @param projectUuid the project uuid, which is selected with all of its children @param handler the action to be applie...
[ "Selects", "all", "components", "that", "are", "relevant", "for", "indexing", ".", "The", "result", "is", "not", "returned", "(", "since", "it", "is", "usually", "too", "big", ")", "but", "handed", "over", "to", "the", "<code", ">", "handler<", "/", "cod...
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDao.java#L335-L337
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/util/sequence/SequenceManagerStoredProcedureImpl.java
SequenceManagerStoredProcedureImpl.buildNextSequence
protected long buildNextSequence(PersistenceBroker broker, ClassDescriptor cld, String sequenceName) throws LookupException, SQLException, PlatformException { """ Calls the stored procedure stored procedure throws an error if it doesn't exist. @param broker @param cld @param sequenceName @return ...
java
protected long buildNextSequence(PersistenceBroker broker, ClassDescriptor cld, String sequenceName) throws LookupException, SQLException, PlatformException { CallableStatement cs = null; try { Connection con = broker.serviceConnectionManager().getConnection(); ...
[ "protected", "long", "buildNextSequence", "(", "PersistenceBroker", "broker", ",", "ClassDescriptor", "cld", ",", "String", "sequenceName", ")", "throws", "LookupException", ",", "SQLException", ",", "PlatformException", "{", "CallableStatement", "cs", "=", "null", ";...
Calls the stored procedure stored procedure throws an error if it doesn't exist. @param broker @param cld @param sequenceName @return @throws LookupException @throws SQLException
[ "Calls", "the", "stored", "procedure", "stored", "procedure", "throws", "an", "error", "if", "it", "doesn", "t", "exist", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerStoredProcedureImpl.java#L241-L264
http-builder-ng/http-builder-ng
http-builder-ng-core/src/main/java/groovyx/net/http/HttpBuilder.java
HttpBuilder.patchAsync
public CompletableFuture<Object> patchAsync(@DelegatesTo(HttpConfig.class) final Closure closure) { """ Executes an asynchronous PATCH request on the configured URI (asynchronous alias to the `patch(Closure)` method), with additional configuration provided by the configuration closure. [source,groovy] ---- d...
java
public CompletableFuture<Object> patchAsync(@DelegatesTo(HttpConfig.class) final Closure closure) { return CompletableFuture.supplyAsync(() -> patch(closure), getExecutor()); }
[ "public", "CompletableFuture", "<", "Object", ">", "patchAsync", "(", "@", "DelegatesTo", "(", "HttpConfig", ".", "class", ")", "final", "Closure", "closure", ")", "{", "return", "CompletableFuture", ".", "supplyAsync", "(", "(", ")", "->", "patch", "(", "cl...
Executes an asynchronous PATCH request on the configured URI (asynchronous alias to the `patch(Closure)` method), with additional configuration provided by the configuration closure. [source,groovy] ---- def http = HttpBuilder.configure { request.uri = 'http://localhost:10101' } CompletableFuture future = http.patchAs...
[ "Executes", "an", "asynchronous", "PATCH", "request", "on", "the", "configured", "URI", "(", "asynchronous", "alias", "to", "the", "patch", "(", "Closure", ")", "method", ")", "with", "additional", "configuration", "provided", "by", "the", "configuration", "clos...
train
https://github.com/http-builder-ng/http-builder-ng/blob/865f37732c102c748d3db8b905199dac9222a525/http-builder-ng-core/src/main/java/groovyx/net/http/HttpBuilder.java#L1665-L1667
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/configure/SchemaConfiguration.java
SchemaConfiguration.getSchemaProperty
private String getSchemaProperty(String persistenceUnit, Map<String, Object> externalProperties) { """ getKunderaProperty method return auto schema generation property for give persistence unit. @param externalProperties @param String persistenceUnit. @return value of kundera auto ddl in form of String. ...
java
private String getSchemaProperty(String persistenceUnit, Map<String, Object> externalProperties) { PersistenceUnitMetadata persistenceUnitMetadata = kunderaMetadata.getApplicationMetadata() .getPersistenceUnitMetadata(persistenceUnit); String autoDdlOption = externalProperties != nul...
[ "private", "String", "getSchemaProperty", "(", "String", "persistenceUnit", ",", "Map", "<", "String", ",", "Object", ">", "externalProperties", ")", "{", "PersistenceUnitMetadata", "persistenceUnitMetadata", "=", "kunderaMetadata", ".", "getApplicationMetadata", "(", "...
getKunderaProperty method return auto schema generation property for give persistence unit. @param externalProperties @param String persistenceUnit. @return value of kundera auto ddl in form of String.
[ "getKunderaProperty", "method", "return", "auto", "schema", "generation", "property", "for", "give", "persistence", "unit", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/configure/SchemaConfiguration.java#L708-L720
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/TemplateFaxJob2HTTPRequestConverter.java
TemplateFaxJob2HTTPRequestConverter.createHTTPRequest
public HTTPRequest createHTTPRequest(HTTPFaxClientSpi faxClientSpi,FaxActionType faxActionType,FaxJob faxJob) { """ Creates the HTTP request from the fax job data. @param faxClientSpi The HTTP fax client SPI @param faxActionType The fax action type @param faxJob The fax job object @return The HTTP ...
java
public HTTPRequest createHTTPRequest(HTTPFaxClientSpi faxClientSpi,FaxActionType faxActionType,FaxJob faxJob) { FaxJob2HTTPRequestConverterConfigurationConstants templateName=null; switch(faxActionType) { case SUBMIT_FAX_JOB: templateName=FaxJob2HTTPRequestConvert...
[ "public", "HTTPRequest", "createHTTPRequest", "(", "HTTPFaxClientSpi", "faxClientSpi", ",", "FaxActionType", "faxActionType", ",", "FaxJob", "faxJob", ")", "{", "FaxJob2HTTPRequestConverterConfigurationConstants", "templateName", "=", "null", ";", "switch", "(", "faxActionT...
Creates the HTTP request from the fax job data. @param faxClientSpi The HTTP fax client SPI @param faxActionType The fax action type @param faxJob The fax job object @return The HTTP request to send
[ "Creates", "the", "HTTP", "request", "from", "the", "fax", "job", "data", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/TemplateFaxJob2HTTPRequestConverter.java#L253-L281
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/JMessageClient.java
JMessageClient.getUserMessagesByCursor
public MessageListResult getUserMessagesByCursor(String username, String cursor) throws APIConnectionException, APIRequestException { """ Get user's message list with cursor, the cursor will effective in 120 seconds. And will return same count of messages as first request. @param username Necessary p...
java
public MessageListResult getUserMessagesByCursor(String username, String cursor) throws APIConnectionException, APIRequestException { return _messageClient.getUserMessagesByCursor(username, cursor); }
[ "public", "MessageListResult", "getUserMessagesByCursor", "(", "String", "username", ",", "String", "cursor", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "return", "_messageClient", ".", "getUserMessagesByCursor", "(", "username", ",", "curso...
Get user's message list with cursor, the cursor will effective in 120 seconds. And will return same count of messages as first request. @param username Necessary parameter. @param cursor First request will return cursor @return MessageListResult @throws APIConnectionException connect exception @throws APIRequestExcepti...
[ "Get", "user", "s", "message", "list", "with", "cursor", "the", "cursor", "will", "effective", "in", "120", "seconds", ".", "And", "will", "return", "same", "count", "of", "messages", "as", "first", "request", "." ]
train
https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/JMessageClient.java#L534-L537
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/imagesearch/AipImageSearch.java
AipImageSearch.sameHqUpdateUrl
public JSONObject sameHqUpdateUrl(String url, HashMap<String, String> options) { """ 相同图检索—更新接口 **更新图库中图片的摘要和分类信息(具体变量为brief、tags)** @param url - 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效 @param options - 可选参数对象,key: value都为string类型 options - opt...
java
public JSONObject sameHqUpdateUrl(String url, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); request.addBody("url", url); if (options != null) { request.addBody(options); } request.setUri(ImageSearchCo...
[ "public", "JSONObject", "sameHqUpdateUrl", "(", "String", "url", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "AipRequest", "request", "=", "new", "AipRequest", "(", ")", ";", "preOperation", "(", "request", ")", ";", "request", ...
相同图检索—更新接口 **更新图库中图片的摘要和分类信息(具体变量为brief、tags)** @param url - 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效 @param options - 可选参数对象,key: value都为string类型 options - options列表: brief 更新的摘要信息,最长256B。样例:{"name":"周杰伦", "id":"666"} tags 1 - 65535范围内的整数,tag间以逗号分隔,最多2个t...
[ "相同图检索—更新接口", "**", "更新图库中图片的摘要和分类信息(具体变量为brief、tags)", "**" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/imagesearch/AipImageSearch.java#L235-L246
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/crossapp/CrossAppClient.java
CrossAppClient.addOrRemoveCrossGroupMembers
public ResponseWrapper addOrRemoveCrossGroupMembers(long gid, CrossGroup[] groups) throws APIConnectionException, APIRequestException { """ Add or remove group members from a given group id. @param gid Necessary, target group id. @param groups Necessary @return No content @throws APIConnectionExcep...
java
public ResponseWrapper addOrRemoveCrossGroupMembers(long gid, CrossGroup[] groups) throws APIConnectionException, APIRequestException { CrossGroupPayload payload = new CrossGroupPayload.Builder() .setCrossGroups(groups) .build(); Preconditions.checkArgument(0 ...
[ "public", "ResponseWrapper", "addOrRemoveCrossGroupMembers", "(", "long", "gid", ",", "CrossGroup", "[", "]", "groups", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "CrossGroupPayload", "payload", "=", "new", "CrossGroupPayload", ".", "Build...
Add or remove group members from a given group id. @param gid Necessary, target group id. @param groups Necessary @return No content @throws APIConnectionException connect exception @throws APIRequestException request exception
[ "Add", "or", "remove", "group", "members", "from", "a", "given", "group", "id", "." ]
train
https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/crossapp/CrossAppClient.java#L51-L59
alipay/sofa-rpc
core/api/src/main/java/com/alipay/sofa/rpc/core/request/SofaRequest.java
SofaRequest.addRequestProp
public void addRequestProp(String key, Object value) { """ Add request prop. @param key the key @param value the value """ if (key == null || value == null) { return; } if (requestProps == null) { requestProps = new HashMap<String, Object>(16); } ...
java
public void addRequestProp(String key, Object value) { if (key == null || value == null) { return; } if (requestProps == null) { requestProps = new HashMap<String, Object>(16); } requestProps.put(key, value); }
[ "public", "void", "addRequestProp", "(", "String", "key", ",", "Object", "value", ")", "{", "if", "(", "key", "==", "null", "||", "value", "==", "null", ")", "{", "return", ";", "}", "if", "(", "requestProps", "==", "null", ")", "{", "requestProps", ...
Add request prop. @param key the key @param value the value
[ "Add", "request", "prop", "." ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/core/request/SofaRequest.java#L65-L73
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/runlevel/RunLevel.java
RunLevel.isInitialisable
public static boolean isInitialisable() throws EFapsException { """ Tests, if the SQL table {@link #TABLE_TESTS} exists (= <i>true</i>). This means the run level could be initialized. @return <i>true</i> if a run level could be initialized (and the SQL table exists in the database); otherwise <i>false...
java
public static boolean isInitialisable() throws EFapsException { try { final Connection con = Context.getConnection(); final boolean ret = Context.getDbType().existsTable(Context.getConnection(), RunLevel.TABLE_TESTS); con.close(); return ret; }...
[ "public", "static", "boolean", "isInitialisable", "(", ")", "throws", "EFapsException", "{", "try", "{", "final", "Connection", "con", "=", "Context", ".", "getConnection", "(", ")", ";", "final", "boolean", "ret", "=", "Context", ".", "getDbType", "(", ")",...
Tests, if the SQL table {@link #TABLE_TESTS} exists (= <i>true</i>). This means the run level could be initialized. @return <i>true</i> if a run level could be initialized (and the SQL table exists in the database); otherwise <i>false</i> @throws EFapsException if the test for the table fails @see #TABLE_TESTS
[ "Tests", "if", "the", "SQL", "table", "{", "@link", "#TABLE_TESTS", "}", "exists", "(", "=", "<i", ">", "true<", "/", "i", ">", ")", ".", "This", "means", "the", "run", "level", "could", "be", "initialized", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/runlevel/RunLevel.java#L188-L199
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/reflect/AnnotationUtility.java
AnnotationUtility.extractAsEnumerationValue
public static String extractAsEnumerationValue(Element item, Class<? extends Annotation> annotationClass, AnnotationAttributeType attribute) { """ Estract from an annotation of a property the attribute value specified. @param item the item @param annotationClass annotation to analyze @param attribu...
java
public static String extractAsEnumerationValue(Element item, Class<? extends Annotation> annotationClass, AnnotationAttributeType attribute) { final Elements elementUtils=BindDataSourceSubProcessor.elementUtils; final One<String> result = new One<String>(); extractAttributeValue(elementUtils, item, annotationCla...
[ "public", "static", "String", "extractAsEnumerationValue", "(", "Element", "item", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotationClass", ",", "AnnotationAttributeType", "attribute", ")", "{", "final", "Elements", "elementUtils", "=", "BindDataSource...
Estract from an annotation of a property the attribute value specified. @param item the item @param annotationClass annotation to analyze @param attribute the attribute @return attribute value as list of string
[ "Estract", "from", "an", "annotation", "of", "a", "property", "the", "attribute", "value", "specified", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/reflect/AnnotationUtility.java#L294-L308
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/couchbase/CouchbaseManager.java
CouchbaseManager.getConnectionObjectsFromHost
protected static Pair<PasswordAuthenticator, List<String>> getConnectionObjectsFromHost(URI host) { """ Creates a {@link Pair} containing a {@link PasswordAuthenticator} and a {@link List} of (cluster) nodes from a URI @param host a URI representing the connection to a single instance, for example couchbase://u...
java
protected static Pair<PasswordAuthenticator, List<String>> getConnectionObjectsFromHost(URI host) { List<String> nodes = Collections.emptyList(); try { nodes = Arrays.asList(new URI(host.getScheme(), null, host.getHost(), host.getPort(), null, null, nu...
[ "protected", "static", "Pair", "<", "PasswordAuthenticator", ",", "List", "<", "String", ">", ">", "getConnectionObjectsFromHost", "(", "URI", "host", ")", "{", "List", "<", "String", ">", "nodes", "=", "Collections", ".", "emptyList", "(", ")", ";", "try", ...
Creates a {@link Pair} containing a {@link PasswordAuthenticator} and a {@link List} of (cluster) nodes from a URI @param host a URI representing the connection to a single instance, for example couchbase://username:password@hostname:port @return a tuple2, the connections objects that we need to establish a connection...
[ "Creates", "a", "{", "@link", "Pair", "}", "containing", "a", "{", "@link", "PasswordAuthenticator", "}", "and", "a", "{", "@link", "List", "}", "of", "(", "cluster", ")", "nodes", "from", "a", "URI" ]
train
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/couchbase/CouchbaseManager.java#L99-L114
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/Helpers.java
Helpers.collectionToString
static String collectionToString(Collection<?> c) { """ An implementation of Collection.toString() suitable for classes with locks. Instead of holding a lock for the entire duration of toString(), or acquiring a lock for each call to Iterator.next(), we hold the lock only during the call to toArray() (less di...
java
static String collectionToString(Collection<?> c) { final Object[] a = c.toArray(); final int size = a.length; if (size == 0) return "[]"; int charLength = 0; // Replace every array element with its string representation for (int i = 0; i < size; i++) { ...
[ "static", "String", "collectionToString", "(", "Collection", "<", "?", ">", "c", ")", "{", "final", "Object", "[", "]", "a", "=", "c", ".", "toArray", "(", ")", ";", "final", "int", "size", "=", "a", ".", "length", ";", "if", "(", "size", "==", "...
An implementation of Collection.toString() suitable for classes with locks. Instead of holding a lock for the entire duration of toString(), or acquiring a lock for each call to Iterator.next(), we hold the lock only during the call to toArray() (less disruptive to other threads accessing the collection) and follows t...
[ "An", "implementation", "of", "Collection", ".", "toString", "()", "suitable", "for", "classes", "with", "locks", ".", "Instead", "of", "holding", "a", "lock", "for", "the", "entire", "duration", "of", "toString", "()", "or", "acquiring", "a", "lock", "for",...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/Helpers.java#L52-L69
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/TableFactoryService.java
TableFactoryService.discoverFactories
private static List<TableFactory> discoverFactories(Optional<ClassLoader> classLoader) { """ Searches for factories using Java service providers. @return all factories in the classpath """ try { List<TableFactory> result = new LinkedList<>(); if (classLoader.isPresent()) { ServiceLoader .lo...
java
private static List<TableFactory> discoverFactories(Optional<ClassLoader> classLoader) { try { List<TableFactory> result = new LinkedList<>(); if (classLoader.isPresent()) { ServiceLoader .load(TableFactory.class, classLoader.get()) .iterator() .forEachRemaining(result::add); } else { ...
[ "private", "static", "List", "<", "TableFactory", ">", "discoverFactories", "(", "Optional", "<", "ClassLoader", ">", "classLoader", ")", "{", "try", "{", "List", "<", "TableFactory", ">", "result", "=", "new", "LinkedList", "<>", "(", ")", ";", "if", "(",...
Searches for factories using Java service providers. @return all factories in the classpath
[ "Searches", "for", "factories", "using", "Java", "service", "providers", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/TableFactoryService.java#L150-L167
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/utils/Utils.java
Utils.nonNull
public static <T> T nonNull(final T object, final Supplier<String> message) { """ Checks that an {@link Object} is not {@code null} and returns the same object or throws an {@link IllegalArgumentException} @param object any Object @param message the text message that would be passed to the exception thrown when ...
java
public static <T> T nonNull(final T object, final Supplier<String> message) { if (object == null) { throw new IllegalArgumentException(message.get()); } return object; }
[ "public", "static", "<", "T", ">", "T", "nonNull", "(", "final", "T", "object", ",", "final", "Supplier", "<", "String", ">", "message", ")", "{", "if", "(", "object", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "message", ...
Checks that an {@link Object} is not {@code null} and returns the same object or throws an {@link IllegalArgumentException} @param object any Object @param message the text message that would be passed to the exception thrown when {@code o == null}. @return the same object @throws IllegalArgumentException if a {@code o...
[ "Checks", "that", "an", "{" ]
train
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/utils/Utils.java#L56-L61
zxing/zxing
core/src/main/java/com/google/zxing/datamatrix/decoder/Version.java
Version.getVersionForDimensions
public static Version getVersionForDimensions(int numRows, int numColumns) throws FormatException { """ <p>Deduces version information from Data Matrix dimensions.</p> @param numRows Number of rows in modules @param numColumns Number of columns in modules @return Version for a Data Matrix Code of those dimens...
java
public static Version getVersionForDimensions(int numRows, int numColumns) throws FormatException { if ((numRows & 0x01) != 0 || (numColumns & 0x01) != 0) { throw FormatException.getFormatInstance(); } for (Version version : VERSIONS) { if (version.symbolSizeRows == numRows && version.symbolSiz...
[ "public", "static", "Version", "getVersionForDimensions", "(", "int", "numRows", ",", "int", "numColumns", ")", "throws", "FormatException", "{", "if", "(", "(", "numRows", "&", "0x01", ")", "!=", "0", "||", "(", "numColumns", "&", "0x01", ")", "!=", "0", ...
<p>Deduces version information from Data Matrix dimensions.</p> @param numRows Number of rows in modules @param numColumns Number of columns in modules @return Version for a Data Matrix Code of those dimensions @throws FormatException if dimensions do correspond to a valid Data Matrix size
[ "<p", ">", "Deduces", "version", "information", "from", "Data", "Matrix", "dimensions", ".", "<", "/", "p", ">" ]
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/datamatrix/decoder/Version.java#L98-L110
facebook/fresco
drawee/src/main/java/com/facebook/drawee/generic/WrappingUtils.java
WrappingUtils.maybeApplyLeafRounding
static Drawable maybeApplyLeafRounding( @Nullable Drawable drawable, @Nullable RoundingParams roundingParams, Resources resources) { """ Applies rounding on the drawable's leaf. <p> Currently only {@link BitmapDrawable} or {@link ColorDrawable} leafs can be rounded. <p> If the leaf cannot be ...
java
static Drawable maybeApplyLeafRounding( @Nullable Drawable drawable, @Nullable RoundingParams roundingParams, Resources resources) { try { if (FrescoSystrace.isTracing()) { FrescoSystrace.beginSection("WrappingUtils#maybeApplyLeafRounding"); } if (drawable == null ...
[ "static", "Drawable", "maybeApplyLeafRounding", "(", "@", "Nullable", "Drawable", "drawable", ",", "@", "Nullable", "RoundingParams", "roundingParams", ",", "Resources", "resources", ")", "{", "try", "{", "if", "(", "FrescoSystrace", ".", "isTracing", "(", ")", ...
Applies rounding on the drawable's leaf. <p> Currently only {@link BitmapDrawable} or {@link ColorDrawable} leafs can be rounded. <p> If the leaf cannot be rounded, or the rounding params do not specify BITMAP_ONLY mode, the given drawable is returned without being rounded. <p> If the given drawable is a leaf itself, ...
[ "Applies", "rounding", "on", "the", "drawable", "s", "leaf", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/drawee/src/main/java/com/facebook/drawee/generic/WrappingUtils.java#L258-L285
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/Annotation.java
Annotation.fillMappedField
public static void fillMappedField(Class<?> configuredClass, MappedField mappedField) { """ Fill the MappedField given as input with the custom accessors (if defined). @param configuredClass field's class @param mappedField mapped field """ JMapAccessor accessor = getClassAccessors(configuredClass, ma...
java
public static void fillMappedField(Class<?> configuredClass, MappedField mappedField){ JMapAccessor accessor = getClassAccessors(configuredClass, mappedField.getValue().getName(),false); if(isNull(accessor)) accessor = getFieldAccessors(configuredClass,mappedField.getValue()); if(isNull(accesso...
[ "public", "static", "void", "fillMappedField", "(", "Class", "<", "?", ">", "configuredClass", ",", "MappedField", "mappedField", ")", "{", "JMapAccessor", "accessor", "=", "getClassAccessors", "(", "configuredClass", ",", "mappedField", ".", "getValue", "(", ")",...
Fill the MappedField given as input with the custom accessors (if defined). @param configuredClass field's class @param mappedField mapped field
[ "Fill", "the", "MappedField", "given", "as", "input", "with", "the", "custom", "accessors", "(", "if", "defined", ")", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/Annotation.java#L79-L96
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/ConditionalFunctions.java
ConditionalFunctions.posInfIf
public static Expression posInfIf(Expression expression1, Expression expression2) { """ Returned expression results in PosInf if expression1 = expression2, otherwise returns expression1. Returns MISSING or NULL if either input is MISSING or NULL. """ return x("POSINFIF(" + expression1.toString() + ", ...
java
public static Expression posInfIf(Expression expression1, Expression expression2) { return x("POSINFIF(" + expression1.toString() + ", " + expression2.toString() + ")"); }
[ "public", "static", "Expression", "posInfIf", "(", "Expression", "expression1", ",", "Expression", "expression2", ")", "{", "return", "x", "(", "\"POSINFIF(\"", "+", "expression1", ".", "toString", "(", ")", "+", "\", \"", "+", "expression2", ".", "toString", ...
Returned expression results in PosInf if expression1 = expression2, otherwise returns expression1. Returns MISSING or NULL if either input is MISSING or NULL.
[ "Returned", "expression", "results", "in", "PosInf", "if", "expression1", "=", "expression2", "otherwise", "returns", "expression1", ".", "Returns", "MISSING", "or", "NULL", "if", "either", "input", "is", "MISSING", "or", "NULL", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/ConditionalFunctions.java#L140-L142
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.addAppSetting
public void addAppSetting(String key, Object value) { """ Adds or overwrites an app-specific setting. @param key a key @param value a value """ if (!StringUtils.isBlank(key) && value != null) { invokePut(Utils.formatMessage("_settings/{0}", key), Entity.json(Collections.singletonMap("value", value))); ...
java
public void addAppSetting(String key, Object value) { if (!StringUtils.isBlank(key) && value != null) { invokePut(Utils.formatMessage("_settings/{0}", key), Entity.json(Collections.singletonMap("value", value))); } }
[ "public", "void", "addAppSetting", "(", "String", "key", ",", "Object", "value", ")", "{", "if", "(", "!", "StringUtils", ".", "isBlank", "(", "key", ")", "&&", "value", "!=", "null", ")", "{", "invokePut", "(", "Utils", ".", "formatMessage", "(", "\"_...
Adds or overwrites an app-specific setting. @param key a key @param value a value
[ "Adds", "or", "overwrites", "an", "app", "-", "specific", "setting", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L1530-L1534
aws/aws-sdk-java
aws-java-sdk-codedeploy/src/main/java/com/amazonaws/services/codedeploy/model/ListDeploymentTargetsRequest.java
ListDeploymentTargetsRequest.withTargetFilters
public ListDeploymentTargetsRequest withTargetFilters(java.util.Map<String, java.util.List<String>> targetFilters) { """ <p> A key used to filter the returned targets. </p> @param targetFilters A key used to filter the returned targets. @return Returns a reference to this object so that method calls can be ...
java
public ListDeploymentTargetsRequest withTargetFilters(java.util.Map<String, java.util.List<String>> targetFilters) { setTargetFilters(targetFilters); return this; }
[ "public", "ListDeploymentTargetsRequest", "withTargetFilters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "java", ".", "util", ".", "List", "<", "String", ">", ">", "targetFilters", ")", "{", "setTargetFilters", "(", "targetFilters", ")", ";", ...
<p> A key used to filter the returned targets. </p> @param targetFilters A key used to filter the returned targets. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "A", "key", "used", "to", "filter", "the", "returned", "targets", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-codedeploy/src/main/java/com/amazonaws/services/codedeploy/model/ListDeploymentTargetsRequest.java#L169-L172
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.storeDirectoryResourcesAsBytes
public static Map<String,byte[]> storeDirectoryResourcesAsBytes( File directory ) throws IOException { """ Stores the resources from a directory into a map. @param directory an existing directory @return a non-null map (key = the file location, relative to the directory, value = file content) @throws IOExceptio...
java
public static Map<String,byte[]> storeDirectoryResourcesAsBytes( File directory ) throws IOException { return storeDirectoryResourcesAsBytes( directory, new ArrayList<String>( 0 )); }
[ "public", "static", "Map", "<", "String", ",", "byte", "[", "]", ">", "storeDirectoryResourcesAsBytes", "(", "File", "directory", ")", "throws", "IOException", "{", "return", "storeDirectoryResourcesAsBytes", "(", "directory", ",", "new", "ArrayList", "<", "String...
Stores the resources from a directory into a map. @param directory an existing directory @return a non-null map (key = the file location, relative to the directory, value = file content) @throws IOException if something went wrong while reading a file
[ "Stores", "the", "resources", "from", "a", "directory", "into", "a", "map", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L836-L838
grails/grails-core
grails-core/src/main/groovy/org/grails/plugins/BasePluginFilter.java
BasePluginFilter.isDependentOn
protected boolean isDependentOn(GrailsPlugin plugin, String pluginName) { """ Checks whether a plugin is dependent on another plugin with the specified name @param plugin the plugin to compare @param pluginName the name to compare against @return true if <code>plugin</code> depends on <code>pluginName</cod...
java
protected boolean isDependentOn(GrailsPlugin plugin, String pluginName) { // check if toCompare depends on the current plugin String[] dependencyNames = plugin.getDependencyNames(); for (int i = 0; i < dependencyNames.length; i++) { final String dependencyName = dependencyNames[i];...
[ "protected", "boolean", "isDependentOn", "(", "GrailsPlugin", "plugin", ",", "String", "pluginName", ")", "{", "// check if toCompare depends on the current plugin", "String", "[", "]", "dependencyNames", "=", "plugin", ".", "getDependencyNames", "(", ")", ";", "for", ...
Checks whether a plugin is dependent on another plugin with the specified name @param plugin the plugin to compare @param pluginName the name to compare against @return true if <code>plugin</code> depends on <code>pluginName</code>
[ "Checks", "whether", "a", "plugin", "is", "dependent", "on", "another", "plugin", "with", "the", "specified", "name" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/plugins/BasePluginFilter.java#L134-L150
Pi4J/pi4j
pi4j-core/src/main/java/com/pi4j/temperature/TemperatureConversion.java
TemperatureConversion.convertFromCelsius
public static double convertFromCelsius(TemperatureScale to, double temperature) { """ Convert a temperature value from the Celsius temperature scale to another. @param to TemperatureScale @param temperature value in degrees centigrade @return converted temperature value in the requested to scale """ ...
java
public static double convertFromCelsius(TemperatureScale to, double temperature) { switch(to) { case FARENHEIT: return convertCelsiusToFarenheit(temperature); case CELSIUS: return temperature; case KELVIN: return convertCelsiu...
[ "public", "static", "double", "convertFromCelsius", "(", "TemperatureScale", "to", ",", "double", "temperature", ")", "{", "switch", "(", "to", ")", "{", "case", "FARENHEIT", ":", "return", "convertCelsiusToFarenheit", "(", "temperature", ")", ";", "case", "CELS...
Convert a temperature value from the Celsius temperature scale to another. @param to TemperatureScale @param temperature value in degrees centigrade @return converted temperature value in the requested to scale
[ "Convert", "a", "temperature", "value", "from", "the", "Celsius", "temperature", "scale", "to", "another", "." ]
train
https://github.com/Pi4J/pi4j/blob/03cacc62223cc59b3118bfcefadabab979fd84c7/pi4j-core/src/main/java/com/pi4j/temperature/TemperatureConversion.java#L121-L136
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java
ProjectiveInitializeAllCommon.triangulateFeatures
private void triangulateFeatures(List<AssociatedTriple> inliers, DMatrixRMaj P1, DMatrixRMaj P2, DMatrixRMaj P3) { """ Triangulates the location of each features in homogenous space """ List<DMatrixRMaj> cameraMatrices = new ArrayList<>(); cameraMatrices.add(P1); cameraMatrices.add(P2); camer...
java
private void triangulateFeatures(List<AssociatedTriple> inliers, DMatrixRMaj P1, DMatrixRMaj P2, DMatrixRMaj P3) { List<DMatrixRMaj> cameraMatrices = new ArrayList<>(); cameraMatrices.add(P1); cameraMatrices.add(P2); cameraMatrices.add(P3); // need elements to be non-empty so that it can use set()....
[ "private", "void", "triangulateFeatures", "(", "List", "<", "AssociatedTriple", ">", "inliers", ",", "DMatrixRMaj", "P1", ",", "DMatrixRMaj", "P2", ",", "DMatrixRMaj", "P3", ")", "{", "List", "<", "DMatrixRMaj", ">", "cameraMatrices", "=", "new", "ArrayList", ...
Triangulates the location of each features in homogenous space
[ "Triangulates", "the", "location", "of", "each", "features", "in", "homogenous", "space" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure2/ProjectiveInitializeAllCommon.java#L275-L304
uniform-java/uniform
src/main/java/net/uniform/api/html/OptionGroup.java
OptionGroup.addOption
public OptionGroup addOption(String value, String text) { """ Adds an option to the option group. @param value Value, not null and not repeated in the group @param text Text, not null @return This group """ return this.addOption(new Option(value, text)); }
java
public OptionGroup addOption(String value, String text) { return this.addOption(new Option(value, text)); }
[ "public", "OptionGroup", "addOption", "(", "String", "value", ",", "String", "text", ")", "{", "return", "this", ".", "addOption", "(", "new", "Option", "(", "value", ",", "text", ")", ")", ";", "}" ]
Adds an option to the option group. @param value Value, not null and not repeated in the group @param text Text, not null @return This group
[ "Adds", "an", "option", "to", "the", "option", "group", "." ]
train
https://github.com/uniform-java/uniform/blob/0b84f0db562253165bc06c69f631e464dca0cb48/src/main/java/net/uniform/api/html/OptionGroup.java#L87-L89
FXMisc/RichTextFX
richtextfx/src/main/java/org/fxmisc/richtext/model/ReadOnlyStyledDocumentBuilder.java
ReadOnlyStyledDocumentBuilder.addParagraph
public ReadOnlyStyledDocumentBuilder<PS, SEG, S> addParagraph(List<StyledSegment<SEG, S>> styledSegments) { """ Adds to the list a paragraph that is constructed using the list of {@link StyledSegment}s. """ return addParagraph(styledSegments, null); }
java
public ReadOnlyStyledDocumentBuilder<PS, SEG, S> addParagraph(List<StyledSegment<SEG, S>> styledSegments) { return addParagraph(styledSegments, null); }
[ "public", "ReadOnlyStyledDocumentBuilder", "<", "PS", ",", "SEG", ",", "S", ">", "addParagraph", "(", "List", "<", "StyledSegment", "<", "SEG", ",", "S", ">", ">", "styledSegments", ")", "{", "return", "addParagraph", "(", "styledSegments", ",", "null", ")",...
Adds to the list a paragraph that is constructed using the list of {@link StyledSegment}s.
[ "Adds", "to", "the", "list", "a", "paragraph", "that", "is", "constructed", "using", "the", "list", "of", "{" ]
train
https://github.com/FXMisc/RichTextFX/blob/bc7cab6a637855e0f37d9b9c12a9172c31545f0b/richtextfx/src/main/java/org/fxmisc/richtext/model/ReadOnlyStyledDocumentBuilder.java#L92-L94
watchrabbit/rabbit-executor
src/main/java/com/watchrabbit/executor/command/ExecutorCommand.java
ExecutorCommand.observe
public void observe(CheckedRunnable runnable, CheckedRunnable onSuccess) { """ Invokes runnable asynchronously with respecting circuit logic and cache logic if configured. If callable completed with success then the {@code onSuccess} method is called. @param runnable method fired by executor @param onSuccess...
java
public void observe(CheckedRunnable runnable, CheckedRunnable onSuccess) { service.executeAsynchronously(wrap(runnable, onSuccess), config); }
[ "public", "void", "observe", "(", "CheckedRunnable", "runnable", ",", "CheckedRunnable", "onSuccess", ")", "{", "service", ".", "executeAsynchronously", "(", "wrap", "(", "runnable", ",", "onSuccess", ")", ",", "config", ")", ";", "}" ]
Invokes runnable asynchronously with respecting circuit logic and cache logic if configured. If callable completed with success then the {@code onSuccess} method is called. @param runnable method fired by executor @param onSuccess method fired if callable is completed with success
[ "Invokes", "runnable", "asynchronously", "with", "respecting", "circuit", "logic", "and", "cache", "logic", "if", "configured", ".", "If", "callable", "completed", "with", "success", "then", "the", "{", "@code", "onSuccess", "}", "method", "is", "called", "." ]
train
https://github.com/watchrabbit/rabbit-executor/blob/fe6674b78e6ab464babcecb6e1f100edec3c9966/src/main/java/com/watchrabbit/executor/command/ExecutorCommand.java#L171-L173
sporniket/core
sporniket-core-ml/src/main/java/com/sporniket/libre/lang/xml/XmlStringTools.java
XmlStringTools.appendCdataSection
public static StringBuffer appendCdataSection(StringBuffer buffer, String cdataContent) { """ Add a cdata section to a StringBuffer. If the buffer is null, a new one is created. @param buffer StringBuffer to fill @param cdataContent the cdata content @return the buffer """ StringBuffer _buffer = in...
java
public static StringBuffer appendCdataSection(StringBuffer buffer, String cdataContent) { StringBuffer _buffer = initStringBufferIfNecessary(buffer); return doAppendCdataSection(_buffer, cdataContent); }
[ "public", "static", "StringBuffer", "appendCdataSection", "(", "StringBuffer", "buffer", ",", "String", "cdataContent", ")", "{", "StringBuffer", "_buffer", "=", "initStringBufferIfNecessary", "(", "buffer", ")", ";", "return", "doAppendCdataSection", "(", "_buffer", ...
Add a cdata section to a StringBuffer. If the buffer is null, a new one is created. @param buffer StringBuffer to fill @param cdataContent the cdata content @return the buffer
[ "Add", "a", "cdata", "section", "to", "a", "StringBuffer", "." ]
train
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-ml/src/main/java/com/sporniket/libre/lang/xml/XmlStringTools.java#L301-L305
actframework/actframework
src/main/java/act/apidoc/javadoc/Javadoc.java
Javadoc.addBlockTag
public Javadoc addBlockTag(String tagName, String content) { """ For tags like "@return good things" where tagName is "return", and the rest is content. """ return addBlockTag(new JavadocBlockTag(tagName, content)); }
java
public Javadoc addBlockTag(String tagName, String content) { return addBlockTag(new JavadocBlockTag(tagName, content)); }
[ "public", "Javadoc", "addBlockTag", "(", "String", "tagName", ",", "String", "content", ")", "{", "return", "addBlockTag", "(", "new", "JavadocBlockTag", "(", "tagName", ",", "content", ")", ")", ";", "}" ]
For tags like "@return good things" where tagName is "return", and the rest is content.
[ "For", "tags", "like" ]
train
https://github.com/actframework/actframework/blob/55a8f8b45e71159a79ec6e157c02f71700f8cd54/src/main/java/act/apidoc/javadoc/Javadoc.java#L60-L62
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/dialect/oracle/OracleDdlParser.java
OracleDdlParser.parseCreateProcedureStatement
protected AstNode parseCreateProcedureStatement( DdlTokenStream tokens, AstNode parentNode ) throws ParsingException { """ Parses DDL CREATE PROCEDURE statement @param tokens the tokenized {@link DdlTokenStream} of the DDL input content; may not be null @par...
java
protected AstNode parseCreateProcedureStatement( DdlTokenStream tokens, AstNode parentNode ) throws ParsingException { assert tokens != null; assert parentNode != null; markStartOfStatement(tokens); /* --------------------------------...
[ "protected", "AstNode", "parseCreateProcedureStatement", "(", "DdlTokenStream", "tokens", ",", "AstNode", "parentNode", ")", "throws", "ParsingException", "{", "assert", "tokens", "!=", "null", ";", "assert", "parentNode", "!=", "null", ";", "markStartOfStatement", "(...
Parses DDL CREATE PROCEDURE statement @param tokens the tokenized {@link DdlTokenStream} of the DDL input content; may not be null @param parentNode the parent {@link AstNode} node; may not be null @return the parsed CREATE PROCEDURE statement node @throws ParsingException
[ "Parses", "DDL", "CREATE", "PROCEDURE", "statement" ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/dialect/oracle/OracleDdlParser.java#L669-L728
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WRepeater.java
WRepeater.prepareRow
protected void prepareRow(final Request request, final int rowIndex) { """ Prepares a single row for painting. @param request the request being responded to. @param rowIndex the row index. """ WComponent row = getRepeatedComponent(); row.preparePaint(request); }
java
protected void prepareRow(final Request request, final int rowIndex) { WComponent row = getRepeatedComponent(); row.preparePaint(request); }
[ "protected", "void", "prepareRow", "(", "final", "Request", "request", ",", "final", "int", "rowIndex", ")", "{", "WComponent", "row", "=", "getRepeatedComponent", "(", ")", ";", "row", ".", "preparePaint", "(", "request", ")", ";", "}" ]
Prepares a single row for painting. @param request the request being responded to. @param rowIndex the row index.
[ "Prepares", "a", "single", "row", "for", "painting", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WRepeater.java#L395-L398
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/listener/ListenerHelper.java
ListenerHelper.createErrorResponse
public Response createErrorResponse(String req, Map<String,String> metaInfo, ServiceException ex) { """ Create a default error message. To customized this response use a ServiceMonitor. """ Request request = new Request(0L); request.setContent(req); Response response = new Response();...
java
public Response createErrorResponse(String req, Map<String,String> metaInfo, ServiceException ex) { Request request = new Request(0L); request.setContent(req); Response response = new Response(); String contentType = metaInfo.get(Listener.METAINFO_CONTENT_TYPE); if (contentType ...
[ "public", "Response", "createErrorResponse", "(", "String", "req", ",", "Map", "<", "String", ",", "String", ">", "metaInfo", ",", "ServiceException", "ex", ")", "{", "Request", "request", "=", "new", "Request", "(", "0L", ")", ";", "request", ".", "setCon...
Create a default error message. To customized this response use a ServiceMonitor.
[ "Create", "a", "default", "error", "message", ".", "To", "customized", "this", "response", "use", "a", "ServiceMonitor", "." ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/listener/ListenerHelper.java#L629-L655
javalite/activeweb
activeweb/src/main/java/org/javalite/activeweb/SessionFacade.java
SessionFacade.put
public Object put(String name, Serializable value) { """ Add object to a session. @param name name of object @param value object reference. """ Object val = RequestContext.getHttpRequest().getSession(true).getAttribute(name); RequestContext.getHttpRequest().getSession(true).setAttribute(name,...
java
public Object put(String name, Serializable value){ Object val = RequestContext.getHttpRequest().getSession(true).getAttribute(name); RequestContext.getHttpRequest().getSession(true).setAttribute(name, value); return val; }
[ "public", "Object", "put", "(", "String", "name", ",", "Serializable", "value", ")", "{", "Object", "val", "=", "RequestContext", ".", "getHttpRequest", "(", ")", ".", "getSession", "(", "true", ")", ".", "getAttribute", "(", "name", ")", ";", "RequestCont...
Add object to a session. @param name name of object @param value object reference.
[ "Add", "object", "to", "a", "session", "." ]
train
https://github.com/javalite/activeweb/blob/f25f589da94852b6f5625182360732e0861794a6/activeweb/src/main/java/org/javalite/activeweb/SessionFacade.java#L81-L85
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.packEntry
public static void packEntry(File fileToPack, File destZipFile, NameMapper mapper) { """ Compresses the given file into a ZIP file. <p> The ZIP file must not be a directory and its parent directory must exist. @param fileToPack file that needs to be zipped. @param destZipFile ZIP file that will be created ...
java
public static void packEntry(File fileToPack, File destZipFile, NameMapper mapper) { packEntries(new File[] { fileToPack }, destZipFile, mapper); }
[ "public", "static", "void", "packEntry", "(", "File", "fileToPack", ",", "File", "destZipFile", ",", "NameMapper", "mapper", ")", "{", "packEntries", "(", "new", "File", "[", "]", "{", "fileToPack", "}", ",", "destZipFile", ",", "mapper", ")", ";", "}" ]
Compresses the given file into a ZIP file. <p> The ZIP file must not be a directory and its parent directory must exist. @param fileToPack file that needs to be zipped. @param destZipFile ZIP file that will be created or overwritten. @param mapper call-back for renaming the entries.
[ "Compresses", "the", "given", "file", "into", "a", "ZIP", "file", ".", "<p", ">", "The", "ZIP", "file", "must", "not", "be", "a", "directory", "and", "its", "parent", "directory", "must", "exist", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L1479-L1481
FasterXML/woodstox
src/main/java/com/ctc/wstx/dtd/DTDEntityAttr.java
DTDEntityAttr.validateDefault
@Override public void validateDefault(InputProblemReporter rep, boolean normalize) throws XMLStreamException { """ Method called by the validator object to ask attribute to verify that the default it has (if any) is valid for such type. """ String normStr = validateDefaultName(rep, normal...
java
@Override public void validateDefault(InputProblemReporter rep, boolean normalize) throws XMLStreamException { String normStr = validateDefaultName(rep, normalize); if (normalize) { mDefValue.setValue(normStr); } // Ok, but was it declared? /* 03-Dec...
[ "@", "Override", "public", "void", "validateDefault", "(", "InputProblemReporter", "rep", ",", "boolean", "normalize", ")", "throws", "XMLStreamException", "{", "String", "normStr", "=", "validateDefaultName", "(", "rep", ",", "normalize", ")", ";", "if", "(", "...
Method called by the validator object to ask attribute to verify that the default it has (if any) is valid for such type.
[ "Method", "called", "by", "the", "validator", "object", "to", "ask", "attribute", "to", "verify", "that", "the", "default", "it", "has", "(", "if", "any", ")", "is", "valid", "for", "such", "type", "." ]
train
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/dtd/DTDEntityAttr.java#L100-L117
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/console/NonBlockingReader.java
NonBlockingReader.getNbReader
public static BufferedReader getNbReader(BufferedReader reader, int tries, int timeout, HasPrompt emptyPrint) { """ Returns a new BufferedReader that uses tries and timeout for readline(). @param reader original reader to extend, use in combination with {@link MessageConsole#getStdIn(String)} for standard in @pa...
java
public static BufferedReader getNbReader(BufferedReader reader, int tries, int timeout, HasPrompt emptyPrint){ if(reader==null){ return null; } return new BufferedReader(reader){ ExecutorService ex = Executors.newSingleThreadExecutor(); @Override public String readLine(){ String input = null; ...
[ "public", "static", "BufferedReader", "getNbReader", "(", "BufferedReader", "reader", ",", "int", "tries", ",", "int", "timeout", ",", "HasPrompt", "emptyPrint", ")", "{", "if", "(", "reader", "==", "null", ")", "{", "return", "null", ";", "}", "return", "...
Returns a new BufferedReader that uses tries and timeout for readline(). @param reader original reader to extend, use in combination with {@link MessageConsole#getStdIn(String)} for standard in @param tries number of tries for read calls, use one as default @param timeout milliseconds for read timeout @param emptyPrint...
[ "Returns", "a", "new", "BufferedReader", "that", "uses", "tries", "and", "timeout", "for", "readline", "()", "." ]
train
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/console/NonBlockingReader.java#L101-L132
PuyallupFoursquare/ccb-api-client-java
src/main/java/com/p4square/ccbapi/serializer/AbstractFormSerializer.java
AbstractFormSerializer.appendField
protected void appendField(final StringBuilder builder, final String key, final LocalDate value) { """ Append a LocalDate field to the form. @param builder The StringBuilder to use. @param key The form key, which must be URLEncoded before calling this method. @param value The value associated with the key. ...
java
protected void appendField(final StringBuilder builder, final String key, final LocalDate value) { appendField(builder, key, value.toString()); }
[ "protected", "void", "appendField", "(", "final", "StringBuilder", "builder", ",", "final", "String", "key", ",", "final", "LocalDate", "value", ")", "{", "appendField", "(", "builder", ",", "key", ",", "value", ".", "toString", "(", ")", ")", ";", "}" ]
Append a LocalDate field to the form. @param builder The StringBuilder to use. @param key The form key, which must be URLEncoded before calling this method. @param value The value associated with the key.
[ "Append", "a", "LocalDate", "field", "to", "the", "form", "." ]
train
https://github.com/PuyallupFoursquare/ccb-api-client-java/blob/54a7a3184dc565fe513aa520e1344b2303ea6834/src/main/java/com/p4square/ccbapi/serializer/AbstractFormSerializer.java#L95-L98
doanduyhai/Achilles
achilles-core/src/main/java/info/archinnov/achilles/internals/dsl/options/AbstractOptionsForSelect.java
AbstractOptionsForSelect.withOptionalOutgoingPayload
public T withOptionalOutgoingPayload(Optional<Map<String, ByteBuffer>> outgoingPayload) { """ Set the given outgoing payload map on the generated statement IF NOT NULL """ getOptions().setOutgoingPayLoad(outgoingPayload); return getThis(); }
java
public T withOptionalOutgoingPayload(Optional<Map<String, ByteBuffer>> outgoingPayload) { getOptions().setOutgoingPayLoad(outgoingPayload); return getThis(); }
[ "public", "T", "withOptionalOutgoingPayload", "(", "Optional", "<", "Map", "<", "String", ",", "ByteBuffer", ">", ">", "outgoingPayload", ")", "{", "getOptions", "(", ")", ".", "setOutgoingPayLoad", "(", "outgoingPayload", ")", ";", "return", "getThis", "(", "...
Set the given outgoing payload map on the generated statement IF NOT NULL
[ "Set", "the", "given", "outgoing", "payload", "map", "on", "the", "generated", "statement", "IF", "NOT", "NULL" ]
train
https://github.com/doanduyhai/Achilles/blob/8281c33100e72c993e570592ae1a5306afac6813/achilles-core/src/main/java/info/archinnov/achilles/internals/dsl/options/AbstractOptionsForSelect.java#L111-L114
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/layout/FlowLayoutExample.java
FlowLayoutExample.addBoxes
private static void addBoxes(final WPanel panel, final int amount) { """ Adds a set of boxes to the given panel. @param panel the panel to add the boxes to. @param amount the number of boxes to add. """ for (int i = 1; i <= amount; i++) { WPanel box = new WPanel(WPanel.Type.BOX); box.add(new WText(...
java
private static void addBoxes(final WPanel panel, final int amount) { for (int i = 1; i <= amount; i++) { WPanel box = new WPanel(WPanel.Type.BOX); box.add(new WText(Integer.toString(i))); panel.add(box); } }
[ "private", "static", "void", "addBoxes", "(", "final", "WPanel", "panel", ",", "final", "int", "amount", ")", "{", "for", "(", "int", "i", "=", "1", ";", "i", "<=", "amount", ";", "i", "++", ")", "{", "WPanel", "box", "=", "new", "WPanel", "(", "...
Adds a set of boxes to the given panel. @param panel the panel to add the boxes to. @param amount the number of boxes to add.
[ "Adds", "a", "set", "of", "boxes", "to", "the", "given", "panel", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/layout/FlowLayoutExample.java#L177-L183
finmath/finmath-lib
src/main/java/net/finmath/montecarlo/interestrate/products/SwaptionSingleCurve.java
SwaptionSingleCurve.getValue
@Override public RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException { """ This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value c...
java
@Override public RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException { /* * Calculate value of the swap at exercise date on each path (beware of perfect foresight - all rates are simulationTime=exerciseDate) */ RandomVariable valueOfSwapAtExer...
[ "@", "Override", "public", "RandomVariable", "getValue", "(", "double", "evaluationTime", ",", "LIBORModelMonteCarloSimulationModel", "model", ")", "throws", "CalculationException", "{", "/*\n\t\t * Calculate value of the swap at exercise date on each path (beware of perfect foresight ...
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value conditional to evalutationTime, for a Monte-Carlo simulation this is the (sum of) value discounted to evaluation time. Cashflows prior evaluationTime...
[ "This", "method", "returns", "the", "value", "random", "variable", "of", "the", "product", "within", "the", "specified", "model", "evaluated", "at", "a", "given", "evalutationTime", ".", "Note", ":", "For", "a", "lattice", "this", "is", "often", "the", "valu...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/interestrate/products/SwaptionSingleCurve.java#L115-L165
alkacon/opencms-core
src/org/opencms/ui/apps/sitemanager/CmsWorkplaceServerWidget.java
CmsWorkplaceServerWidget.setUpWorkplaceComboBox
private static BeanItemContainer<CmsSite> setUpWorkplaceComboBox( List<CmsSite> allSites, final ComboBox combo, boolean nullselect, String defaultValue, CmsSSLMode sslMode) { """ Sets the combo box for workplace.<p> @param allSites alls available sites @param combo combo...
java
private static BeanItemContainer<CmsSite> setUpWorkplaceComboBox( List<CmsSite> allSites, final ComboBox combo, boolean nullselect, String defaultValue, CmsSSLMode sslMode) { final List<CmsSite> modSites = new ArrayList<CmsSite>(); CmsSite siteWithDefaultURL = nu...
[ "private", "static", "BeanItemContainer", "<", "CmsSite", ">", "setUpWorkplaceComboBox", "(", "List", "<", "CmsSite", ">", "allSites", ",", "final", "ComboBox", "combo", ",", "boolean", "nullselect", ",", "String", "defaultValue", ",", "CmsSSLMode", "sslMode", ")"...
Sets the combo box for workplace.<p> @param allSites alls available sites @param combo combo box to fill @param nullselect if true, nothing is selected @param defaultValue if set, this value gets chosen @param sslMode CmsSSLMode @return BeanItemContainer
[ "Sets", "the", "combo", "box", "for", "workplace", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/sitemanager/CmsWorkplaceServerWidget.java#L128-L178
andkulikov/Transitions-Everywhere
library(1.x)/src/main/java/com/transitionseverywhere/Visibility.java
Visibility.onAppear
@Nullable public Animator onAppear(@NonNull ViewGroup sceneRoot, @Nullable TransitionValues startValues, int startVisibility, @Nullable TransitionValues endValues, int endVisibility) { """ The default implementation of this method calls {@link #onAppea...
java
@Nullable public Animator onAppear(@NonNull ViewGroup sceneRoot, @Nullable TransitionValues startValues, int startVisibility, @Nullable TransitionValues endValues, int endVisibility) { if ((mMode & MODE_IN) != MODE_IN || endValues == null) { ...
[ "@", "Nullable", "public", "Animator", "onAppear", "(", "@", "NonNull", "ViewGroup", "sceneRoot", ",", "@", "Nullable", "TransitionValues", "startValues", ",", "int", "startVisibility", ",", "@", "Nullable", "TransitionValues", "endValues", ",", "int", "endVisibilit...
The default implementation of this method calls {@link #onAppear(ViewGroup, View, TransitionValues, TransitionValues)}. Subclasses should override this method or {@link #onAppear(ViewGroup, View, TransitionValues, TransitionValues)}. if they need to create an Animator when targets appear. The method should only be call...
[ "The", "default", "implementation", "of", "this", "method", "calls", "{", "@link", "#onAppear", "(", "ViewGroup", "View", "TransitionValues", "TransitionValues", ")", "}", ".", "Subclasses", "should", "override", "this", "method", "or", "{", "@link", "#onAppear", ...
train
https://github.com/andkulikov/Transitions-Everywhere/blob/828efe5f152a2f05e2bfeee6254b74ad2269d4f1/library(1.x)/src/main/java/com/transitionseverywhere/Visibility.java#L299-L329
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/validation/rules/AttributeConstraintRule.java
AttributeConstraintRule.validatePast
private boolean validatePast(Object validationObject, Annotation annotate) { """ Checks whether the object is null or not @param validationObject @param annotate @return """ if (checkNullObject(validationObject)) { return true; } int res = 0; if (valid...
java
private boolean validatePast(Object validationObject, Annotation annotate) { if (checkNullObject(validationObject)) { return true; } int res = 0; if (validationObject.getClass().isAssignableFrom(java.util.Date.class)) { Date today = new Date(...
[ "private", "boolean", "validatePast", "(", "Object", "validationObject", ",", "Annotation", "annotate", ")", "{", "if", "(", "checkNullObject", "(", "validationObject", ")", ")", "{", "return", "true", ";", "}", "int", "res", "=", "0", ";", "if", "(", "val...
Checks whether the object is null or not @param validationObject @param annotate @return
[ "Checks", "whether", "the", "object", "is", "null", "or", "not" ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/validation/rules/AttributeConstraintRule.java#L273-L307
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/JMapper.java
JMapper.getDestination
public D getDestination(final S source,final NullPointerControl nullPointerControl,final MappingType mtSource) { """ This method returns a new instance of Destination Class with this setting: <table summary = ""> <tr> <td><code>NullPointerControl</code></td><td>nullPointerControl</td> </tr><tr> <td><code>Mapp...
java
public D getDestination(final S source,final NullPointerControl nullPointerControl,final MappingType mtSource){ try{ switch(nullPointerControl){ case ALL: case DESTINATION: case SOURCE: switch(mtSource){ case ALL_FIELDS: return mapper.nullVSou...
[ "public", "D", "getDestination", "(", "final", "S", "source", ",", "final", "NullPointerControl", "nullPointerControl", ",", "final", "MappingType", "mtSource", ")", "{", "try", "{", "switch", "(", "nullPointerControl", ")", "{", "case", "ALL", ":", "case", "D...
This method returns a new instance of Destination Class with this setting: <table summary = ""> <tr> <td><code>NullPointerControl</code></td><td>nullPointerControl</td> </tr><tr> <td><code>MappingType</code> of Destination</td><td><code>ALL_FIELDS</code></td> </tr><tr> <td><code>MappingType</code> of Source</td><td>mtS...
[ "This", "method", "returns", "a", "new", "instance", "of", "Destination", "Class", "with", "this", "setting", ":", "<table", "summary", "=", ">", "<tr", ">", "<td", ">", "<code", ">", "NullPointerControl<", "/", "code", ">", "<", "/", "td", ">", "<td", ...
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/JMapper.java#L223-L242
bbottema/simple-java-mail
modules/simple-java-mail/src/main/java/org/simplejavamail/mailer/internal/mailsender/AsyncOperationHelper.java
AsyncOperationHelper.executeAsync
static AsyncResponse executeAsync(final @Nonnull ExecutorService executorService, final @Nonnull String processName, final @Nonnull Runnable operation) { """ Executes using a the given ExecutorService, which is left running after the thread finishes running. @see Executors#newSingleThreadE...
java
static AsyncResponse executeAsync(final @Nonnull ExecutorService executorService, final @Nonnull String processName, final @Nonnull Runnable operation) { return executeAsync(executorService, processName, operation, false); }
[ "static", "AsyncResponse", "executeAsync", "(", "final", "@", "Nonnull", "ExecutorService", "executorService", ",", "final", "@", "Nonnull", "String", "processName", ",", "final", "@", "Nonnull", "Runnable", "operation", ")", "{", "return", "executeAsync", "(", "e...
Executes using a the given ExecutorService, which is left running after the thread finishes running. @see Executors#newSingleThreadExecutor()
[ "Executes", "using", "a", "the", "given", "ExecutorService", "which", "is", "left", "running", "after", "the", "thread", "finishes", "running", "." ]
train
https://github.com/bbottema/simple-java-mail/blob/b03635328aeecd525e35eddfef8f5b9a184559d8/modules/simple-java-mail/src/main/java/org/simplejavamail/mailer/internal/mailsender/AsyncOperationHelper.java#L40-L44
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/matrix/RowComparator.java
RowComparator.getMostSimilar
public SortedMultiMap<Double,Integer> getMostSimilar( Matrix m, int row, int kNearestRows, SimilarityFunction simFunction) { """ Compares the specified row to all other rows, returning the k-nearest rows according to the similarity metric. @param m The {@link Matrix} containing data poi...
java
public SortedMultiMap<Double,Integer> getMostSimilar( Matrix m, int row, int kNearestRows, SimilarityFunction simFunction) { Object key = workQueue.registerTaskGroup(m.rows() - 1); // the most-similar set will automatically retain only a fixed number of ...
[ "public", "SortedMultiMap", "<", "Double", ",", "Integer", ">", "getMostSimilar", "(", "Matrix", "m", ",", "int", "row", ",", "int", "kNearestRows", ",", "SimilarityFunction", "simFunction", ")", "{", "Object", "key", "=", "workQueue", ".", "registerTaskGroup", ...
Compares the specified row to all other rows, returning the k-nearest rows according to the similarity metric. @param m The {@link Matrix} containing data points to be compared @param row The current row in {@code m} to be compared against all other rows @param kNearestRows The number of most similar rows to retain @p...
[ "Compares", "the", "specified", "row", "to", "all", "other", "rows", "returning", "the", "k", "-", "nearest", "rows", "according", "to", "the", "similarity", "metric", "." ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/matrix/RowComparator.java#L100-L128
d-sauer/JCalcAPI
src/main/java/org/jdice/calc/internal/CacheExtension.java
CacheExtension.setNumConverter
public static void setNumConverter(Class customClass, Class<? extends NumConverter> converterClass) { """ Register custom converter class on global scope. @param customClass define class type for conversion @param converterClass define class which knows how to convert <tt>customClass</tt> """ NumC...
java
public static void setNumConverter(Class customClass, Class<? extends NumConverter> converterClass) { NumConverter nc = converterCache.get(customClass); if (nc == null) { synchronized (converterClass) { nc = converterCache.get(customClass); if (nc == null...
[ "public", "static", "void", "setNumConverter", "(", "Class", "customClass", ",", "Class", "<", "?", "extends", "NumConverter", ">", "converterClass", ")", "{", "NumConverter", "nc", "=", "converterCache", ".", "get", "(", "customClass", ")", ";", "if", "(", ...
Register custom converter class on global scope. @param customClass define class type for conversion @param converterClass define class which knows how to convert <tt>customClass</tt>
[ "Register", "custom", "converter", "class", "on", "global", "scope", "." ]
train
https://github.com/d-sauer/JCalcAPI/blob/36ae1f9adfe611a6f1bd8ef87cf1dc0ec88ac035/src/main/java/org/jdice/calc/internal/CacheExtension.java#L89-L109
datastax/java-driver
query-builder/src/main/java/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.java
SchemaBuilder.alterMaterializedView
@NonNull public static AlterMaterializedViewStart alterMaterializedView( @Nullable CqlIdentifier keyspace, @NonNull CqlIdentifier viewName) { """ Starts an ALTER MATERIALIZED VIEW query with the given view name for the given keyspace name. """ return new DefaultAlterMaterializedView(keyspace, viewN...
java
@NonNull public static AlterMaterializedViewStart alterMaterializedView( @Nullable CqlIdentifier keyspace, @NonNull CqlIdentifier viewName) { return new DefaultAlterMaterializedView(keyspace, viewName); }
[ "@", "NonNull", "public", "static", "AlterMaterializedViewStart", "alterMaterializedView", "(", "@", "Nullable", "CqlIdentifier", "keyspace", ",", "@", "NonNull", "CqlIdentifier", "viewName", ")", "{", "return", "new", "DefaultAlterMaterializedView", "(", "keyspace", ",...
Starts an ALTER MATERIALIZED VIEW query with the given view name for the given keyspace name.
[ "Starts", "an", "ALTER", "MATERIALIZED", "VIEW", "query", "with", "the", "given", "view", "name", "for", "the", "given", "keyspace", "name", "." ]
train
https://github.com/datastax/java-driver/blob/612a63f2525618e2020e86c9ad75ab37adba6132/query-builder/src/main/java/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.java#L259-L263
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service.location/src/com/ibm/ws/kernel/service/location/internal/FileLocator.java
FileLocator.getMatchingFiles
public static List<File> getMatchingFiles(String root, String filterExpr) { """ Get a list of Files from the given path that match the provided filter; not recursive. @param root base directory to look for files @param filterExpr the regular expression to match, may be null @return List of File objects; Li...
java
public static List<File> getMatchingFiles(String root, String filterExpr) { if (root == null) return Collections.emptyList(); File file = new File(root); return getMatchingFiles(file, filterExpr); }
[ "public", "static", "List", "<", "File", ">", "getMatchingFiles", "(", "String", "root", ",", "String", "filterExpr", ")", "{", "if", "(", "root", "==", "null", ")", "return", "Collections", ".", "emptyList", "(", ")", ";", "File", "file", "=", "new", ...
Get a list of Files from the given path that match the provided filter; not recursive. @param root base directory to look for files @param filterExpr the regular expression to match, may be null @return List of File objects; List will be empty if root is null
[ "Get", "a", "list", "of", "Files", "from", "the", "given", "path", "that", "match", "the", "provided", "filter", ";", "not", "recursive", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service.location/src/com/ibm/ws/kernel/service/location/internal/FileLocator.java#L223-L229
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java
Check.greaterOrEqualThan
@ArgumentsChecked @Throws( { """ Ensures that a passed {@code Comparable} is greater or equal compared to another {@code Comparable}. The comparison is made using {@code expected.compareTo(check) > 0}. @param expected Expected value @param check Comparable to be checked @param message an error message de...
java
@ArgumentsChecked @Throws({ IllegalNullArgumentException.class, IllegalNotGreaterOrEqualThanException.class }) public static <T extends Comparable<T>> T greaterOrEqualThan(@Nonnull final T expected, @Nonnull final T check, @Nonnull final String message) { Check.notNull(expected, "expected"); Check.notNull(chec...
[ "@", "ArgumentsChecked", "@", "Throws", "(", "{", "IllegalNullArgumentException", ".", "class", ",", "IllegalNotGreaterOrEqualThanException", ".", "class", "}", ")", "public", "static", "<", "T", "extends", "Comparable", "<", "T", ">", ">", "T", "greaterOrEqualTha...
Ensures that a passed {@code Comparable} is greater or equal compared to another {@code Comparable}. The comparison is made using {@code expected.compareTo(check) > 0}. @param expected Expected value @param check Comparable to be checked @param message an error message describing why the comparable must be greater tha...
[ "Ensures", "that", "a", "passed", "{", "@code", "Comparable", "}", "is", "greater", "or", "equal", "compared", "to", "another", "{", "@code", "Comparable", "}", ".", "The", "comparison", "is", "made", "using", "{", "@code", "expected", ".", "compareTo", "(...
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L705-L717
davetcc/tcMenu
tcMenuJavaApi/src/main/java/com/thecoderscorner/menu/domain/util/MenuItemHelper.java
MenuItemHelper.asSubMenu
public static SubMenuItem asSubMenu(MenuItem item) { """ Returns the menu item as a sub menu or null @param item the possible sub menu @return the sub menu, or null. """ return visitWithResult(item, new AbstractMenuItemVisitor<SubMenuItem>() { @Override public void visit(SubMe...
java
public static SubMenuItem asSubMenu(MenuItem item) { return visitWithResult(item, new AbstractMenuItemVisitor<SubMenuItem>() { @Override public void visit(SubMenuItem item) { setResult(item); } @Override public void anyItem(MenuItem it...
[ "public", "static", "SubMenuItem", "asSubMenu", "(", "MenuItem", "item", ")", "{", "return", "visitWithResult", "(", "item", ",", "new", "AbstractMenuItemVisitor", "<", "SubMenuItem", ">", "(", ")", "{", "@", "Override", "public", "void", "visit", "(", "SubMen...
Returns the menu item as a sub menu or null @param item the possible sub menu @return the sub menu, or null.
[ "Returns", "the", "menu", "item", "as", "a", "sub", "menu", "or", "null" ]
train
https://github.com/davetcc/tcMenu/blob/61546e4b982b25ceaff384073fe9ec1fff55e64a/tcMenuJavaApi/src/main/java/com/thecoderscorner/menu/domain/util/MenuItemHelper.java#L37-L47
emfjson/emfjson-jackson
src/main/java/org/emfjson/jackson/databind/ser/ResourceSerializer.java
ResourceSerializer.serialize
@Override public void serialize(Resource value, JsonGenerator jg, SerializerProvider provider) throws IOException { """ private final EcoreTypeFactory typeFactory = new EcoreTypeFactory(); """ if (value.getContents().size() == 1) { serializeOne(value.getContents().get(0), jg, provider); } else { jg....
java
@Override public void serialize(Resource value, JsonGenerator jg, SerializerProvider provider) throws IOException { if (value.getContents().size() == 1) { serializeOne(value.getContents().get(0), jg, provider); } else { jg.writeStartArray(); for (EObject o : value.getContents()) { serializeOne(o, jg, ...
[ "@", "Override", "public", "void", "serialize", "(", "Resource", "value", ",", "JsonGenerator", "jg", ",", "SerializerProvider", "provider", ")", "throws", "IOException", "{", "if", "(", "value", ".", "getContents", "(", ")", ".", "size", "(", ")", "==", "...
private final EcoreTypeFactory typeFactory = new EcoreTypeFactory();
[ "private", "final", "EcoreTypeFactory", "typeFactory", "=", "new", "EcoreTypeFactory", "()", ";" ]
train
https://github.com/emfjson/emfjson-jackson/blob/5f4488d1b07d499003351606cf76ee0c4ac39964/src/main/java/org/emfjson/jackson/databind/ser/ResourceSerializer.java#L27-L38
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java
DocBookBuilder.createRootContainerXML
protected Element createRootContainerXML(final BuildData buildData, final Document doc, final Level level, final boolean flattenStructure) throws BuildProcessingException { """ Creates all the chapters/appendixes for a book and generates the section/topic data inside of each chapter. @param buildDat...
java
protected Element createRootContainerXML(final BuildData buildData, final Document doc, final Level level, final boolean flattenStructure) throws BuildProcessingException { // Check if the app should be shutdown if (isShuttingDown.get()) { return null; } // Get t...
[ "protected", "Element", "createRootContainerXML", "(", "final", "BuildData", "buildData", ",", "final", "Document", "doc", ",", "final", "Level", "level", ",", "final", "boolean", "flattenStructure", ")", "throws", "BuildProcessingException", "{", "// Check if the app s...
Creates all the chapters/appendixes for a book and generates the section/topic data inside of each chapter. @param buildData Information and data structures for the build. @param doc The Book document object to add the child level content to. @param level The level to build the chapter f...
[ "Creates", "all", "the", "chapters", "/", "appendixes", "for", "a", "book", "and", "generates", "the", "section", "/", "topic", "data", "inside", "of", "each", "chapter", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L2250-L2290
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/Validate.java
Validate.exclusiveBetween
public static <T> void exclusiveBetween(final T start, final T end, final Comparable<T> value) { """ <p>Validate that the specified argument object fall between the two exclusive values specified; otherwise, throws an exception.</p> <pre>Validate.exclusiveBetween(0, 2, 1);</pre> @param <T> the type of the a...
java
public static <T> void exclusiveBetween(final T start, final T end, final Comparable<T> value) { // TODO when breaking BC, consider returning value if (value.compareTo(start) <= 0 || value.compareTo(end) >= 0) { throw new IllegalArgumentException(StringUtils.simpleFormat(DEFAULT_EXCLUSIVE_BE...
[ "public", "static", "<", "T", ">", "void", "exclusiveBetween", "(", "final", "T", "start", ",", "final", "T", "end", ",", "final", "Comparable", "<", "T", ">", "value", ")", "{", "// TODO when breaking BC, consider returning value", "if", "(", "value", ".", ...
<p>Validate that the specified argument object fall between the two exclusive values specified; otherwise, throws an exception.</p> <pre>Validate.exclusiveBetween(0, 2, 1);</pre> @param <T> the type of the argument object @param start the exclusive start value, not null @param end the exclusive end value, not null ...
[ "<p", ">", "Validate", "that", "the", "specified", "argument", "object", "fall", "between", "the", "two", "exclusive", "values", "specified", ";", "otherwise", "throws", "an", "exception", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/Validate.java#L1127-L1132
apereo/cas
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/configurer/AbstractCasWebflowConfigurer.java
AbstractCasWebflowConfigurer.addActionsToActionStateExecutionListAt
public void addActionsToActionStateExecutionListAt(final Flow flow, final String actionStateId, final int position, final EvaluateAction... actions) { """ Add actions to action state execution list at. @param flow the flow @param actionStateId the action state id @param position the position @p...
java
public void addActionsToActionStateExecutionListAt(final Flow flow, final String actionStateId, final int position, final EvaluateAction... actions) { val actionState = getState(flow, actionStateId, ActionState.class); val currentActions = new ArrayList<Action>(); val actionList = actionState.ge...
[ "public", "void", "addActionsToActionStateExecutionListAt", "(", "final", "Flow", "flow", ",", "final", "String", "actionStateId", ",", "final", "int", "position", ",", "final", "EvaluateAction", "...", "actions", ")", "{", "val", "actionState", "=", "getState", "...
Add actions to action state execution list at. @param flow the flow @param actionStateId the action state id @param position the position @param actions the actions
[ "Add", "actions", "to", "action", "state", "execution", "list", "at", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/configurer/AbstractCasWebflowConfigurer.java#L856-L865
alkacon/opencms-core
src/org/opencms/ade/sitemap/CmsModelPageHelper.java
CmsModelPageHelper.ensureModelFolder
public CmsResource ensureModelFolder(CmsResource rootResource) throws CmsException { """ Tries to either read or create the default folder for model pages in the current sitemap, and returns it.<p> @param rootResource the root of the sitemap @return the folder resource @throws CmsException if something go...
java
public CmsResource ensureModelFolder(CmsResource rootResource) throws CmsException { String modelFolderPath = CmsStringUtil.joinPaths(m_adeConfig.getBasePath(), ".content/.templates"); try { CmsResource result = m_cms.readFolder(modelFolderPath); return result; } catch ...
[ "public", "CmsResource", "ensureModelFolder", "(", "CmsResource", "rootResource", ")", "throws", "CmsException", "{", "String", "modelFolderPath", "=", "CmsStringUtil", ".", "joinPaths", "(", "m_adeConfig", ".", "getBasePath", "(", ")", ",", "\".content/.templates\"", ...
Tries to either read or create the default folder for model pages in the current sitemap, and returns it.<p> @param rootResource the root of the sitemap @return the folder resource @throws CmsException if something goes wrong
[ "Tries", "to", "either", "read", "or", "create", "the", "default", "folder", "for", "model", "pages", "in", "the", "current", "sitemap", "and", "returns", "it", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/sitemap/CmsModelPageHelper.java#L289-L307
openengsb/openengsb
components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/QueryRequestCriteriaBuilder.java
QueryRequestCriteriaBuilder.convertParametersToPredicate
@SuppressWarnings( { """ Converts a query request parameter map for a query operation into a list of predicates which need to be added to the criteria query. """ "unchecked" }) private Predicate convertParametersToPredicate(Root<?> from, CriteriaQuery<?> query) { List<Predicate> predicates = new A...
java
@SuppressWarnings({ "unchecked" }) private Predicate convertParametersToPredicate(Root<?> from, CriteriaQuery<?> query) { List<Predicate> predicates = new ArrayList<>(); for (Map.Entry<String, Set<Object>> value : request.getParameters().entrySet()) { Subquery<JPAEntry> subquery = buildJ...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", "}", ")", "private", "Predicate", "convertParametersToPredicate", "(", "Root", "<", "?", ">", "from", ",", "CriteriaQuery", "<", "?", ">", "query", ")", "{", "List", "<", "Predicate", ">", "predicates", "="...
Converts a query request parameter map for a query operation into a list of predicates which need to be added to the criteria query.
[ "Converts", "a", "query", "request", "parameter", "map", "for", "a", "query", "operation", "into", "a", "list", "of", "predicates", "which", "need", "to", "be", "added", "to", "the", "criteria", "query", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/QueryRequestCriteriaBuilder.java#L88-L100
Netflix/Nicobar
nicobar-core/src/main/java/com/netflix/nicobar/core/module/GraphUtils.java
GraphUtils.addIncomingEdges
public static <N> void addIncomingEdges(DirectedGraph<N, DefaultEdge> graph, N target, Set<N> sources) { """ Add dependents on the give target vertex. Whether duplicates are created is dependent on the underlying {@link DirectedGraph} implementation. @param graph graph to be mutated @param target target vertex ...
java
public static <N> void addIncomingEdges(DirectedGraph<N, DefaultEdge> graph, N target, Set<N> sources) { if (!graph.containsVertex(target)) { graph.addVertex(target); } for (N source : sources) { if (!graph.containsVertex(source)) { graph.addVertex(source)...
[ "public", "static", "<", "N", ">", "void", "addIncomingEdges", "(", "DirectedGraph", "<", "N", ",", "DefaultEdge", ">", "graph", ",", "N", "target", ",", "Set", "<", "N", ">", "sources", ")", "{", "if", "(", "!", "graph", ".", "containsVertex", "(", ...
Add dependents on the give target vertex. Whether duplicates are created is dependent on the underlying {@link DirectedGraph} implementation. @param graph graph to be mutated @param target target vertex for the new edges @param sources source vertices for the new edges
[ "Add", "dependents", "on", "the", "give", "target", "vertex", ".", "Whether", "duplicates", "are", "created", "is", "dependent", "on", "the", "underlying", "{" ]
train
https://github.com/Netflix/Nicobar/blob/507173dcae4a86a955afc3df222a855862fab8d7/nicobar-core/src/main/java/com/netflix/nicobar/core/module/GraphUtils.java#L112-L122
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java
DerInputStream.getUnalignedBitString
public BitArray getUnalignedBitString() throws IOException { """ Get a bit string from the input stream. The bit string need not be byte-aligned. """ if (buffer.read() != DerValue.tag_BitString) throw new IOException("DER input not a bit string"); int length = getLength(buffer) -...
java
public BitArray getUnalignedBitString() throws IOException { if (buffer.read() != DerValue.tag_BitString) throw new IOException("DER input not a bit string"); int length = getLength(buffer) - 1; /* * First byte = number of excess bits in the last octet of the * re...
[ "public", "BitArray", "getUnalignedBitString", "(", ")", "throws", "IOException", "{", "if", "(", "buffer", ".", "read", "(", ")", "!=", "DerValue", ".", "tag_BitString", ")", "throw", "new", "IOException", "(", "\"DER input not a bit string\"", ")", ";", "int",...
Get a bit string from the input stream. The bit string need not be byte-aligned.
[ "Get", "a", "bit", "string", "from", "the", "input", "stream", ".", "The", "bit", "string", "need", "not", "be", "byte", "-", "aligned", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L226-L243
jamesagnew/hapi-fhir
hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java
AbstractJaxRsResourceProvider.searchWithPost
@POST @Path("/_search") public Response searchWithPost() throws IOException { """ Search the resource type based on some filter criteria @return the response @see <a href="https://www.hl7.org/fhir/http.html#search">https://www.hl7.org/fhir/http.html#search</a> """ return execute...
java
@POST @Path("/_search") public Response searchWithPost() throws IOException { return execute(getResourceRequest(RequestTypeEnum.POST, RestOperationTypeEnum.SEARCH_TYPE)); }
[ "@", "POST", "@", "Path", "(", "\"/_search\"", ")", "public", "Response", "searchWithPost", "(", ")", "throws", "IOException", "{", "return", "execute", "(", "getResourceRequest", "(", "RequestTypeEnum", ".", "POST", ",", "RestOperationTypeEnum", ".", "SEARCH_TYPE...
Search the resource type based on some filter criteria @return the response @see <a href="https://www.hl7.org/fhir/http.html#search">https://www.hl7.org/fhir/http.html#search</a>
[ "Search", "the", "resource", "type", "based", "on", "some", "filter", "criteria" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java#L143-L148
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.core/src/com/ibm/websphere/ras/TraceComponent.java
TraceComponent.uniquifyCountAndCopy
private static int uniquifyCountAndCopy(String[] in, String[] out) { """ Count the number of non-null non-duplicate elements in an array, and copy those elements to an output array if provided. @param in the input array @param out an output array, or null to count rather than copying @return the number of no...
java
private static int uniquifyCountAndCopy(String[] in, String[] out) { int count = 0; outer: for (int i = 0; i < in.length; i++) { if (in[i] != null) { for (int j = 0; j < i; j++) if (in[i].equals(in[j])) continue outer; ...
[ "private", "static", "int", "uniquifyCountAndCopy", "(", "String", "[", "]", "in", ",", "String", "[", "]", "out", ")", "{", "int", "count", "=", "0", ";", "outer", ":", "for", "(", "int", "i", "=", "0", ";", "i", "<", "in", ".", "length", ";", ...
Count the number of non-null non-duplicate elements in an array, and copy those elements to an output array if provided. @param in the input array @param out an output array, or null to count rather than copying @return the number of non-null non-duplicate elements
[ "Count", "the", "number", "of", "non", "-", "null", "non", "-", "duplicate", "elements", "in", "an", "array", "and", "copy", "those", "elements", "to", "an", "output", "array", "if", "provided", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.core/src/com/ibm/websphere/ras/TraceComponent.java#L174-L187
http-builder-ng/http-builder-ng
http-builder-ng-core/src/main/java/groovyx/net/http/optional/Html.java
Html.jsoupParse
public static Object jsoupParse(final ChainedHttpConfig config, final FromServer fromServer) { """ Method that provides an HTML parser for response configuration (uses JSoup). @param config the chained configuration @param fromServer the server response adapter @return the parsed HTML content (a {@link Docume...
java
public static Object jsoupParse(final ChainedHttpConfig config, final FromServer fromServer) { try { return Jsoup.parse(fromServer.getInputStream(), fromServer.getCharset().name(), fromServer.getUri().toString()); } catch (IOException e) { throw new TransportingException(e); ...
[ "public", "static", "Object", "jsoupParse", "(", "final", "ChainedHttpConfig", "config", ",", "final", "FromServer", "fromServer", ")", "{", "try", "{", "return", "Jsoup", ".", "parse", "(", "fromServer", ".", "getInputStream", "(", ")", ",", "fromServer", "."...
Method that provides an HTML parser for response configuration (uses JSoup). @param config the chained configuration @param fromServer the server response adapter @return the parsed HTML content (a {@link Document} object)
[ "Method", "that", "provides", "an", "HTML", "parser", "for", "response", "configuration", "(", "uses", "JSoup", ")", "." ]
train
https://github.com/http-builder-ng/http-builder-ng/blob/865f37732c102c748d3db8b905199dac9222a525/http-builder-ng-core/src/main/java/groovyx/net/http/optional/Html.java#L73-L79
cdk/cdk
base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java
SmilesValencyChecker.saturateByIncreasingBondOrder
public boolean saturateByIncreasingBondOrder(IBond bond, IAtomContainer atomContainer) throws CDKException { """ Tries to saturate a bond by increasing its bond orders by 1.0. @return true if the bond could be increased """ IAtom[] atoms = BondManipulator.getAtomArray(bond); IAtom atom = ato...
java
public boolean saturateByIncreasingBondOrder(IBond bond, IAtomContainer atomContainer) throws CDKException { IAtom[] atoms = BondManipulator.getAtomArray(bond); IAtom atom = atoms[0]; IAtom partner = atoms[1]; logger.debug(" saturating bond: ", atom.getSymbol(), "-", partner.getSymbol()...
[ "public", "boolean", "saturateByIncreasingBondOrder", "(", "IBond", "bond", ",", "IAtomContainer", "atomContainer", ")", "throws", "CDKException", "{", "IAtom", "[", "]", "atoms", "=", "BondManipulator", ".", "getAtomArray", "(", "bond", ")", ";", "IAtom", "atom",...
Tries to saturate a bond by increasing its bond orders by 1.0. @return true if the bond could be increased
[ "Tries", "to", "saturate", "a", "bond", "by", "increasing", "its", "bond", "orders", "by", "1", ".", "0", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java#L164-L192
vanilladb/vanillacore
src/main/java/org/vanilladb/core/storage/metadata/statistics/SampledHistogramBuilder.java
SampledHistogramBuilder.newMaxDiffHistogram
public Histogram newMaxDiffHistogram(int numBkts, int numPcts) { """ Constructs a histogram with the "MaxDiff(V, A)" buckets for numeric field values and "MaxDiff(V, F)" buckets for other types of field values respectively. @param numBkts the number of buckets to construct for each field @param numPcts the...
java
public Histogram newMaxDiffHistogram(int numBkts, int numPcts) { Map<String, BucketBuilder> initBbs = new HashMap<String, BucketBuilder>(); for (String fld : schema.fields()) { if (schema.type(fld).isNumeric()) { initBbs.put(fld, new MaxDiffAreaBucketBuilder(frequencies(fld), null)); } else ...
[ "public", "Histogram", "newMaxDiffHistogram", "(", "int", "numBkts", ",", "int", "numPcts", ")", "{", "Map", "<", "String", ",", "BucketBuilder", ">", "initBbs", "=", "new", "HashMap", "<", "String", ",", "BucketBuilder", ">", "(", ")", ";", "for", "(", ...
Constructs a histogram with the "MaxDiff(V, A)" buckets for numeric field values and "MaxDiff(V, F)" buckets for other types of field values respectively. @param numBkts the number of buckets to construct for each field @param numPcts the number of value percentiles in each bucket of the non-numeric fields @return a "...
[ "Constructs", "a", "histogram", "with", "the", "MaxDiff", "(", "V", "A", ")", "buckets", "for", "numeric", "field", "values", "and", "MaxDiff", "(", "V", "F", ")", "buckets", "for", "other", "types", "of", "field", "values", "respectively", "." ]
train
https://github.com/vanilladb/vanillacore/blob/d9a34e876b1b83226036d1fa982a614bbef59bd1/src/main/java/org/vanilladb/core/storage/metadata/statistics/SampledHistogramBuilder.java#L395-L406
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/JDBCUtilities.java
JDBCUtilities.hasField
public static boolean hasField(Connection connection, String tableName, String fieldName) throws SQLException { """ Return true if table tableName contains field fieldName. @param connection Connection @param tableName Table name @param fieldName Field name @return True if the table contains the field @th...
java
public static boolean hasField(Connection connection, String tableName, String fieldName) throws SQLException { final Statement statement = connection.createStatement(); try { final ResultSet resultSet = statement.executeQuery( "SELECT * FROM " + TableLocation.parse(table...
[ "public", "static", "boolean", "hasField", "(", "Connection", "connection", ",", "String", "tableName", ",", "String", "fieldName", ")", "throws", "SQLException", "{", "final", "Statement", "statement", "=", "connection", ".", "createStatement", "(", ")", ";", "...
Return true if table tableName contains field fieldName. @param connection Connection @param tableName Table name @param fieldName Field name @return True if the table contains the field @throws SQLException
[ "Return", "true", "if", "table", "tableName", "contains", "field", "fieldName", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/JDBCUtilities.java#L89-L104
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/TransactionWriteRequest.java
TransactionWriteRequest.addUpdate
public TransactionWriteRequest addUpdate(Object object, DynamoDBTransactionWriteExpression transactionWriteExpression) { """ Adds update operation (to be executed on object) to the list of transaction write operations. transactionWriteExpression is used to conditionally update object. """ return addUp...
java
public TransactionWriteRequest addUpdate(Object object, DynamoDBTransactionWriteExpression transactionWriteExpression) { return addUpdate(object, transactionWriteExpression, null /* returnValuesOnConditionCheckFailure */); }
[ "public", "TransactionWriteRequest", "addUpdate", "(", "Object", "object", ",", "DynamoDBTransactionWriteExpression", "transactionWriteExpression", ")", "{", "return", "addUpdate", "(", "object", ",", "transactionWriteExpression", ",", "null", "/* returnValuesOnConditionCheckFa...
Adds update operation (to be executed on object) to the list of transaction write operations. transactionWriteExpression is used to conditionally update object.
[ "Adds", "update", "operation", "(", "to", "be", "executed", "on", "object", ")", "to", "the", "list", "of", "transaction", "write", "operations", ".", "transactionWriteExpression", "is", "used", "to", "conditionally", "update", "object", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/TransactionWriteRequest.java#L85-L87
Bedework/bw-util
bw-util-misc/src/main/java/org/bedework/util/misc/Util.java
Util.cmpObjval
@SuppressWarnings("unchecked") public static int cmpObjval(final Comparable thisone, final Comparable thatone) { """ Compare two possibly null objects @param thisone @param thatone @return int -1, 0, 1, """ if (thisone == null) { if (thatone == null) { return 0; } return -...
java
@SuppressWarnings("unchecked") public static int cmpObjval(final Comparable thisone, final Comparable thatone) { if (thisone == null) { if (thatone == null) { return 0; } return -1; } if (thatone == null) { return 1; } return thisone.compareTo(thatone); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "int", "cmpObjval", "(", "final", "Comparable", "thisone", ",", "final", "Comparable", "thatone", ")", "{", "if", "(", "thisone", "==", "null", ")", "{", "if", "(", "thatone", "==", "n...
Compare two possibly null objects @param thisone @param thatone @return int -1, 0, 1,
[ "Compare", "two", "possibly", "null", "objects" ]
train
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-misc/src/main/java/org/bedework/util/misc/Util.java#L729-L744
stapler/stapler
jelly/src/main/java/org/kohsuke/stapler/jelly/ResourceBundle.java
ResourceBundle.getFormatStringWithoutDefaulting
public String getFormatStringWithoutDefaulting(Locale locale, String key) { """ Works like {@link #getFormatString(Locale, String)} except there's no searching up the delegation chain. """ for (String s : toStrings(locale)) { String msg = get(s).getProperty(key); if(msg!=null &...
java
public String getFormatStringWithoutDefaulting(Locale locale, String key) { for (String s : toStrings(locale)) { String msg = get(s).getProperty(key); if(msg!=null && msg.length()>0) return msg; } return null; }
[ "public", "String", "getFormatStringWithoutDefaulting", "(", "Locale", "locale", ",", "String", "key", ")", "{", "for", "(", "String", "s", ":", "toStrings", "(", "locale", ")", ")", "{", "String", "msg", "=", "get", "(", "s", ")", ".", "getProperty", "(...
Works like {@link #getFormatString(Locale, String)} except there's no searching up the delegation chain.
[ "Works", "like", "{" ]
train
https://github.com/stapler/stapler/blob/11ad5af185e062fb46e01bf9fbed66f3ebf2a8f7/jelly/src/main/java/org/kohsuke/stapler/jelly/ResourceBundle.java#L107-L114
google/closure-compiler
src/com/google/javascript/rhino/JSDocInfo.java
JSDocInfo.documentParam
boolean documentParam(String parameter, String description) { """ Documents a parameter. Parameters are described using the {@code @param} annotation. @param parameter the parameter's name @param description the parameter's description """ if (!lazyInitDocumentation()) { return true; } ...
java
boolean documentParam(String parameter, String description) { if (!lazyInitDocumentation()) { return true; } if (documentation.parameters == null) { documentation.parameters = new LinkedHashMap<>(); } if (!documentation.parameters.containsKey(parameter)) { documentation.parameter...
[ "boolean", "documentParam", "(", "String", "parameter", ",", "String", "description", ")", "{", "if", "(", "!", "lazyInitDocumentation", "(", ")", ")", "{", "return", "true", ";", "}", "if", "(", "documentation", ".", "parameters", "==", "null", ")", "{", ...
Documents a parameter. Parameters are described using the {@code @param} annotation. @param parameter the parameter's name @param description the parameter's description
[ "Documents", "a", "parameter", ".", "Parameters", "are", "described", "using", "the", "{", "@code", "@param", "}", "annotation", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/JSDocInfo.java#L1302-L1317
hibernate/hibernate-ogm
neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/query/parsing/impl/predicate/impl/Neo4jPredicateFactory.java
Neo4jPredicateFactory.getPropertyIdentifier
private PropertyIdentifier getPropertyIdentifier(String entityType, List<String> propertyPath) { """ Returns the {@link PropertyIdentifier} corresponding to this property based on information provided by the {@link Neo4jAliasResolver}. Note that all the path is required as in the current implementation, the WHE...
java
private PropertyIdentifier getPropertyIdentifier(String entityType, List<String> propertyPath) { return propertyHelper.getPropertyIdentifier( entityType, propertyPath, propertyPath.size() ); }
[ "private", "PropertyIdentifier", "getPropertyIdentifier", "(", "String", "entityType", ",", "List", "<", "String", ">", "propertyPath", ")", "{", "return", "propertyHelper", ".", "getPropertyIdentifier", "(", "entityType", ",", "propertyPath", ",", "propertyPath", "."...
Returns the {@link PropertyIdentifier} corresponding to this property based on information provided by the {@link Neo4jAliasResolver}. Note that all the path is required as in the current implementation, the WHERE clause is appended before the OPTIONAL MATCH clauses so we need all the aliases referenced in the predica...
[ "Returns", "the", "{", "@link", "PropertyIdentifier", "}", "corresponding", "to", "this", "property", "based", "on", "information", "provided", "by", "the", "{", "@link", "Neo4jAliasResolver", "}", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/query/parsing/impl/predicate/impl/Neo4jPredicateFactory.java#L113-L115
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java
Validator.expectNumeric
public void expectNumeric(String name, String message) { """ Validates that a given field has a numeric value @param name The field to check @param message A custom error message instead of the default one """ String value = Optional.ofNullable(get(name)).orElse(""); if (!StringUtils.isNum...
java
public void expectNumeric(String name, String message) { String value = Optional.ofNullable(get(name)).orElse(""); if (!StringUtils.isNumeric(value)) { addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.NUMERIC_KEY.name(), name))); } }
[ "public", "void", "expectNumeric", "(", "String", "name", ",", "String", "message", ")", "{", "String", "value", "=", "Optional", ".", "ofNullable", "(", "get", "(", "name", ")", ")", ".", "orElse", "(", "\"\"", ")", ";", "if", "(", "!", "StringUtils",...
Validates that a given field has a numeric value @param name The field to check @param message A custom error message instead of the default one
[ "Validates", "that", "a", "given", "field", "has", "a", "numeric", "value" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java#L136-L142
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/message/ParameterFormatter.java
ParameterFormatter.countArgumentPlaceholders3
static int countArgumentPlaceholders3(final char[] messagePattern, final int length, final int[] indices) { """ Counts the number of unescaped placeholders in the given messagePattern. @param messagePattern the message pattern to be analyzed. @return the number of unescaped placeholders. """ int re...
java
static int countArgumentPlaceholders3(final char[] messagePattern, final int length, final int[] indices) { int result = 0; boolean isEscaped = false; for (int i = 0; i < length - 1; i++) { final char curChar = messagePattern[i]; if (curChar == ESCAPE_CHAR) { ...
[ "static", "int", "countArgumentPlaceholders3", "(", "final", "char", "[", "]", "messagePattern", ",", "final", "int", "length", ",", "final", "int", "[", "]", "indices", ")", "{", "int", "result", "=", "0", ";", "boolean", "isEscaped", "=", "false", ";", ...
Counts the number of unescaped placeholders in the given messagePattern. @param messagePattern the message pattern to be analyzed. @return the number of unescaped placeholders.
[ "Counts", "the", "number", "of", "unescaped", "placeholders", "in", "the", "given", "messagePattern", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/ParameterFormatter.java#L137-L156
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/PropertiesField.java
PropertiesField.propertiesToString
public static String propertiesToString(Map<String,Object> map) { """ Convert these java properties to a string. @param properties The java properties. @return The properties string. """ String strProperties = null; Properties properties = Utility.mapToProperties(map); ByteArrayOutput...
java
public static String propertiesToString(Map<String,Object> map) { String strProperties = null; Properties properties = Utility.mapToProperties(map); ByteArrayOutputStream baOut = new ByteArrayOutputStream(); try { properties.store(baOut, PROPERTIES_COMMENT); ...
[ "public", "static", "String", "propertiesToString", "(", "Map", "<", "String", ",", "Object", ">", "map", ")", "{", "String", "strProperties", "=", "null", ";", "Properties", "properties", "=", "Utility", ".", "mapToProperties", "(", "map", ")", ";", "ByteAr...
Convert these java properties to a string. @param properties The java properties. @return The properties string.
[ "Convert", "these", "java", "properties", "to", "a", "string", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/PropertiesField.java#L266-L284
mlhartme/mork
src/main/java/net/oneandone/mork/scanner/Minimizer.java
Minimizer.setDistinct
private void setDistinct(int leftSi, int rightSi) { """ Mark the pair to be distinct. Recursively marks depending pairs. """ IntArrayList tmp; int pair; int i, max; tmp = distinct[leftSi][rightSi]; if (tmp != YES) { distinct[leftSi][rightSi] = YES; ...
java
private void setDistinct(int leftSi, int rightSi) { IntArrayList tmp; int pair; int i, max; tmp = distinct[leftSi][rightSi]; if (tmp != YES) { distinct[leftSi][rightSi] = YES; if (tmp != UNKNOWN) { max = tmp.size(); for (i ...
[ "private", "void", "setDistinct", "(", "int", "leftSi", ",", "int", "rightSi", ")", "{", "IntArrayList", "tmp", ";", "int", "pair", ";", "int", "i", ",", "max", ";", "tmp", "=", "distinct", "[", "leftSi", "]", "[", "rightSi", "]", ";", "if", "(", "...
Mark the pair to be distinct. Recursively marks depending pairs.
[ "Mark", "the", "pair", "to", "be", "distinct", ".", "Recursively", "marks", "depending", "pairs", "." ]
train
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/scanner/Minimizer.java#L237-L253
jvirtanen/config-extras
src/main/java/org/jvirtanen/config/Configs.java
Configs.getNetworkInterface
public static NetworkInterface getNetworkInterface(Config config, String path) { """ Get a network interface. The network interface can be identified by its name or its IP address. @param config a configuration object @param path the path expression @return a network interface @throws ConfigException.Missin...
java
public static NetworkInterface getNetworkInterface(Config config, String path) { NetworkInterface value = getNetworkInterfaceByName(config, path); if (value == null) value = getNetworkInterfaceByInetAddress(config, path); if (value == null) throw badValue("No network int...
[ "public", "static", "NetworkInterface", "getNetworkInterface", "(", "Config", "config", ",", "String", "path", ")", "{", "NetworkInterface", "value", "=", "getNetworkInterfaceByName", "(", "config", ",", "path", ")", ";", "if", "(", "value", "==", "null", ")", ...
Get a network interface. The network interface can be identified by its name or its IP address. @param config a configuration object @param path the path expression @return a network interface @throws ConfigException.Missing if the value is absent or null @throws ConfigException.WrongType if the value is not convertib...
[ "Get", "a", "network", "interface", ".", "The", "network", "interface", "can", "be", "identified", "by", "its", "name", "or", "its", "IP", "address", "." ]
train
https://github.com/jvirtanen/config-extras/blob/eba3cff680c302fe07625dc8046f0bd4a56b9fc3/src/main/java/org/jvirtanen/config/Configs.java#L53-L62
pravega/pravega
segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/LogMetadata.java
LogMetadata.updateLedgerStatus
LogMetadata updateLedgerStatus(Map<Long, Long> lastAddConfirmed) { """ Updates the LastAddConfirmed on individual LedgerMetadata instances based on the provided argument. @param lastAddConfirmed A Map of LedgerId to LastAddConfirmed based on which we can update the status. @return This (unmodified) instance if...
java
LogMetadata updateLedgerStatus(Map<Long, Long> lastAddConfirmed) { if (lastAddConfirmed.isEmpty()) { // Nothing to change. return this; } val newLedgers = this.ledgers.stream() .map(lm -> { long lac = lastAddConfirmed.getOrDefault(lm.g...
[ "LogMetadata", "updateLedgerStatus", "(", "Map", "<", "Long", ",", "Long", ">", "lastAddConfirmed", ")", "{", "if", "(", "lastAddConfirmed", ".", "isEmpty", "(", ")", ")", "{", "// Nothing to change.", "return", "this", ";", "}", "val", "newLedgers", "=", "t...
Updates the LastAddConfirmed on individual LedgerMetadata instances based on the provided argument. @param lastAddConfirmed A Map of LedgerId to LastAddConfirmed based on which we can update the status. @return This (unmodified) instance if lastAddConfirmed.isEmpty() or a new instance of the LogMetadata class with the...
[ "Updates", "the", "LastAddConfirmed", "on", "individual", "LedgerMetadata", "instances", "based", "on", "the", "provided", "argument", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/LogMetadata.java#L191-L211
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java
Validator.expectDomainName
public void expectDomainName(String name, String message) { """ Validates a field to be a valid IPv4 address @param name The field to check @param message A custom error message instead of the default one """ String value = Optional.ofNullable(get(name)).orElse(""); if (!DomainValidator.ge...
java
public void expectDomainName(String name, String message) { String value = Optional.ofNullable(get(name)).orElse(""); if (!DomainValidator.getInstance().isValid(value)) { addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.DOMAIN_NAME_KEY.name(), name))); } ...
[ "public", "void", "expectDomainName", "(", "String", "name", ",", "String", "message", ")", "{", "String", "value", "=", "Optional", ".", "ofNullable", "(", "get", "(", "name", ")", ")", ".", "orElse", "(", "\"\"", ")", ";", "if", "(", "!", "DomainVali...
Validates a field to be a valid IPv4 address @param name The field to check @param message A custom error message instead of the default one
[ "Validates", "a", "field", "to", "be", "a", "valid", "IPv4", "address" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java#L303-L309
datacleaner/DataCleaner
desktop/api/src/main/java/org/datacleaner/widgets/properties/FormPanel.java
FormPanel.addFormEntry
public void addFormEntry(final JLabel mainLabel, final JLabel minorLabel, final JComponent component) { """ Adds a form entry to the panel @param mainLabel @param minorLabel @param component """ add(mainLabel, new GridBagConstraints(0, _rowCounter, 1, 1, 0d, 0d, GridBagConstraints.NORTHWEST, ...
java
public void addFormEntry(final JLabel mainLabel, final JLabel minorLabel, final JComponent component) { add(mainLabel, new GridBagConstraints(0, _rowCounter, 1, 1, 0d, 0d, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, INSETS, 0, 0)); if (minorLabel != null) { add(mi...
[ "public", "void", "addFormEntry", "(", "final", "JLabel", "mainLabel", ",", "final", "JLabel", "minorLabel", ",", "final", "JComponent", "component", ")", "{", "add", "(", "mainLabel", ",", "new", "GridBagConstraints", "(", "0", ",", "_rowCounter", ",", "1", ...
Adds a form entry to the panel @param mainLabel @param minorLabel @param component
[ "Adds", "a", "form", "entry", "to", "the", "panel" ]
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/desktop/api/src/main/java/org/datacleaner/widgets/properties/FormPanel.java#L100-L114
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WCollapsibleRenderer.java
WCollapsibleRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given WCollapsible. @param component the WCollapsible to paint. @param renderContext the RenderContext to paint to. """ WCollapsible collapsible = (WCollapsible) component; XmlStringBui...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WCollapsible collapsible = (WCollapsible) component; XmlStringBuilder xml = renderContext.getWriter(); WComponent content = collapsible.getContent(); boolean collapsed = collapsible.isCollapsed(); xml.appen...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WCollapsible", "collapsible", "=", "(", "WCollapsible", ")", "component", ";", "XmlStringBuilder", "xml", "=", ...
Paints the given WCollapsible. @param component the WCollapsible to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WCollapsible", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WCollapsibleRenderer.java#L26-L89
mboudreau/Alternator
src/main/java/com/amazonaws/services/dynamodb/AmazonDynamoDBClient.java
AmazonDynamoDBClient.listTables
public ListTablesResult listTables(ListTablesRequest listTablesRequest) throws AmazonServiceException, AmazonClientException { """ <p> Retrieves a paginated list of table names created by the AWS Account of the caller in the AWS Region (e.g. <code>us-east-1</code> ). </p> @param listTablesRequest...
java
public ListTablesResult listTables(ListTablesRequest listTablesRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(listTablesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); ...
[ "public", "ListTablesResult", "listTables", "(", "ListTablesRequest", "listTablesRequest", ")", "throws", "AmazonServiceException", ",", "AmazonClientException", "{", "ExecutionContext", "executionContext", "=", "createExecutionContext", "(", "listTablesRequest", ")", ";", "A...
<p> Retrieves a paginated list of table names created by the AWS Account of the caller in the AWS Region (e.g. <code>us-east-1</code> ). </p> @param listTablesRequest Container for the necessary parameters to execute the ListTables service method on AmazonDynamoDB. @return The response from the ListTables service met...
[ "<p", ">", "Retrieves", "a", "paginated", "list", "of", "table", "names", "created", "by", "the", "AWS", "Account", "of", "the", "caller", "in", "the", "AWS", "Region", "(", "e", ".", "g", ".", "<code", ">", "us", "-", "east", "-", "1<", "/", "code...
train
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/amazonaws/services/dynamodb/AmazonDynamoDBClient.java#L370-L382
geomajas/geomajas-project-client-gwt2
impl/src/main/java/org/geomajas/gwt2/client/controller/NavigationController.java
NavigationController.calculatePosition
protected Coordinate calculatePosition(boolean zoomIn, Coordinate rescalePoint) { """ Calculate the target position should there be a rescale point. The idea is that after zooming in or out, the mouse cursor would still lie at the same position in world space. """ ViewPort viewPort = mapPresenter.getViewPor...
java
protected Coordinate calculatePosition(boolean zoomIn, Coordinate rescalePoint) { ViewPort viewPort = mapPresenter.getViewPort(); Coordinate position = viewPort.getPosition(); int index = viewPort.getResolutionIndex(viewPort.getResolution()); double resolution = viewPort.getResolution(); if (zoomIn && index <...
[ "protected", "Coordinate", "calculatePosition", "(", "boolean", "zoomIn", ",", "Coordinate", "rescalePoint", ")", "{", "ViewPort", "viewPort", "=", "mapPresenter", ".", "getViewPort", "(", ")", ";", "Coordinate", "position", "=", "viewPort", ".", "getPosition", "(...
Calculate the target position should there be a rescale point. The idea is that after zooming in or out, the mouse cursor would still lie at the same position in world space.
[ "Calculate", "the", "target", "position", "should", "there", "be", "a", "rescale", "point", ".", "The", "idea", "is", "that", "after", "zooming", "in", "or", "out", "the", "mouse", "cursor", "would", "still", "lie", "at", "the", "same", "position", "in", ...
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/impl/src/main/java/org/geomajas/gwt2/client/controller/NavigationController.java#L318-L334
OpenLiberty/open-liberty
dev/com.ibm.ws.crypto.ltpakeyutil/src/com/ibm/ws/crypto/ltpakeyutil/LTPAKeyFileUtilityImpl.java
LTPAKeyFileUtilityImpl.generateLTPAKeys
protected final Properties generateLTPAKeys(byte[] keyPasswordBytes, final String realm) throws Exception { """ Generates the LTPA keys and stores them into a Properties object. @param keyPasswordBytes @param realm @return @throws Exception """ Properties expProps = null; try { ...
java
protected final Properties generateLTPAKeys(byte[] keyPasswordBytes, final String realm) throws Exception { Properties expProps = null; try { KeyEncryptor encryptor = new KeyEncryptor(keyPasswordBytes); LTPAKeyPair pair = LTPADigSignature.generateLTPAKeyPair(); byte[...
[ "protected", "final", "Properties", "generateLTPAKeys", "(", "byte", "[", "]", "keyPasswordBytes", ",", "final", "String", "realm", ")", "throws", "Exception", "{", "Properties", "expProps", "=", "null", ";", "try", "{", "KeyEncryptor", "encryptor", "=", "new", ...
Generates the LTPA keys and stores them into a Properties object. @param keyPasswordBytes @param realm @return @throws Exception
[ "Generates", "the", "LTPA", "keys", "and", "stores", "them", "into", "a", "Properties", "object", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.crypto.ltpakeyutil/src/com/ibm/ws/crypto/ltpakeyutil/LTPAKeyFileUtilityImpl.java#L45-L76
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeIndirectInvoke
private RValue[] executeIndirectInvoke(Expr.IndirectInvoke expr, CallStack frame) { """ Execute an IndirectInvoke bytecode instruction at a given point in the function or method body. This first checks the operand is a function reference, and then generates a recursive call to execute the given function. If the...
java
private RValue[] executeIndirectInvoke(Expr.IndirectInvoke expr, CallStack frame) { RValue.Lambda src = executeExpression(LAMBDA_T, expr.getSource(),frame); RValue[] arguments = executeExpressions(expr.getArguments(), frame); // Here we have to use the enclosing frame when the lambda was created. // The reason ...
[ "private", "RValue", "[", "]", "executeIndirectInvoke", "(", "Expr", ".", "IndirectInvoke", "expr", ",", "CallStack", "frame", ")", "{", "RValue", ".", "Lambda", "src", "=", "executeExpression", "(", "LAMBDA_T", ",", "expr", ".", "getSource", "(", ")", ",", ...
Execute an IndirectInvoke bytecode instruction at a given point in the function or method body. This first checks the operand is a function reference, and then generates a recursive call to execute the given function. If the function does not exist, or is provided with the wrong number of arguments, then a runtime faul...
[ "Execute", "an", "IndirectInvoke", "bytecode", "instruction", "at", "a", "given", "point", "in", "the", "function", "or", "method", "body", ".", "This", "first", "checks", "the", "operand", "is", "a", "function", "reference", "and", "then", "generates", "a", ...
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L1144-L1162
grails/grails-core
grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java
GrailsASTUtils.applyMethodTarget
public static MethodCallExpression applyMethodTarget(final MethodCallExpression methodCallExpression, final Class<?> targetClass, final Class<?>... targetParameterClassTypes) { """ Set the method target of a MethodCallExpression to the first matching method with same number and type of arguments. @param methodC...
java
public static MethodCallExpression applyMethodTarget(final MethodCallExpression methodCallExpression, final Class<?> targetClass, final Class<?>... targetParameterClassTypes) { return applyMethodTarget(methodCallExpression, ClassHelper.make(targetClass).getPlainNodeReference(), convertTargetParameterTypes(targe...
[ "public", "static", "MethodCallExpression", "applyMethodTarget", "(", "final", "MethodCallExpression", "methodCallExpression", ",", "final", "Class", "<", "?", ">", "targetClass", ",", "final", "Class", "<", "?", ">", "...", "targetParameterClassTypes", ")", "{", "r...
Set the method target of a MethodCallExpression to the first matching method with same number and type of arguments. @param methodCallExpression @param targetClass @param targetParameterClassTypes @return The method call expression
[ "Set", "the", "method", "target", "of", "a", "MethodCallExpression", "to", "the", "first", "matching", "method", "with", "same", "number", "and", "type", "of", "arguments", "." ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java#L1256-L1258
mozilla/rhino
src/org/mozilla/javascript/ScriptRuntime.java
ScriptRuntime.getPropFunctionAndThis
@Deprecated public static Callable getPropFunctionAndThis(Object obj, String property, Context cx) { """ Prepare for calling obj.property(...): return function corresponding to obj.property and make obj properl...
java
@Deprecated public static Callable getPropFunctionAndThis(Object obj, String property, Context cx) { return getPropFunctionAndThis(obj, property, cx, getTopCallScope(cx)); }
[ "@", "Deprecated", "public", "static", "Callable", "getPropFunctionAndThis", "(", "Object", "obj", ",", "String", "property", ",", "Context", "cx", ")", "{", "return", "getPropFunctionAndThis", "(", "obj", ",", "property", ",", "cx", ",", "getTopCallScope", "(",...
Prepare for calling obj.property(...): return function corresponding to obj.property and make obj properly converted to Scriptable available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj. The caller must call ScriptRuntime.lastStoredScriptable() immediately after calling this method. Warning: this ...
[ "Prepare", "for", "calling", "obj", ".", "property", "(", "...", ")", ":", "return", "function", "corresponding", "to", "obj", ".", "property", "and", "make", "obj", "properly", "converted", "to", "Scriptable", "available", "as", "ScriptRuntime", ".", "lastSto...
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptRuntime.java#L2542-L2548
structurizr/java
structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java
DocumentationTemplate.addImages
public Collection<Image> addImages(File path) throws IOException { """ Adds png/jpg/jpeg/gif images in the given directory to the workspace. @param path a File descriptor representing a directory on disk @return a Collection of Image objects @throws IOException if the path can't be accessed """...
java
public Collection<Image> addImages(File path) throws IOException { if (path == null) { throw new IllegalArgumentException("Directory path must not be null."); } else if (!path.exists()) { throw new IllegalArgumentException("The directory " + path.getCanonicalPath() + " does not e...
[ "public", "Collection", "<", "Image", ">", "addImages", "(", "File", "path", ")", "throws", "IOException", "{", "if", "(", "path", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Directory path must not be null.\"", ")", ";", "}", "...
Adds png/jpg/jpeg/gif images in the given directory to the workspace. @param path a File descriptor representing a directory on disk @return a Collection of Image objects @throws IOException if the path can't be accessed
[ "Adds", "png", "/", "jpg", "/", "jpeg", "/", "gif", "images", "in", "the", "given", "directory", "to", "the", "workspace", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java#L195-L205
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderNotePersistenceImpl.java
CommerceOrderNotePersistenceImpl.findByCommerceOrderId
@Override public List<CommerceOrderNote> findByCommerceOrderId(long commerceOrderId, int start, int end) { """ Returns a range of all the commerce order notes where commerceOrderId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <c...
java
@Override public List<CommerceOrderNote> findByCommerceOrderId(long commerceOrderId, int start, int end) { return findByCommerceOrderId(commerceOrderId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceOrderNote", ">", "findByCommerceOrderId", "(", "long", "commerceOrderId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByCommerceOrderId", "(", "commerceOrderId", ",", "start", ",", "end", ",",...
Returns a range of all the commerce order notes where commerceOrderId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result i...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "order", "notes", "where", "commerceOrderId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderNotePersistenceImpl.java#L143-L147
jsurfer/JsonSurfer
jsurfer-core/src/main/java/org/jsfr/json/JsonSurfer.java
JsonSurfer.collectAll
public Collection<Object> collectAll(String json, String... paths) { """ Collect all matched value into a collection @param json Json string @param paths JsonPath @return collection """ return collectAll(json, compile(paths)); }
java
public Collection<Object> collectAll(String json, String... paths) { return collectAll(json, compile(paths)); }
[ "public", "Collection", "<", "Object", ">", "collectAll", "(", "String", "json", ",", "String", "...", "paths", ")", "{", "return", "collectAll", "(", "json", ",", "compile", "(", "paths", ")", ")", ";", "}" ]
Collect all matched value into a collection @param json Json string @param paths JsonPath @return collection
[ "Collect", "all", "matched", "value", "into", "a", "collection" ]
train
https://github.com/jsurfer/JsonSurfer/blob/52bd75a453338b86e115092803da140bf99cee62/jsurfer-core/src/main/java/org/jsfr/json/JsonSurfer.java#L261-L263
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.overTheBox_serviceName_migrate_POST
public OvhOrder overTheBox_serviceName_migrate_POST(String serviceName, Boolean hardware, String offer, String shippingContactID, OvhShippingMethodEnum shippingMethod, Long shippingRelayID) throws IOException { """ Create order REST: POST /order/overTheBox/{serviceName}/migrate @param offer [required] Offer na...
java
public OvhOrder overTheBox_serviceName_migrate_POST(String serviceName, Boolean hardware, String offer, String shippingContactID, OvhShippingMethodEnum shippingMethod, Long shippingRelayID) throws IOException { String qPath = "/order/overTheBox/{serviceName}/migrate"; StringBuilder sb = path(qPath, serviceName); ...
[ "public", "OvhOrder", "overTheBox_serviceName_migrate_POST", "(", "String", "serviceName", ",", "Boolean", "hardware", ",", "String", "offer", ",", "String", "shippingContactID", ",", "OvhShippingMethodEnum", "shippingMethod", ",", "Long", "shippingRelayID", ")", "throws"...
Create order REST: POST /order/overTheBox/{serviceName}/migrate @param offer [required] Offer name to migrate to @param shippingContactID [required] Contact ID to deliver to @param shippingRelayID [required] Relay ID to deliver to. Needed if shipping is mondialRelay @param shippingMethod [required] How do you want you...
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L3177-L3188
sporniket/core
sporniket-core-ui/src/main/java/com/sporniket/libre/ui/swing/JFrameUtils.java
JFrameUtils.getMaximisedFrameOuterBounds
public static Rectangle getMaximisedFrameOuterBounds() { """ Query {@link Toolkit#getScreenInsets(GraphicsConfiguration)} and {@link GraphicsConfiguration#getBounds()} to compute the bounds of a maximized JFrame. @return a rectangle describing the outer bounds of a maximised frame, for determining the screen s...
java
public static Rectangle getMaximisedFrameOuterBounds() { Toolkit _toolkit = Toolkit.getDefaultToolkit(); GraphicsEnvironment _ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice _gd = _ge.getDefaultScreenDevice(); GraphicsConfiguration _gc = _gd.getDefaultConfiguration(); Insets _scr...
[ "public", "static", "Rectangle", "getMaximisedFrameOuterBounds", "(", ")", "{", "Toolkit", "_toolkit", "=", "Toolkit", ".", "getDefaultToolkit", "(", ")", ";", "GraphicsEnvironment", "_ge", "=", "GraphicsEnvironment", ".", "getLocalGraphicsEnvironment", "(", ")", ";",...
Query {@link Toolkit#getScreenInsets(GraphicsConfiguration)} and {@link GraphicsConfiguration#getBounds()} to compute the bounds of a maximized JFrame. @return a rectangle describing the outer bounds of a maximised frame, for determining the screen size (this is not the full-screen size).
[ "Query", "{", "@link", "Toolkit#getScreenInsets", "(", "GraphicsConfiguration", ")", "}", "and", "{", "@link", "GraphicsConfiguration#getBounds", "()", "}", "to", "compute", "the", "bounds", "of", "a", "maximized", "JFrame", "." ]
train
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-ui/src/main/java/com/sporniket/libre/ui/swing/JFrameUtils.java#L56-L69
thinkaurelius/titan
titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/keycolumnvalue/KCVSUtil.java
KCVSUtil.containsKeyColumn
public static boolean containsKeyColumn(KeyColumnValueStore store, StaticBuffer key, StaticBuffer column, StoreTransaction txh) throws BackendException { """ Returns true if the specified key-column pair exists in the store. @param store Store @param key Key @param column Column @param txh Transaction...
java
public static boolean containsKeyColumn(KeyColumnValueStore store, StaticBuffer key, StaticBuffer column, StoreTransaction txh) throws BackendException { return get(store, key, column, txh) != null; }
[ "public", "static", "boolean", "containsKeyColumn", "(", "KeyColumnValueStore", "store", ",", "StaticBuffer", "key", ",", "StaticBuffer", "column", ",", "StoreTransaction", "txh", ")", "throws", "BackendException", "{", "return", "get", "(", "store", ",", "key", "...
Returns true if the specified key-column pair exists in the store. @param store Store @param key Key @param column Column @param txh Transaction @return TRUE, if key has at least one column-value pair, else FALSE
[ "Returns", "true", "if", "the", "specified", "key", "-", "column", "pair", "exists", "in", "the", "store", "." ]
train
https://github.com/thinkaurelius/titan/blob/ee226e52415b8bf43b700afac75fa5b9767993a5/titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/keycolumnvalue/KCVSUtil.java#L70-L72
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CPDefinitionInventoryPersistenceImpl.java
CPDefinitionInventoryPersistenceImpl.findAll
@Override public List<CPDefinitionInventory> findAll(int start, int end) { """ Returns a range of all the cp definition inventories. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in th...
java
@Override public List<CPDefinitionInventory> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CPDefinitionInventory", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the cp definition inventories. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <...
[ "Returns", "a", "range", "of", "all", "the", "cp", "definition", "inventories", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CPDefinitionInventoryPersistenceImpl.java#L2347-L2350
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/utils/ValueMap.java
ValueMap.withInt
public ValueMap withInt(String key, int val) { """ Sets the value of the specified key in the current ValueMap to the given value. """ return withNumber(key, Integer.valueOf(val)); }
java
public ValueMap withInt(String key, int val) { return withNumber(key, Integer.valueOf(val)); }
[ "public", "ValueMap", "withInt", "(", "String", "key", ",", "int", "val", ")", "{", "return", "withNumber", "(", "key", ",", "Integer", ".", "valueOf", "(", "val", ")", ")", ";", "}" ]
Sets the value of the specified key in the current ValueMap to the given value.
[ "Sets", "the", "value", "of", "the", "specified", "key", "in", "the", "current", "ValueMap", "to", "the", "given", "value", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/utils/ValueMap.java#L68-L70
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java
EntitySerDe.deserializeColumn
private Object deserializeColumn(String fieldName, byte[] family, byte[] qualifier, Result result) { """ Deserialize the entity field that has a column mapping. @param fieldName The name of the entity's field we are deserializing. @param family The column family this field is mapped to @param qualifie...
java
private Object deserializeColumn(String fieldName, byte[] family, byte[] qualifier, Result result) { byte[] bytes = result.getValue(family, qualifier); if (bytes == null) { return getDefaultValue(fieldName); } else { return deserializeColumnValueFromBytes(fieldName, bytes); } }
[ "private", "Object", "deserializeColumn", "(", "String", "fieldName", ",", "byte", "[", "]", "family", ",", "byte", "[", "]", "qualifier", ",", "Result", "result", ")", "{", "byte", "[", "]", "bytes", "=", "result", ".", "getValue", "(", "family", ",", ...
Deserialize the entity field that has a column mapping. @param fieldName The name of the entity's field we are deserializing. @param family The column family this field is mapped to @param qualifier The column qualifier this field is mapped to @param result The HBase Result that represents a row in HBase. @return The ...
[ "Deserialize", "the", "entity", "field", "that", "has", "a", "column", "mapping", "." ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntitySerDe.java#L301-L309
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java
DomHelper.createGroup
protected Element createGroup(String namespace, Object parent, Object group, String type) { """ Generic creation method for group elements. @param namespace the name space (HTML, SVG or VML,...) @param parent the parent group @param group group @param type type @return the newly created group element or...
java
protected Element createGroup(String namespace, Object parent, Object group, String type) { Element parentElement; if (parent == null) { parentElement = getRootElement(); } else { parentElement = getGroup(parent); } if (parentElement == null) { return null; } else { Element element; String id...
[ "protected", "Element", "createGroup", "(", "String", "namespace", ",", "Object", "parent", ",", "Object", "group", ",", "String", "type", ")", "{", "Element", "parentElement", ";", "if", "(", "parent", "==", "null", ")", "{", "parentElement", "=", "getRootE...
Generic creation method for group elements. @param namespace the name space (HTML, SVG or VML,...) @param parent the parent group @param group group @param type type @return the newly created group element or null if creation failed
[ "Generic", "creation", "method", "for", "group", "elements", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L793-L818
carewebframework/carewebframework-core
org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/messaging/ProducerService.java
ProducerService.prepare
private Message prepare(String channel, Message message, Recipient[] recipients) { """ Adds publication-specific metadata to the message. @param channel The message channel. @param message The message. @param recipients The message recipients. @return The original message. """ message.setMetadata...
java
private Message prepare(String channel, Message message, Recipient[] recipients) { message.setMetadata("cwf.pub.node", nodeId); message.setMetadata("cwf.pub.channel", channel); message.setMetadata("cwf.pub.event", UUID.randomUUID().toString()); message.setMetadata("cwf.pub.when", System....
[ "private", "Message", "prepare", "(", "String", "channel", ",", "Message", "message", ",", "Recipient", "[", "]", "recipients", ")", "{", "message", ".", "setMetadata", "(", "\"cwf.pub.node\"", ",", "nodeId", ")", ";", "message", ".", "setMetadata", "(", "\"...
Adds publication-specific metadata to the message. @param channel The message channel. @param message The message. @param recipients The message recipients. @return The original message.
[ "Adds", "publication", "-", "specific", "metadata", "to", "the", "message", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/messaging/ProducerService.java#L175-L182
csc19601128/Phynixx
phynixx/phynixx-connection/src/main/java/org/csc/phynixx/connection/PhynixxManagedConnectionGuard.java
PhynixxManagedConnectionGuard.fireEventWithException
private void fireEventWithException(IEventDeliver<C, IManagedConnectionEvent<C>> deliver, Exception exception) { """ creates an event an fires at all listeners @param deliver implementaion of the firing @param exception expection added to the event if given @see #deliverEvent(org.csc.phynixx.connection.Phynix...
java
private void fireEventWithException(IEventDeliver<C, IManagedConnectionEvent<C>> deliver, Exception exception) { ManagedPhynixxConnectionEvent<C> event = new ManagedPhynixxConnectionEvent<C>(getObservableProxy(), exception); deliverEvent(deliver, event); }
[ "private", "void", "fireEventWithException", "(", "IEventDeliver", "<", "C", ",", "IManagedConnectionEvent", "<", "C", ">", ">", "deliver", ",", "Exception", "exception", ")", "{", "ManagedPhynixxConnectionEvent", "<", "C", ">", "event", "=", "new", "ManagedPhynix...
creates an event an fires at all listeners @param deliver implementaion of the firing @param exception expection added to the event if given @see #deliverEvent(org.csc.phynixx.connection.PhynixxManagedConnectionGuard.IEventDeliver, IManagedConnectionEvent)
[ "creates", "an", "event", "an", "fires", "at", "all", "listeners", "@param", "deliver", "implementaion", "of", "the", "firing", "@param", "exception", "expection", "added", "to", "the", "event", "if", "given" ]
train
https://github.com/csc19601128/Phynixx/blob/a26c03bc229a8882c647799834115bec6bdc0ac8/phynixx/phynixx-connection/src/main/java/org/csc/phynixx/connection/PhynixxManagedConnectionGuard.java#L467-L470