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
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java
TasksImpl.listAsync
public ServiceFuture<List<CloudTask>> listAsync(final String jobId, final ListOperationCallback<CloudTask> serviceCallback) { """ Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use t...
java
public ServiceFuture<List<CloudTask>> listAsync(final String jobId, final ListOperationCallback<CloudTask> serviceCallback) { return AzureServiceFuture.fromHeaderPageResponse( listSinglePageAsync(jobId), new Func1<String, Observable<ServiceResponseWithHeaders<Page<CloudTask>, TaskListHea...
[ "public", "ServiceFuture", "<", "List", "<", "CloudTask", ">", ">", "listAsync", "(", "final", "String", "jobId", ",", "final", "ListOperationCallback", "<", "CloudTask", ">", "serviceCallback", ")", "{", "return", "AzureServiceFuture", ".", "fromHeaderPageResponse"...
Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks. @param jobId The ID of the job. @param serviceCallback the async ServiceCa...
[ "Lists", "all", "of", "the", "tasks", "that", "are", "associated", "with", "the", "specified", "job", ".", "For", "multi", "-", "instance", "tasks", "information", "such", "as", "affinityId", "executionInfo", "and", "nodeInfo", "refer", "to", "the", "primary",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java#L373-L383
killbill/killbill
invoice/src/main/java/org/killbill/billing/invoice/generator/InvoiceDateUtils.java
InvoiceDateUtils.calculateProrationBetweenDates
private static BigDecimal calculateProrationBetweenDates(final LocalDate startDate, final LocalDate endDate, final LocalDate previousBillingCycleDate, final LocalDate nextBillingCycleDate) { """ Called internally to calculate proration or when we recalculate approximate repair amount @param startDate ...
java
private static BigDecimal calculateProrationBetweenDates(final LocalDate startDate, final LocalDate endDate, final LocalDate previousBillingCycleDate, final LocalDate nextBillingCycleDate) { final int daysBetween = Days.daysBetween(previousBillingCycleDate, nextBillingCycleDate).getDays(); return calcul...
[ "private", "static", "BigDecimal", "calculateProrationBetweenDates", "(", "final", "LocalDate", "startDate", ",", "final", "LocalDate", "endDate", ",", "final", "LocalDate", "previousBillingCycleDate", ",", "final", "LocalDate", "nextBillingCycleDate", ")", "{", "final", ...
Called internally to calculate proration or when we recalculate approximate repair amount @param startDate start date of the prorated interval @param endDate end date of the prorated interval @param previousBillingCycleDate start date of the period @param nextBillingCycleDate end da...
[ "Called", "internally", "to", "calculate", "proration", "or", "when", "we", "recalculate", "approximate", "repair", "amount" ]
train
https://github.com/killbill/killbill/blob/6457b485fb32a182c76197a83f428123331f1380/invoice/src/main/java/org/killbill/billing/invoice/generator/InvoiceDateUtils.java#L73-L76
dickschoeller/gedbrowser
gedbrowserng/src/main/java/org/schoellerfamily/gedbrowser/api/crud/PersonCrud.java
PersonCrud.createOne
@Override public ApiPerson createOne(final String db, final ApiPerson person) { """ Create a new person from the passed object. @param db the name of the db to access @param person the data for the person @return the person as created """ logger.info("Entering create person in db: " + db); ...
java
@Override public ApiPerson createOne(final String db, final ApiPerson person) { logger.info("Entering create person in db: " + db); return create(readRoot(db), person, (i, id) -> new ApiPerson(i, id)); }
[ "@", "Override", "public", "ApiPerson", "createOne", "(", "final", "String", "db", ",", "final", "ApiPerson", "person", ")", "{", "logger", ".", "info", "(", "\"Entering create person in db: \"", "+", "db", ")", ";", "return", "create", "(", "readRoot", "(", ...
Create a new person from the passed object. @param db the name of the db to access @param person the data for the person @return the person as created
[ "Create", "a", "new", "person", "from", "the", "passed", "object", "." ]
train
https://github.com/dickschoeller/gedbrowser/blob/e3e10b1ff3a34ebde9b7edcbfafcd5fe6fb3b3e1/gedbrowserng/src/main/java/org/schoellerfamily/gedbrowser/api/crud/PersonCrud.java#L61-L65
ben-manes/caffeine
caffeine/src/main/java/com/github/benmanes/caffeine/cache/Caffeine.java
Caffeine.buildAsync
@NonNull public <K1 extends K, V1 extends V> AsyncLoadingCache<K1, V1> buildAsync( @NonNull CacheLoader<? super K1, V1> loader) { """ Builds a cache, which either returns a {@link CompletableFuture} already loaded or currently computing the value for a given key, or atomically computes the value asynchron...
java
@NonNull public <K1 extends K, V1 extends V> AsyncLoadingCache<K1, V1> buildAsync( @NonNull CacheLoader<? super K1, V1> loader) { return buildAsync((AsyncCacheLoader<? super K1, V1>) loader); }
[ "@", "NonNull", "public", "<", "K1", "extends", "K", ",", "V1", "extends", "V", ">", "AsyncLoadingCache", "<", "K1", ",", "V1", ">", "buildAsync", "(", "@", "NonNull", "CacheLoader", "<", "?", "super", "K1", ",", "V1", ">", "loader", ")", "{", "retur...
Builds a cache, which either returns a {@link CompletableFuture} already loaded or currently computing the value for a given key, or atomically computes the value asynchronously through a supplied mapping function or the supplied {@code CacheLoader}. If the asynchronous computation fails or computes a {@code null} valu...
[ "Builds", "a", "cache", "which", "either", "returns", "a", "{", "@link", "CompletableFuture", "}", "already", "loaded", "or", "currently", "computing", "the", "value", "for", "a", "given", "key", "or", "atomically", "computes", "the", "value", "asynchronously", ...
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/caffeine/src/main/java/com/github/benmanes/caffeine/cache/Caffeine.java#L1018-L1022
VoltDB/voltdb
src/frontend/org/voltdb/client/exampleutils/ClientConnection.java
ClientConnection.executeAsync
public boolean executeAsync(ProcedureCallback callback, String procedure, Object... parameters) throws Exception { """ Executes a procedure asynchronously, then calls the provided user callback with the server response upon completion. @param callback the user-specified callback to call with the server response...
java
public boolean executeAsync(ProcedureCallback callback, String procedure, Object... parameters) throws Exception { return this.Client.callProcedure(new TrackingCallback(this, procedure, callback), procedure, parameters); }
[ "public", "boolean", "executeAsync", "(", "ProcedureCallback", "callback", ",", "String", "procedure", ",", "Object", "...", "parameters", ")", "throws", "Exception", "{", "return", "this", ".", "Client", ".", "callProcedure", "(", "new", "TrackingCallback", "(", ...
Executes a procedure asynchronously, then calls the provided user callback with the server response upon completion. @param callback the user-specified callback to call with the server response upon execution completion. @param procedure the name of the procedure to call. @param parameters the list of parameters to pa...
[ "Executes", "a", "procedure", "asynchronously", "then", "calls", "the", "provided", "user", "callback", "with", "the", "server", "response", "upon", "completion", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/exampleutils/ClientConnection.java#L207-L210
Jasig/uPortal
uPortal-web/src/main/java/org/apereo/portal/portlets/error/PortletErrorController.java
PortletErrorController.renderError
@RequestMapping("VIEW") public String renderError(RenderRequest request, RenderResponse response, ModelMap model) throws Exception { """ Render the error portlet view. @param request @param response @param model @return the name of the view to display @throws Exception """ HttpS...
java
@RequestMapping("VIEW") public String renderError(RenderRequest request, RenderResponse response, ModelMap model) throws Exception { HttpServletRequest httpRequest = this.portalRequestUtils.getPortletHttpRequest(request); IPortletWindowId currentFailedPortletWindowId = (...
[ "@", "RequestMapping", "(", "\"VIEW\"", ")", "public", "String", "renderError", "(", "RenderRequest", "request", ",", "RenderResponse", "response", ",", "ModelMap", "model", ")", "throws", "Exception", "{", "HttpServletRequest", "httpRequest", "=", "this", ".", "p...
Render the error portlet view. @param request @param response @param model @return the name of the view to display @throws Exception
[ "Render", "the", "error", "portlet", "view", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-web/src/main/java/org/apereo/portal/portlets/error/PortletErrorController.java#L101-L149
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/email/Mail.java
Mail.templateMessage
public Mail templateMessage(String template, Map<String, Object> content) throws MangooTemplateEngineException { """ Sets a template to be rendered for the email. Using a template will make it a HTML Email by default. @param template The template to use @param content The content for the template @return A m...
java
public Mail templateMessage(String template, Map<String, Object> content) throws MangooTemplateEngineException { Objects.requireNonNull(template, Required.TEMPLATE.toString()); Objects.requireNonNull(content, Required.CONTENT.toString()); if (template.charAt(0) == '/' || template.startsWith("\\...
[ "public", "Mail", "templateMessage", "(", "String", "template", ",", "Map", "<", "String", ",", "Object", ">", "content", ")", "throws", "MangooTemplateEngineException", "{", "Objects", ".", "requireNonNull", "(", "template", ",", "Required", ".", "TEMPLATE", "....
Sets a template to be rendered for the email. Using a template will make it a HTML Email by default. @param template The template to use @param content The content for the template @return A mail object instance @throws MangooTemplateEngineException if rendering of template fails
[ "Sets", "a", "template", "to", "be", "rendered", "for", "the", "email", ".", "Using", "a", "template", "will", "make", "it", "a", "HTML", "Email", "by", "default", "." ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/email/Mail.java#L54-L67
dustin/java-memcached-client
src/main/java/net/spy/memcached/transcoders/BaseSerializingTranscoder.java
BaseSerializingTranscoder.setCharset
public void setCharset(String to) { """ Set the character set for string value transcoding (defaults to UTF-8). """ // Validate the character set. try { new String(new byte[97], to); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } charset = to; }
java
public void setCharset(String to) { // Validate the character set. try { new String(new byte[97], to); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } charset = to; }
[ "public", "void", "setCharset", "(", "String", "to", ")", "{", "// Validate the character set.", "try", "{", "new", "String", "(", "new", "byte", "[", "97", "]", ",", "to", ")", ";", "}", "catch", "(", "UnsupportedEncodingException", "e", ")", "{", "throw"...
Set the character set for string value transcoding (defaults to UTF-8).
[ "Set", "the", "character", "set", "for", "string", "value", "transcoding", "(", "defaults", "to", "UTF", "-", "8", ")", "." ]
train
https://github.com/dustin/java-memcached-client/blob/c232307ad8e0c7ccc926e495dd7d5aad2d713318/src/main/java/net/spy/memcached/transcoders/BaseSerializingTranscoder.java#L82-L90
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.toBufferedImage
public static BufferedImage toBufferedImage(Image img) { """ {@link Image} 转 {@link BufferedImage}<br> 首先尝试强转,否则新建一个{@link BufferedImage}后重新绘制 @param img {@link Image} @return {@link BufferedImage} """ if (img instanceof BufferedImage) { return (BufferedImage) img; } return copyImage(img, B...
java
public static BufferedImage toBufferedImage(Image img) { if (img instanceof BufferedImage) { return (BufferedImage) img; } return copyImage(img, BufferedImage.TYPE_INT_RGB); }
[ "public", "static", "BufferedImage", "toBufferedImage", "(", "Image", "img", ")", "{", "if", "(", "img", "instanceof", "BufferedImage", ")", "{", "return", "(", "BufferedImage", ")", "img", ";", "}", "return", "copyImage", "(", "img", ",", "BufferedImage", "...
{@link Image} 转 {@link BufferedImage}<br> 首先尝试强转,否则新建一个{@link BufferedImage}后重新绘制 @param img {@link Image} @return {@link BufferedImage}
[ "{", "@link", "Image", "}", "转", "{", "@link", "BufferedImage", "}", "<br", ">", "首先尝试强转,否则新建一个", "{", "@link", "BufferedImage", "}", "后重新绘制" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L1158-L1164
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/jaxrx/core/SchemaChecker.java
SchemaChecker.checkIsValid
private void checkIsValid(final Document document, final Source source) throws SAXException, IOException { """ This method checks the parsed document if it is valid to a given XML schema. If not, an exception is thrown @param document The parsed document. @param source The {@link String} representation of t...
java
private void checkIsValid(final Document document, final Source source) throws SAXException, IOException { final SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); final Schema schema = schemaFactory.newSchema(source); final Validator validator = schema...
[ "private", "void", "checkIsValid", "(", "final", "Document", "document", ",", "final", "Source", "source", ")", "throws", "SAXException", ",", "IOException", "{", "final", "SchemaFactory", "schemaFactory", "=", "SchemaFactory", ".", "newInstance", "(", "XMLConstants...
This method checks the parsed document if it is valid to a given XML schema. If not, an exception is thrown @param document The parsed document. @param source The {@link String} representation of the XML schema file. @throws SAXException if the document is invalid @throws IOException if the input cannot be read
[ "This", "method", "checks", "the", "parsed", "document", "if", "it", "is", "valid", "to", "a", "given", "XML", "schema", ".", "If", "not", "an", "exception", "is", "thrown" ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/jaxrx/core/SchemaChecker.java#L109-L115
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java
SearchIndex.createSortFields
protected SortField[] createSortFields(QPath[] orderProps, boolean[] orderSpecs, FieldComparatorSource scs) throws RepositoryException { """ Creates the SortFields for the order properties. @param orderProps the order properties. @param orderSpecs the order specs for the properties. @param scs {@link...
java
protected SortField[] createSortFields(QPath[] orderProps, boolean[] orderSpecs, FieldComparatorSource scs) throws RepositoryException { List<SortField> sortFields = new ArrayList<SortField>(); for (int i = 0; i < orderProps.length; i++) { if (orderProps[i].getEntries().length == 1 &...
[ "protected", "SortField", "[", "]", "createSortFields", "(", "QPath", "[", "]", "orderProps", ",", "boolean", "[", "]", "orderSpecs", ",", "FieldComparatorSource", "scs", ")", "throws", "RepositoryException", "{", "List", "<", "SortField", ">", "sortFields", "="...
Creates the SortFields for the order properties. @param orderProps the order properties. @param orderSpecs the order specs for the properties. @param scs {@link FieldComparatorSource} case sensitive or case insensitive comparator @return an array of sort fields @throws RepositoryException
[ "Creates", "the", "SortFields", "for", "the", "order", "properties", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java#L1773-L1794
lets-blade/blade
src/main/java/com/blade/Blade.java
Blade.enableCors
public Blade enableCors(boolean enableCors, CorsConfiger corsConfig) { """ Set whether to config cors @param enableCors enable cors @param corsConfig config cors @return blade """ this.environment.set(ENV_KEY_CORS_ENABLE, enableCors); if (enableCors) { this.corsMiddleware = new ...
java
public Blade enableCors(boolean enableCors, CorsConfiger corsConfig) { this.environment.set(ENV_KEY_CORS_ENABLE, enableCors); if (enableCors) { this.corsMiddleware = new CorsMiddleware(corsConfig); } return this; }
[ "public", "Blade", "enableCors", "(", "boolean", "enableCors", ",", "CorsConfiger", "corsConfig", ")", "{", "this", ".", "environment", ".", "set", "(", "ENV_KEY_CORS_ENABLE", ",", "enableCors", ")", ";", "if", "(", "enableCors", ")", "{", "this", ".", "cors...
Set whether to config cors @param enableCors enable cors @param corsConfig config cors @return blade
[ "Set", "whether", "to", "config", "cors" ]
train
https://github.com/lets-blade/blade/blob/60624ee528be12122c49a9ad1713e336b959e59a/src/main/java/com/blade/Blade.java#L540-L546
bThink-BGU/BPjs
src/main/java/il/ac/bgu/cs/bp/bpjs/analysis/DfsTraversalNode.java
DfsTraversalNode.getNextNode
public DfsTraversalNode getNextNode(BEvent e, ExecutorService exSvc) throws BPjsRuntimeException { """ Get a Node object for each possible state of the system after triggering the given event. @param e the selected event @param exSvc The executor service that will run the threads @return State of the BProgra...
java
public DfsTraversalNode getNextNode(BEvent e, ExecutorService exSvc) throws BPjsRuntimeException { try { return new DfsTraversalNode(bp, BProgramSyncSnapshotCloner.clone(systemState).triggerEvent(e, exSvc, Collections.emptySet()), e); } catch ( InterruptedException ie ) { throw n...
[ "public", "DfsTraversalNode", "getNextNode", "(", "BEvent", "e", ",", "ExecutorService", "exSvc", ")", "throws", "BPjsRuntimeException", "{", "try", "{", "return", "new", "DfsTraversalNode", "(", "bp", ",", "BProgramSyncSnapshotCloner", ".", "clone", "(", "systemSta...
Get a Node object for each possible state of the system after triggering the given event. @param e the selected event @param exSvc The executor service that will run the threads @return State of the BProgram after event {@code e} was selected while the program was at {@code this} node's state. @throws BPjsRuntimeExcep...
[ "Get", "a", "Node", "object", "for", "each", "possible", "state", "of", "the", "system", "after", "triggering", "the", "given", "event", "." ]
train
https://github.com/bThink-BGU/BPjs/blob/2d388365a27ad79ded108eaf98a35a7ef292ae1f/src/main/java/il/ac/bgu/cs/bp/bpjs/analysis/DfsTraversalNode.java#L88-L94
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/MetadataFinder.java
MetadataFinder.addMetadataProviderForMedia
private void addMetadataProviderForMedia(String key, MetadataProvider provider) { """ Internal method that adds a metadata provider to the set associated with a particular hash key, creating the set if needed. @param key the hashKey identifying the media for which this provider can offer metadata (or the empty...
java
private void addMetadataProviderForMedia(String key, MetadataProvider provider) { if (!metadataProviders.containsKey(key)) { metadataProviders.put(key, Collections.newSetFromMap(new ConcurrentHashMap<MetadataProvider, Boolean>())); } Set<MetadataProvider> providers = metadataProvider...
[ "private", "void", "addMetadataProviderForMedia", "(", "String", "key", ",", "MetadataProvider", "provider", ")", "{", "if", "(", "!", "metadataProviders", ".", "containsKey", "(", "key", ")", ")", "{", "metadataProviders", ".", "put", "(", "key", ",", "Collec...
Internal method that adds a metadata provider to the set associated with a particular hash key, creating the set if needed. @param key the hashKey identifying the media for which this provider can offer metadata (or the empty string if it can offer metadata for all media) @param provider the metadata provider to be ad...
[ "Internal", "method", "that", "adds", "a", "metadata", "provider", "to", "the", "set", "associated", "with", "a", "particular", "hash", "key", "creating", "the", "set", "if", "needed", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/MetadataFinder.java#L1082-L1088
openengsb-labs/labs-endtoend
core/src/main/java/org/openengsb/labs/endtoend/util/MavenConfigurationHelper.java
MavenConfigurationHelper.getMavenHome
public static File getMavenHome() throws Exception { """ Discover maven home from executable on PATH, using conventions. """ final String command; switch (OS.current()) { case LINUX: case MAC: command = "mvn"; break; case WINDOWS: comm...
java
public static File getMavenHome() throws Exception { final String command; switch (OS.current()) { case LINUX: case MAC: command = "mvn"; break; case WINDOWS: command = "mvn.bat"; break; default: throw new Illega...
[ "public", "static", "File", "getMavenHome", "(", ")", "throws", "Exception", "{", "final", "String", "command", ";", "switch", "(", "OS", ".", "current", "(", ")", ")", "{", "case", "LINUX", ":", "case", "MAC", ":", "command", "=", "\"mvn\"", ";", "bre...
Discover maven home from executable on PATH, using conventions.
[ "Discover", "maven", "home", "from", "executable", "on", "PATH", "using", "conventions", "." ]
train
https://github.com/openengsb-labs/labs-endtoend/blob/5604227b47cd9f45f1757256ca0fd0ddf5ac5871/core/src/main/java/org/openengsb/labs/endtoend/util/MavenConfigurationHelper.java#L39-L65
kotcrab/vis-ui
ui/src/main/java/com/kotcrab/vis/ui/util/ToastManager.java
ToastManager.show
public void show (String text, float timeSec) { """ Displays basic toast with provided text as message. Toast will be displayed for given amount of seconds. """ VisTable table = new VisTable(); table.add(text).grow(); show(table, timeSec); }
java
public void show (String text, float timeSec) { VisTable table = new VisTable(); table.add(text).grow(); show(table, timeSec); }
[ "public", "void", "show", "(", "String", "text", ",", "float", "timeSec", ")", "{", "VisTable", "table", "=", "new", "VisTable", "(", ")", ";", "table", ".", "add", "(", "text", ")", ".", "grow", "(", ")", ";", "show", "(", "table", ",", "timeSec",...
Displays basic toast with provided text as message. Toast will be displayed for given amount of seconds.
[ "Displays", "basic", "toast", "with", "provided", "text", "as", "message", ".", "Toast", "will", "be", "displayed", "for", "given", "amount", "of", "seconds", "." ]
train
https://github.com/kotcrab/vis-ui/blob/3b68f82d94ae32bffa2a3399c63f432e0f4908e0/ui/src/main/java/com/kotcrab/vis/ui/util/ToastManager.java#L81-L85
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.ui/src/io/sarl/pythongenerator/ui/configuration/PyPreferenceAccess.java
PyPreferenceAccess.loadPreferences
public static void loadPreferences(PyGeneratorConfiguration generatorConfig, IPreferenceStore store) { """ Load the generator configuration from the preferences. @param generatorConfig the configuration to set up. @param store the preference store access. """ final String key = ExtraLanguagePreferenceAcc...
java
public static void loadPreferences(PyGeneratorConfiguration generatorConfig, IPreferenceStore store) { final String key = ExtraLanguagePreferenceAccess.getPrefixedKey(PyGeneratorPlugin.PREFERENCE_ID, PyPreferenceAccess.JYTHON_COMPLIANCE_PROPERTY); if (store.contains(key)) { generatorConfig.setImplicitJvmType...
[ "public", "static", "void", "loadPreferences", "(", "PyGeneratorConfiguration", "generatorConfig", ",", "IPreferenceStore", "store", ")", "{", "final", "String", "key", "=", "ExtraLanguagePreferenceAccess", ".", "getPrefixedKey", "(", "PyGeneratorPlugin", ".", "PREFERENCE...
Load the generator configuration from the preferences. @param generatorConfig the configuration to set up. @param store the preference store access.
[ "Load", "the", "generator", "configuration", "from", "the", "preferences", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.ui/src/io/sarl/pythongenerator/ui/configuration/PyPreferenceAccess.java#L53-L59
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/ExecArgList.java
ExecArgList.joinAndQuote
public static String joinAndQuote(List<String> commandList1, Converter<String, String> quote) { """ @return Join a list of strings and then quote the entire string, if specified @param commandList1 list of commands @param quote quote converter """ String join = DataContextUtils.join(commandList1, "...
java
public static String joinAndQuote(List<String> commandList1, Converter<String, String> quote) { String join = DataContextUtils.join(commandList1, " "); if (null != quote) { join = quote.convert(join); } return join; }
[ "public", "static", "String", "joinAndQuote", "(", "List", "<", "String", ">", "commandList1", ",", "Converter", "<", "String", ",", "String", ">", "quote", ")", "{", "String", "join", "=", "DataContextUtils", ".", "join", "(", "commandList1", ",", "\" \"", ...
@return Join a list of strings and then quote the entire string, if specified @param commandList1 list of commands @param quote quote converter
[ "@return", "Join", "a", "list", "of", "strings", "and", "then", "quote", "the", "entire", "string", "if", "specified" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/ExecArgList.java#L123-L129
ddf-project/DDF
core/src/main/java/io/ddf/DDF.java
DDF.initialize
protected void initialize(DDFManager manager, Object data, Class<?>[] typeSpecs, String name, Schema schema) throws DDFException { """ Initialization to be done after constructor assignments, such as setting of the all-important DDFManager. """ this.validateSchema(schema); this.setManager(manager...
java
protected void initialize(DDFManager manager, Object data, Class<?>[] typeSpecs, String name, Schema schema) throws DDFException { this.validateSchema(schema); this.setManager(manager); // this must be done first in case later stuff needs a manager if (typeSpecs != null) { this.getRepresentatio...
[ "protected", "void", "initialize", "(", "DDFManager", "manager", ",", "Object", "data", ",", "Class", "<", "?", ">", "[", "]", "typeSpecs", ",", "String", "name", ",", "Schema", "schema", ")", "throws", "DDFException", "{", "this", ".", "validateSchema", "...
Initialization to be done after constructor assignments, such as setting of the all-important DDFManager.
[ "Initialization", "to", "be", "done", "after", "constructor", "assignments", "such", "as", "setting", "of", "the", "all", "-", "important", "DDFManager", "." ]
train
https://github.com/ddf-project/DDF/blob/e4e68315dcec1ed8b287bf1ee73baa88e7e41eba/core/src/main/java/io/ddf/DDF.java#L161-L185
liferay/com-liferay-commerce
commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java
CommerceDiscountPersistenceImpl.removeByG_C
@Override public void removeByG_C(long groupId, String couponCode) { """ Removes all the commerce discounts where groupId = &#63; and couponCode = &#63; from the database. @param groupId the group ID @param couponCode the coupon code """ for (CommerceDiscount commerceDiscount : findByG_C(groupId, coupon...
java
@Override public void removeByG_C(long groupId, String couponCode) { for (CommerceDiscount commerceDiscount : findByG_C(groupId, couponCode, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceDiscount); } }
[ "@", "Override", "public", "void", "removeByG_C", "(", "long", "groupId", ",", "String", "couponCode", ")", "{", "for", "(", "CommerceDiscount", "commerceDiscount", ":", "findByG_C", "(", "groupId", ",", "couponCode", ",", "QueryUtil", ".", "ALL_POS", ",", "Qu...
Removes all the commerce discounts where groupId = &#63; and couponCode = &#63; from the database. @param groupId the group ID @param couponCode the coupon code
[ "Removes", "all", "the", "commerce", "discounts", "where", "groupId", "=", "&#63", ";", "and", "couponCode", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java#L3220-L3226
line/armeria
core/src/main/java/com/linecorp/armeria/server/cors/AbstractCorsPolicyBuilder.java
AbstractCorsPolicyBuilder.preflightResponseHeader
public B preflightResponseHeader(CharSequence name, Object... values) { """ Specifies HTTP response headers that should be added to a CORS preflight response. <p>An intermediary like a load balancer might require that a CORS preflight request have certain headers set. This enables such headers to be added. ...
java
public B preflightResponseHeader(CharSequence name, Object... values) { requireNonNull(name, "name"); requireNonNull(values, "values"); checkArgument(values.length > 0, "values should not be empty."); for (int i = 0; i < values.length; i++) { if (values[i] == null) { ...
[ "public", "B", "preflightResponseHeader", "(", "CharSequence", "name", ",", "Object", "...", "values", ")", "{", "requireNonNull", "(", "name", ",", "\"name\"", ")", ";", "requireNonNull", "(", "values", ",", "\"values\"", ")", ";", "checkArgument", "(", "valu...
Specifies HTTP response headers that should be added to a CORS preflight response. <p>An intermediary like a load balancer might require that a CORS preflight request have certain headers set. This enables such headers to be added. @param name the name of the HTTP header. @param values the values for the HTTP header....
[ "Specifies", "HTTP", "response", "headers", "that", "should", "be", "added", "to", "a", "CORS", "preflight", "response", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/cors/AbstractCorsPolicyBuilder.java#L291-L303
jenkinsci/jenkins
core/src/main/java/jenkins/model/NodeListener.java
NodeListener.fireOnUpdated
public static void fireOnUpdated(@Nonnull Node oldOne, @Nonnull Node newOne) { """ Inform listeners that node is being updated. @param oldOne Old configuration. @param newOne New Configuration. """ for (NodeListener nl: all()) { try { nl.onUpdated(oldOne, newOne); ...
java
public static void fireOnUpdated(@Nonnull Node oldOne, @Nonnull Node newOne) { for (NodeListener nl: all()) { try { nl.onUpdated(oldOne, newOne); } catch (Throwable ex) { LOGGER.log(Level.WARNING, "Listener invocation failed", ex); } } ...
[ "public", "static", "void", "fireOnUpdated", "(", "@", "Nonnull", "Node", "oldOne", ",", "@", "Nonnull", "Node", "newOne", ")", "{", "for", "(", "NodeListener", "nl", ":", "all", "(", ")", ")", "{", "try", "{", "nl", ".", "onUpdated", "(", "oldOne", ...
Inform listeners that node is being updated. @param oldOne Old configuration. @param newOne New Configuration.
[ "Inform", "listeners", "that", "node", "is", "being", "updated", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/NodeListener.java#L81-L89
alamkanak/Android-Week-View
library/src/main/java/com/alamkanak/weekview/WeekView.java
WeekView.isEventsCollide
private boolean isEventsCollide(WeekViewEvent event1, WeekViewEvent event2) { """ Checks if two events overlap. @param event1 The first event. @param event2 The second event. @return true if the events overlap. """ long start1 = event1.getStartTime().getTimeInMillis(); long end1 = event1.get...
java
private boolean isEventsCollide(WeekViewEvent event1, WeekViewEvent event2) { long start1 = event1.getStartTime().getTimeInMillis(); long end1 = event1.getEndTime().getTimeInMillis(); long start2 = event2.getStartTime().getTimeInMillis(); long end2 = event2.getEndTime().getTimeInMillis()...
[ "private", "boolean", "isEventsCollide", "(", "WeekViewEvent", "event1", ",", "WeekViewEvent", "event2", ")", "{", "long", "start1", "=", "event1", ".", "getStartTime", "(", ")", ".", "getTimeInMillis", "(", ")", ";", "long", "end1", "=", "event1", ".", "get...
Checks if two events overlap. @param event1 The first event. @param event2 The second event. @return true if the events overlap.
[ "Checks", "if", "two", "events", "overlap", "." ]
train
https://github.com/alamkanak/Android-Week-View/blob/dc3f97d65d44785d1a761b52b58527c86c4eee1b/library/src/main/java/com/alamkanak/weekview/WeekView.java#L1194-L1200
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/utils/BsfUtils.java
BsfUtils.selectDateFormat
public static String selectDateFormat(Locale locale, String format) { """ Selects the Date Pattern to use based on the given Locale if the input format is null @param locale Locale (may be the result of a call to selectLocale) @param format Input format String @return Date Pattern eg. dd/MM/yyyy """ ...
java
public static String selectDateFormat(Locale locale, String format) { String selFormat; if (format == null) { selFormat = ((SimpleDateFormat) DateFormat.getDateInstance(DateFormat.SHORT, locale)).toPattern(); // Since DateFormat.SHORT is silly, return a smart format if (selFormat.equals("M/d/yy")) { re...
[ "public", "static", "String", "selectDateFormat", "(", "Locale", "locale", ",", "String", "format", ")", "{", "String", "selFormat", ";", "if", "(", "format", "==", "null", ")", "{", "selFormat", "=", "(", "(", "SimpleDateFormat", ")", "DateFormat", ".", "...
Selects the Date Pattern to use based on the given Locale if the input format is null @param locale Locale (may be the result of a call to selectLocale) @param format Input format String @return Date Pattern eg. dd/MM/yyyy
[ "Selects", "the", "Date", "Pattern", "to", "use", "based", "on", "the", "given", "Locale", "if", "the", "input", "format", "is", "null" ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/utils/BsfUtils.java#L479-L495
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/beans/ELTools.java
ELTools.readAnnotations
public static Annotation[] readAnnotations(UIComponent p_component) { """ Which annotations are given to an object displayed by a JSF component? @param p_component the component @return null if there are no annotations, or if they cannot be accessed """ ValueExpression valueExpression = p_component.getV...
java
public static Annotation[] readAnnotations(UIComponent p_component) { ValueExpression valueExpression = p_component.getValueExpression("value"); if (valueExpression != null && valueExpression.getExpressionString() != null && valueExpression.getExpressionString().length()>0) { return readAnnotations(valueExpressi...
[ "public", "static", "Annotation", "[", "]", "readAnnotations", "(", "UIComponent", "p_component", ")", "{", "ValueExpression", "valueExpression", "=", "p_component", ".", "getValueExpression", "(", "\"value\"", ")", ";", "if", "(", "valueExpression", "!=", "null", ...
Which annotations are given to an object displayed by a JSF component? @param p_component the component @return null if there are no annotations, or if they cannot be accessed
[ "Which", "annotations", "are", "given", "to", "an", "object", "displayed", "by", "a", "JSF", "component?" ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/beans/ELTools.java#L412-L418
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java
MethodWriterImpl.addReturnType
protected void addReturnType(ExecutableElement method, Content htmltree) { """ Add the return type. @param method the method being documented. @param htmltree the content tree to which the return type will be added """ TypeMirror type = utils.getReturnType(method); if (type != null) { ...
java
protected void addReturnType(ExecutableElement method, Content htmltree) { TypeMirror type = utils.getReturnType(method); if (type != null) { Content linkContent = writer.getLink( new LinkInfoImpl(configuration, LinkInfoImpl.Kind.RETURN_TYPE, type)); htmltree....
[ "protected", "void", "addReturnType", "(", "ExecutableElement", "method", ",", "Content", "htmltree", ")", "{", "TypeMirror", "type", "=", "utils", ".", "getReturnType", "(", "method", ")", ";", "if", "(", "type", "!=", "null", ")", "{", "Content", "linkCont...
Add the return type. @param method the method being documented. @param htmltree the content tree to which the return type will be added
[ "Add", "the", "return", "type", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java#L404-L412
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ReUtil.java
ReUtil.getAllGroups
public static List<String> getAllGroups(Pattern pattern, CharSequence content) { """ 获得匹配的字符串匹配到的所有分组 @param pattern 编译后的正则模式 @param content 被匹配的内容 @return 匹配后得到的字符串数组,按照分组顺序依次列出,未匹配到返回空列表,任何一个参数为null返回null @since 3.1.0 """ return getAllGroups(pattern, content, true); }
java
public static List<String> getAllGroups(Pattern pattern, CharSequence content) { return getAllGroups(pattern, content, true); }
[ "public", "static", "List", "<", "String", ">", "getAllGroups", "(", "Pattern", "pattern", ",", "CharSequence", "content", ")", "{", "return", "getAllGroups", "(", "pattern", ",", "content", ",", "true", ")", ";", "}" ]
获得匹配的字符串匹配到的所有分组 @param pattern 编译后的正则模式 @param content 被匹配的内容 @return 匹配后得到的字符串数组,按照分组顺序依次列出,未匹配到返回空列表,任何一个参数为null返回null @since 3.1.0
[ "获得匹配的字符串匹配到的所有分组" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReUtil.java#L131-L133
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/refactoring/rename/EcorePackageRenameStrategy.java
EcorePackageRenameStrategy.setPackageName
protected void setPackageName(String newName, ResourceSet resourceSet) { """ Change the package name. @param newName the new name. @param resourceSet the set of resource to use. """ final EObject object = resourceSet.getEObject(this.uriProvider.apply(resourceSet), true); if (object instanceof SarlScrip...
java
protected void setPackageName(String newName, ResourceSet resourceSet) { final EObject object = resourceSet.getEObject(this.uriProvider.apply(resourceSet), true); if (object instanceof SarlScript) { ((SarlScript) object).setPackage(newName); } else { throw new RefactoringException("SARL script not loaded.")...
[ "protected", "void", "setPackageName", "(", "String", "newName", ",", "ResourceSet", "resourceSet", ")", "{", "final", "EObject", "object", "=", "resourceSet", ".", "getEObject", "(", "this", ".", "uriProvider", ".", "apply", "(", "resourceSet", ")", ",", "tru...
Change the package name. @param newName the new name. @param resourceSet the set of resource to use.
[ "Change", "the", "package", "name", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/refactoring/rename/EcorePackageRenameStrategy.java#L106-L113
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/functions/core/AbstractDateFunction.java
AbstractDateFunction.applyDateOffset
protected void applyDateOffset(Calendar calendar, String offsetString) { """ Adds/removes date value offset by parsing offset string for year/month/day/hour/minute/second offsets. @param calendar @param offsetString """ calendar.add(Calendar.YEAR, getDateValueOffset(offsetString, 'y')); ca...
java
protected void applyDateOffset(Calendar calendar, String offsetString) { calendar.add(Calendar.YEAR, getDateValueOffset(offsetString, 'y')); calendar.add(Calendar.MONTH, getDateValueOffset(offsetString, 'M')); calendar.add(Calendar.DAY_OF_YEAR, getDateValueOffset(offsetString, 'd')); cal...
[ "protected", "void", "applyDateOffset", "(", "Calendar", "calendar", ",", "String", "offsetString", ")", "{", "calendar", ".", "add", "(", "Calendar", ".", "YEAR", ",", "getDateValueOffset", "(", "offsetString", ",", "'", "'", ")", ")", ";", "calendar", ".",...
Adds/removes date value offset by parsing offset string for year/month/day/hour/minute/second offsets. @param calendar @param offsetString
[ "Adds", "/", "removes", "date", "value", "offset", "by", "parsing", "offset", "string", "for", "year", "/", "month", "/", "day", "/", "hour", "/", "minute", "/", "second", "offsets", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/functions/core/AbstractDateFunction.java#L40-L47
xiancloud/xian
xian-core/src/main/java/info/xiancloud/core/message/UnitResponse.java
UnitResponse.createMissingParam
public static UnitResponse createMissingParam(Object theMissingParameters, String errMsg) { """ create a new unit response when missingParam @param theMissingParameters theMissingParameters array, leave it null, if you dont know which parameter is missing. @return the newly created response object describing t...
java
public static UnitResponse createMissingParam(Object theMissingParameters, String errMsg) { return UnitResponse.createError(Group.CODE_LACK_OF_PARAMETER, theMissingParameters, errMsg); }
[ "public", "static", "UnitResponse", "createMissingParam", "(", "Object", "theMissingParameters", ",", "String", "errMsg", ")", "{", "return", "UnitResponse", ".", "createError", "(", "Group", ".", "CODE_LACK_OF_PARAMETER", ",", "theMissingParameters", ",", "errMsg", "...
create a new unit response when missingParam @param theMissingParameters theMissingParameters array, leave it null, if you dont know which parameter is missing. @return the newly created response object describing the missed parameters.
[ "create", "a", "new", "unit", "response", "when", "missingParam" ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/message/UnitResponse.java#L250-L252
EdwardRaff/JSAT
JSAT/src/jsat/distributions/Levy.java
Levy.setScale
public void setScale(double scale) { """ Sets the scale of the Levy distribution @param scale the new scale value, must be positive """ if(scale <= 0 || Double.isNaN(scale) || Double.isInfinite(scale)) throw new ArithmeticException("Scale must be a positive value, not " + scale); t...
java
public void setScale(double scale) { if(scale <= 0 || Double.isNaN(scale) || Double.isInfinite(scale)) throw new ArithmeticException("Scale must be a positive value, not " + scale); this.scale = scale; this.logScale = log(scale); }
[ "public", "void", "setScale", "(", "double", "scale", ")", "{", "if", "(", "scale", "<=", "0", "||", "Double", ".", "isNaN", "(", "scale", ")", "||", "Double", ".", "isInfinite", "(", "scale", ")", ")", "throw", "new", "ArithmeticException", "(", "\"Sc...
Sets the scale of the Levy distribution @param scale the new scale value, must be positive
[ "Sets", "the", "scale", "of", "the", "Levy", "distribution" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/distributions/Levy.java#L33-L39
yidongnan/grpc-spring-boot-starter
grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/inject/GrpcClientBeanPostProcessor.java
GrpcClientBeanPostProcessor.processInjectionPoint
protected <T> T processInjectionPoint(final Member injectionTarget, final Class<T> injectionType, final GrpcClient annotation) { """ Processes the given injection point and computes the appropriate value for the injection. @param <T> The type of the value to be injected. @param injectionTarget The ...
java
protected <T> T processInjectionPoint(final Member injectionTarget, final Class<T> injectionType, final GrpcClient annotation) { final List<ClientInterceptor> interceptors = interceptorsFromAnnotation(annotation); final String name = annotation.value(); final Channel channel; ...
[ "protected", "<", "T", ">", "T", "processInjectionPoint", "(", "final", "Member", "injectionTarget", ",", "final", "Class", "<", "T", ">", "injectionType", ",", "final", "GrpcClient", "annotation", ")", "{", "final", "List", "<", "ClientInterceptor", ">", "int...
Processes the given injection point and computes the appropriate value for the injection. @param <T> The type of the value to be injected. @param injectionTarget The target of the injection. @param injectionType The class that will be used to compute injection. @param annotation The annotation on the target with the m...
[ "Processes", "the", "given", "injection", "point", "and", "computes", "the", "appropriate", "value", "for", "the", "injection", "." ]
train
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/inject/GrpcClientBeanPostProcessor.java#L107-L127
lessthanoptimal/ddogleg
src/org/ddogleg/optimization/math/HessianSchurComplement_DDRM.java
HessianSchurComplement_DDRM.computeHessian
@Override public void computeHessian(DMatrixRMaj jacLeft , DMatrixRMaj jacRight) { """ Compuets the Hessian in block form @param jacLeft (Input) Left side of Jacobian @param jacRight (Input) Right side of Jacobian """ A.reshape(jacLeft.numCols,jacLeft.numCols); B.reshape(jacLeft.numCols,jacRight.numCols...
java
@Override public void computeHessian(DMatrixRMaj jacLeft , DMatrixRMaj jacRight) { A.reshape(jacLeft.numCols,jacLeft.numCols); B.reshape(jacLeft.numCols,jacRight.numCols); D.reshape(jacRight.numCols,jacRight.numCols); // take advantage of the inner product's symmetry when possible to reduce // the number of...
[ "@", "Override", "public", "void", "computeHessian", "(", "DMatrixRMaj", "jacLeft", ",", "DMatrixRMaj", "jacRight", ")", "{", "A", ".", "reshape", "(", "jacLeft", ".", "numCols", ",", "jacLeft", ".", "numCols", ")", ";", "B", ".", "reshape", "(", "jacLeft"...
Compuets the Hessian in block form @param jacLeft (Input) Left side of Jacobian @param jacRight (Input) Right side of Jacobian
[ "Compuets", "the", "Hessian", "in", "block", "form" ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/optimization/math/HessianSchurComplement_DDRM.java#L54-L67
zaproxy/zaproxy
src/org/parosproxy/paros/core/scanner/VariantCustom.java
VariantCustom.addParamPost
public void addParamPost(String name, String value) { """ Support method to add a new PostData param to this custom variant @param name the param name @param value the value of this parameter """ addParam(name, value, NameValuePair.TYPE_POST_DATA); }
java
public void addParamPost(String name, String value) { addParam(name, value, NameValuePair.TYPE_POST_DATA); }
[ "public", "void", "addParamPost", "(", "String", "name", ",", "String", "value", ")", "{", "addParam", "(", "name", ",", "value", ",", "NameValuePair", ".", "TYPE_POST_DATA", ")", ";", "}" ]
Support method to add a new PostData param to this custom variant @param name the param name @param value the value of this parameter
[ "Support", "method", "to", "add", "a", "new", "PostData", "param", "to", "this", "custom", "variant" ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/VariantCustom.java#L161-L163
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java
UserProfileExample.registerSchemas
private void registerSchemas(Configuration conf, SchemaManager schemaManager) throws InterruptedException { """ Uses SchemaTool to register the required schemas and create the required tables. @param conf The HBaseConfiguration. @param schemaManager The schema manager SchemaTool needs to create the sc...
java
private void registerSchemas(Configuration conf, SchemaManager schemaManager) throws InterruptedException { HBaseAdmin admin; try { // Construct an HBaseAdmin object (required by schema tool), and delete it // if it exists so we start fresh. admin = new HBaseAdmin(conf); if (admin....
[ "private", "void", "registerSchemas", "(", "Configuration", "conf", ",", "SchemaManager", "schemaManager", ")", "throws", "InterruptedException", "{", "HBaseAdmin", "admin", ";", "try", "{", "// Construct an HBaseAdmin object (required by schema tool), and delete it", "// if it...
Uses SchemaTool to register the required schemas and create the required tables. @param conf The HBaseConfiguration. @param schemaManager The schema manager SchemaTool needs to create the schemas.
[ "Uses", "SchemaTool", "to", "register", "the", "required", "schemas", "and", "create", "the", "required", "tables", "." ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/example/UserProfileExample.java#L275-L294
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/shell/SkbShellFactory.java
SkbShellFactory.newCommand
public static SkbShellCommand newCommand(String command, SkbShellArgument argument, SkbShellCommandCategory category, String description, String addedHelp) { """ Returns a new shell command, use the factory to create one. @param command the actual command @param argument the command's argument, can be null @par...
java
public static SkbShellCommand newCommand(String command, SkbShellArgument argument, SkbShellCommandCategory category, String description, String addedHelp){ if(argument==null){ return new AbstractShellCommand(command, null, category, description, addedHelp); } return SkbShellFactory.newCommand(command, new Skb...
[ "public", "static", "SkbShellCommand", "newCommand", "(", "String", "command", ",", "SkbShellArgument", "argument", ",", "SkbShellCommandCategory", "category", ",", "String", "description", ",", "String", "addedHelp", ")", "{", "if", "(", "argument", "==", "null", ...
Returns a new shell command, use the factory to create one. @param command the actual command @param argument the command's argument, can be null @param category the command's category, can be null @param description the command's description @param addedHelp additional help, can be null @return new shell command @thro...
[ "Returns", "a", "new", "shell", "command", "use", "the", "factory", "to", "create", "one", "." ]
train
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/shell/SkbShellFactory.java#L124-L129
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerDelegate.java
SingleSessionIoHandlerDelegate.exceptionCaught
public void exceptionCaught(IoSession session, Throwable cause) throws Exception { """ Delegates the method call to the {@link SingleSessionIoHandler#exceptionCaught(Throwable)} method of the handler assigned to this session. """ SingleSessionIoHandler handler = (SingleSessionIoHandler) s...
java
public void exceptionCaught(IoSession session, Throwable cause) throws Exception { SingleSessionIoHandler handler = (SingleSessionIoHandler) session .getAttribute(HANDLER); handler.exceptionCaught(cause); }
[ "public", "void", "exceptionCaught", "(", "IoSession", "session", ",", "Throwable", "cause", ")", "throws", "Exception", "{", "SingleSessionIoHandler", "handler", "=", "(", "SingleSessionIoHandler", ")", "session", ".", "getAttribute", "(", "HANDLER", ")", ";", "h...
Delegates the method call to the {@link SingleSessionIoHandler#exceptionCaught(Throwable)} method of the handler assigned to this session.
[ "Delegates", "the", "method", "call", "to", "the", "{" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerDelegate.java#L124-L129
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java
StringIterate.occurrencesOfChar
public static int occurrencesOfChar(String string, final char value) { """ Count the number of occurrences of the specified char. @since 7.0 """ return StringIterate.countChar(string, new CharPredicate() { public boolean accept(char character) { return...
java
public static int occurrencesOfChar(String string, final char value) { return StringIterate.countChar(string, new CharPredicate() { public boolean accept(char character) { return value == character; } }); }
[ "public", "static", "int", "occurrencesOfChar", "(", "String", "string", ",", "final", "char", "value", ")", "{", "return", "StringIterate", ".", "countChar", "(", "string", ",", "new", "CharPredicate", "(", ")", "{", "public", "boolean", "accept", "(", "cha...
Count the number of occurrences of the specified char. @since 7.0
[ "Count", "the", "number", "of", "occurrences", "of", "the", "specified", "char", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java#L736-L745
javalite/activeweb
activeweb/src/main/java/org/javalite/activeweb/Router.java
Router.matchStandard
private Route matchStandard(String uri, ControllerPath controllerPathObject, AppController controller, HttpMethod method) { """ Will match a standard, non-restful route. @param uri request URI @return instance of a <code>Route</code> if one is found, null if not. """ String controller...
java
private Route matchStandard(String uri, ControllerPath controllerPathObject, AppController controller, HttpMethod method) { String controllerPath = (controllerPathObject.getControllerPackage() != null ? "/" + controllerPathObject.getControllerPackage().replace(".", "/") : "") + "/" + controllerPathObject.getCo...
[ "private", "Route", "matchStandard", "(", "String", "uri", ",", "ControllerPath", "controllerPathObject", ",", "AppController", "controller", ",", "HttpMethod", "method", ")", "{", "String", "controllerPath", "=", "(", "controllerPathObject", ".", "getControllerPackage"...
Will match a standard, non-restful route. @param uri request URI @return instance of a <code>Route</code> if one is found, null if not.
[ "Will", "match", "a", "standard", "non", "-", "restful", "route", "." ]
train
https://github.com/javalite/activeweb/blob/f25f589da94852b6f5625182360732e0861794a6/activeweb/src/main/java/org/javalite/activeweb/Router.java#L124-L154
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/matchspace/utils/TraceUtils.java
TraceUtils.getTrace
public static Trace getTrace(Class sourceClass, String traceGroup) { """ Wrapper method to get the trace via the Factory. @param Class the sourceClass @return Trace implementatiion for the source class. """ Class traceFactoryClass; Object ret = null; try { traceFactoryClass = Class.for...
java
public static Trace getTrace(Class sourceClass, String traceGroup) { Class traceFactoryClass; Object ret = null; try { traceFactoryClass = Class.forName("com.ibm.ws.sib.matchspace.utils.TraceFactory"); Class[] params = new Class[]{Class.class, String.class}; Method getTraceMethod ...
[ "public", "static", "Trace", "getTrace", "(", "Class", "sourceClass", ",", "String", "traceGroup", ")", "{", "Class", "traceFactoryClass", ";", "Object", "ret", "=", "null", ";", "try", "{", "traceFactoryClass", "=", "Class", ".", "forName", "(", "\"com.ibm.ws...
Wrapper method to get the trace via the Factory. @param Class the sourceClass @return Trace implementatiion for the source class.
[ "Wrapper", "method", "to", "get", "the", "trace", "via", "the", "Factory", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/matchspace/utils/TraceUtils.java#L23-L44
Waikato/moa
moa/src/main/java/moa/clusterers/dstream/Dstream.java
Dstream.mergeClusters
private void mergeClusters (int smallClus, int bigClus) { """ Reassign all grids belonging in the small cluster to the big cluster Merge the GridCluster objects representing each cluster @param smallClus - the index of the smaller cluster @param bigClus - the index of the bigger cluster """ //System.o...
java
private void mergeClusters (int smallClus, int bigClus) { //System.out.println("Merge clusters "+smallClus+" and "+bigClus+"."); // Iterate through the density grids in grid_list to find those which are in highClass for (Map.Entry<DensityGrid, CharacteristicVector> grid : grid_list.entrySet()) { DensityGr...
[ "private", "void", "mergeClusters", "(", "int", "smallClus", ",", "int", "bigClus", ")", "{", "//System.out.println(\"Merge clusters \"+smallClus+\" and \"+bigClus+\".\");", "// Iterate through the density grids in grid_list to find those which are in highClass", "for", "(", "Map", "...
Reassign all grids belonging in the small cluster to the big cluster Merge the GridCluster objects representing each cluster @param smallClus - the index of the smaller cluster @param bigClus - the index of the bigger cluster
[ "Reassign", "all", "grids", "belonging", "in", "the", "small", "cluster", "to", "the", "big", "cluster", "Merge", "the", "GridCluster", "objects", "representing", "each", "cluster" ]
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/clusterers/dstream/Dstream.java#L1255-L1280
headius/invokebinder
src/main/java/com/headius/invokebinder/Binder.java
Binder.getField
public MethodHandle getField(MethodHandles.Lookup lookup, String name) throws NoSuchFieldException, IllegalAccessException { """ Apply the chain of transforms and bind them to an object field retrieval specified using the end signature plus the given class and name. The field must match the end signature's retur...
java
public MethodHandle getField(MethodHandles.Lookup lookup, String name) throws NoSuchFieldException, IllegalAccessException { return invoke(lookup.findGetter(type().parameterType(0), name, type().returnType())); }
[ "public", "MethodHandle", "getField", "(", "MethodHandles", ".", "Lookup", "lookup", ",", "String", "name", ")", "throws", "NoSuchFieldException", ",", "IllegalAccessException", "{", "return", "invoke", "(", "lookup", ".", "findGetter", "(", "type", "(", ")", "....
Apply the chain of transforms and bind them to an object field retrieval specified using the end signature plus the given class and name. The field must match the end signature's return value and the end signature must take the target class or a subclass as its only argument. If the final handle's type does not exactl...
[ "Apply", "the", "chain", "of", "transforms", "and", "bind", "them", "to", "an", "object", "field", "retrieval", "specified", "using", "the", "end", "signature", "plus", "the", "given", "class", "and", "name", ".", "The", "field", "must", "match", "the", "e...
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Binder.java#L1387-L1389
massimozappino/tagmycode-java-plugin-framework
src/main/java/com/tagmycode/plugin/gui/TextPrompt.java
TextPrompt.changeAlpha
public void changeAlpha(int alpha) { """ Convenience method to applyChanges the alpha value of the current foreground Color to the specifice value. @param alpha value in the range of 0 - 255. """ alpha = alpha > 255 ? 255 : alpha < 0 ? 0 : alpha; Color foreground = getForeground(); ...
java
public void changeAlpha(int alpha) { alpha = alpha > 255 ? 255 : alpha < 0 ? 0 : alpha; Color foreground = getForeground(); int red = foreground.getRed(); int green = foreground.getGreen(); int blue = foreground.getBlue(); Color withAlpha = new Color(red, green, blue, a...
[ "public", "void", "changeAlpha", "(", "int", "alpha", ")", "{", "alpha", "=", "alpha", ">", "255", "?", "255", ":", "alpha", "<", "0", "?", "0", ":", "alpha", ";", "Color", "foreground", "=", "getForeground", "(", ")", ";", "int", "red", "=", "fore...
Convenience method to applyChanges the alpha value of the current foreground Color to the specifice value. @param alpha value in the range of 0 - 255.
[ "Convenience", "method", "to", "applyChanges", "the", "alpha", "value", "of", "the", "current", "foreground", "Color", "to", "the", "specifice", "value", "." ]
train
https://github.com/massimozappino/tagmycode-java-plugin-framework/blob/06637e32bf737e3e0d318859c718815edac9d0f0/src/main/java/com/tagmycode/plugin/gui/TextPrompt.java#L68-L78
Jasig/uPortal
uPortal-core/src/main/java/org/apereo/portal/i18n/LocaleManager.java
LocaleManager.getLocales
public List<Locale> getLocales() { """ Produces a sorted list of locales according to locale preferences obtained from several places. The following priority is given: session, user, browser, portal, and jvm. @return the sorted list of locales """ // Need logic to construct ordered locale list. ...
java
public List<Locale> getLocales() { // Need logic to construct ordered locale list. // Consider creating a separate ILocaleResolver // interface to do this work. final List rslt = new ArrayList(); // Add highest priority locales first addToLocaleList(rslt, sessionLocales);...
[ "public", "List", "<", "Locale", ">", "getLocales", "(", ")", "{", "// Need logic to construct ordered locale list.", "// Consider creating a separate ILocaleResolver", "// interface to do this work.", "final", "List", "rslt", "=", "new", "ArrayList", "(", ")", ";", "// Add...
Produces a sorted list of locales according to locale preferences obtained from several places. The following priority is given: session, user, browser, portal, and jvm. @return the sorted list of locales
[ "Produces", "a", "sorted", "list", "of", "locales", "according", "to", "locale", "preferences", "obtained", "from", "several", "places", ".", "The", "following", "priority", "is", "given", ":", "session", "user", "browser", "portal", "and", "jvm", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-core/src/main/java/org/apereo/portal/i18n/LocaleManager.java#L87-L100
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java
MSPDIWriter.writeExceptions9
private void writeExceptions9(List<Project.Calendars.Calendar.WeekDays.WeekDay> dayList, List<ProjectCalendarException> exceptions) { """ Write exceptions in the format used by MSPDI files prior to Project 2007. @param dayList list of calendar days @param exceptions list of exceptions """ for (Projec...
java
private void writeExceptions9(List<Project.Calendars.Calendar.WeekDays.WeekDay> dayList, List<ProjectCalendarException> exceptions) { for (ProjectCalendarException exception : exceptions) { boolean working = exception.getWorking(); Project.Calendars.Calendar.WeekDays.WeekDay day = m_fa...
[ "private", "void", "writeExceptions9", "(", "List", "<", "Project", ".", "Calendars", ".", "Calendar", ".", "WeekDays", ".", "WeekDay", ">", "dayList", ",", "List", "<", "ProjectCalendarException", ">", "exceptions", ")", "{", "for", "(", "ProjectCalendarExcepti...
Write exceptions in the format used by MSPDI files prior to Project 2007. @param dayList list of calendar days @param exceptions list of exceptions
[ "Write", "exceptions", "in", "the", "format", "used", "by", "MSPDI", "files", "prior", "to", "Project", "2007", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L488-L520
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/Stylesheet.java
Stylesheet.replaceTemplate
public void replaceTemplate(ElemTemplate v, int i) throws TransformerException { """ Replace an "xsl:template" property. This is a hook for CompilingStylesheetHandler, to allow us to access a template, compile it, instantiate it, and replace the original with the compiled instance. ADDED 9/5/2000 to support co...
java
public void replaceTemplate(ElemTemplate v, int i) throws TransformerException { if (null == m_templates) throw new ArrayIndexOutOfBoundsException(); replaceChild(v, (ElemTemplateElement)m_templates.elementAt(i)); m_templates.setElementAt(v, i); v.setStylesheet(this); }
[ "public", "void", "replaceTemplate", "(", "ElemTemplate", "v", ",", "int", "i", ")", "throws", "TransformerException", "{", "if", "(", "null", "==", "m_templates", ")", "throw", "new", "ArrayIndexOutOfBoundsException", "(", ")", ";", "replaceChild", "(", "v", ...
Replace an "xsl:template" property. This is a hook for CompilingStylesheetHandler, to allow us to access a template, compile it, instantiate it, and replace the original with the compiled instance. ADDED 9/5/2000 to support compilation experiment @param v Compiled template to replace with @param i Index of template to...
[ "Replace", "an", "xsl", ":", "template", "property", ".", "This", "is", "a", "hook", "for", "CompilingStylesheetHandler", "to", "allow", "us", "to", "access", "a", "template", "compile", "it", "instantiate", "it", "and", "replace", "the", "original", "with", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/Stylesheet.java#L1372-L1381
Impetus/Kundera
src/jpa-engine/fallback-impl/src/main/java/com/impetus/kundera/index/DocumentIndexer.java
DocumentIndexer.addEntityClassToDocument
protected void addEntityClassToDocument(EntityMetadata metadata, Object entity, Document document, final MetamodelImpl metaModel) { """ Prepare index document. @param metadata the metadata @param entity the object @param document the document """ try { Field luceneField; ...
java
protected void addEntityClassToDocument(EntityMetadata metadata, Object entity, Document document, final MetamodelImpl metaModel) { try { Field luceneField; Object id; id = PropertyAccessorHelper.getId(entity, metadata); // Indexing composite keys ...
[ "protected", "void", "addEntityClassToDocument", "(", "EntityMetadata", "metadata", ",", "Object", "entity", ",", "Document", "document", ",", "final", "MetamodelImpl", "metaModel", ")", "{", "try", "{", "Field", "luceneField", ";", "Object", "id", ";", "id", "=...
Prepare index document. @param metadata the metadata @param entity the object @param document the document
[ "Prepare", "index", "document", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/fallback-impl/src/main/java/com/impetus/kundera/index/DocumentIndexer.java#L358-L411
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.pack
public static void pack(ZipEntrySource[] entries, File zip) { """ Compresses the given entries into a new ZIP file. @param entries ZIP entries added. @param zip new ZIP file created. """ if (log.isDebugEnabled()) { log.debug("Creating '{}' from {}.", zip, Arrays.asList(entries)); } Out...
java
public static void pack(ZipEntrySource[] entries, File zip) { if (log.isDebugEnabled()) { log.debug("Creating '{}' from {}.", zip, Arrays.asList(entries)); } OutputStream out = null; try { out = new BufferedOutputStream(new FileOutputStream(zip)); pack(entries, out, true); } c...
[ "public", "static", "void", "pack", "(", "ZipEntrySource", "[", "]", "entries", ",", "File", "zip", ")", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "debug", "(", "\"Creating '{}' from {}.\"", ",", "zip", ",", "Arrays", ...
Compresses the given entries into a new ZIP file. @param entries ZIP entries added. @param zip new ZIP file created.
[ "Compresses", "the", "given", "entries", "into", "a", "new", "ZIP", "file", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L1996-L2012
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java
SharedPreferenceUtils.getString
public String getString(String key, String defaultValue) throws ClassCastException { """ Retrieve a String value from the preferences. @param key The name of the preference to retrieve. @param defaultValue value to return when a key does not exists. @return the preference value if it exists, or defValue. ...
java
public String getString(String key, String defaultValue) throws ClassCastException { return sharedPreferences.getString(key, (defaultValue == null) ? "" : defaultValue); }
[ "public", "String", "getString", "(", "String", "key", ",", "String", "defaultValue", ")", "throws", "ClassCastException", "{", "return", "sharedPreferences", ".", "getString", "(", "key", ",", "(", "defaultValue", "==", "null", ")", "?", "\"\"", ":", "default...
Retrieve a String value from the preferences. @param key The name of the preference to retrieve. @param defaultValue value to return when a key does not exists. @return the preference value if it exists, or defValue. Throws ClassCastException if there is a preference with this name that is not a String. @Throws Clas...
[ "Retrieve", "a", "String", "value", "from", "the", "preferences", "." ]
train
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java#L258-L261
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.startRecording
public StartRecordingResponse startRecording(String sessionId, String recording) { """ Start live session recording. @param sessionId Live session id. @param recording Live recording preset name. @return the response """ checkStringNotEmpty(sessionId, "The parameter sessionId should NOT be null or...
java
public StartRecordingResponse startRecording(String sessionId, String recording) { checkStringNotEmpty(sessionId, "The parameter sessionId should NOT be null or empty string."); checkStringNotEmpty(recording, "The parameter recording should NOT be null or empty string."); StartRecordingRequest r...
[ "public", "StartRecordingResponse", "startRecording", "(", "String", "sessionId", ",", "String", "recording", ")", "{", "checkStringNotEmpty", "(", "sessionId", ",", "\"The parameter sessionId should NOT be null or empty string.\"", ")", ";", "checkStringNotEmpty", "(", "reco...
Start live session recording. @param sessionId Live session id. @param recording Live recording preset name. @return the response
[ "Start", "live", "session", "recording", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1047-L1054
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.subsidiaryPrice_GET
public OvhPrice subsidiaryPrice_GET(String flavorId, OvhOvhSubsidiaryEnum ovhSubsidiary, String region) throws IOException { """ Get services prices for a subsidiary REST: GET /cloud/subsidiaryPrice @param ovhSubsidiary [required] OVH subsidiary @param flavorId [required] OVH cloud flavor id @param region [r...
java
public OvhPrice subsidiaryPrice_GET(String flavorId, OvhOvhSubsidiaryEnum ovhSubsidiary, String region) throws IOException { String qPath = "/cloud/subsidiaryPrice"; StringBuilder sb = path(qPath); query(sb, "flavorId", flavorId); query(sb, "ovhSubsidiary", ovhSubsidiary); query(sb, "region", region); Strin...
[ "public", "OvhPrice", "subsidiaryPrice_GET", "(", "String", "flavorId", ",", "OvhOvhSubsidiaryEnum", "ovhSubsidiary", ",", "String", "region", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/subsidiaryPrice\"", ";", "StringBuilder", "sb", "=", "pa...
Get services prices for a subsidiary REST: GET /cloud/subsidiaryPrice @param ovhSubsidiary [required] OVH subsidiary @param flavorId [required] OVH cloud flavor id @param region [required] Region
[ "Get", "services", "prices", "for", "a", "subsidiary" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L107-L115
OpenVidu/openvidu
openvidu-server/src/main/java/io/openvidu/server/kurento/core/KurentoSessionManager.java
KurentoSessionManager.createSession
public void createSession(Session sessionNotActive, KurentoClientSessionInfo kcSessionInfo) throws OpenViduException { """ Creates a session if it doesn't already exist. The session's id will be indicated by the session info bean. @param kcSessionInfo bean that will be passed to the {@link KurentoClientPro...
java
public void createSession(Session sessionNotActive, KurentoClientSessionInfo kcSessionInfo) throws OpenViduException { String sessionId = kcSessionInfo.getRoomName(); KurentoSession session = (KurentoSession) sessions.get(sessionId); if (session != null) { throw new OpenViduException(Code.ROOM_CANNOT_BE_CRE...
[ "public", "void", "createSession", "(", "Session", "sessionNotActive", ",", "KurentoClientSessionInfo", "kcSessionInfo", ")", "throws", "OpenViduException", "{", "String", "sessionId", "=", "kcSessionInfo", ".", "getRoomName", "(", ")", ";", "KurentoSession", "session",...
Creates a session if it doesn't already exist. The session's id will be indicated by the session info bean. @param kcSessionInfo bean that will be passed to the {@link KurentoClientProvider} in order to obtain the {@link KurentoClient} that will be used by the room @throws OpenViduException in case of error while crea...
[ "Creates", "a", "session", "if", "it", "doesn", "t", "already", "exist", ".", "The", "session", "s", "id", "will", "be", "indicated", "by", "the", "session", "info", "bean", "." ]
train
https://github.com/OpenVidu/openvidu/blob/89db47dd37949ceab29e5228371a8fcab04d8d55/openvidu-server/src/main/java/io/openvidu/server/kurento/core/KurentoSessionManager.java#L503-L527
thinkaurelius/titan
titan-core/src/main/java/com/thinkaurelius/titan/util/stats/ObjectAccumulator.java
ObjectAccumulator.incBy
public double incBy(K o, double inc) { """ Increases the count of object o by inc and returns the new count value @param o @param inc @return """ Counter c = countMap.get(o); if (c == null) { c = new Counter(); countMap.put(o, c); } c.count += inc; ...
java
public double incBy(K o, double inc) { Counter c = countMap.get(o); if (c == null) { c = new Counter(); countMap.put(o, c); } c.count += inc; return c.count; }
[ "public", "double", "incBy", "(", "K", "o", ",", "double", "inc", ")", "{", "Counter", "c", "=", "countMap", ".", "get", "(", "o", ")", ";", "if", "(", "c", "==", "null", ")", "{", "c", "=", "new", "Counter", "(", ")", ";", "countMap", ".", "...
Increases the count of object o by inc and returns the new count value @param o @param inc @return
[ "Increases", "the", "count", "of", "object", "o", "by", "inc", "and", "returns", "the", "new", "count", "value" ]
train
https://github.com/thinkaurelius/titan/blob/ee226e52415b8bf43b700afac75fa5b9767993a5/titan-core/src/main/java/com/thinkaurelius/titan/util/stats/ObjectAccumulator.java#L36-L44
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/LocaleDisplayNames.java
LocaleDisplayNames.getInstance
public static LocaleDisplayNames getInstance(ULocale locale, DialectHandling dialectHandling) { """ Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale, using the provided dialectHandling. @param locale the display locale @param dialectHandling how to select names for ...
java
public static LocaleDisplayNames getInstance(ULocale locale, DialectHandling dialectHandling) { LocaleDisplayNames result = null; if (FACTORY_DIALECTHANDLING != null) { try { result = (LocaleDisplayNames) FACTORY_DIALECTHANDLING.invoke(null, locale, di...
[ "public", "static", "LocaleDisplayNames", "getInstance", "(", "ULocale", "locale", ",", "DialectHandling", "dialectHandling", ")", "{", "LocaleDisplayNames", "result", "=", "null", ";", "if", "(", "FACTORY_DIALECTHANDLING", "!=", "null", ")", "{", "try", "{", "res...
Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale, using the provided dialectHandling. @param locale the display locale @param dialectHandling how to select names for locales @return a LocaleDisplayNames instance
[ "Returns", "an", "instance", "of", "LocaleDisplayNames", "that", "returns", "names", "formatted", "for", "the", "provided", "locale", "using", "the", "provided", "dialectHandling", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/LocaleDisplayNames.java#L76-L92
structurizr/java
structurizr-core/src/com/structurizr/model/ContainerInstance.java
ContainerInstance.addHealthCheck
@Nonnull public HttpHealthCheck addHealthCheck(String name, String url, int interval, long timeout) { """ Adds a new health check. @param name the name of the health check @param url the URL of the health check @param interval the polling interval, in seconds @param timeout the timeout, in ...
java
@Nonnull public HttpHealthCheck addHealthCheck(String name, String url, int interval, long timeout) { if (name == null || name.trim().length() == 0) { throw new IllegalArgumentException("The name must not be null or empty."); } if (url == null || url.trim().length() == 0) { ...
[ "@", "Nonnull", "public", "HttpHealthCheck", "addHealthCheck", "(", "String", "name", ",", "String", "url", ",", "int", "interval", ",", "long", "timeout", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "trim", "(", ")", ".", "length", "...
Adds a new health check. @param name the name of the health check @param url the URL of the health check @param interval the polling interval, in seconds @param timeout the timeout, in milliseconds @return a HttpHealthCheck instance representing the health check that has been added @throws IllegalArgume...
[ "Adds", "a", "new", "health", "check", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/ContainerInstance.java#L145-L171
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WebUtilities.java
WebUtilities.getAncestorOfClass
public static <T> T getAncestorOfClass(final Class<T> clazz, final WComponent comp) { """ Attempts to find a component which is an ancestor of the given component, and that is assignable to the given class. @param clazz the class to look for @param comp the component to start at. @return the matching ancesto...
java
public static <T> T getAncestorOfClass(final Class<T> clazz, final WComponent comp) { if (comp == null || clazz == null) { return null; } WComponent parent = comp.getParent(); while (parent != null) { if (clazz.isInstance(parent)) { return (T) parent; } parent = parent.getParent(); } retur...
[ "public", "static", "<", "T", ">", "T", "getAncestorOfClass", "(", "final", "Class", "<", "T", ">", "clazz", ",", "final", "WComponent", "comp", ")", "{", "if", "(", "comp", "==", "null", "||", "clazz", "==", "null", ")", "{", "return", "null", ";", ...
Attempts to find a component which is an ancestor of the given component, and that is assignable to the given class. @param clazz the class to look for @param comp the component to start at. @return the matching ancestor, if found, otherwise null. @param <T> the ancestor class
[ "Attempts", "to", "find", "a", "component", "which", "is", "an", "ancestor", "of", "the", "given", "component", "and", "that", "is", "assignable", "to", "the", "given", "class", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WebUtilities.java#L225-L239
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java
ManagementClient.createRule
public RuleDescription createRule(String topicName, String subscriptionName, RuleDescription ruleDescription) throws ServiceBusException, InterruptedException { """ Creates a new rule for a given topic - subscription. See {@link RuleDescription} for default values of subscription properties. @param topicName - N...
java
public RuleDescription createRule(String topicName, String subscriptionName, RuleDescription ruleDescription) throws ServiceBusException, InterruptedException { return Utils.completeFuture(this.asyncClient.createRuleAsync(topicName, subscriptionName, ruleDescription)); }
[ "public", "RuleDescription", "createRule", "(", "String", "topicName", ",", "String", "subscriptionName", ",", "RuleDescription", "ruleDescription", ")", "throws", "ServiceBusException", ",", "InterruptedException", "{", "return", "Utils", ".", "completeFuture", "(", "t...
Creates a new rule for a given topic - subscription. See {@link RuleDescription} for default values of subscription properties. @param topicName - Name of the topic. @param subscriptionName - Name of the subscription. @param ruleDescription - A {@link RuleDescription} object describing the attributes with which the new...
[ "Creates", "a", "new", "rule", "for", "a", "given", "topic", "-", "subscription", ".", "See", "{" ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java#L470-L472
OpenLiberty/open-liberty
dev/com.ibm.ws.ras.instrument/src/com/ibm/ws/ras/instrument/internal/main/LibertyTracePreprocessInstrumentation.java
LibertyTracePreprocessInstrumentation.getMethod
private MethodNode getMethod(String name, String desc, List<MethodNode> methods) { """ Find the method with the given name and descriptor in the list of {@code MethodNode}s. @param name the method name @param desc the method descriptor @param methods the list of methods to search @return the matching {@cod...
java
private MethodNode getMethod(String name, String desc, List<MethodNode> methods) { for (MethodNode mn : methods) { if (name.equals(mn.name) && desc.equals(mn.desc)) { return mn; } } return null; }
[ "private", "MethodNode", "getMethod", "(", "String", "name", ",", "String", "desc", ",", "List", "<", "MethodNode", ">", "methods", ")", "{", "for", "(", "MethodNode", "mn", ":", "methods", ")", "{", "if", "(", "name", ".", "equals", "(", "mn", ".", ...
Find the method with the given name and descriptor in the list of {@code MethodNode}s. @param name the method name @param desc the method descriptor @param methods the list of methods to search @return the matching {@code MethodNode} if found or null if not found
[ "Find", "the", "method", "with", "the", "given", "name", "and", "descriptor", "in", "the", "list", "of", "{", "@code", "MethodNode", "}", "s", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ras.instrument/src/com/ibm/ws/ras/instrument/internal/main/LibertyTracePreprocessInstrumentation.java#L183-L190
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/toolbox/simulators/SimulatorImpl.java
SimulatorImpl.scheduleTask
public void scheduleTask(PyObject task, double delay) { """ Schedules the specified task for execution after the specified delay. @param task Python object callable without arguments, to schedule @param delay delay in seconds before task is to be executed """ mTimer.schedule(new PythonCallTimerTask...
java
public void scheduleTask(PyObject task, double delay) { mTimer.schedule(new PythonCallTimerTask(task), Math.round(delay * 1000)); }
[ "public", "void", "scheduleTask", "(", "PyObject", "task", ",", "double", "delay", ")", "{", "mTimer", ".", "schedule", "(", "new", "PythonCallTimerTask", "(", "task", ")", ",", "Math", ".", "round", "(", "delay", "*", "1000", ")", ")", ";", "}" ]
Schedules the specified task for execution after the specified delay. @param task Python object callable without arguments, to schedule @param delay delay in seconds before task is to be executed
[ "Schedules", "the", "specified", "task", "for", "execution", "after", "the", "specified", "delay", "." ]
train
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/toolbox/simulators/SimulatorImpl.java#L116-L118
Whiley/WhileyCompiler
src/main/java/wyil/transform/VerificationConditionGenerator.java
VerificationConditionGenerator.translateVariableAssign
private Context translateVariableAssign(WyilFile.Expr.VariableAccess lval, Expr rval, Context context) { """ Translate an assignment to a variable @param lval The array assignment expression @param result The value being assigned to the given array element @param context The enclosing context @return ...
java
private Context translateVariableAssign(WyilFile.Expr.VariableAccess lval, Expr rval, Context context) { WyilFile.Decl.Variable decl = lval.getVariableDeclaration(); context = context.havoc(decl); WyalFile.VariableDeclaration nVersionedVar = context.read(decl); Expr.VariableAccess var = new Expr.VariableAccess(...
[ "private", "Context", "translateVariableAssign", "(", "WyilFile", ".", "Expr", ".", "VariableAccess", "lval", ",", "Expr", "rval", ",", "Context", "context", ")", "{", "WyilFile", ".", "Decl", ".", "Variable", "decl", "=", "lval", ".", "getVariableDeclaration", ...
Translate an assignment to a variable @param lval The array assignment expression @param result The value being assigned to the given array element @param context The enclosing context @return
[ "Translate", "an", "assignment", "to", "a", "variable" ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/transform/VerificationConditionGenerator.java#L682-L688
foundation-runtime/service-directory
2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/connect/DirectoryConnection.java
DirectoryConnection.generateDirectoryAuthData
private AuthData generateDirectoryAuthData(String userName, String password) { """ Generate the obfuscated auth data. @param userName the user name. @param password the password. @return the AuthData. """ if(password != null && ! password.isEmpty()){ byte[] secret = ObfuscatUtil.ba...
java
private AuthData generateDirectoryAuthData(String userName, String password) { if(password != null && ! password.isEmpty()){ byte[] secret = ObfuscatUtil.base64Encode(password.getBytes()); return new AuthData(AuthScheme.DIRECTORY, userName, secret, true); } else { r...
[ "private", "AuthData", "generateDirectoryAuthData", "(", "String", "userName", ",", "String", "password", ")", "{", "if", "(", "password", "!=", "null", "&&", "!", "password", ".", "isEmpty", "(", ")", ")", "{", "byte", "[", "]", "secret", "=", "ObfuscatUt...
Generate the obfuscated auth data. @param userName the user name. @param password the password. @return the AuthData.
[ "Generate", "the", "obfuscated", "auth", "data", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/connect/DirectoryConnection.java#L960-L968
SundeepK/CompactCalendarView
library/src/main/java/com/github/sundeepk/compactcalendarview/CompactCalendarView.java
CompactCalendarView.setLocale
public void setLocale(TimeZone timeZone, Locale locale) { """ /* Use a custom locale for compact calendar and reinitialise the view. """ compactCalendarController.setLocale(timeZone, locale); invalidate(); }
java
public void setLocale(TimeZone timeZone, Locale locale){ compactCalendarController.setLocale(timeZone, locale); invalidate(); }
[ "public", "void", "setLocale", "(", "TimeZone", "timeZone", ",", "Locale", "locale", ")", "{", "compactCalendarController", ".", "setLocale", "(", "timeZone", ",", "locale", ")", ";", "invalidate", "(", ")", ";", "}" ]
/* Use a custom locale for compact calendar and reinitialise the view.
[ "/", "*", "Use", "a", "custom", "locale", "for", "compact", "calendar", "and", "reinitialise", "the", "view", "." ]
train
https://github.com/SundeepK/CompactCalendarView/blob/e74e0eeb913744bdcaea6e9df53268441f9dbf8d/library/src/main/java/com/github/sundeepk/compactcalendarview/CompactCalendarView.java#L109-L112
roboconf/roboconf-platform
core/roboconf-target-iaas-occi/src/main/java/net/roboconf/target/occi/internal/OcciVMUtils.java
OcciVMUtils.deleteVM
public static boolean deleteVM(String hostIpPort, String id) throws TargetException { """ Deletes a VM (OCCI / VMWare). @param hostIpPort IP and port of OCCI server (eg. "172.16.225.91:8080") @param id Unique VM ID @return true if deletion OK, false otherwise """ if(id.startsWith("urn:uuid:")) id = id.su...
java
public static boolean deleteVM(String hostIpPort, String id) throws TargetException { if(id.startsWith("urn:uuid:")) id = id.substring(9); String ret = null; URL url = null; try { CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL)); url = new URL("http://" + hostIpPort + "/" + id);...
[ "public", "static", "boolean", "deleteVM", "(", "String", "hostIpPort", ",", "String", "id", ")", "throws", "TargetException", "{", "if", "(", "id", ".", "startsWith", "(", "\"urn:uuid:\"", ")", ")", "id", "=", "id", ".", "substring", "(", "9", ")", ";",...
Deletes a VM (OCCI / VMWare). @param hostIpPort IP and port of OCCI server (eg. "172.16.225.91:8080") @param id Unique VM ID @return true if deletion OK, false otherwise
[ "Deletes", "a", "VM", "(", "OCCI", "/", "VMWare", ")", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-iaas-occi/src/main/java/net/roboconf/target/occi/internal/OcciVMUtils.java#L533-L569
dain/leveldb
leveldb/src/main/java/org/iq80/leveldb/util/Slice.java
Slice.getBytes
public void getBytes(int index, byte[] destination, int destinationIndex, int length) { """ Transfers this buffer's data to the specified destination starting at the specified absolute {@code index}. @param destinationIndex the first index of the destination @param length the number of bytes to transfer @thr...
java
public void getBytes(int index, byte[] destination, int destinationIndex, int length) { checkPositionIndexes(index, index + length, this.length); checkPositionIndexes(destinationIndex, destinationIndex + length, destination.length); index += offset; System.arraycopy(data, index, dest...
[ "public", "void", "getBytes", "(", "int", "index", ",", "byte", "[", "]", "destination", ",", "int", "destinationIndex", ",", "int", "length", ")", "{", "checkPositionIndexes", "(", "index", ",", "index", "+", "length", ",", "this", ".", "length", ")", "...
Transfers this buffer's data to the specified destination starting at the specified absolute {@code index}. @param destinationIndex the first index of the destination @param length the number of bytes to transfer @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0}, if the specified ...
[ "Transfers", "this", "buffer", "s", "data", "to", "the", "specified", "destination", "starting", "at", "the", "specified", "absolute", "{", "@code", "index", "}", "." ]
train
https://github.com/dain/leveldb/blob/7994065b48eada2ef29e7fefd172c2ad1e0110eb/leveldb/src/main/java/org/iq80/leveldb/util/Slice.java#L207-L213
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java
TreeScanner.visitUnionType
@Override public R visitUnionType(UnionTypeTree node, P p) { """ {@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning """ return scan(node.getTypeAlternatives(), p); }
java
@Override public R visitUnionType(UnionTypeTree node, P p) { return scan(node.getTypeAlternatives(), p); }
[ "@", "Override", "public", "R", "visitUnionType", "(", "UnionTypeTree", "node", ",", "P", "p", ")", "{", "return", "scan", "(", "node", ".", "getTypeAlternatives", "(", ")", ",", "p", ")", ";", "}" ]
{@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning
[ "{", "@inheritDoc", "}", "This", "implementation", "scans", "the", "children", "in", "left", "to", "right", "order", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java#L766-L769
IBM/ibm-cos-sdk-java
ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/profile/internal/securitytoken/STSProfileCredentialsServiceProvider.java
STSProfileCredentialsServiceProvider.getProfileCredentialService
private static synchronized ProfileCredentialsService getProfileCredentialService() { """ Only called once per creation of each profile credential provider so we don't bother with any double checked locking. """ if (STS_CREDENTIALS_SERVICE == null) { try { STS_CREDENTIALS_S...
java
private static synchronized ProfileCredentialsService getProfileCredentialService() { if (STS_CREDENTIALS_SERVICE == null) { try { STS_CREDENTIALS_SERVICE = (ProfileCredentialsService) Class.forName(CLASS_NAME) .newInstance(); } catch (ClassNotFoun...
[ "private", "static", "synchronized", "ProfileCredentialsService", "getProfileCredentialService", "(", ")", "{", "if", "(", "STS_CREDENTIALS_SERVICE", "==", "null", ")", "{", "try", "{", "STS_CREDENTIALS_SERVICE", "=", "(", "ProfileCredentialsService", ")", "Class", ".",...
Only called once per creation of each profile credential provider so we don't bother with any double checked locking.
[ "Only", "called", "once", "per", "creation", "of", "each", "profile", "credential", "provider", "so", "we", "don", "t", "bother", "with", "any", "double", "checked", "locking", "." ]
train
https://github.com/IBM/ibm-cos-sdk-java/blob/d0bb2dd754c328a05e7dba8dc42e28b271b6daf2/ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/auth/profile/internal/securitytoken/STSProfileCredentialsServiceProvider.java#L50-L66
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/query/KunderaQuery.java
KunderaQuery.addTypedParameter
private void addTypedParameter(Type type, String parameter, FilterClause clause) { """ Adds typed parameter to {@link TypedParameter}. @param type type of parameter(e.g. NAMED/INDEXED) @param parameter parameter name. @param clause filter clause. """ if (typedParameter == null) { ty...
java
private void addTypedParameter(Type type, String parameter, FilterClause clause) { if (typedParameter == null) { typedParameter = new TypedParameter(type); } if (typedParameter.getType().equals(type)) { typedParameter.addParameters(parameter, clause); } else { ...
[ "private", "void", "addTypedParameter", "(", "Type", "type", ",", "String", "parameter", ",", "FilterClause", "clause", ")", "{", "if", "(", "typedParameter", "==", "null", ")", "{", "typedParameter", "=", "new", "TypedParameter", "(", "type", ")", ";", "}",...
Adds typed parameter to {@link TypedParameter}. @param type type of parameter(e.g. NAMED/INDEXED) @param parameter parameter name. @param clause filter clause.
[ "Adds", "typed", "parameter", "to", "{", "@link", "TypedParameter", "}", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/query/KunderaQuery.java#L737-L747
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/JavaTimeZone.java
JavaTimeZone.createTimeZone
public static JavaTimeZone createTimeZone(String id) { """ Creates an instance of JavaTimeZone with the given timezone ID. @param id A timezone ID, either a system ID or a custom ID. @return An instance of JavaTimeZone for the given ID, or null when the ID cannot be understood. """ java.util.TimeZon...
java
public static JavaTimeZone createTimeZone(String id) { java.util.TimeZone jtz = null; if (AVAILABLESET.contains(id)) { jtz = java.util.TimeZone.getTimeZone(id); } if (jtz == null) { // Use ICU's canonical ID mapping boolean[] isSystemID = new boolean...
[ "public", "static", "JavaTimeZone", "createTimeZone", "(", "String", "id", ")", "{", "java", ".", "util", ".", "TimeZone", "jtz", "=", "null", ";", "if", "(", "AVAILABLESET", ".", "contains", "(", "id", ")", ")", "{", "jtz", "=", "java", ".", "util", ...
Creates an instance of JavaTimeZone with the given timezone ID. @param id A timezone ID, either a system ID or a custom ID. @return An instance of JavaTimeZone for the given ID, or null when the ID cannot be understood.
[ "Creates", "an", "instance", "of", "JavaTimeZone", "with", "the", "given", "timezone", "ID", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/JavaTimeZone.java#L86-L107
google/closure-compiler
src/com/google/javascript/rhino/jstype/JSTypeRegistry.java
JSTypeRegistry.resetImplicitPrototype
public void resetImplicitPrototype(JSType type, ObjectType newImplicitProto) { """ Set the implicit prototype if it's possible to do so. There are a few different reasons why this could be a no-op: for example, numbers can't be implicit prototypes, and we don't want to change the implicit prototype if other cla...
java
public void resetImplicitPrototype(JSType type, ObjectType newImplicitProto) { if (type instanceof PrototypeObjectType) { PrototypeObjectType poType = (PrototypeObjectType) type; poType.clearCachedValues(); poType.setImplicitPrototype(newImplicitProto); } }
[ "public", "void", "resetImplicitPrototype", "(", "JSType", "type", ",", "ObjectType", "newImplicitProto", ")", "{", "if", "(", "type", "instanceof", "PrototypeObjectType", ")", "{", "PrototypeObjectType", "poType", "=", "(", "PrototypeObjectType", ")", "type", ";", ...
Set the implicit prototype if it's possible to do so. There are a few different reasons why this could be a no-op: for example, numbers can't be implicit prototypes, and we don't want to change the implicit prototype if other classes have already subclassed this one.
[ "Set", "the", "implicit", "prototype", "if", "it", "s", "possible", "to", "do", "so", ".", "There", "are", "a", "few", "different", "reasons", "why", "this", "could", "be", "a", "no", "-", "op", ":", "for", "example", "numbers", "can", "t", "be", "im...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/jstype/JSTypeRegistry.java#L1778-L1784
sd4324530/fastweixin
src/main/java/com/github/sd4324530/fastweixin/servlet/WeixinServletSupport.java
WeixinServletSupport.doPost
@Override protected final void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { """ 重写servlet中的post方法,用于接收微信服务器发来的消息,置为final方法,用户已经无需重写这个方法啦 @param request http请求对象 @param response http响应对象 @throws ServletException servlet异常 @throws IOException ...
java
@Override protected final void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (!support.isLegal(request)) { return; } //设置响应编码格式 response.setCharacterEncoding("UTF-8"); String resp = support.processReques...
[ "@", "Override", "protected", "final", "void", "doPost", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "ServletException", ",", "IOException", "{", "if", "(", "!", "support", ".", "isLegal", "(", "request", ")", ")"...
重写servlet中的post方法,用于接收微信服务器发来的消息,置为final方法,用户已经无需重写这个方法啦 @param request http请求对象 @param response http响应对象 @throws ServletException servlet异常 @throws IOException IO异常
[ "重写servlet中的post方法,用于接收微信服务器发来的消息,置为final方法,用户已经无需重写这个方法啦" ]
train
https://github.com/sd4324530/fastweixin/blob/6bc0a7abfa23aad0dbad4c3123a47a7fb53f3447/src/main/java/com/github/sd4324530/fastweixin/servlet/WeixinServletSupport.java#L53-L65
infinispan/infinispan
core/src/main/java/org/infinispan/util/stream/Streams.java
Streams.copySome
public static long copySome(final InputStream input, final OutputStream output, final long length) throws IOException { """ Copy a limited number of bytes from the input stream to the output stream. @param input Stream to read bytes from. ...
java
public static long copySome(final InputStream input, final OutputStream output, final long length) throws IOException { return copySome(input, output, DEFAULT_BUFFER_SIZE, length); }
[ "public", "static", "long", "copySome", "(", "final", "InputStream", "input", ",", "final", "OutputStream", "output", ",", "final", "long", "length", ")", "throws", "IOException", "{", "return", "copySome", "(", "input", ",", "output", ",", "DEFAULT_BUFFER_SIZE"...
Copy a limited number of bytes from the input stream to the output stream. @param input Stream to read bytes from. @param output Stream to write bytes to. @param length The maximum number of bytes to copy. @return The total number of bytes copied. @throws IOException Failed to copy bytes.
[ "Copy", "a", "limited", "number", "of", "bytes", "from", "the", "input", "stream", "to", "the", "output", "stream", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/util/stream/Streams.java#L407-L412
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/quantiles/DoublesSketch.java
DoublesSketch.putMemory
public void putMemory(final WritableMemory dstMem, final boolean compact) { """ Puts the current sketch into the given Memory if there is sufficient space, otherwise, throws an error. @param dstMem the given memory. @param compact if true, compacts and sorts the base buffer, which optimizes merge performance...
java
public void putMemory(final WritableMemory dstMem, final boolean compact) { if (isDirect() && (isCompact() == compact)) { final Memory srcMem = getMemory(); srcMem.copyTo(0, dstMem, 0, getStorageBytes()); } else { final byte[] byteArr = toByteArray(compact); final int arrLen = byteArr.le...
[ "public", "void", "putMemory", "(", "final", "WritableMemory", "dstMem", ",", "final", "boolean", "compact", ")", "{", "if", "(", "isDirect", "(", ")", "&&", "(", "isCompact", "(", ")", "==", "compact", ")", ")", "{", "final", "Memory", "srcMem", "=", ...
Puts the current sketch into the given Memory if there is sufficient space, otherwise, throws an error. @param dstMem the given memory. @param compact if true, compacts and sorts the base buffer, which optimizes merge performance at the cost of slightly increased serialization time.
[ "Puts", "the", "current", "sketch", "into", "the", "given", "Memory", "if", "there", "is", "sufficient", "space", "otherwise", "throws", "an", "error", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/quantiles/DoublesSketch.java#L693-L707
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.newDriverInstance
public Object newDriverInstance(CmsParameterConfiguration configuration, String driverName, String driverPoolUrl) throws CmsException { """ Method to create a new instance of a driver.<p> @param configuration the configurations from the propertyfile @param driverName the class name of the driver @param dr...
java
public Object newDriverInstance(CmsParameterConfiguration configuration, String driverName, String driverPoolUrl) throws CmsException { Class<?>[] initParamClasses = {CmsParameterConfiguration.class, String.class, CmsDriverManager.class}; Object[] initParams = {configuration, driverPoolUrl, this}; ...
[ "public", "Object", "newDriverInstance", "(", "CmsParameterConfiguration", "configuration", ",", "String", "driverName", ",", "String", "driverPoolUrl", ")", "throws", "CmsException", "{", "Class", "<", "?", ">", "[", "]", "initParamClasses", "=", "{", "CmsParameter...
Method to create a new instance of a driver.<p> @param configuration the configurations from the propertyfile @param driverName the class name of the driver @param driverPoolUrl the pool url for the driver @return an initialized instance of the driver @throws CmsException if something goes wrong
[ "Method", "to", "create", "a", "new", "instance", "of", "a", "driver", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L5970-L6009
Inbot/inbot-utils
src/main/java/io/inbot/utils/MiscUtils.java
MiscUtils.urlDecode
public static String urlDecode(String s) { """ Url decode a string and don't throw a checked exception. Uses UTF-8 as per RFC 3986. @param s a string @return decoded string """ try { return URLDecoder.decode(s, StandardCharsets.UTF_8.name()); } catch (UnsupportedEncodingException ...
java
public static String urlDecode(String s) { try { return URLDecoder.decode(s, StandardCharsets.UTF_8.name()); } catch (UnsupportedEncodingException e) { throw new IllegalStateException("get a jdk that actually supports utf-8", e); } }
[ "public", "static", "String", "urlDecode", "(", "String", "s", ")", "{", "try", "{", "return", "URLDecoder", ".", "decode", "(", "s", ",", "StandardCharsets", ".", "UTF_8", ".", "name", "(", ")", ")", ";", "}", "catch", "(", "UnsupportedEncodingException",...
Url decode a string and don't throw a checked exception. Uses UTF-8 as per RFC 3986. @param s a string @return decoded string
[ "Url", "decode", "a", "string", "and", "don", "t", "throw", "a", "checked", "exception", ".", "Uses", "UTF", "-", "8", "as", "per", "RFC", "3986", "." ]
train
https://github.com/Inbot/inbot-utils/blob/3112bc08d4237e95fe0f8a219a5bbceb390d0505/src/main/java/io/inbot/utils/MiscUtils.java#L44-L50
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/CareWebShellEx.java
CareWebShellEx.registerMenu
public ElementMenuItem registerMenu(String path, String action) { """ Register a menu. @param path Path for the menu. @param action Associated action for the menu. @return Created menu. """ ElementMenuItem menu = getElement(path, getDesktop().getMenubar(), ElementMenuItem.class); menu.setA...
java
public ElementMenuItem registerMenu(String path, String action) { ElementMenuItem menu = getElement(path, getDesktop().getMenubar(), ElementMenuItem.class); menu.setAction(action); return menu; }
[ "public", "ElementMenuItem", "registerMenu", "(", "String", "path", ",", "String", "action", ")", "{", "ElementMenuItem", "menu", "=", "getElement", "(", "path", ",", "getDesktop", "(", ")", ".", "getMenubar", "(", ")", ",", "ElementMenuItem", ".", "class", ...
Register a menu. @param path Path for the menu. @param action Associated action for the menu. @return Created menu.
[ "Register", "a", "menu", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/CareWebShellEx.java#L216-L220
junit-team/junit4
src/main/java/junit/framework/Assert.java
Assert.assertEquals
static public void assertEquals(String message, byte expected, byte actual) { """ Asserts that two bytes are equal. If they are not an AssertionFailedError is thrown with the given message. """ assertEquals(message, Byte.valueOf(expected), Byte.valueOf(actual)); }
java
static public void assertEquals(String message, byte expected, byte actual) { assertEquals(message, Byte.valueOf(expected), Byte.valueOf(actual)); }
[ "static", "public", "void", "assertEquals", "(", "String", "message", ",", "byte", "expected", ",", "byte", "actual", ")", "{", "assertEquals", "(", "message", ",", "Byte", ".", "valueOf", "(", "expected", ")", ",", "Byte", ".", "valueOf", "(", "actual", ...
Asserts that two bytes are equal. If they are not an AssertionFailedError is thrown with the given message.
[ "Asserts", "that", "two", "bytes", "are", "equal", ".", "If", "they", "are", "not", "an", "AssertionFailedError", "is", "thrown", "with", "the", "given", "message", "." ]
train
https://github.com/junit-team/junit4/blob/d9861ecdb6e487f6c352437ee823879aca3b81d4/src/main/java/junit/framework/Assert.java#L188-L190
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldList.java
FieldList.doRecordChange
public int doRecordChange(Field field, int iChangeType, boolean bDisplayOption) { """ Called each time a field changed. This method replaces behaviors in the thick model. Just override this method and look for the target field and do the listener associated with a change of value. Note: The thin version (this o...
java
public int doRecordChange(Field field, int iChangeType, boolean bDisplayOption) { if (field != null) if (iChangeType == Constants.SCREEN_MOVE) this.firePropertyChange(field.getFieldName(), null, field.getData()); return Constants.NORMAL_RETURN; }
[ "public", "int", "doRecordChange", "(", "Field", "field", ",", "int", "iChangeType", ",", "boolean", "bDisplayOption", ")", "{", "if", "(", "field", "!=", "null", ")", "if", "(", "iChangeType", "==", "Constants", ".", "SCREEN_MOVE", ")", "this", ".", "fire...
Called each time a field changed. This method replaces behaviors in the thick model. Just override this method and look for the target field and do the listener associated with a change of value. Note: The thin version (this one) keeps a flag for changes, the thick version surveys the fields. @param field The field tha...
[ "Called", "each", "time", "a", "field", "changed", ".", "This", "method", "replaces", "behaviors", "in", "the", "thick", "model", ".", "Just", "override", "this", "method", "and", "look", "for", "the", "target", "field", "and", "do", "the", "listener", "as...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldList.java#L382-L388
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/stream/StreamHelper.java
StreamHelper.readSafeUTF
@Nullable public static String readSafeUTF (@Nonnull final DataInput aDI) throws IOException { """ Because {@link DataOutputStream#writeUTF(String)} has a limit of 64KB this methods provides a similar solution for reading like {@link DataInputStream#readUTF()} but what was written in {@link #writeSafeUTF(Data...
java
@Nullable public static String readSafeUTF (@Nonnull final DataInput aDI) throws IOException { ValueEnforcer.notNull (aDI, "DataInput"); final int nLayout = aDI.readByte (); final String ret; switch (nLayout) { case 0: { // If the first byte has value "0" it means the whole ...
[ "@", "Nullable", "public", "static", "String", "readSafeUTF", "(", "@", "Nonnull", "final", "DataInput", "aDI", ")", "throws", "IOException", "{", "ValueEnforcer", ".", "notNull", "(", "aDI", ",", "\"DataInput\"", ")", ";", "final", "int", "nLayout", "=", "a...
Because {@link DataOutputStream#writeUTF(String)} has a limit of 64KB this methods provides a similar solution for reading like {@link DataInputStream#readUTF()} but what was written in {@link #writeSafeUTF(DataOutput, String)}. @param aDI {@link DataInput} to read from. May not be <code>null</code>. @return The read ...
[ "Because", "{", "@link", "DataOutputStream#writeUTF", "(", "String", ")", "}", "has", "a", "limit", "of", "64KB", "this", "methods", "provides", "a", "similar", "solution", "for", "reading", "like", "{", "@link", "DataInputStream#readUTF", "()", "}", "but", "w...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/stream/StreamHelper.java#L1675-L1717
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToSAXHandler.java
ToSAXHandler.startElement
public void startElement(String uri, String localName, String qName) throws SAXException { """ Receives notification that an element starts, but attributes are not fully known yet. @param uri the URI of the namespace of the element (optional) @param localName the element name, but without prefix (opti...
java
public void startElement(String uri, String localName, String qName) throws SAXException { if (m_state != null) { m_state.resetState(getTransformer()); } // fire off the start element event if (m_tracer != null) super.fireStartElem(qName); ...
[ "public", "void", "startElement", "(", "String", "uri", ",", "String", "localName", ",", "String", "qName", ")", "throws", "SAXException", "{", "if", "(", "m_state", "!=", "null", ")", "{", "m_state", ".", "resetState", "(", "getTransformer", "(", ")", ")"...
Receives notification that an element starts, but attributes are not fully known yet. @param uri the URI of the namespace of the element (optional) @param localName the element name, but without prefix (optional) @param qName the element name, with prefix, if any (required) @see ExtendedContentHandler#startElement(St...
[ "Receives", "notification", "that", "an", "element", "starts", "but", "attributes", "are", "not", "fully", "known", "yet", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToSAXHandler.java#L313-L323
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.deleteIntentAsync
public Observable<OperationStatus> deleteIntentAsync(UUID appId, String versionId, UUID intentId, DeleteIntentOptionalParameter deleteIntentOptionalParameter) { """ Deletes an intent classifier from the application. @param appId The application ID. @param versionId The version ID. @param intentId The intent c...
java
public Observable<OperationStatus> deleteIntentAsync(UUID appId, String versionId, UUID intentId, DeleteIntentOptionalParameter deleteIntentOptionalParameter) { return deleteIntentWithServiceResponseAsync(appId, versionId, intentId, deleteIntentOptionalParameter).map(new Func1<ServiceResponse<OperationStatus>, ...
[ "public", "Observable", "<", "OperationStatus", ">", "deleteIntentAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "intentId", ",", "DeleteIntentOptionalParameter", "deleteIntentOptionalParameter", ")", "{", "return", "deleteIntentWithServiceResponseAs...
Deletes an intent classifier from the application. @param appId The application ID. @param versionId The version ID. @param intentId The intent classifier ID. @param deleteIntentOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown i...
[ "Deletes", "an", "intent", "classifier", "from", "the", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L3129-L3136
Waikato/moa
moa/src/main/java/moa/clusterers/clustree/Entry.java
Entry.emptyBuffer
protected ClusKernel emptyBuffer(long currentTime, double negLambda) { """ Clear the buffer in this entry and return a copy. No side effects are possible (given that the copy constructor of <code>Kernel</code> makes a deep copy). @return A copy of the buffer. """ this.buffer.makeOlder(currentTime - ...
java
protected ClusKernel emptyBuffer(long currentTime, double negLambda) { this.buffer.makeOlder(currentTime - this.timestamp, negLambda); ClusKernel bufferCopy = new ClusKernel(this.buffer); this.buffer.clear(); return bufferCopy; }
[ "protected", "ClusKernel", "emptyBuffer", "(", "long", "currentTime", ",", "double", "negLambda", ")", "{", "this", ".", "buffer", ".", "makeOlder", "(", "currentTime", "-", "this", ".", "timestamp", ",", "negLambda", ")", ";", "ClusKernel", "bufferCopy", "=",...
Clear the buffer in this entry and return a copy. No side effects are possible (given that the copy constructor of <code>Kernel</code> makes a deep copy). @return A copy of the buffer.
[ "Clear", "the", "buffer", "in", "this", "entry", "and", "return", "a", "copy", ".", "No", "side", "effects", "are", "possible", "(", "given", "that", "the", "copy", "constructor", "of", "<code", ">", "Kernel<", "/", "code", ">", "makes", "a", "deep", "...
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/clusterers/clustree/Entry.java#L371-L376
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_http_frontend_frontendId_GET
public OvhFrontendHttp serviceName_http_frontend_frontendId_GET(String serviceName, Long frontendId) throws IOException { """ Get this object properties REST: GET /ipLoadbalancing/{serviceName}/http/frontend/{frontendId} @param serviceName [required] The internal name of your IP load balancing @param frontend...
java
public OvhFrontendHttp serviceName_http_frontend_frontendId_GET(String serviceName, Long frontendId) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/http/frontend/{frontendId}"; StringBuilder sb = path(qPath, serviceName, frontendId); String resp = exec(qPath, "GET", sb.toString(), null); re...
[ "public", "OvhFrontendHttp", "serviceName_http_frontend_frontendId_GET", "(", "String", "serviceName", ",", "Long", "frontendId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ipLoadbalancing/{serviceName}/http/frontend/{frontendId}\"", ";", "StringBuilder", "s...
Get this object properties REST: GET /ipLoadbalancing/{serviceName}/http/frontend/{frontendId} @param serviceName [required] The internal name of your IP load balancing @param frontendId [required] Id of your frontend
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L323-L328
cdk/cdk
base/core/src/main/java/org/openscience/cdk/graph/PathTools.java
PathTools.breadthFirstSearch
public static void breadthFirstSearch(IAtomContainer atomContainer, List<IAtom> sphere, IAtomContainer molecule) { """ Performs a breadthFirstSearch in an AtomContainer starting with a particular sphere, which usually consists of one start atom. While searching the graph, the method marks each visited atom. It t...
java
public static void breadthFirstSearch(IAtomContainer atomContainer, List<IAtom> sphere, IAtomContainer molecule) { // logger.debug("Staring partitioning with this ac: " + ac); breadthFirstSearch(atomContainer, sphere, molecule, -1); }
[ "public", "static", "void", "breadthFirstSearch", "(", "IAtomContainer", "atomContainer", ",", "List", "<", "IAtom", ">", "sphere", ",", "IAtomContainer", "molecule", ")", "{", "// logger.debug(\"Staring partitioning with this ac: \" + ac);", "breadthFirstSearch", "(", "ato...
Performs a breadthFirstSearch in an AtomContainer starting with a particular sphere, which usually consists of one start atom. While searching the graph, the method marks each visited atom. It then puts all the atoms connected to the atoms in the given sphere into a new vector which forms the sphere to search for the n...
[ "Performs", "a", "breadthFirstSearch", "in", "an", "AtomContainer", "starting", "with", "a", "particular", "sphere", "which", "usually", "consists", "of", "one", "start", "atom", ".", "While", "searching", "the", "graph", "the", "method", "marks", "each", "visit...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/PathTools.java#L203-L206
finmath/finmath-lib
src/main/java/net/finmath/marketdata2/model/curves/ForwardCurveInterpolation.java
ForwardCurveInterpolation.createForwardCurveFromDiscountFactors
public static ForwardCurveInterpolation createForwardCurveFromDiscountFactors(String name, double[] times, RandomVariable[] givenDiscountFactors, double paymentOffset) { """ Create a forward curve from given times and discount factors. The forward curve will have times.length-1 fixing times from times[0] to tim...
java
public static ForwardCurveInterpolation createForwardCurveFromDiscountFactors(String name, double[] times, RandomVariable[] givenDiscountFactors, double paymentOffset) { ForwardCurveInterpolation forwardCurveInterpolation = new ForwardCurveInterpolation(name, paymentOffset, InterpolationEntityForward.FORWARD, null); ...
[ "public", "static", "ForwardCurveInterpolation", "createForwardCurveFromDiscountFactors", "(", "String", "name", ",", "double", "[", "]", "times", ",", "RandomVariable", "[", "]", "givenDiscountFactors", ",", "double", "paymentOffset", ")", "{", "ForwardCurveInterpolation...
Create a forward curve from given times and discount factors. The forward curve will have times.length-1 fixing times from times[0] to times[times.length-2] <code> forward[timeIndex] = (givenDiscountFactors[timeIndex]/givenDiscountFactors[timeIndex+1]-1.0) / (times[timeIndex+1] - times[timeIndex]); </code> Note: If ti...
[ "Create", "a", "forward", "curve", "from", "given", "times", "and", "discount", "factors", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata2/model/curves/ForwardCurveInterpolation.java#L261-L282
sstrickx/yahoofinance-api
src/main/java/yahoofinance/YahooFinance.java
YahooFinance.get
public static Stock get(String symbol, Calendar from, Calendar to, Interval interval) throws IOException { """ Sends a request with the historical quotes included starting from the specified {@link Calendar} date until the specified Calendar date (to) at the specified interval. Returns null if the data can't b...
java
public static Stock get(String symbol, Calendar from, Calendar to, Interval interval) throws IOException { Map<String, Stock> result = YahooFinance.getQuotes(symbol, from, to, interval); return result.get(symbol.toUpperCase()); }
[ "public", "static", "Stock", "get", "(", "String", "symbol", ",", "Calendar", "from", ",", "Calendar", "to", ",", "Interval", "interval", ")", "throws", "IOException", "{", "Map", "<", "String", ",", "Stock", ">", "result", "=", "YahooFinance", ".", "getQu...
Sends a request with the historical quotes included starting from the specified {@link Calendar} date until the specified Calendar date (to) at the specified interval. Returns null if the data can't be retrieved from Yahoo Finance. @param symbol the symbol of the stock for which you want to retrieve information...
[ "Sends", "a", "request", "with", "the", "historical", "quotes", "included", "starting", "from", "the", "specified", "{", "@link", "Calendar", "}", "date", "until", "the", "specified", "Calendar", "date", "(", "to", ")", "at", "the", "specified", "interval", ...
train
https://github.com/sstrickx/yahoofinance-api/blob/2766ba52fc5cccf9b4da5c06423d68059cf0a6e6/src/main/java/yahoofinance/YahooFinance.java#L178-L181
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerImpl.java
TransformerImpl.setParameter
public void setParameter(String name, String namespace, Object value) { """ Set a parameter for the templates. @param name The name of the parameter. @param namespace The namespace of the parameter. @param value The value object. This can be any valid Java object -- it's up to the processor to provide the p...
java
public void setParameter(String name, String namespace, Object value) { VariableStack varstack = getXPathContext().getVarStack(); QName qname = new QName(namespace, name); XObject xobject = XObject.create(value, getXPathContext()); StylesheetRoot sroot = m_stylesheetRoot; Vector vars = sroot...
[ "public", "void", "setParameter", "(", "String", "name", ",", "String", "namespace", ",", "Object", "value", ")", "{", "VariableStack", "varstack", "=", "getXPathContext", "(", ")", ".", "getVarStack", "(", ")", ";", "QName", "qname", "=", "new", "QName", ...
Set a parameter for the templates. @param name The name of the parameter. @param namespace The namespace of the parameter. @param value The value object. This can be any valid Java object -- it's up to the processor to provide the proper coersion to the object, or simply pass it on for use in extensions.
[ "Set", "a", "parameter", "for", "the", "templates", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerImpl.java#L1382-L1401
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FacesBackingBean.java
FacesBackingBean.persistInSession
public void persistInSession( HttpServletRequest request, HttpServletResponse response ) { """ Store this object in the user session, in the appropriate place. Used by the framework; normally should not be called directly. """ StorageHandler sh = Handlers.get( getServletContext() ).getStorageHandler(...
java
public void persistInSession( HttpServletRequest request, HttpServletResponse response ) { StorageHandler sh = Handlers.get( getServletContext() ).getStorageHandler(); HttpServletRequest unwrappedRequest = PageFlowUtils.unwrapMultipart( request ); RequestContext rc = new RequestContext( unwr...
[ "public", "void", "persistInSession", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "{", "StorageHandler", "sh", "=", "Handlers", ".", "get", "(", "getServletContext", "(", ")", ")", ".", "getStorageHandler", "(", ")", ";", "...
Store this object in the user session, in the appropriate place. Used by the framework; normally should not be called directly.
[ "Store", "this", "object", "in", "the", "user", "session", "in", "the", "appropriate", "place", ".", "Used", "by", "the", "framework", ";", "normally", "should", "not", "be", "called", "directly", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FacesBackingBean.java#L70-L79
mboudreau/Alternator
src/main/java/com/amazonaws/services/dynamodb/model/BatchWriteItemResult.java
BatchWriteItemResult.withResponses
public BatchWriteItemResult withResponses(java.util.Map<String,BatchWriteResponse> responses) { """ The response object as a result of <code>BatchWriteItem</code> call. This is essentially a map of table name to <code>ConsumedCapacityUnits</code>. <p> Returns a reference to this object so that method calls can...
java
public BatchWriteItemResult withResponses(java.util.Map<String,BatchWriteResponse> responses) { setResponses(responses); return this; }
[ "public", "BatchWriteItemResult", "withResponses", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "BatchWriteResponse", ">", "responses", ")", "{", "setResponses", "(", "responses", ")", ";", "return", "this", ";", "}" ]
The response object as a result of <code>BatchWriteItem</code> call. This is essentially a map of table name to <code>ConsumedCapacityUnits</code>. <p> Returns a reference to this object so that method calls can be chained together. @param responses The response object as a result of <code>BatchWriteItem</code> call. ...
[ "The", "response", "object", "as", "a", "result", "of", "<code", ">", "BatchWriteItem<", "/", "code", ">", "call", ".", "This", "is", "essentially", "a", "map", "of", "table", "name", "to", "<code", ">", "ConsumedCapacityUnits<", "/", "code", ">", ".", "...
train
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/amazonaws/services/dynamodb/model/BatchWriteItemResult.java#L86-L89
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/IconUtils.java
IconUtils.encodeIconUrl
public static String encodeIconUrl( String name, String version, File iconFile ) { """ <i>Encodes</i> the URL for an application or a template. <p> For an application, it looks like <code>/app/icon.jpg</code>.<br> For a template, it looks like <code>/app/version/icon.jpg</code>. </p> <p> Notice the returned ...
java
public static String encodeIconUrl( String name, String version, File iconFile ) { StringBuilder sb = new StringBuilder(); if( iconFile != null ) { sb.append( "/" ); sb.append( name ); if( ! Utils.isEmptyOrWhitespaces( version )) sb.append( "/" + version ); sb.append( "/" ); sb.append( iconFile...
[ "public", "static", "String", "encodeIconUrl", "(", "String", "name", ",", "String", "version", ",", "File", "iconFile", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "iconFile", "!=", "null", ")", "{", "sb", "."...
<i>Encodes</i> the URL for an application or a template. <p> For an application, it looks like <code>/app/icon.jpg</code>.<br> For a template, it looks like <code>/app/version/icon.jpg</code>. </p> <p> Notice the returned image is not always a JPG file. The MIME type will be used by the browser. </p> @param name the a...
[ "<i", ">", "Encodes<", "/", "i", ">", "the", "URL", "for", "an", "application", "or", "a", "template", ".", "<p", ">", "For", "an", "application", "it", "looks", "like", "<code", ">", "/", "app", "/", "icon", ".", "jpg<", "/", "code", ">", ".", "...
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/IconUtils.java#L79-L93
facebookarchive/hadoop-20
src/contrib/hive-streaming/src/java/org/apache/hadoop/streaming/PipeMapRed.java
PipeMapRed.splitKeyVal
void splitKeyVal(byte[] line, Text key, Text val) throws IOException { """ Split a line into key and value. Assume the delimitor is a tab. @param line: a byte array of line containing UTF-8 bytes @param key: key of a record @param val: value of a record @throws IOException """ int pos = UTF8ByteArrayUt...
java
void splitKeyVal(byte[] line, Text key, Text val) throws IOException { int pos = UTF8ByteArrayUtils.findNthByte(line, (byte)this.getFieldSeparator(), this.getNumOfKeyFields()); try { if (pos == -1) { key.set(line); val.set(""); } else { UTF8ByteArrayUtils.splitKeyVal(line, ke...
[ "void", "splitKeyVal", "(", "byte", "[", "]", "line", ",", "Text", "key", ",", "Text", "val", ")", "throws", "IOException", "{", "int", "pos", "=", "UTF8ByteArrayUtils", ".", "findNthByte", "(", "line", ",", "(", "byte", ")", "this", ".", "getFieldSepara...
Split a line into key and value. Assume the delimitor is a tab. @param line: a byte array of line containing UTF-8 bytes @param key: key of a record @param val: value of a record @throws IOException
[ "Split", "a", "line", "into", "key", "and", "value", ".", "Assume", "the", "delimitor", "is", "a", "tab", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/hive-streaming/src/java/org/apache/hadoop/streaming/PipeMapRed.java#L335-L347
michael-rapp/AndroidPreferenceActivity
example/src/main/java/de/mrapp/android/preference/activity/example/fragment/AppearancePreferenceFragment.java
AppearancePreferenceFragment.createThemeChangeListener
private OnPreferenceChangeListener createThemeChangeListener() { """ Creates and returns a listener, which allows to adapt the app's theme, when the value of the corresponding preference has been changed. @return The listener, which has been created, as an instance of the type {@link OnPreferenceChangeListene...
java
private OnPreferenceChangeListener createThemeChangeListener() { return new OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(final Preference preference, final Object newValue) { Intent intent = getActivity().getIntent(); getActi...
[ "private", "OnPreferenceChangeListener", "createThemeChangeListener", "(", ")", "{", "return", "new", "OnPreferenceChangeListener", "(", ")", "{", "@", "Override", "public", "boolean", "onPreferenceChange", "(", "final", "Preference", "preference", ",", "final", "Object...
Creates and returns a listener, which allows to adapt the app's theme, when the value of the corresponding preference has been changed. @return The listener, which has been created, as an instance of the type {@link OnPreferenceChangeListener}
[ "Creates", "and", "returns", "a", "listener", "which", "allows", "to", "adapt", "the", "app", "s", "theme", "when", "the", "value", "of", "the", "corresponding", "preference", "has", "been", "changed", "." ]
train
https://github.com/michael-rapp/AndroidPreferenceActivity/blob/0fcde73815b4b3bf6bcb36acd3d5733e301bbba5/example/src/main/java/de/mrapp/android/preference/activity/example/fragment/AppearancePreferenceFragment.java#L46-L58
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java
XLogPDescriptor.checkRingLink
private boolean checkRingLink(IRingSet ringSet, IAtomContainer ac, IAtom atom) { """ Check if atom or neighbour atom is part of a ring @param ac Description of the Parameter @param atom Description of the Parameter @return The hydrogenCount value """ List<IAtom> neighbours = ac.getConn...
java
private boolean checkRingLink(IRingSet ringSet, IAtomContainer ac, IAtom atom) { List<IAtom> neighbours = ac.getConnectedAtomsList(atom); if (ringSet.contains(atom)) { return true; } for (IAtom neighbour : neighbours) { if (ringSet.contains(neighbour)) { ...
[ "private", "boolean", "checkRingLink", "(", "IRingSet", "ringSet", ",", "IAtomContainer", "ac", ",", "IAtom", "atom", ")", "{", "List", "<", "IAtom", ">", "neighbours", "=", "ac", ".", "getConnectedAtomsList", "(", "atom", ")", ";", "if", "(", "ringSet", "...
Check if atom or neighbour atom is part of a ring @param ac Description of the Parameter @param atom Description of the Parameter @return The hydrogenCount value
[ "Check", "if", "atom", "or", "neighbour", "atom", "is", "part", "of", "a", "ring" ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L993-L1004
landawn/AbacusUtil
src/com/landawn/abacus/util/CSVUtil.java
CSVUtil.loadCSV
@SuppressWarnings("rawtypes") public static <E extends Exception> DataSet loadCSV(final InputStream csvInputStream, final long offset, final long count, final Try.Predicate<String[], E> filter, final List<? extends Type> columnTypeList) throws E { """ Load the data from CSV. @param csvInputStrea...
java
@SuppressWarnings("rawtypes") public static <E extends Exception> DataSet loadCSV(final InputStream csvInputStream, final long offset, final long count, final Try.Predicate<String[], E> filter, final List<? extends Type> columnTypeList) throws E { final Reader csvReader = new InputStreamReade...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "static", "<", "E", "extends", "Exception", ">", "DataSet", "loadCSV", "(", "final", "InputStream", "csvInputStream", ",", "final", "long", "offset", ",", "final", "long", "count", ",", "final", "Try...
Load the data from CSV. @param csvInputStream @param offset @param count @param filter @param columnTypeList set the column type to null to skip the column in CSV. @return
[ "Load", "the", "data", "from", "CSV", ".", "@param", "csvInputStream", "@param", "offset", "@param", "count", "@param", "filter", "@param", "columnTypeList", "set", "the", "column", "type", "to", "null", "to", "skip", "the", "column", "in", "CSV", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/CSVUtil.java#L595-L601
nlalevee/jsourcemap
jsourcemap/src/java/org/hibnet/jsourcemap/IndexedSourceMapConsumer.java
IndexedSourceMapConsumer.originalPositionFor
public OriginalPosition originalPositionFor(int line, int column, Bias bias) { """ Returns the original source, line, and column information for the generated source's line and column positions provided. The only argument is an object with the following properties: <ul> <li>line: The line number in the generate...
java
public OriginalPosition originalPositionFor(int line, int column, Bias bias) { ParsedSection needle = new ParsedSection(new ParsedOffset(line, column), null); // Find the section containing the generated position we're trying to map // to an original position. int sectionIndex = BinaryS...
[ "public", "OriginalPosition", "originalPositionFor", "(", "int", "line", ",", "int", "column", ",", "Bias", "bias", ")", "{", "ParsedSection", "needle", "=", "new", "ParsedSection", "(", "new", "ParsedOffset", "(", "line", ",", "column", ")", ",", "null", ")...
Returns the original source, line, and column information for the generated source's line and column positions provided. The only argument is an object with the following properties: <ul> <li>line: The line number in the generated source.</li> <li>column: The column number in the generated source.</li> </ul> and an obj...
[ "Returns", "the", "original", "source", "line", "and", "column", "information", "for", "the", "generated", "source", "s", "line", "and", "column", "positions", "provided", ".", "The", "only", "argument", "is", "an", "object", "with", "the", "following", "prope...
train
https://github.com/nlalevee/jsourcemap/blob/361a99c73d51c11afa5579dd83d477c4d0345599/jsourcemap/src/java/org/hibnet/jsourcemap/IndexedSourceMapConsumer.java#L156-L179
molgenis/molgenis
molgenis-data-postgresql/src/main/java/org/molgenis/data/postgresql/PostgreSqlQueryGenerator.java
PostgreSqlQueryGenerator.isDistinctSelectRequired
private static <E extends Entity> boolean isDistinctSelectRequired( EntityType entityType, Query<E> q) { """ Determines whether a distinct select is required based on a given query. @param entityType entity meta data @param q query @param <E> entity type @return <code>true</code> if a distinct select i...
java
private static <E extends Entity> boolean isDistinctSelectRequired( EntityType entityType, Query<E> q) { return isDistinctSelectRequiredRec(entityType, q.getRules()); }
[ "private", "static", "<", "E", "extends", "Entity", ">", "boolean", "isDistinctSelectRequired", "(", "EntityType", "entityType", ",", "Query", "<", "E", ">", "q", ")", "{", "return", "isDistinctSelectRequiredRec", "(", "entityType", ",", "q", ".", "getRules", ...
Determines whether a distinct select is required based on a given query. @param entityType entity meta data @param q query @param <E> entity type @return <code>true</code> if a distinct select is required for SQL queries based on the given query @throws UnknownAttributeException if query field refers to an attribute t...
[ "Determines", "whether", "a", "distinct", "select", "is", "required", "based", "on", "a", "given", "query", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data-postgresql/src/main/java/org/molgenis/data/postgresql/PostgreSqlQueryGenerator.java#L511-L514
netty/netty
handler/src/main/java/io/netty/handler/ssl/SslContext.java
SslContext.newHandler
protected SslHandler newHandler(ByteBufAllocator alloc, boolean startTls, Executor executor) { """ Create a new SslHandler. @see #newHandler(ByteBufAllocator, String, int, boolean, Executor) """ return new SslHandler(newEngine(alloc), startTls, executor); }
java
protected SslHandler newHandler(ByteBufAllocator alloc, boolean startTls, Executor executor) { return new SslHandler(newEngine(alloc), startTls, executor); }
[ "protected", "SslHandler", "newHandler", "(", "ByteBufAllocator", "alloc", ",", "boolean", "startTls", ",", "Executor", "executor", ")", "{", "return", "new", "SslHandler", "(", "newEngine", "(", "alloc", ")", ",", "startTls", ",", "executor", ")", ";", "}" ]
Create a new SslHandler. @see #newHandler(ByteBufAllocator, String, int, boolean, Executor)
[ "Create", "a", "new", "SslHandler", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslContext.java#L932-L934
alkacon/opencms-core
src/org/opencms/mail/CmsMailSettings.java
CmsMailSettings.addMailHost
public void addMailHost( String hostname, String port, String order, String protocol, String security, String username, String password) { """ Adds a new mail host to the internal list of mail hosts.<p> @param hostname the name of the mail host @param por...
java
public void addMailHost( String hostname, String port, String order, String protocol, String security, String username, String password) { Integer thePort; try { thePort = Integer.valueOf(port); } catch (Throwable t) { ...
[ "public", "void", "addMailHost", "(", "String", "hostname", ",", "String", "port", ",", "String", "order", ",", "String", "protocol", ",", "String", "security", ",", "String", "username", ",", "String", "password", ")", "{", "Integer", "thePort", ";", "try",...
Adds a new mail host to the internal list of mail hosts.<p> @param hostname the name of the mail host @param port the port of the mail host @param order the order in which the host is tried @param protocol the protocol to use (default "smtp") @param security the security mode @param username the user name to use for a...
[ "Adds", "a", "new", "mail", "host", "to", "the", "internal", "list", "of", "mail", "hosts", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/mail/CmsMailSettings.java#L100-L132
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/data/nvdcve/ConnectionFactory.java
ConnectionFactory.getH2DataFile
public static File getH2DataFile(Settings configuration) throws IOException { """ Returns a reference to the H2 database file. @param configuration the configured settings @return the path to the H2 database file @throws IOException thrown if there is an error """ final File dir = configuration.ge...
java
public static File getH2DataFile(Settings configuration) throws IOException { final File dir = configuration.getH2DataDirectory(); final String fileName = configuration.getString(Settings.KEYS.DB_FILE_NAME); final File file = new File(dir, fileName); return file; }
[ "public", "static", "File", "getH2DataFile", "(", "Settings", "configuration", ")", "throws", "IOException", "{", "final", "File", "dir", "=", "configuration", ".", "getH2DataDirectory", "(", ")", ";", "final", "String", "fileName", "=", "configuration", ".", "g...
Returns a reference to the H2 database file. @param configuration the configured settings @return the path to the H2 database file @throws IOException thrown if there is an error
[ "Returns", "a", "reference", "to", "the", "H2", "database", "file", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/data/nvdcve/ConnectionFactory.java#L275-L280
kiegroup/jbpm
jbpm-case-mgmt/jbpm-case-mgmt-impl/src/main/java/org/jbpm/casemgmt/impl/marshalling/CaseMarshallerFactory.java
CaseMarshallerFactory.withJpa
public CaseMarshallerFactory withJpa(String puName) { """ Add JPA marshalling strategy to be used by CaseFileMarshaller @param puName persistence unit name to be used @return this factory instance """ marshallers.add(new JPAPlaceholderResolverStrategy(puName, classLoader)); this.toString.appe...
java
public CaseMarshallerFactory withJpa(String puName) { marshallers.add(new JPAPlaceholderResolverStrategy(puName, classLoader)); this.toString.append(".withJpa(\"" + puName + "\")"); return this; }
[ "public", "CaseMarshallerFactory", "withJpa", "(", "String", "puName", ")", "{", "marshallers", ".", "add", "(", "new", "JPAPlaceholderResolverStrategy", "(", "puName", ",", "classLoader", ")", ")", ";", "this", ".", "toString", ".", "append", "(", "\".withJpa(\...
Add JPA marshalling strategy to be used by CaseFileMarshaller @param puName persistence unit name to be used @return this factory instance
[ "Add", "JPA", "marshalling", "strategy", "to", "be", "used", "by", "CaseFileMarshaller" ]
train
https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-case-mgmt/jbpm-case-mgmt-impl/src/main/java/org/jbpm/casemgmt/impl/marshalling/CaseMarshallerFactory.java#L64-L68
michel-kraemer/citeproc-java
citeproc-java/src/main/java/de/undercouch/citeproc/CSL.java
CSL.getSupportedOutputFormats
public static List<String> getSupportedOutputFormats() throws IOException { """ Calculates a list of supported output formats @return the formats @throws IOException if the underlying JavaScript files could not be loaded """ ScriptRunner runner = getRunner(); try { return runner.callMethod("getSupport...
java
public static List<String> getSupportedOutputFormats() throws IOException { ScriptRunner runner = getRunner(); try { return runner.callMethod("getSupportedFormats", List.class); } catch (ScriptRunnerException e) { throw new IllegalStateException("Could not get supported formats", e); } }
[ "public", "static", "List", "<", "String", ">", "getSupportedOutputFormats", "(", ")", "throws", "IOException", "{", "ScriptRunner", "runner", "=", "getRunner", "(", ")", ";", "try", "{", "return", "runner", ".", "callMethod", "(", "\"getSupportedFormats\"", ","...
Calculates a list of supported output formats @return the formats @throws IOException if the underlying JavaScript files could not be loaded
[ "Calculates", "a", "list", "of", "supported", "output", "formats" ]
train
https://github.com/michel-kraemer/citeproc-java/blob/1d5bf0e7bbb2bdc47309530babf0ecaba838bf10/citeproc-java/src/main/java/de/undercouch/citeproc/CSL.java#L312-L319