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
ThreeTen/threetenbp
src/main/java/org/threeten/bp/chrono/JapaneseChronology.java
JapaneseChronology.dateYearDay
@Override public JapaneseDate dateYearDay(Era era, int yearOfEra, int dayOfYear) { """ Obtains a local date in Japanese calendar system from the era, year-of-era and day-of-year fields. <p> The day-of-year in this factory is expressed relative to the start of the year-of-era. This definition changes the no...
java
@Override public JapaneseDate dateYearDay(Era era, int yearOfEra, int dayOfYear) { if (era instanceof JapaneseEra == false) { throw new ClassCastException("Era must be JapaneseEra"); } return JapaneseDate.ofYearDay((JapaneseEra) era, yearOfEra, dayOfYear); }
[ "@", "Override", "public", "JapaneseDate", "dateYearDay", "(", "Era", "era", ",", "int", "yearOfEra", ",", "int", "dayOfYear", ")", "{", "if", "(", "era", "instanceof", "JapaneseEra", "==", "false", ")", "{", "throw", "new", "ClassCastException", "(", "\"Era...
Obtains a local date in Japanese calendar system from the era, year-of-era and day-of-year fields. <p> The day-of-year in this factory is expressed relative to the start of the year-of-era. This definition changes the normal meaning of day-of-year only in those years where the year-of-era is reset to one due to a chang...
[ "Obtains", "a", "local", "date", "in", "Japanese", "calendar", "system", "from", "the", "era", "year", "-", "of", "-", "era", "and", "day", "-", "of", "-", "year", "fields", ".", "<p", ">", "The", "day", "-", "of", "-", "year", "in", "this", "facto...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/chrono/JapaneseChronology.java#L235-L241
tobykurien/Xtendroid
Xtendroid/src/asia/sonix/android/orm/AbatisService.java
AbatisService.getInstance
protected static AbatisService getInstance(Context context, int version) { """ Default DB file nameを利用する外部Constructor @param context 呼び出し元Contextオブジェクト @param dbName 生成するDB file name """ if (instance == null) { instance = new AbatisService(context, version); } return instance; ...
java
protected static AbatisService getInstance(Context context, int version) { if (instance == null) { instance = new AbatisService(context, version); } return instance; }
[ "protected", "static", "AbatisService", "getInstance", "(", "Context", "context", ",", "int", "version", ")", "{", "if", "(", "instance", "==", "null", ")", "{", "instance", "=", "new", "AbatisService", "(", "context", ",", "version", ")", ";", "}", "retur...
Default DB file nameを利用する外部Constructor @param context 呼び出し元Contextオブジェクト @param dbName 生成するDB file name
[ "Default", "DB", "file", "nameを利用する外部Constructor" ]
train
https://github.com/tobykurien/Xtendroid/blob/758bf1d06f4cf3b64f9c10632fe9c6fb30bcebd4/Xtendroid/src/asia/sonix/android/orm/AbatisService.java#L121-L126
opencb/biodata
biodata-tools/src/main/java/org/opencb/biodata/tools/variant/LeftAligner.java
LeftAligner.isAlleleCorrect
private boolean isAlleleCorrect(String allele, boolean acceptAmbiguousBases) { """ Checks if all bases in the allele are valid bases. @param allele the reference bases @return """ if (StringUtils.isNotEmpty(allele)) { for (char base : allele.toCharArray()) { if (!isValidBa...
java
private boolean isAlleleCorrect(String allele, boolean acceptAmbiguousBases) { if (StringUtils.isNotEmpty(allele)) { for (char base : allele.toCharArray()) { if (!isValidBase(base, acceptAmbiguousBases)) { return false; } } } ...
[ "private", "boolean", "isAlleleCorrect", "(", "String", "allele", ",", "boolean", "acceptAmbiguousBases", ")", "{", "if", "(", "StringUtils", ".", "isNotEmpty", "(", "allele", ")", ")", "{", "for", "(", "char", "base", ":", "allele", ".", "toCharArray", "(",...
Checks if all bases in the allele are valid bases. @param allele the reference bases @return
[ "Checks", "if", "all", "bases", "in", "the", "allele", "are", "valid", "bases", "." ]
train
https://github.com/opencb/biodata/blob/21b3d51d71f578efab908422aca4bab7a73097b1/biodata-tools/src/main/java/org/opencb/biodata/tools/variant/LeftAligner.java#L148-L157
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/CredentialsInner.java
CredentialsInner.getAsync
public Observable<CredentialInner> getAsync(String resourceGroupName, String automationAccountName, String credentialName) { """ Retrieve the credential identified by credential name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @pa...
java
public Observable<CredentialInner> getAsync(String resourceGroupName, String automationAccountName, String credentialName) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, credentialName).map(new Func1<ServiceResponse<CredentialInner>, CredentialInner>() { @Override ...
[ "public", "Observable", "<", "CredentialInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "credentialName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccou...
Retrieve the credential identified by credential name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param credentialName The name of credential. @throws IllegalArgumentException thrown if parameters fail the validation @return the observabl...
[ "Retrieve", "the", "credential", "identified", "by", "credential", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/CredentialsInner.java#L222-L229
westnordost/osmapi
src/main/java/de/westnordost/osmapi/user/UserPreferencesDao.java
UserPreferencesDao.setAll
public void setAll(Map<String, String> preferences) { """ Sets all the given preference keys to the given preference values. @param preferences preferences to set. Each key and each value must be less than 256 characters. @throws OsmAuthorizationException if this application is not authorized to change the ...
java
public void setAll(Map<String, String> preferences) { // check it before sending it to the server in order to be able to raise a precise exception for(Map.Entry<String,String> preference : preferences.entrySet()) { checkPreferenceKeyLength(preference.getKey()); checkPreferenceValueLength(preference.getValu...
[ "public", "void", "setAll", "(", "Map", "<", "String", ",", "String", ">", "preferences", ")", "{", "// check it before sending it to the server in order to be able to raise a precise exception", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "pre...
Sets all the given preference keys to the given preference values. @param preferences preferences to set. Each key and each value must be less than 256 characters. @throws OsmAuthorizationException if this application is not authorized to change the user's preferences. (Permission.CHANGE_PREFERENCES)
[ "Sets", "all", "the", "given", "preference", "keys", "to", "the", "given", "preference", "values", "." ]
train
https://github.com/westnordost/osmapi/blob/dda6978fd12e117d0cf17812bc22037f61e22c4b/src/main/java/de/westnordost/osmapi/user/UserPreferencesDao.java#L81-L112
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PeopleApi.java
PeopleApi.getGroups
public Groups getGroups(String userId, EnumSet<JinxConstants.GroupExtras> extras) throws JinxException { """ Returns the list of groups a user is a member of. <br> This method requires authentication with 'read' permission. <br> Flickr does not return pagination information for this call. The returned object w...
java
public Groups getGroups(String userId, EnumSet<JinxConstants.GroupExtras> extras) throws JinxException { JinxUtils.validateParams(userId); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.people.getGroups"); params.put("user_id", userId); if (!JinxUtils.isNullOrEmpty(extras...
[ "public", "Groups", "getGroups", "(", "String", "userId", ",", "EnumSet", "<", "JinxConstants", ".", "GroupExtras", ">", "extras", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "userId", ")", ";", "Map", "<", "String", ",", "S...
Returns the list of groups a user is a member of. <br> This method requires authentication with 'read' permission. <br> Flickr does not return pagination information for this call. The returned object will not have any values set for pagination, and the the getPage(), getPages(), getPerPage(), or getTotal() methods wil...
[ "Returns", "the", "list", "of", "groups", "a", "user", "is", "a", "member", "of", ".", "<br", ">", "This", "method", "requires", "authentication", "with", "read", "permission", ".", "<br", ">", "Flickr", "does", "not", "return", "pagination", "information", ...
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PeopleApi.java#L102-L111
protostuff/protostuff
protostuff-xml/src/main/java/io/protostuff/XmlIOUtil.java
XmlIOUtil.writeListTo
public static <T> void writeListTo(XMLStreamWriter writer, List<T> messages, Schema<T> schema) throws IOException, XMLStreamException { """ Serializes the {@code messages} into the {@link XMLStreamWriter} using the given schema. """ writer.writeStartElement("list"); if (message...
java
public static <T> void writeListTo(XMLStreamWriter writer, List<T> messages, Schema<T> schema) throws IOException, XMLStreamException { writer.writeStartElement("list"); if (messages.isEmpty()) { writer.writeEndElement(); return; } ...
[ "public", "static", "<", "T", ">", "void", "writeListTo", "(", "XMLStreamWriter", "writer", ",", "List", "<", "T", ">", "messages", ",", "Schema", "<", "T", ">", "schema", ")", "throws", "IOException", ",", "XMLStreamException", "{", "writer", ".", "writeS...
Serializes the {@code messages} into the {@link XMLStreamWriter} using the given schema.
[ "Serializes", "the", "{" ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-xml/src/main/java/io/protostuff/XmlIOUtil.java#L504-L525
pravega/pravega
common/src/main/java/io/pravega/common/Exceptions.java
Exceptions.handleInterruptedCall
@SneakyThrows(InterruptedException.class) public static <ExceptionT extends Exception, ResultT> ResultT handleInterruptedCall(InterruptibleCall<ExceptionT, ResultT> call) throws ExceptionT { """ Eliminates boilerplate code of catching and re-interrupting the thread. <p> NOTE: This method currentl...
java
@SneakyThrows(InterruptedException.class) public static <ExceptionT extends Exception, ResultT> ResultT handleInterruptedCall(InterruptibleCall<ExceptionT, ResultT> call) throws ExceptionT { try { return call.call(); } catch (InterruptedException e) { Thread.curre...
[ "@", "SneakyThrows", "(", "InterruptedException", ".", "class", ")", "public", "static", "<", "ExceptionT", "extends", "Exception", ",", "ResultT", ">", "ResultT", "handleInterruptedCall", "(", "InterruptibleCall", "<", "ExceptionT", ",", "ResultT", ">", "call", "...
Eliminates boilerplate code of catching and re-interrupting the thread. <p> NOTE: This method currently has the limitation that it can only handle functions that throw up to one additional exception besides {@link InterruptedException}. This is a limitation of the Compiler. @param call A method that should be ...
[ "Eliminates", "boilerplate", "code", "of", "catching", "and", "re", "-", "interrupting", "the", "thread", ".", "<p", ">", "NOTE", ":", "This", "method", "currently", "has", "the", "limitation", "that", "it", "can", "only", "handle", "functions", "that", "thr...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/Exceptions.java#L134-L143
pravega/pravega
segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/BookKeeperLog.java
BookKeeperLog.addCallback
private void addCallback(int rc, LedgerHandle handle, long entryId, Object ctx) { """ Callback for BookKeeper appends. @param rc Response Code. @param handle LedgerHandle. @param entryId Assigned EntryId. @param ctx Write Context. In our case, the Write we were writing. """ Write write ...
java
private void addCallback(int rc, LedgerHandle handle, long entryId, Object ctx) { Write write = (Write) ctx; try { assert handle.getId() == write.getWriteLedger().ledger.getId() : "Handle.Id mismatch: " + write.getWriteLedger().ledger.getId() + " vs " + handle.getId(); ...
[ "private", "void", "addCallback", "(", "int", "rc", ",", "LedgerHandle", "handle", ",", "long", "entryId", ",", "Object", "ctx", ")", "{", "Write", "write", "=", "(", "Write", ")", "ctx", ";", "try", "{", "assert", "handle", ".", "getId", "(", ")", "...
Callback for BookKeeper appends. @param rc Response Code. @param handle LedgerHandle. @param entryId Assigned EntryId. @param ctx Write Context. In our case, the Write we were writing.
[ "Callback", "for", "BookKeeper", "appends", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/BookKeeperLog.java#L554-L585
sagiegurari/fax4j
src/main/java/org/fax4j/bridge/AbstractFaxBridge.java
AbstractFaxBridge.submitFaxJob
public void submitFaxJob(FaxJob faxJob,FileInfo fileInfo) { """ This function will submit a new fax job.<br> The fax job ID may be populated by this method in the provided fax job object.<br> The file information in the provided fax job will be ignored by this method, instead the file data will be taken from t...
java
public void submitFaxJob(FaxJob faxJob,FileInfo fileInfo) { if(!this.initialized) { throw new FaxException("Fax bridge not initialized."); } //validate input if(faxJob==null) { throw new FaxException("File job not provided."); } ...
[ "public", "void", "submitFaxJob", "(", "FaxJob", "faxJob", ",", "FileInfo", "fileInfo", ")", "{", "if", "(", "!", "this", ".", "initialized", ")", "{", "throw", "new", "FaxException", "(", "\"Fax bridge not initialized.\"", ")", ";", "}", "//validate input", "...
This function will submit a new fax job.<br> The fax job ID may be populated by this method in the provided fax job object.<br> The file information in the provided fax job will be ignored by this method, instead the file data will be taken from the FileInfo. @param faxJob The fax job object containing the needed in...
[ "This", "function", "will", "submit", "a", "new", "fax", "job", ".", "<br", ">", "The", "fax", "job", "ID", "may", "be", "populated", "by", "this", "method", "in", "the", "provided", "fax", "job", "object", ".", "<br", ">", "The", "file", "information"...
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/bridge/AbstractFaxBridge.java#L244-L266
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationradiuspolicy_binding.java
authenticationradiuspolicy_binding.get
public static authenticationradiuspolicy_binding get(nitro_service service, String name) throws Exception { """ Use this API to fetch authenticationradiuspolicy_binding resource of given name . """ authenticationradiuspolicy_binding obj = new authenticationradiuspolicy_binding(); obj.set_name(name); auth...
java
public static authenticationradiuspolicy_binding get(nitro_service service, String name) throws Exception{ authenticationradiuspolicy_binding obj = new authenticationradiuspolicy_binding(); obj.set_name(name); authenticationradiuspolicy_binding response = (authenticationradiuspolicy_binding) obj.get_resource(serv...
[ "public", "static", "authenticationradiuspolicy_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "authenticationradiuspolicy_binding", "obj", "=", "new", "authenticationradiuspolicy_binding", "(", ")", ";", "obj", ...
Use this API to fetch authenticationradiuspolicy_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "authenticationradiuspolicy_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationradiuspolicy_binding.java#L136-L141
VoltDB/voltdb
src/frontend/org/voltdb/PostgreSQLBackend.java
PostgreSQLBackend.indexOfNthOccurrenceOfCharIn
static private int indexOfNthOccurrenceOfCharIn(String str, char ch, int n) { """ Returns the Nth occurrence of the specified character in the specified String, but ignoring those contained in single quotes. """ boolean inMiddleOfQuote = false; int index = -1, previousIndex = 0; for (i...
java
static private int indexOfNthOccurrenceOfCharIn(String str, char ch, int n) { boolean inMiddleOfQuote = false; int index = -1, previousIndex = 0; for (int i=0; i < n; i++) { do { index = str.indexOf(ch, index+1); if (index < 0) { re...
[ "static", "private", "int", "indexOfNthOccurrenceOfCharIn", "(", "String", "str", ",", "char", "ch", ",", "int", "n", ")", "{", "boolean", "inMiddleOfQuote", "=", "false", ";", "int", "index", "=", "-", "1", ",", "previousIndex", "=", "0", ";", "for", "(...
Returns the Nth occurrence of the specified character in the specified String, but ignoring those contained in single quotes.
[ "Returns", "the", "Nth", "occurrence", "of", "the", "specified", "character", "in", "the", "specified", "String", "but", "ignoring", "those", "contained", "in", "single", "quotes", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/PostgreSQLBackend.java#L666-L682
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/runtime/AbstractEJBRuntime.java
AbstractEJBRuntime.fireMetaDataCreatedAndStartBean
private EJSHome fireMetaDataCreatedAndStartBean(BeanMetaData bmd) // d648522 throws ContainerException { """ Starts the bean by creating a home instance via the container. When this method completes successfully, bmd.homeRecord.homeInternal will be set to indicate that this home is started; t...
java
private EJSHome fireMetaDataCreatedAndStartBean(BeanMetaData bmd) // d648522 throws ContainerException { if (!bmd.isManagedBean()) // F743-34301.1 { try { // Fire the ComponentMetaData event to the listeners // (ie. we have loaded a new bea...
[ "private", "EJSHome", "fireMetaDataCreatedAndStartBean", "(", "BeanMetaData", "bmd", ")", "// d648522", "throws", "ContainerException", "{", "if", "(", "!", "bmd", ".", "isManagedBean", "(", ")", ")", "// F743-34301.1", "{", "try", "{", "// Fire the ComponentMetaData ...
Starts the bean by creating a home instance via the container. When this method completes successfully, bmd.homeRecord.homeInternal will be set to indicate that this home is started; this method must not be called if this field is already set. The context class loader must be the bean class loader when calling this met...
[ "Starts", "the", "bean", "by", "creating", "a", "home", "instance", "via", "the", "container", ".", "When", "this", "method", "completes", "successfully", "bmd", ".", "homeRecord", ".", "homeInternal", "will", "be", "set", "to", "indicate", "that", "this", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/runtime/AbstractEJBRuntime.java#L1541-L1561
FXMisc/RichTextFX
richtextfx/src/main/java/org/fxmisc/richtext/CaretSelectionBindImpl.java
CaretSelectionBindImpl.calculatePositionViaBreakingForwards
private int calculatePositionViaBreakingForwards(int numOfBreaks, BreakIterator breakIterator, int position) { """ Assumes that {@code getArea().getLength != 0} is true and {@link BreakIterator#setText(String)} has been called """ breakIterator.following(position); for (int i = 1; i < numOfBrea...
java
private int calculatePositionViaBreakingForwards(int numOfBreaks, BreakIterator breakIterator, int position) { breakIterator.following(position); for (int i = 1; i < numOfBreaks; i++) { breakIterator.next(numOfBreaks); } return breakIterator.current(); }
[ "private", "int", "calculatePositionViaBreakingForwards", "(", "int", "numOfBreaks", ",", "BreakIterator", "breakIterator", ",", "int", "position", ")", "{", "breakIterator", ".", "following", "(", "position", ")", ";", "for", "(", "int", "i", "=", "1", ";", "...
Assumes that {@code getArea().getLength != 0} is true and {@link BreakIterator#setText(String)} has been called
[ "Assumes", "that", "{" ]
train
https://github.com/FXMisc/RichTextFX/blob/bc7cab6a637855e0f37d9b9c12a9172c31545f0b/richtextfx/src/main/java/org/fxmisc/richtext/CaretSelectionBindImpl.java#L473-L479
networknt/light-4j
metrics/src/main/java/io/dropwizard/metrics/UniformSnapshot.java
UniformSnapshot.dump
@Override public void dump(OutputStream output) { """ Writes the values of the snapshot to the given stream. @param output an output stream """ try (PrintWriter out = new PrintWriter(new OutputStreamWriter(output, UTF_8))) { for (long value : values) { out.printf("%d%...
java
@Override public void dump(OutputStream output) { try (PrintWriter out = new PrintWriter(new OutputStreamWriter(output, UTF_8))) { for (long value : values) { out.printf("%d%n", value); } } }
[ "@", "Override", "public", "void", "dump", "(", "OutputStream", "output", ")", "{", "try", "(", "PrintWriter", "out", "=", "new", "PrintWriter", "(", "new", "OutputStreamWriter", "(", "output", ",", "UTF_8", ")", ")", ")", "{", "for", "(", "long", "value...
Writes the values of the snapshot to the given stream. @param output an output stream
[ "Writes", "the", "values", "of", "the", "snapshot", "to", "the", "given", "stream", "." ]
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/metrics/src/main/java/io/dropwizard/metrics/UniformSnapshot.java#L201-L208
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceWarehousePersistenceImpl.java
CommerceWarehousePersistenceImpl.removeByG_A
@Override public void removeByG_A(long groupId, boolean active) { """ Removes all the commerce warehouses where groupId = &#63; and active = &#63; from the database. @param groupId the group ID @param active the active """ for (CommerceWarehouse commerceWarehouse : findByG_A(groupId, active, QueryUt...
java
@Override public void removeByG_A(long groupId, boolean active) { for (CommerceWarehouse commerceWarehouse : findByG_A(groupId, active, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceWarehouse); } }
[ "@", "Override", "public", "void", "removeByG_A", "(", "long", "groupId", ",", "boolean", "active", ")", "{", "for", "(", "CommerceWarehouse", "commerceWarehouse", ":", "findByG_A", "(", "groupId", ",", "active", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUt...
Removes all the commerce warehouses where groupId = &#63; and active = &#63; from the database. @param groupId the group ID @param active the active
[ "Removes", "all", "the", "commerce", "warehouses", "where", "groupId", "=", "&#63", ";", "and", "active", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceWarehousePersistenceImpl.java#L1083-L1089
spring-projects/spring-hateoas
src/main/java/org/springframework/hateoas/UriTemplate.java
UriTemplate.appendComposite
@SuppressWarnings("unchecked") private static void appendComposite(UriComponentsBuilder builder, String name, Object value) { """ Expand what could be a single value, a {@link List}, or a {@link Map}. @param builder @param name @param value @see https://tools.ietf.org/html/rfc6570#section-2.4.2 """ i...
java
@SuppressWarnings("unchecked") private static void appendComposite(UriComponentsBuilder builder, String name, Object value) { if (value instanceof Iterable) { ((Iterable<?>) value).forEach(it -> builder.queryParam(name, it)); } else if (value instanceof Map) { ((Map<Object, Object>) value).entrySet() // ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "static", "void", "appendComposite", "(", "UriComponentsBuilder", "builder", ",", "String", "name", ",", "Object", "value", ")", "{", "if", "(", "value", "instanceof", "Iterable", ")", "{", "(", "(...
Expand what could be a single value, a {@link List}, or a {@link Map}. @param builder @param name @param value @see https://tools.ietf.org/html/rfc6570#section-2.4.2
[ "Expand", "what", "could", "be", "a", "single", "value", "a", "{", "@link", "List", "}", "or", "a", "{", "@link", "Map", "}", "." ]
train
https://github.com/spring-projects/spring-hateoas/blob/70ebff9309f086cd8d6a97daf67e0dc215c87d9c/src/main/java/org/springframework/hateoas/UriTemplate.java#L350-L366
JodaOrg/joda-time
src/main/java/org/joda/time/Years.java
Years.yearsBetween
public static Years yearsBetween(ReadablePartial start, ReadablePartial end) { """ Creates a <code>Years</code> representing the number of whole years between the two specified partial datetimes. <p> The two partials must contain the same fields, for example you can specify two <code>LocalDate</code> objects. ...
java
public static Years yearsBetween(ReadablePartial start, ReadablePartial end) { if (start instanceof LocalDate && end instanceof LocalDate) { Chronology chrono = DateTimeUtils.getChronology(start.getChronology()); int years = chrono.years().getDifference( ((LocalDate...
[ "public", "static", "Years", "yearsBetween", "(", "ReadablePartial", "start", ",", "ReadablePartial", "end", ")", "{", "if", "(", "start", "instanceof", "LocalDate", "&&", "end", "instanceof", "LocalDate", ")", "{", "Chronology", "chrono", "=", "DateTimeUtils", ...
Creates a <code>Years</code> representing the number of whole years between the two specified partial datetimes. <p> The two partials must contain the same fields, for example you can specify two <code>LocalDate</code> objects. @param start the start partial date, must not be null @param end the end partial date, mu...
[ "Creates", "a", "<code", ">", "Years<", "/", "code", ">", "representing", "the", "number", "of", "whole", "years", "between", "the", "two", "specified", "partial", "datetimes", ".", "<p", ">", "The", "two", "partials", "must", "contain", "the", "same", "fi...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/Years.java#L118-L127
wso2/transport-http
components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/sender/http2/Http2ConnectionManager.java
Http2ConnectionManager.returnClientChannel
void returnClientChannel(HttpRoute httpRoute, Http2ClientChannel http2ClientChannel) { """ Return the http/2 client channel to per route pool. @param httpRoute the http route @param http2ClientChannel represents the http/2 client channel """ EventLoopPool.PerRouteConnectionPool perRouteCon...
java
void returnClientChannel(HttpRoute httpRoute, Http2ClientChannel http2ClientChannel) { EventLoopPool.PerRouteConnectionPool perRouteConnectionPool = fetchPerRoutePool(httpRoute, http2ClientChannel.getChannel() ...
[ "void", "returnClientChannel", "(", "HttpRoute", "httpRoute", ",", "Http2ClientChannel", "http2ClientChannel", ")", "{", "EventLoopPool", ".", "PerRouteConnectionPool", "perRouteConnectionPool", "=", "fetchPerRoutePool", "(", "httpRoute", ",", "http2ClientChannel", ".", "ge...
Return the http/2 client channel to per route pool. @param httpRoute the http route @param http2ClientChannel represents the http/2 client channel
[ "Return", "the", "http", "/", "2", "client", "channel", "to", "per", "route", "pool", "." ]
train
https://github.com/wso2/transport-http/blob/c51aa715b473db6c1b82a7d7b22f6e65f74df4c9/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/sender/http2/Http2ConnectionManager.java#L141-L148
networknt/light-4j
dump/src/main/java/com/networknt/dump/CookiesDumper.java
CookiesDumper.dumpCookies
private void dumpCookies(Map<String, Cookie> cookiesMap, String maskKey) { """ put cookies info to cookieMap @param cookiesMap Map of cookies """ cookiesMap.forEach((key, cookie) -> { if(!config.getRequestFilteredCookies().contains(cookie.getName())) { List<Map<String, Stri...
java
private void dumpCookies(Map<String, Cookie> cookiesMap, String maskKey) { cookiesMap.forEach((key, cookie) -> { if(!config.getRequestFilteredCookies().contains(cookie.getName())) { List<Map<String, String>> cookieInfoList = new ArrayList<>(); //mask cookieValue ...
[ "private", "void", "dumpCookies", "(", "Map", "<", "String", ",", "Cookie", ">", "cookiesMap", ",", "String", "maskKey", ")", "{", "cookiesMap", ".", "forEach", "(", "(", "key", ",", "cookie", ")", "->", "{", "if", "(", "!", "config", ".", "getRequestF...
put cookies info to cookieMap @param cookiesMap Map of cookies
[ "put", "cookies", "info", "to", "cookieMap" ]
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/dump/src/main/java/com/networknt/dump/CookiesDumper.java#L61-L74
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscConfigurationsInner.java
DscConfigurationsInner.listByAutomationAccountAsync
public Observable<Page<DscConfigurationInner>> listByAutomationAccountAsync(final String resourceGroupName, final String automationAccountName) { """ Retrieve a list of configurations. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @t...
java
public Observable<Page<DscConfigurationInner>> listByAutomationAccountAsync(final String resourceGroupName, final String automationAccountName) { return listByAutomationAccountWithServiceResponseAsync(resourceGroupName, automationAccountName) .map(new Func1<ServiceResponse<Page<DscConfigurationInner...
[ "public", "Observable", "<", "Page", "<", "DscConfigurationInner", ">", ">", "listByAutomationAccountAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "automationAccountName", ")", "{", "return", "listByAutomationAccountWithServiceResponseAsync", ...
Retrieve a list of configurations. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;DscConfigurationInner&gt; object
[ "Retrieve", "a", "list", "of", "configurations", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscConfigurationsInner.java#L700-L708
elki-project/elki
elki-core-dbids/src/main/java/de/lmu/ifi/dbs/elki/database/datastore/DataStoreUtil.java
DataStoreUtil.makeIntegerStorage
public static WritableIntegerDataStore makeIntegerStorage(DBIDs ids, int hints) { """ Make a new storage, to associate the given ids with an object of class dataclass. @param ids DBIDs to store data for @param hints Hints for the storage manager @return new data store """ return DataStoreFactory.FACT...
java
public static WritableIntegerDataStore makeIntegerStorage(DBIDs ids, int hints) { return DataStoreFactory.FACTORY.makeIntegerStorage(ids, hints); }
[ "public", "static", "WritableIntegerDataStore", "makeIntegerStorage", "(", "DBIDs", "ids", ",", "int", "hints", ")", "{", "return", "DataStoreFactory", ".", "FACTORY", ".", "makeIntegerStorage", "(", "ids", ",", "hints", ")", ";", "}" ]
Make a new storage, to associate the given ids with an object of class dataclass. @param ids DBIDs to store data for @param hints Hints for the storage manager @return new data store
[ "Make", "a", "new", "storage", "to", "associate", "the", "given", "ids", "with", "an", "object", "of", "class", "dataclass", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-dbids/src/main/java/de/lmu/ifi/dbs/elki/database/datastore/DataStoreUtil.java#L112-L114
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/TimeZone.java
TimeZone.getDisplayName
public String getDisplayName(boolean daylightTime, int style, Locale locale) { """ Returns the {@link #SHORT short} or {@link #LONG long} name of this time zone with either standard or daylight time, as written in {@code locale}. If the name is not available, the result is in the format {@code GMT[+-]hh:mm}. ...
java
public String getDisplayName(boolean daylightTime, int style, Locale locale) { if (style != SHORT && style != LONG) { throw new IllegalArgumentException("Illegal style: " + style); } String[][] zoneStrings = TimeZoneNames.getZoneStrings(locale); String result = TimeZoneNames...
[ "public", "String", "getDisplayName", "(", "boolean", "daylightTime", ",", "int", "style", ",", "Locale", "locale", ")", "{", "if", "(", "style", "!=", "SHORT", "&&", "style", "!=", "LONG", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Illega...
Returns the {@link #SHORT short} or {@link #LONG long} name of this time zone with either standard or daylight time, as written in {@code locale}. If the name is not available, the result is in the format {@code GMT[+-]hh:mm}. @param daylightTime true for daylight time, false for standard time. @param style either {@l...
[ "Returns", "the", "{", "@link", "#SHORT", "short", "}", "or", "{", "@link", "#LONG", "long", "}", "name", "of", "this", "time", "zone", "with", "either", "standard", "or", "daylight", "time", "as", "written", "in", "{", "@code", "locale", "}", ".", "If...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/TimeZone.java#L384-L411
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/model/intermediate/ShapeModel.java
ShapeModel.removeMemberByC2jName
public boolean removeMemberByC2jName(String memberC2jName, boolean ignoreCase) { """ Takes in the c2j member name as input and removes if the shape contains a member with the given name. Return false otherwise. """ // Implicitly depending on the default equals and hashcode // implementation of...
java
public boolean removeMemberByC2jName(String memberC2jName, boolean ignoreCase) { // Implicitly depending on the default equals and hashcode // implementation of the class MemberModel MemberModel model = tryFindMemberModelByC2jName(memberC2jName, ignoreCase); return model == null ? false ...
[ "public", "boolean", "removeMemberByC2jName", "(", "String", "memberC2jName", ",", "boolean", "ignoreCase", ")", "{", "// Implicitly depending on the default equals and hashcode", "// implementation of the class MemberModel", "MemberModel", "model", "=", "tryFindMemberModelByC2jName"...
Takes in the c2j member name as input and removes if the shape contains a member with the given name. Return false otherwise.
[ "Takes", "in", "the", "c2j", "member", "name", "as", "input", "and", "removes", "if", "the", "shape", "contains", "a", "member", "with", "the", "given", "name", ".", "Return", "false", "otherwise", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/model/intermediate/ShapeModel.java#L390-L395
infinispan/infinispan
core/src/main/java/org/infinispan/atomic/impl/FineGrainedAtomicMapProxyImpl.java
FineGrainedAtomicMapProxyImpl.removeMap
public static void removeMap(Cache<Object, Object> cache, Object group) { """ Warning: with pessimistic locking/optimistic locking without WSC, when the map is removed and a new key is added before the removal transaction commit, the map may be removed but the key left dangling. """ FunctionalMapImpl<Ob...
java
public static void removeMap(Cache<Object, Object> cache, Object group) { FunctionalMapImpl<Object, Object> fmap = FunctionalMapImpl.create(cache.getAdvancedCache()); FunctionalMap.ReadWriteMap<Object, Object> rw = ReadWriteMapImpl.create(fmap).withParams(Param.LockingMode.SKIP); new TransactionHelper...
[ "public", "static", "void", "removeMap", "(", "Cache", "<", "Object", ",", "Object", ">", "cache", ",", "Object", "group", ")", "{", "FunctionalMapImpl", "<", "Object", ",", "Object", ">", "fmap", "=", "FunctionalMapImpl", ".", "create", "(", "cache", ".",...
Warning: with pessimistic locking/optimistic locking without WSC, when the map is removed and a new key is added before the removal transaction commit, the map may be removed but the key left dangling.
[ "Warning", ":", "with", "pessimistic", "locking", "/", "optimistic", "locking", "without", "WSC", "when", "the", "map", "is", "removed", "and", "a", "new", "key", "is", "added", "before", "the", "removal", "transaction", "commit", "the", "map", "may", "be", ...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/atomic/impl/FineGrainedAtomicMapProxyImpl.java#L114-L124
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/rules/spelling/symspell/implementation/SymSpell.java
SymSpell.lookup
public List<SuggestItem> lookup(String input, Verbosity verbosity) { """ / sorted by edit distance, and secondarily by count frequency.</returns> """ return lookup(input, verbosity, maxDictionaryEditDistance); }
java
public List<SuggestItem> lookup(String input, Verbosity verbosity) { return lookup(input, verbosity, maxDictionaryEditDistance); }
[ "public", "List", "<", "SuggestItem", ">", "lookup", "(", "String", "input", ",", "Verbosity", "verbosity", ")", "{", "return", "lookup", "(", "input", ",", "verbosity", ",", "maxDictionaryEditDistance", ")", ";", "}" ]
/ sorted by edit distance, and secondarily by count frequency.</returns>
[ "/", "sorted", "by", "edit", "distance", "and", "secondarily", "by", "count", "frequency", ".", "<", "/", "returns", ">" ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/rules/spelling/symspell/implementation/SymSpell.java#L303-L305
lessthanoptimal/ddogleg
src/org/ddogleg/optimization/trustregion/TrustRegionBase_F64.java
TrustRegionBase_F64.setVerbose
@Override public void setVerbose(@Nullable PrintStream out, int level) { """ Turns on printing of debug messages. @param out Stream that is printed to. Set to null to disable @param level 0=Debug from solver. {@code > 0} is debug from solver and update """ super.setVerbose(out, level); if( level > 0 ) ...
java
@Override public void setVerbose(@Nullable PrintStream out, int level) { super.setVerbose(out, level); if( level > 0 ) this.parameterUpdate.setVerbose(verbose,level); }
[ "@", "Override", "public", "void", "setVerbose", "(", "@", "Nullable", "PrintStream", "out", ",", "int", "level", ")", "{", "super", ".", "setVerbose", "(", "out", ",", "level", ")", ";", "if", "(", "level", ">", "0", ")", "this", ".", "parameterUpdate...
Turns on printing of debug messages. @param out Stream that is printed to. Set to null to disable @param level 0=Debug from solver. {@code > 0} is debug from solver and update
[ "Turns", "on", "printing", "of", "debug", "messages", "." ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/optimization/trustregion/TrustRegionBase_F64.java#L364-L369
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionValuePersistenceImpl.java
CPOptionValuePersistenceImpl.findAll
@Override public List<CPOptionValue> findAll() { """ Returns all the cp option values. @return the cp option values """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CPOptionValue> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CPOptionValue", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the cp option values. @return the cp option values
[ "Returns", "all", "the", "cp", "option", "values", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionValuePersistenceImpl.java#L4252-L4255
infinispan/infinispan
core/src/main/java/org/infinispan/configuration/cache/DeadlockDetectionConfigurationBuilder.java
DeadlockDetectionConfigurationBuilder.spinDuration
@Deprecated public DeadlockDetectionConfigurationBuilder spinDuration(long l, TimeUnit unit) { """ Time period that determines how often is lock acquisition attempted within maximum time allowed to acquire a particular lock @deprecated Since 9.0, deadlock detection is always disabled. """ return s...
java
@Deprecated public DeadlockDetectionConfigurationBuilder spinDuration(long l, TimeUnit unit) { return spinDuration(unit.toMillis(l)); }
[ "@", "Deprecated", "public", "DeadlockDetectionConfigurationBuilder", "spinDuration", "(", "long", "l", ",", "TimeUnit", "unit", ")", "{", "return", "spinDuration", "(", "unit", ".", "toMillis", "(", "l", ")", ")", ";", "}" ]
Time period that determines how often is lock acquisition attempted within maximum time allowed to acquire a particular lock @deprecated Since 9.0, deadlock detection is always disabled.
[ "Time", "period", "that", "determines", "how", "often", "is", "lock", "acquisition", "attempted", "within", "maximum", "time", "allowed", "to", "acquire", "a", "particular", "lock" ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/configuration/cache/DeadlockDetectionConfigurationBuilder.java#L52-L55
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java
DataService.downloadAsync
public <T extends IEntity> void downloadAsync(T entity, CallbackHandler callbackHandler) throws FMSException { """ Method to download the file for the given entity id in asynchronous fashion @param entity the entity @param callbackHandler the callback handler @throws FMSException throws FMSException ""...
java
public <T extends IEntity> void downloadAsync(T entity, CallbackHandler callbackHandler) throws FMSException { IntuitMessage intuitMessage = prepareDownload(entity); //set callback handler intuitMessage.getRequestElements().setCallbackHandler(callbackHandler); //execute async intercep...
[ "public", "<", "T", "extends", "IEntity", ">", "void", "downloadAsync", "(", "T", "entity", ",", "CallbackHandler", "callbackHandler", ")", "throws", "FMSException", "{", "IntuitMessage", "intuitMessage", "=", "prepareDownload", "(", "entity", ")", ";", "//set cal...
Method to download the file for the given entity id in asynchronous fashion @param entity the entity @param callbackHandler the callback handler @throws FMSException throws FMSException
[ "Method", "to", "download", "the", "file", "for", "the", "given", "entity", "id", "in", "asynchronous", "fashion" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java#L883-L892
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowControllerFactory.java
FlowControllerFactory.getPageFlow
public static PageFlowController getPageFlow( String pageFlowClassName, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext ) { ""...
java
public static PageFlowController getPageFlow( String pageFlowClassName, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext ) { ...
[ "public", "static", "PageFlowController", "getPageFlow", "(", "String", "pageFlowClassName", ",", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ",", "ServletContext", "servletContext", ")", "{", "try", "{", "return", "get", "(", "servletContex...
Create a page flow of the given type. The page flow stack (for nesting) will be cleared or pushed, and the new instance will be stored as the current page flow. @deprecated Use {@link #createPageFlow(RequestContext, String)} instead. @param request the current HttpServletRequest. @param response the current HttpServl...
[ "Create", "a", "page", "flow", "of", "the", "given", "type", ".", "The", "page", "flow", "stack", "(", "for", "nesting", ")", "will", "be", "cleared", "or", "pushed", "and", "the", "new", "instance", "will", "be", "stored", "as", "the", "current", "pag...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowControllerFactory.java#L640-L664
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.serviceName_lines_number_diagnostic_cancel_POST
public void serviceName_lines_number_diagnostic_cancel_POST(String serviceName, String number) throws IOException { """ Cancel line diagnostic if possible REST: POST /xdsl/{serviceName}/lines/{number}/diagnostic/cancel @param serviceName [required] The internal name of your XDSL offer @param number [required]...
java
public void serviceName_lines_number_diagnostic_cancel_POST(String serviceName, String number) throws IOException { String qPath = "/xdsl/{serviceName}/lines/{number}/diagnostic/cancel"; StringBuilder sb = path(qPath, serviceName, number); exec(qPath, "POST", sb.toString(), null); }
[ "public", "void", "serviceName_lines_number_diagnostic_cancel_POST", "(", "String", "serviceName", ",", "String", "number", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/xdsl/{serviceName}/lines/{number}/diagnostic/cancel\"", ";", "StringBuilder", "sb", "=", ...
Cancel line diagnostic if possible REST: POST /xdsl/{serviceName}/lines/{number}/diagnostic/cancel @param serviceName [required] The internal name of your XDSL offer @param number [required] The number of the line
[ "Cancel", "line", "diagnostic", "if", "possible" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L430-L434
ksclarke/freelib-utils
src/main/java/info/freelibrary/util/I18nObject.java
I18nObject.getI18n
protected String getI18n(final String aMessageKey, final File... aFileArray) { """ Gets the internationalized value for the supplied message key, using a file array as additional information. @param aMessageKey A message key @param aFileArray Additional details for the message @return The internationalized me...
java
protected String getI18n(final String aMessageKey, final File... aFileArray) { final String[] fileNames = new String[aFileArray.length]; for (int index = 0; index < fileNames.length; index++) { fileNames[index] = aFileArray[index].getAbsolutePath(); } return StringUtils.nor...
[ "protected", "String", "getI18n", "(", "final", "String", "aMessageKey", ",", "final", "File", "...", "aFileArray", ")", "{", "final", "String", "[", "]", "fileNames", "=", "new", "String", "[", "aFileArray", ".", "length", "]", ";", "for", "(", "int", "...
Gets the internationalized value for the supplied message key, using a file array as additional information. @param aMessageKey A message key @param aFileArray Additional details for the message @return The internationalized message
[ "Gets", "the", "internationalized", "value", "for", "the", "supplied", "message", "key", "using", "a", "file", "array", "as", "additional", "information", "." ]
train
https://github.com/ksclarke/freelib-utils/blob/54e822ae4c11b3d74793fd82a1a535ffafffaf45/src/main/java/info/freelibrary/util/I18nObject.java#L123-L131
tzaeschke/zoodb
src/org/zoodb/internal/util/DBLogger.java
DBLogger.newFatalDataStore
public static RuntimeException newFatalDataStore(String msg, Throwable t) { """ THese always result in the session being closed! @param msg The error message @param t The Throwable to report @return Fatal data store exception. """ return newEx(FATAL_DATA_STORE_EXCEPTION, msg, t); }
java
public static RuntimeException newFatalDataStore(String msg, Throwable t) { return newEx(FATAL_DATA_STORE_EXCEPTION, msg, t); }
[ "public", "static", "RuntimeException", "newFatalDataStore", "(", "String", "msg", ",", "Throwable", "t", ")", "{", "return", "newEx", "(", "FATAL_DATA_STORE_EXCEPTION", ",", "msg", ",", "t", ")", ";", "}" ]
THese always result in the session being closed! @param msg The error message @param t The Throwable to report @return Fatal data store exception.
[ "THese", "always", "result", "in", "the", "session", "being", "closed!" ]
train
https://github.com/tzaeschke/zoodb/blob/058d0ff161a8ee9d53244c433aca97ee9c654410/src/org/zoodb/internal/util/DBLogger.java#L171-L173
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/Mac.java
Mac.getInstance
public static final Mac getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { """ Returns a <code>Mac</code> object that implements the specified MAC algorithm. <p> A new Mac object encapsulating the MacSpi implementation from the specified provi...
java
public static final Mac getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { Instance instance = JceSecurity.getInstance ("Mac", MacSpi.class, algorithm, provider); return new Mac((MacSpi)instance.impl, instance.provider, a...
[ "public", "static", "final", "Mac", "getInstance", "(", "String", "algorithm", ",", "String", "provider", ")", "throws", "NoSuchAlgorithmException", ",", "NoSuchProviderException", "{", "Instance", "instance", "=", "JceSecurity", ".", "getInstance", "(", "\"Mac\"", ...
Returns a <code>Mac</code> object that implements the specified MAC algorithm. <p> A new Mac object encapsulating the MacSpi implementation from the specified provider is returned. The specified provider must be registered in the security provider list. <p> Note that the list of registered providers may be retrieved...
[ "Returns", "a", "<code", ">", "Mac<", "/", "code", ">", "object", "that", "implements", "the", "specified", "MAC", "algorithm", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/Mac.java#L289-L294
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/Var2Data.java
Var2Data.getString
public String getString(Integer id, Integer type) { """ This method retrieves a string of the specified type, belonging to the item with the specified unique ID. @param id unique ID of entity to which this data belongs @param type data type identifier @return required string data """ return (getStr...
java
public String getString(Integer id, Integer type) { return (getString(m_meta.getOffset(id, type))); }
[ "public", "String", "getString", "(", "Integer", "id", ",", "Integer", "type", ")", "{", "return", "(", "getString", "(", "m_meta", ".", "getOffset", "(", "id", ",", "type", ")", ")", ")", ";", "}" ]
This method retrieves a string of the specified type, belonging to the item with the specified unique ID. @param id unique ID of entity to which this data belongs @param type data type identifier @return required string data
[ "This", "method", "retrieves", "a", "string", "of", "the", "specified", "type", "belonging", "to", "the", "item", "with", "the", "specified", "unique", "ID", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/Var2Data.java#L239-L242
haraldk/TwelveMonkeys
common/common-lang/src/main/java/com/twelvemonkeys/lang/StringUtil.java
StringUtil.lastIndexOfIgnoreCase
public static int lastIndexOfIgnoreCase(String pString, int pChar, int pPos) { """ Returns the index within this string of the last occurrence of the specified character, searching backward starting at the specified index. @param pString The string to test @param pChar The character to look for @param pPos...
java
public static int lastIndexOfIgnoreCase(String pString, int pChar, int pPos) { if ((pString == null)) { return -1; } // Get first char char lower = Character.toLowerCase((char) pChar); char upper = Character.toUpperCase((char) pChar); int indexLower; ...
[ "public", "static", "int", "lastIndexOfIgnoreCase", "(", "String", "pString", ",", "int", "pChar", ",", "int", "pPos", ")", "{", "if", "(", "(", "pString", "==", "null", ")", ")", "{", "return", "-", "1", ";", "}", "// Get first char\r", "char", "lower",...
Returns the index within this string of the last occurrence of the specified character, searching backward starting at the specified index. @param pString The string to test @param pChar The character to look for @param pPos The last index to test @return if the string argument occurs as a substring within this o...
[ "Returns", "the", "index", "within", "this", "string", "of", "the", "last", "occurrence", "of", "the", "specified", "character", "searching", "backward", "starting", "at", "the", "specified", "index", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-lang/src/main/java/com/twelvemonkeys/lang/StringUtil.java#L525-L556
httl/httl
httl/src/main/java/httl/spi/codecs/json/JSONObject.java
JSONObject.writeJSON
public void writeJSON(JSONValue jc, JSONWriter jb, boolean writeClass) throws IOException { """ write json. @param jc json converter. @param jb json builder. """ String key; Object value; jb.objectBegin(); for (Map.Entry<String, Object> entry : objectMap.entrySet...
java
public void writeJSON(JSONValue jc, JSONWriter jb, boolean writeClass) throws IOException { String key; Object value; jb.objectBegin(); for (Map.Entry<String, Object> entry : objectMap.entrySet()) { key = entry.getKey(); jb.objectItem(key); ...
[ "public", "void", "writeJSON", "(", "JSONValue", "jc", ",", "JSONWriter", "jb", ",", "boolean", "writeClass", ")", "throws", "IOException", "{", "String", "key", ";", "Object", "value", ";", "jb", ".", "objectBegin", "(", ")", ";", "for", "(", "Map", "."...
write json. @param jc json converter. @param jb json builder.
[ "write", "json", "." ]
train
https://github.com/httl/httl/blob/e13e00f4ab41252a8f53d6dafd4a6610be9dcaad/httl/src/main/java/httl/spi/codecs/json/JSONObject.java#L199-L214
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/Director.java
Director.installAssets
public void installAssets(Collection<String> assetIds, File fromDir, RepositoryConnectionList loginInfo) throws InstallException { """ Installs the specified assets from a specific directory @param assetIds Collection of assetIds to install @param fromDir Directory to get assets from @param loginInfo Reposito...
java
public void installAssets(Collection<String> assetIds, File fromDir, RepositoryConnectionList loginInfo) throws InstallException { this.installAssets = new ArrayList<List<InstallAsset>>(); ArrayList<InstallAsset> installAssets = new ArrayList<InstallAsset>(); ArrayList<String> unresolvedFeatures...
[ "public", "void", "installAssets", "(", "Collection", "<", "String", ">", "assetIds", ",", "File", "fromDir", ",", "RepositoryConnectionList", "loginInfo", ")", "throws", "InstallException", "{", "this", ".", "installAssets", "=", "new", "ArrayList", "<", "List", ...
Installs the specified assets from a specific directory @param assetIds Collection of assetIds to install @param fromDir Directory to get assets from @param loginInfo RepositoryConnectionList to obtain unresolved features @throws InstallException
[ "Installs", "the", "specified", "assets", "from", "a", "specific", "directory" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/Director.java#L1373-L1390
lucee/Lucee
core/src/main/java/lucee/runtime/tag/TagUtil.java
TagUtil.invokeBIF
public static Object invokeBIF(PageContext pc, Object[] args, String className, String bundleName, String bundleVersion) throws PageException { """ used by the bytecode builded @param pc pageContext @param className @param bundleName @param bundleVersion @return @throws BundleException @throws ClassExcept...
java
public static Object invokeBIF(PageContext pc, Object[] args, String className, String bundleName, String bundleVersion) throws PageException { try { Class<?> clazz = ClassUtil.loadClassByBundle(className, bundleName, bundleVersion, pc.getConfig().getIdentification()); BIF bif; if (Reflector.isInstaneOf...
[ "public", "static", "Object", "invokeBIF", "(", "PageContext", "pc", ",", "Object", "[", "]", "args", ",", "String", "className", ",", "String", "bundleName", ",", "String", "bundleVersion", ")", "throws", "PageException", "{", "try", "{", "Class", "<", "?",...
used by the bytecode builded @param pc pageContext @param className @param bundleName @param bundleVersion @return @throws BundleException @throws ClassException
[ "used", "by", "the", "bytecode", "builded" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/TagUtil.java#L357-L370
JoeKerouac/utils
src/main/java/com/joe/utils/serialize/xml/XmlParser.java
XmlParser.toXml
public String toXml(Object source, String rootName, boolean hasNull) { """ 将Object解析为xml,暂时只能解析基本类型(可以正确解析list、map) @param source bean @param rootName 根节点名称,如果为null则会尝试使用默认值 @param hasNull 是否包含null元素(true:包含) @return 解析结果 """ if (source == null) { log.warn("传入的source为null,返回null");...
java
public String toXml(Object source, String rootName, boolean hasNull) { if (source == null) { log.warn("传入的source为null,返回null"); return null; } if (rootName == null) { XmlNode xmlNode = source.getClass().getDeclaredAnnotation(XmlNode.class); rootNa...
[ "public", "String", "toXml", "(", "Object", "source", ",", "String", "rootName", ",", "boolean", "hasNull", ")", "{", "if", "(", "source", "==", "null", ")", "{", "log", ".", "warn", "(", "\"传入的source为null,返回null\");", "", "", "return", "null", ";", "}",...
将Object解析为xml,暂时只能解析基本类型(可以正确解析list、map) @param source bean @param rootName 根节点名称,如果为null则会尝试使用默认值 @param hasNull 是否包含null元素(true:包含) @return 解析结果
[ "将Object解析为xml,暂时只能解析基本类型(可以正确解析list、map)" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/serialize/xml/XmlParser.java#L332-L353
apache/incubator-gobblin
gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/avro/MRCompactorAvroKeyDedupJobRunner.java
MRCompactorAvroKeyDedupJobRunner.isKeySchemaValid
public static boolean isKeySchemaValid(Schema keySchema, Schema topicSchema) { """ keySchema is valid if a record with newestSchema can be converted to a record with keySchema. """ return SchemaCompatibility.checkReaderWriterCompatibility(keySchema, topicSchema).getType() .equals(SchemaCompatibilit...
java
public static boolean isKeySchemaValid(Schema keySchema, Schema topicSchema) { return SchemaCompatibility.checkReaderWriterCompatibility(keySchema, topicSchema).getType() .equals(SchemaCompatibilityType.COMPATIBLE); }
[ "public", "static", "boolean", "isKeySchemaValid", "(", "Schema", "keySchema", ",", "Schema", "topicSchema", ")", "{", "return", "SchemaCompatibility", ".", "checkReaderWriterCompatibility", "(", "keySchema", ",", "topicSchema", ")", ".", "getType", "(", ")", ".", ...
keySchema is valid if a record with newestSchema can be converted to a record with keySchema.
[ "keySchema", "is", "valid", "if", "a", "record", "with", "newestSchema", "can", "be", "converted", "to", "a", "record", "with", "keySchema", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/avro/MRCompactorAvroKeyDedupJobRunner.java#L215-L218
b3dgs/lionengine
lionengine-network/src/main/java/com/b3dgs/lionengine/network/message/NetworkMessageEntity.java
NetworkMessageEntity.addAction
public void addAction(M element, int value) { """ Add an action. @param element The action type. @param value The action value. """ actions.put(element, Integer.valueOf(value)); }
java
public void addAction(M element, int value) { actions.put(element, Integer.valueOf(value)); }
[ "public", "void", "addAction", "(", "M", "element", ",", "int", "value", ")", "{", "actions", ".", "put", "(", "element", ",", "Integer", ".", "valueOf", "(", "value", ")", ")", ";", "}" ]
Add an action. @param element The action type. @param value The action value.
[ "Add", "an", "action", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-network/src/main/java/com/b3dgs/lionengine/network/message/NetworkMessageEntity.java#L155-L158
kiegroup/drools
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/assembler/DMNAssemblerService.java
DMNAssemblerService.compilerConfigWithKModulePrefs
public static DMNCompilerConfigurationImpl compilerConfigWithKModulePrefs(ClassLoader classLoader, ChainedProperties chainedProperties, List<DMNProfile> dmnProfiles, DMNCompilerConfigurationImpl config) { """ Returns a DMNCompilerConfiguration with the specified properties set, and applying the explicited dmnProfi...
java
public static DMNCompilerConfigurationImpl compilerConfigWithKModulePrefs(ClassLoader classLoader, ChainedProperties chainedProperties, List<DMNProfile> dmnProfiles, DMNCompilerConfigurationImpl config) { config.setRootClassLoader(classLoader); Map<String, String> dmnPrefs = new HashMap<>(); c...
[ "public", "static", "DMNCompilerConfigurationImpl", "compilerConfigWithKModulePrefs", "(", "ClassLoader", "classLoader", ",", "ChainedProperties", "chainedProperties", ",", "List", "<", "DMNProfile", ">", "dmnProfiles", ",", "DMNCompilerConfigurationImpl", "config", ")", "{",...
Returns a DMNCompilerConfiguration with the specified properties set, and applying the explicited dmnProfiles. @param classLoader @param chainedProperties applies properties --it does not do any classloading nor profile loading based on these properites, just passes the values. @param dmnProfiles applies these DMNProfi...
[ "Returns", "a", "DMNCompilerConfiguration", "with", "the", "specified", "properties", "set", "and", "applying", "the", "explicited", "dmnProfiles", "." ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/assembler/DMNAssemblerService.java#L248-L263
jboss-integration/fuse-bxms-integ
switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/exchange/KnowledgeExchangeHandler.java
KnowledgeExchangeHandler.getInteger
protected Integer getInteger(Exchange exchange, Message message, String name) { """ Gets an Integer context property. @param exchange the exchange @param message the message @param name the name @return the property """ Object value = getObject(exchange, message, name); if (value instance...
java
protected Integer getInteger(Exchange exchange, Message message, String name) { Object value = getObject(exchange, message, name); if (value instanceof Integer) { return (Integer)value; } else if (value instanceof Number) { return Integer.valueOf(((Number)value).intValue(...
[ "protected", "Integer", "getInteger", "(", "Exchange", "exchange", ",", "Message", "message", ",", "String", "name", ")", "{", "Object", "value", "=", "getObject", "(", "exchange", ",", "message", ",", "name", ")", ";", "if", "(", "value", "instanceof", "I...
Gets an Integer context property. @param exchange the exchange @param message the message @param name the name @return the property
[ "Gets", "an", "Integer", "context", "property", "." ]
train
https://github.com/jboss-integration/fuse-bxms-integ/blob/ca5c012bf867ea15d1250f0991af3cd7e708aaaf/switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/exchange/KnowledgeExchangeHandler.java#L202-L212
btrplace/scheduler
json/src/main/java/org/btrplace/json/JSONs.java
JSONs.requiredInt
public static int requiredInt(JSONObject o, String id) throws JSONConverterException { """ Read an expected integer. @param o the object to parse @param id the key in the map that points to an integer @return the int @throws JSONConverterException if the key does not point to a int """ checkKeys...
java
public static int requiredInt(JSONObject o, String id) throws JSONConverterException { checkKeys(o, id); try { return (Integer) o.get(id); } catch (ClassCastException e) { throw new JSONConverterException("Unable to read a int from string '" + id + "'", e); } ...
[ "public", "static", "int", "requiredInt", "(", "JSONObject", "o", ",", "String", "id", ")", "throws", "JSONConverterException", "{", "checkKeys", "(", "o", ",", "id", ")", ";", "try", "{", "return", "(", "Integer", ")", "o", ".", "get", "(", "id", ")",...
Read an expected integer. @param o the object to parse @param id the key in the map that points to an integer @return the int @throws JSONConverterException if the key does not point to a int
[ "Read", "an", "expected", "integer", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/JSONs.java#L92-L99
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.writeInData
public void writeInData(int hashCode, byte[] b, int offset, int len) { """ This method writes data to the in buffer. @param hashCode The hash code, or -1 to ignore the hash code @param b The bytes @param offset The offset @param len The length """ if (inStream != null && (hashCode == -1 || hashCo...
java
public void writeInData(int hashCode, byte[] b, int offset, int len) { if (inStream != null && (hashCode == -1 || hashCode == inHashCode)) { inStream.write(b, offset, len); } }
[ "public", "void", "writeInData", "(", "int", "hashCode", ",", "byte", "[", "]", "b", ",", "int", "offset", ",", "int", "len", ")", "{", "if", "(", "inStream", "!=", "null", "&&", "(", "hashCode", "==", "-", "1", "||", "hashCode", "==", "inHashCode", ...
This method writes data to the in buffer. @param hashCode The hash code, or -1 to ignore the hash code @param b The bytes @param offset The offset @param len The length
[ "This", "method", "writes", "data", "to", "the", "in", "buffer", "." ]
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L508-L512
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TitlePaneCloseButtonPainter.java
TitlePaneCloseButtonPainter.decodeEdge
private Shape decodeEdge(int width, int height) { """ Create the edge of the button. @param width the width. @param height the height. @return the shape of the edge. """ path.reset(); path.moveTo(width - 2, 0); path.lineTo(width - 2, height - 4); path.lineTo(width - 4,...
java
private Shape decodeEdge(int width, int height) { path.reset(); path.moveTo(width - 2, 0); path.lineTo(width - 2, height - 4); path.lineTo(width - 4, height - 2); path.lineTo(0, height - 2); return path; }
[ "private", "Shape", "decodeEdge", "(", "int", "width", ",", "int", "height", ")", "{", "path", ".", "reset", "(", ")", ";", "path", ".", "moveTo", "(", "width", "-", "2", ",", "0", ")", ";", "path", ".", "lineTo", "(", "width", "-", "2", ",", "...
Create the edge of the button. @param width the width. @param height the height. @return the shape of the edge.
[ "Create", "the", "edge", "of", "the", "button", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TitlePaneCloseButtonPainter.java#L222-L230
jdereg/java-util
src/main/java/com/cedarsoftware/util/UrlUtilities.java
UrlUtilities.getConnection
@Deprecated public static URLConnection getConnection(URL url, String server, int port, Map inCookies, boolean input, boolean output, boolean cache, boolean allowAllCerts) throws IOException { """ Anyone using the proxy calls such as this one should have that managed by the jvm with -D parameters: http.proxyH...
java
@Deprecated public static URLConnection getConnection(URL url, String server, int port, Map inCookies, boolean input, boolean output, boolean cache, boolean allowAllCerts) throws IOException { return getConnection(url, inCookies, input, output, cache, allowAllCerts); }
[ "@", "Deprecated", "public", "static", "URLConnection", "getConnection", "(", "URL", "url", ",", "String", "server", ",", "int", "port", ",", "Map", "inCookies", ",", "boolean", "input", ",", "boolean", "output", ",", "boolean", "cache", ",", "boolean", "all...
Anyone using the proxy calls such as this one should have that managed by the jvm with -D parameters: http.proxyHost http.proxyPort (default: 80) http.nonProxyHosts (should always include localhost) https.proxyHost https.proxyPort Example: -Dhttp.proxyHost=proxy.example.org -Dhttp.proxyPort=8080 -Dhttps.proxyHost=pro...
[ "Anyone", "using", "the", "proxy", "calls", "such", "as", "this", "one", "should", "have", "that", "managed", "by", "the", "jvm", "with", "-", "D", "parameters", ":", "http", ".", "proxyHost", "http", ".", "proxyPort", "(", "default", ":", "80", ")", "...
train
https://github.com/jdereg/java-util/blob/a2dce61aed16d6454ee575174dda1ba6bff0015c/src/main/java/com/cedarsoftware/util/UrlUtilities.java#L709-L713
threerings/nenya
core/src/main/java/com/threerings/media/util/AStarPathUtil.java
AStarPathUtil.getNodePath
protected static List<Point> getNodePath (Node n) { """ Return a list of <code>Point</code> objects detailing the path from the first node (the given node's ultimate parent) to the ending node (the given node itself.) @param n the ending node in the path. @return the list detailing the path. """ ...
java
protected static List<Point> getNodePath (Node n) { Node cur = n; ArrayList<Point> path = Lists.newArrayList(); while (cur != null) { // add to the head of the list since we're traversing from // the end to the beginning path.add(0, new Point(cur.x, cur.y...
[ "protected", "static", "List", "<", "Point", ">", "getNodePath", "(", "Node", "n", ")", "{", "Node", "cur", "=", "n", ";", "ArrayList", "<", "Point", ">", "path", "=", "Lists", ".", "newArrayList", "(", ")", ";", "while", "(", "cur", "!=", "null", ...
Return a list of <code>Point</code> objects detailing the path from the first node (the given node's ultimate parent) to the ending node (the given node itself.) @param n the ending node in the path. @return the list detailing the path.
[ "Return", "a", "list", "of", "<code", ">", "Point<", "/", "code", ">", "objects", "detailing", "the", "path", "from", "the", "first", "node", "(", "the", "given", "node", "s", "ultimate", "parent", ")", "to", "the", "ending", "node", "(", "the", "given...
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/util/AStarPathUtil.java#L277-L292
shrinkwrap/resolver
maven/impl-maven/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/PostResolutionFilterApplicator.java
PostResolutionFilterApplicator.postFilter
static Collection<MavenResolvedArtifact> postFilter(final Collection<MavenResolvedArtifact> artifactResults) { """ Run post-resolution filtering to weed out POMs. @param artifactResults The original list of resolved artifacts @return List of modified artifactResults """ final MavenResolutionFilter...
java
static Collection<MavenResolvedArtifact> postFilter(final Collection<MavenResolvedArtifact> artifactResults) { final MavenResolutionFilter postResolutionFilter = RestrictPomArtifactFilter.INSTANCE; final Collection<MavenResolvedArtifact> filteredArtifacts = new ArrayList<MavenResolvedArtifact>(); ...
[ "static", "Collection", "<", "MavenResolvedArtifact", ">", "postFilter", "(", "final", "Collection", "<", "MavenResolvedArtifact", ">", "artifactResults", ")", "{", "final", "MavenResolutionFilter", "postResolutionFilter", "=", "RestrictPomArtifactFilter", ".", "INSTANCE", ...
Run post-resolution filtering to weed out POMs. @param artifactResults The original list of resolved artifacts @return List of modified artifactResults
[ "Run", "post", "-", "resolution", "filtering", "to", "weed", "out", "POMs", "." ]
train
https://github.com/shrinkwrap/resolver/blob/e881a84b8cff5b0a014f2a5ebf612be3eb9db01f/maven/impl-maven/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/PostResolutionFilterApplicator.java#L49-L64
jcuda/jcusparse
JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java
JCusparse.cusparseSbsrmm
public static int cusparseSbsrmm( cusparseHandle handle, int dirA, int transA, int transB, int mb, int n, int kb, int nnzb, Pointer alpha, cusparseMatDescr descrA, Pointer bsrSortedValA, Pointer bsrSor...
java
public static int cusparseSbsrmm( cusparseHandle handle, int dirA, int transA, int transB, int mb, int n, int kb, int nnzb, Pointer alpha, cusparseMatDescr descrA, Pointer bsrSortedValA, Pointer bsrSor...
[ "public", "static", "int", "cusparseSbsrmm", "(", "cusparseHandle", "handle", ",", "int", "dirA", ",", "int", "transA", ",", "int", "transB", ",", "int", "mb", ",", "int", "n", ",", "int", "kb", ",", "int", "nnzb", ",", "Pointer", "alpha", ",", "cuspar...
Description: sparse - dense matrix multiplication C = alpha * op(A) * B + beta * C, where A is a sparse matrix in block-CSR format, B and C are dense tall matrices. This routine allows transposition of matrix B, which may improve performance.
[ "Description", ":", "sparse", "-", "dense", "matrix", "multiplication", "C", "=", "alpha", "*", "op", "(", "A", ")", "*", "B", "+", "beta", "*", "C", "where", "A", "is", "a", "sparse", "matrix", "in", "block", "-", "CSR", "format", "B", "and", "C",...
train
https://github.com/jcuda/jcusparse/blob/7687a62a4ef6b76cb91cf7da93d4cf5ade96a791/JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java#L3969-L3991
agmip/ace-core
src/main/java/org/agmip/ace/AceComponent.java
AceComponent.getValueOr
public String getValueOr(String key, String alternateValue) throws IOException { """ Return a value from the component, or return a default value. <p> <strong>NOTE:</strong>Use this for values only, not to retrieve subcomponents. Use class specific methods to retrieve subcompnents. <p> Calls {@link #getVa...
java
public String getValueOr(String key, String alternateValue) throws IOException { String value = this.getValue(key); if (value == null) { return alternateValue; } else { return value; } }
[ "public", "String", "getValueOr", "(", "String", "key", ",", "String", "alternateValue", ")", "throws", "IOException", "{", "String", "value", "=", "this", ".", "getValue", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "{", "return", "alte...
Return a value from the component, or return a default value. <p> <strong>NOTE:</strong>Use this for values only, not to retrieve subcomponents. Use class specific methods to retrieve subcompnents. <p> Calls {@link #getValue} on the current component. If the value is {@code null}, return {@code alternateValue}. @param...
[ "Return", "a", "value", "from", "the", "component", "or", "return", "a", "default", "value", ".", "<p", ">", "<strong", ">", "NOTE", ":", "<", "/", "strong", ">", "Use", "this", "for", "values", "only", "not", "to", "retrieve", "subcomponents", ".", "U...
train
https://github.com/agmip/ace-core/blob/51957e79b4567d0083c52d0720f4a268c3a02f44/src/main/java/org/agmip/ace/AceComponent.java#L128-L136
hal/core
processors/src/main/java/org/jboss/hal/processors/AbstractHalProcessor.java
AbstractHalProcessor.writeCode
protected void writeCode(final String packageName, final String className, final StringBuffer code) { """ Writes the specified source code and wraps any {@code IOException} as {@link GenerationException}. @param packageName the package name @param className the class name @param code the source code ...
java
protected void writeCode(final String packageName, final String className, final StringBuffer code) { try { JavaFileObject jfo = filer.createSourceFile(packageName + "." + className); Writer w = jfo.openWriter(); BufferedWriter bw = new BufferedWriter(w); bw.appen...
[ "protected", "void", "writeCode", "(", "final", "String", "packageName", ",", "final", "String", "className", ",", "final", "StringBuffer", "code", ")", "{", "try", "{", "JavaFileObject", "jfo", "=", "filer", ".", "createSourceFile", "(", "packageName", "+", "...
Writes the specified source code and wraps any {@code IOException} as {@link GenerationException}. @param packageName the package name @param className the class name @param code the source code @throws GenerationException if an {@code IOException occurs}
[ "Writes", "the", "specified", "source", "code", "and", "wraps", "any", "{", "@code", "IOException", "}", "as", "{", "@link", "GenerationException", "}", "." ]
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/processors/src/main/java/org/jboss/hal/processors/AbstractHalProcessor.java#L249-L261
alexvasilkov/AndroidCommons
library/src/main/java/com/alexvasilkov/android/commons/state/InstanceStateManager.java
InstanceStateManager.saveInstanceState
@NonNull public static <T> Bundle saveInstanceState(@NonNull T obj, @Nullable Bundle outState) { """ Saving instance state of the given {@code obj} into {@code outState}.<br/> Supposed to be called from {@link android.app.Activity#onSaveInstanceState(android.os.Bundle)} or {@link android.app.Fragment#onSave...
java
@NonNull public static <T> Bundle saveInstanceState(@NonNull T obj, @Nullable Bundle outState) { if (outState == null) { outState = new Bundle(); } return new InstanceStateManager<>(obj).saveState(outState); }
[ "@", "NonNull", "public", "static", "<", "T", ">", "Bundle", "saveInstanceState", "(", "@", "NonNull", "T", "obj", ",", "@", "Nullable", "Bundle", "outState", ")", "{", "if", "(", "outState", "==", "null", ")", "{", "outState", "=", "new", "Bundle", "(...
Saving instance state of the given {@code obj} into {@code outState}.<br/> Supposed to be called from {@link android.app.Activity#onSaveInstanceState(android.os.Bundle)} or {@link android.app.Fragment#onSaveInstanceState(android.os.Bundle)}.<br/> Activity or Fragment itself can be used as {@code obj} parameter.
[ "Saving", "instance", "state", "of", "the", "given", "{" ]
train
https://github.com/alexvasilkov/AndroidCommons/blob/aca9f6d5acfc6bd3694984b7f89956e1a0146ddb/library/src/main/java/com/alexvasilkov/android/commons/state/InstanceStateManager.java#L45-L51
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/util/Properties.java
Properties.getProperty
public String getProperty(String propName, String defaultValue) { """ Returns the string property associated with {@code propName}, or {@code defaultValue} if there is no property. """ return props.getProperty(propName, defaultValue); }
java
public String getProperty(String propName, String defaultValue) { return props.getProperty(propName, defaultValue); }
[ "public", "String", "getProperty", "(", "String", "propName", ",", "String", "defaultValue", ")", "{", "return", "props", ".", "getProperty", "(", "propName", ",", "defaultValue", ")", ";", "}" ]
Returns the string property associated with {@code propName}, or {@code defaultValue} if there is no property.
[ "Returns", "the", "string", "property", "associated", "with", "{" ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/util/Properties.java#L65-L67
junit-team/junit4
src/main/java/org/junit/runners/RuleContainer.java
RuleContainer.getSortedEntries
private List<RuleEntry> getSortedEntries() { """ Returns entries in the order how they should be applied, i.e. inner-to-outer. """ List<RuleEntry> ruleEntries = new ArrayList<RuleEntry>( methodRules.size() + testRules.size()); for (MethodRule rule : methodRules) { ru...
java
private List<RuleEntry> getSortedEntries() { List<RuleEntry> ruleEntries = new ArrayList<RuleEntry>( methodRules.size() + testRules.size()); for (MethodRule rule : methodRules) { ruleEntries.add(new RuleEntry(rule, RuleEntry.TYPE_METHOD_RULE, orderValues.get(rule))); ...
[ "private", "List", "<", "RuleEntry", ">", "getSortedEntries", "(", ")", "{", "List", "<", "RuleEntry", ">", "ruleEntries", "=", "new", "ArrayList", "<", "RuleEntry", ">", "(", "methodRules", ".", "size", "(", ")", "+", "testRules", ".", "size", "(", ")",...
Returns entries in the order how they should be applied, i.e. inner-to-outer.
[ "Returns", "entries", "in", "the", "order", "how", "they", "should", "be", "applied", "i", ".", "e", ".", "inner", "-", "to", "-", "outer", "." ]
train
https://github.com/junit-team/junit4/blob/d9861ecdb6e487f6c352437ee823879aca3b81d4/src/main/java/org/junit/runners/RuleContainer.java#L55-L66
belaban/JGroups
src/org/jgroups/blocks/ReplicatedTree.java
ReplicatedTree.get
public Object get(String fqn, String key) { """ Finds a node given its name and returns the value associated with a given key in its {@code data} map. Returns null if the node was not found in the tree or the key was not found in the hashmap. @param fqn The fully qualified name of the node. @param key The key. ...
java
public Object get(String fqn, String key) { Node n=findNode(fqn); if(n == null) return null; return n.getData(key); }
[ "public", "Object", "get", "(", "String", "fqn", ",", "String", "key", ")", "{", "Node", "n", "=", "findNode", "(", "fqn", ")", ";", "if", "(", "n", "==", "null", ")", "return", "null", ";", "return", "n", ".", "getData", "(", "key", ")", ";", ...
Finds a node given its name and returns the value associated with a given key in its {@code data} map. Returns null if the node was not found in the tree or the key was not found in the hashmap. @param fqn The fully qualified name of the node. @param key The key.
[ "Finds", "a", "node", "given", "its", "name", "and", "returns", "the", "value", "associated", "with", "a", "given", "key", "in", "its", "{" ]
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/blocks/ReplicatedTree.java#L321-L326
google/closure-compiler
src/com/google/javascript/jscomp/RemoveUnusedCode.java
RemoveUnusedCode.isLocalDefaultValueAssignment
private static boolean isLocalDefaultValueAssignment(Node targetNode, Node valueNode) { """ True if targetNode is a qualified name and the valueNode is of the form `targetQualifiedName || localValue`. """ return valueNode.isOr() && targetNode.isQualifiedName() && valueNode.getFirstChild()....
java
private static boolean isLocalDefaultValueAssignment(Node targetNode, Node valueNode) { return valueNode.isOr() && targetNode.isQualifiedName() && valueNode.getFirstChild().isEquivalentTo(targetNode) && NodeUtil.evaluatesToLocalValue(valueNode.getLastChild()); }
[ "private", "static", "boolean", "isLocalDefaultValueAssignment", "(", "Node", "targetNode", ",", "Node", "valueNode", ")", "{", "return", "valueNode", ".", "isOr", "(", ")", "&&", "targetNode", ".", "isQualifiedName", "(", ")", "&&", "valueNode", ".", "getFirstC...
True if targetNode is a qualified name and the valueNode is of the form `targetQualifiedName || localValue`.
[ "True", "if", "targetNode", "is", "a", "qualified", "name", "and", "the", "valueNode", "is", "of", "the", "form", "targetQualifiedName", "||", "localValue", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/RemoveUnusedCode.java#L2292-L2297
samskivert/samskivert
src/main/java/com/samskivert/text/MessageUtil.java
MessageUtil.qualify
public static String qualify (String bundle, String key) { """ Returns a fully qualified message key which, when translated by some other bundle, will know to resolve and utilize the supplied bundle to translate this particular key. """ // sanity check if (bundle.indexOf(QUAL_PREFIX) != -1 || ...
java
public static String qualify (String bundle, String key) { // sanity check if (bundle.indexOf(QUAL_PREFIX) != -1 || bundle.indexOf(QUAL_SEP) != -1) { String errmsg = "Message bundle may not contain '" + QUAL_PREFIX + "' or '" + QUAL_SEP + "' [bundle=" + bundle...
[ "public", "static", "String", "qualify", "(", "String", "bundle", ",", "String", "key", ")", "{", "// sanity check", "if", "(", "bundle", ".", "indexOf", "(", "QUAL_PREFIX", ")", "!=", "-", "1", "||", "bundle", ".", "indexOf", "(", "QUAL_SEP", ")", "!=",...
Returns a fully qualified message key which, when translated by some other bundle, will know to resolve and utilize the supplied bundle to translate this particular key.
[ "Returns", "a", "fully", "qualified", "message", "key", "which", "when", "translated", "by", "some", "other", "bundle", "will", "know", "to", "resolve", "and", "utilize", "the", "supplied", "bundle", "to", "translate", "this", "particular", "key", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/text/MessageUtil.java#L168-L179
Alluxio/alluxio
core/common/src/main/java/alluxio/metrics/Metric.java
Metric.getMetricNameWithTags
public static String getMetricNameWithTags(String name, String... tags) { """ Gets the metric name with the appendix of tags. The returned name is of the pattern name[.tagName:tagValue]*. @param name the metric name @param tags the tag name and tag value pairs @return the name with the tags appended """ ...
java
public static String getMetricNameWithTags(String name, String... tags) { Preconditions.checkArgument(tags.length % 2 == 0, "The tag arguments should be tag name and tag value pairs"); StringBuilder sb = new StringBuilder(); sb.append(name); for (int i = 0; i < tags.length; i += 2) { sb.ap...
[ "public", "static", "String", "getMetricNameWithTags", "(", "String", "name", ",", "String", "...", "tags", ")", "{", "Preconditions", ".", "checkArgument", "(", "tags", ".", "length", "%", "2", "==", "0", ",", "\"The tag arguments should be tag name and tag value p...
Gets the metric name with the appendix of tags. The returned name is of the pattern name[.tagName:tagValue]*. @param name the metric name @param tags the tag name and tag value pairs @return the name with the tags appended
[ "Gets", "the", "metric", "name", "with", "the", "appendix", "of", "tags", ".", "The", "returned", "name", "is", "of", "the", "pattern", "name", "[", ".", "tagName", ":", "tagValue", "]", "*", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/metrics/Metric.java#L205-L214
jcuda/jcufft
JCufftJava/src/main/java/jcuda/jcufft/JCufft.java
JCufft.cufftExecZ2Z
public static int cufftExecZ2Z(cufftHandle plan, Pointer cIdata, Pointer cOdata, int direction) { """ <pre> Executes a CUFFT complex-to-complex transform plan for double precision values. cufftResult cufftExecZ2Z( cufftHandle plan, cufftDoubleComplex *idata, cufftDoubleComplex *odata, int direction ); CUFF...
java
public static int cufftExecZ2Z(cufftHandle plan, Pointer cIdata, Pointer cOdata, int direction) { return checkResult(cufftExecZ2ZNative(plan, cIdata, cOdata, direction)); }
[ "public", "static", "int", "cufftExecZ2Z", "(", "cufftHandle", "plan", ",", "Pointer", "cIdata", ",", "Pointer", "cOdata", ",", "int", "direction", ")", "{", "return", "checkResult", "(", "cufftExecZ2ZNative", "(", "plan", ",", "cIdata", ",", "cOdata", ",", ...
<pre> Executes a CUFFT complex-to-complex transform plan for double precision values. cufftResult cufftExecZ2Z( cufftHandle plan, cufftDoubleComplex *idata, cufftDoubleComplex *odata, int direction ); CUFFT uses as input data the GPU memory pointed to by the idata parameter. This function stores the Fourier coefficie...
[ "<pre", ">", "Executes", "a", "CUFFT", "complex", "-", "to", "-", "complex", "transform", "plan", "for", "double", "precision", "values", "." ]
train
https://github.com/jcuda/jcufft/blob/833c87ffb0864f7ee7270fddef8af57f48939b3a/JCufftJava/src/main/java/jcuda/jcufft/JCufft.java#L1309-L1312
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/CharsetUtil.java
CharsetUtil.convert
public static File convert(File file, Charset srcCharset, Charset destCharset) { """ 转换文件编码<br> 此方法用于转换文件编码,读取的文件实际编码必须与指定的srcCharset编码一致,否则导致乱码 @param file 文件 @param srcCharset 原文件的编码,必须与文件内容的编码保持一致 @param destCharset 转码后的编码 @return 被转换编码的文件 @since 3.1.0 """ final String str = FileUtil.readString(f...
java
public static File convert(File file, Charset srcCharset, Charset destCharset) { final String str = FileUtil.readString(file, srcCharset); return FileUtil.writeString(str, file, destCharset); }
[ "public", "static", "File", "convert", "(", "File", "file", ",", "Charset", "srcCharset", ",", "Charset", "destCharset", ")", "{", "final", "String", "str", "=", "FileUtil", ".", "readString", "(", "file", ",", "srcCharset", ")", ";", "return", "FileUtil", ...
转换文件编码<br> 此方法用于转换文件编码,读取的文件实际编码必须与指定的srcCharset编码一致,否则导致乱码 @param file 文件 @param srcCharset 原文件的编码,必须与文件内容的编码保持一致 @param destCharset 转码后的编码 @return 被转换编码的文件 @since 3.1.0
[ "转换文件编码<br", ">", "此方法用于转换文件编码,读取的文件实际编码必须与指定的srcCharset编码一致,否则导致乱码" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/CharsetUtil.java#L92-L95
thiagokimo/Faker
faker-core/src/main/java/io/kimo/lib/faker/Faker.java
Faker.fillWithNumber
public void fillWithNumber(TextView view, FakerNumericComponent component) { """ Fill a TextView with a specific FakerNumericComponent @param view @param component """ validateNotNullableView(view); validateIfIsATextView(view); validateNotNullableFakerComponent(component); vi...
java
public void fillWithNumber(TextView view, FakerNumericComponent component) { validateNotNullableView(view); validateIfIsATextView(view); validateNotNullableFakerComponent(component); view.setText(String.valueOf(component.randomNumber())); }
[ "public", "void", "fillWithNumber", "(", "TextView", "view", ",", "FakerNumericComponent", "component", ")", "{", "validateNotNullableView", "(", "view", ")", ";", "validateIfIsATextView", "(", "view", ")", ";", "validateNotNullableFakerComponent", "(", "component", "...
Fill a TextView with a specific FakerNumericComponent @param view @param component
[ "Fill", "a", "TextView", "with", "a", "specific", "FakerNumericComponent" ]
train
https://github.com/thiagokimo/Faker/blob/8b0eccd499817a2bc3377db0c6e1b50736d0f034/faker-core/src/main/java/io/kimo/lib/faker/Faker.java#L125-L131
gilberto-torrezan/gwt-views
src/main/java/com/github/gilbertotorrezan/gwtviews/client/URLToken.java
URLToken.getParameter
public String getParameter(String name, String defaultValue) { """ Gets a parameter extracted from the History token. For example, if the token is: <pre>{@code tokenId&param1=value1 }</pre>the call to <code>getParameter("param1", "def")</code> will return <code>value1</code>. @param name The name of the parame...
java
public String getParameter(String name, String defaultValue) { String value = parameters.get(name); if (value == null){ value = defaultValue; } return value; }
[ "public", "String", "getParameter", "(", "String", "name", ",", "String", "defaultValue", ")", "{", "String", "value", "=", "parameters", ".", "get", "(", "name", ")", ";", "if", "(", "value", "==", "null", ")", "{", "value", "=", "defaultValue", ";", ...
Gets a parameter extracted from the History token. For example, if the token is: <pre>{@code tokenId&param1=value1 }</pre>the call to <code>getParameter("param1", "def")</code> will return <code>value1</code>. @param name The name of the parameter @param defaultValue The value to be returned when the parameter value i...
[ "Gets", "a", "parameter", "extracted", "from", "the", "History", "token", ".", "For", "example", "if", "the", "token", "is", ":", "<pre", ">", "{", "@code", "tokenId&param1", "=", "value1", "}", "<", "/", "pre", ">", "the", "call", "to", "<code", ">", ...
train
https://github.com/gilberto-torrezan/gwt-views/blob/c6511435d14b5aa93a722b0e861230d0ae2159e5/src/main/java/com/github/gilbertotorrezan/gwtviews/client/URLToken.java#L201-L207
LMAX-Exchange/disruptor
src/main/java/com/lmax/disruptor/util/Util.java
Util.getMinimumSequence
public static long getMinimumSequence(final Sequence[] sequences, long minimum) { """ Get the minimum sequence from an array of {@link com.lmax.disruptor.Sequence}s. @param sequences to compare. @param minimum an initial default minimum. If the array is empty this value will be returned. @return the small...
java
public static long getMinimumSequence(final Sequence[] sequences, long minimum) { for (int i = 0, n = sequences.length; i < n; i++) { long value = sequences[i].get(); minimum = Math.min(minimum, value); } return minimum; }
[ "public", "static", "long", "getMinimumSequence", "(", "final", "Sequence", "[", "]", "sequences", ",", "long", "minimum", ")", "{", "for", "(", "int", "i", "=", "0", ",", "n", "=", "sequences", ".", "length", ";", "i", "<", "n", ";", "i", "++", ")...
Get the minimum sequence from an array of {@link com.lmax.disruptor.Sequence}s. @param sequences to compare. @param minimum an initial default minimum. If the array is empty this value will be returned. @return the smaller of minimum sequence value found in {@code sequences} and {@code minimum}; {@code minimum} if ...
[ "Get", "the", "minimum", "sequence", "from", "an", "array", "of", "{", "@link", "com", ".", "lmax", ".", "disruptor", ".", "Sequence", "}", "s", "." ]
train
https://github.com/LMAX-Exchange/disruptor/blob/4266d00c5250190313446fdd7c8aa7a4edb5c818/src/main/java/com/lmax/disruptor/util/Util.java#L63-L72
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceClient.java
DataTransferServiceClient.createTransferConfig
public final TransferConfig createTransferConfig(String parent, TransferConfig transferConfig) { """ Creates a new data transfer configuration. <p>Sample code: <pre><code> try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { ParentName parent = ProjectName.of("[P...
java
public final TransferConfig createTransferConfig(String parent, TransferConfig transferConfig) { CreateTransferConfigRequest request = CreateTransferConfigRequest.newBuilder() .setParent(parent) .setTransferConfig(transferConfig) .build(); return createTransferConfig...
[ "public", "final", "TransferConfig", "createTransferConfig", "(", "String", "parent", ",", "TransferConfig", "transferConfig", ")", "{", "CreateTransferConfigRequest", "request", "=", "CreateTransferConfigRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "pa...
Creates a new data transfer configuration. <p>Sample code: <pre><code> try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { ParentName parent = ProjectName.of("[PROJECT]"); TransferConfig transferConfig = TransferConfig.newBuilder().build(); TransferConfig response = dataTr...
[ "Creates", "a", "new", "data", "transfer", "configuration", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceClient.java#L438-L446
igniterealtime/Smack
smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoService.java
OmemoService.publishBundle
static void publishBundle(XMPPConnection connection, OmemoDevice userDevice, OmemoBundleElement bundle) throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException { """ Publish the given OMEMO bundle to the server ...
java
static void publishBundle(XMPPConnection connection, OmemoDevice userDevice, OmemoBundleElement bundle) throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException { PubSubManager pm = PubSubManager.getInstanceFo...
[ "static", "void", "publishBundle", "(", "XMPPConnection", "connection", ",", "OmemoDevice", "userDevice", ",", "OmemoBundleElement", "bundle", ")", "throws", "XMPPException", ".", "XMPPErrorException", ",", "SmackException", ".", "NotConnectedException", ",", "Interrupted...
Publish the given OMEMO bundle to the server using PubSub. @param connection our connection. @param userDevice our device @param bundle the bundle we want to publish @throws XMPPException.XMPPErrorException @throws SmackException.NotConnectedException @throws InterruptedException @throws SmackException.NoResponseExcept...
[ "Publish", "the", "given", "OMEMO", "bundle", "to", "the", "server", "using", "PubSub", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoService.java#L584-L589
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/subdoc/MutateInBuilder.java
MutateInBuilder.arrayAddUnique
public <T> MutateInBuilder arrayAddUnique(String path, T value) { """ Insert a value in an existing array only if the value isn't already contained in the array (by way of string comparison). @param path the path to mutate in the JSON. @param value the value to insert. """ asyncBuilder.arrayAddUni...
java
public <T> MutateInBuilder arrayAddUnique(String path, T value) { asyncBuilder.arrayAddUnique(path, value); return this; }
[ "public", "<", "T", ">", "MutateInBuilder", "arrayAddUnique", "(", "String", "path", ",", "T", "value", ")", "{", "asyncBuilder", ".", "arrayAddUnique", "(", "path", ",", "value", ")", ";", "return", "this", ";", "}" ]
Insert a value in an existing array only if the value isn't already contained in the array (by way of string comparison). @param path the path to mutate in the JSON. @param value the value to insert.
[ "Insert", "a", "value", "in", "an", "existing", "array", "only", "if", "the", "value", "isn", "t", "already", "contained", "in", "the", "array", "(", "by", "way", "of", "string", "comparison", ")", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/subdoc/MutateInBuilder.java#L1018-L1021
bignerdranch/expandable-recycler-view
expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java
ExpandableRecyclerAdapter.notifyChildRangeRemoved
@UiThread public void notifyChildRangeRemoved(int parentPosition, int childPositionStart, int itemCount) { """ Notify any registered observers that the parent located at {@code parentPosition} has {@code itemCount} children that have been removed from the data set, previously located at {@code childPositionS...
java
@UiThread public void notifyChildRangeRemoved(int parentPosition, int childPositionStart, int itemCount) { int flatParentPosition = getFlatParentPosition(parentPosition); ExpandableWrapper<P, C> parentWrapper = mFlatItemList.get(flatParentPosition); parentWrapper.setParent(mParentList.get(pa...
[ "@", "UiThread", "public", "void", "notifyChildRangeRemoved", "(", "int", "parentPosition", ",", "int", "childPositionStart", ",", "int", "itemCount", ")", "{", "int", "flatParentPosition", "=", "getFlatParentPosition", "(", "parentPosition", ")", ";", "ExpandableWrap...
Notify any registered observers that the parent located at {@code parentPosition} has {@code itemCount} children that have been removed from the data set, previously located at {@code childPositionStart} onwards. The child previously located at and after {@code childPositionStart} may now be found at {@code childPositi...
[ "Notify", "any", "registered", "observers", "that", "the", "parent", "located", "at", "{", "@code", "parentPosition", "}", "has", "{", "@code", "itemCount", "}", "children", "that", "have", "been", "removed", "from", "the", "data", "set", "previously", "locate...
train
https://github.com/bignerdranch/expandable-recycler-view/blob/930912510620894c531d236856fa79d646e2f1ed/expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java#L1216-L1228
google/jimfs
jimfs/src/main/java/com/google/common/jimfs/WindowsPathType.java
WindowsPathType.parseUncRoot
private String parseUncRoot(String path, String original) { """ Parse the root of a UNC-style path, throwing an exception if the path does not start with a valid UNC root. """ Matcher uncMatcher = UNC_ROOT.matcher(path); if (uncMatcher.find()) { String host = uncMatcher.group(2); if (host ...
java
private String parseUncRoot(String path, String original) { Matcher uncMatcher = UNC_ROOT.matcher(path); if (uncMatcher.find()) { String host = uncMatcher.group(2); if (host == null) { throw new InvalidPathException(original, "UNC path is missing hostname"); } String share = uncM...
[ "private", "String", "parseUncRoot", "(", "String", "path", ",", "String", "original", ")", "{", "Matcher", "uncMatcher", "=", "UNC_ROOT", ".", "matcher", "(", "path", ")", ";", "if", "(", "uncMatcher", ".", "find", "(", ")", ")", "{", "String", "host", ...
Parse the root of a UNC-style path, throwing an exception if the path does not start with a valid UNC root.
[ "Parse", "the", "root", "of", "a", "UNC", "-", "style", "path", "throwing", "an", "exception", "if", "the", "path", "does", "not", "start", "with", "a", "valid", "UNC", "root", "." ]
train
https://github.com/google/jimfs/blob/3eadff747a3afa7b498030f420d2d04ce700534a/jimfs/src/main/java/com/google/common/jimfs/WindowsPathType.java#L114-L131
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DomainsInner.java
DomainsInner.deleteOwnershipIdentifier
public void deleteOwnershipIdentifier(String resourceGroupName, String domainName, String name) { """ Delete ownership identifier for domain. Delete ownership identifier for domain. @param resourceGroupName Name of the resource group to which the resource belongs. @param domainName Name of domain. @param nam...
java
public void deleteOwnershipIdentifier(String resourceGroupName, String domainName, String name) { deleteOwnershipIdentifierWithServiceResponseAsync(resourceGroupName, domainName, name).toBlocking().single().body(); }
[ "public", "void", "deleteOwnershipIdentifier", "(", "String", "resourceGroupName", ",", "String", "domainName", ",", "String", "name", ")", "{", "deleteOwnershipIdentifierWithServiceResponseAsync", "(", "resourceGroupName", ",", "domainName", ",", "name", ")", ".", "toB...
Delete ownership identifier for domain. Delete ownership identifier for domain. @param resourceGroupName Name of the resource group to which the resource belongs. @param domainName Name of domain. @param name Name of identifier. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudExc...
[ "Delete", "ownership", "identifier", "for", "domain", ".", "Delete", "ownership", "identifier", "for", "domain", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DomainsInner.java#L1624-L1626
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/core/encoding/ConvertYV12.java
ConvertYV12.yu12ToGray
public static GrayU8 yu12ToGray(byte[] data , int width , int height , GrayU8 output ) { """ Converts an YV12 image into a gray scale U8 image. @param data Input: YV12 image data @param width Input: image width @param height Input: image height @param output Output: Optional storage for output image. Can be...
java
public static GrayU8 yu12ToGray(byte[] data , int width , int height , GrayU8 output ) { if( output != null ) { if( output.width != width || output.height != height ) throw new IllegalArgumentException("output width and height must be "+width+" "+height); } else { ...
[ "public", "static", "GrayU8", "yu12ToGray", "(", "byte", "[", "]", "data", ",", "int", "width", ",", "int", "height", ",", "GrayU8", "output", ")", "{", "if", "(", "output", "!=", "null", ")", "{", "if", "(", "output", ".", "width", "!=", "width", ...
Converts an YV12 image into a gray scale U8 image. @param data Input: YV12 image data @param width Input: image width @param height Input: image height @param output Output: Optional storage for output image. Can be null. @return Gray scale image
[ "Converts", "an", "YV12", "image", "into", "a", "gray", "scale", "U8", "image", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/core/encoding/ConvertYV12.java#L110-L125
Javacord/Javacord
javacord-api/src/main/java/org/javacord/api/entity/server/ServerUpdater.java
ServerUpdater.removeRolesFromUser
public ServerUpdater removeRolesFromUser(User user, Collection<Role> roles) { """ Queues a collection of roles to be removed from the user. @param user The server member the roles should be removed from. @param roles The roles which should be removed from the user. @return The current instance in order to cha...
java
public ServerUpdater removeRolesFromUser(User user, Collection<Role> roles) { delegate.removeRolesFromUser(user, roles); return this; }
[ "public", "ServerUpdater", "removeRolesFromUser", "(", "User", "user", ",", "Collection", "<", "Role", ">", "roles", ")", "{", "delegate", ".", "removeRolesFromUser", "(", "user", ",", "roles", ")", ";", "return", "this", ";", "}" ]
Queues a collection of roles to be removed from the user. @param user The server member the roles should be removed from. @param roles The roles which should be removed from the user. @return The current instance in order to chain call methods.
[ "Queues", "a", "collection", "of", "roles", "to", "be", "removed", "from", "the", "user", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-api/src/main/java/org/javacord/api/entity/server/ServerUpdater.java#L503-L506
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/BlockingThreadPoolExecutorService.java
BlockingThreadPoolExecutorService.getNamedThreadFactory
static ThreadFactory getNamedThreadFactory(final String prefix) { """ Returns a {@link java.util.concurrent.ThreadFactory} that names each created thread uniquely, with a common prefix. @param prefix The prefix of every created Thread's name @return a {@link java.util.concurrent.ThreadFactory} that names thr...
java
static ThreadFactory getNamedThreadFactory(final String prefix) { SecurityManager s = System.getSecurityManager(); final ThreadGroup threadGroup = (s != null) ? s.getThreadGroup() : Thread.currentThread().getThreadGroup(); return new ThreadFactory() { private final AtomicInteger threadNumber ...
[ "static", "ThreadFactory", "getNamedThreadFactory", "(", "final", "String", "prefix", ")", "{", "SecurityManager", "s", "=", "System", ".", "getSecurityManager", "(", ")", ";", "final", "ThreadGroup", "threadGroup", "=", "(", "s", "!=", "null", ")", "?", "s", ...
Returns a {@link java.util.concurrent.ThreadFactory} that names each created thread uniquely, with a common prefix. @param prefix The prefix of every created Thread's name @return a {@link java.util.concurrent.ThreadFactory} that names threads
[ "Returns", "a", "{", "@link", "java", ".", "util", ".", "concurrent", ".", "ThreadFactory", "}", "that", "names", "each", "created", "thread", "uniquely", "with", "a", "common", "prefix", "." ]
train
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/BlockingThreadPoolExecutorService.java#L63-L80
elki-project/elki
elki-core/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/AbstractStaticHistogram.java
AbstractStaticHistogram.growSize
protected static int growSize(int current, int requiredSize) { """ Compute the size to grow to. @param current Current size @param requiredSize Required size @return Size to allocate """ // Double until 64, then increase by 50% each time. int newCapacity = ((current < 64) ? ((current + 1) << 1) : ...
java
protected static int growSize(int current, int requiredSize) { // Double until 64, then increase by 50% each time. int newCapacity = ((current < 64) ? ((current + 1) << 1) : ((current >> 1) * 3)); // overflow? if (newCapacity < 0) { throw new OutOfMemoryError(); } if (requiredSize > newCap...
[ "protected", "static", "int", "growSize", "(", "int", "current", ",", "int", "requiredSize", ")", "{", "// Double until 64, then increase by 50% each time.", "int", "newCapacity", "=", "(", "(", "current", "<", "64", ")", "?", "(", "(", "current", "+", "1", ")...
Compute the size to grow to. @param current Current size @param requiredSize Required size @return Size to allocate
[ "Compute", "the", "size", "to", "grow", "to", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/AbstractStaticHistogram.java#L98-L109
defei/codelogger-utils
src/main/java/org/codelogger/utils/RangeUtils.java
RangeUtils.getDateRanges
public static List<Range<Date>> getDateRanges(Date from, Date to, final Period periodGranulation) throws InvalidRangeException { """ Returns Range&lt;Date&gt; list between given date from and date to by period granulation. @param from the range from. @param to the range to. @param periodGranulation the...
java
public static List<Range<Date>> getDateRanges(Date from, Date to, final Period periodGranulation) throws InvalidRangeException { if (from.after(to)) { throw buildInvalidRangeException(from, to); } if (periodGranulation == Period.SINGLE) { @SuppressWarnings("unchecked") ArrayList<Range<Dat...
[ "public", "static", "List", "<", "Range", "<", "Date", ">", ">", "getDateRanges", "(", "Date", "from", ",", "Date", "to", ",", "final", "Period", "periodGranulation", ")", "throws", "InvalidRangeException", "{", "if", "(", "from", ".", "after", "(", "to", ...
Returns Range&lt;Date&gt; list between given date from and date to by period granulation. @param from the range from. @param to the range to. @param periodGranulation the range granulation. @return Range&lt;Date&gt; list between given date from and date to by period granulation.
[ "Returns", "Range&lt", ";", "Date&gt", ";", "list", "between", "given", "date", "from", "and", "date", "to", "by", "period", "granulation", "." ]
train
https://github.com/defei/codelogger-utils/blob/d906f5d217b783c7ae3e53442cd6fb87b20ecc0a/src/main/java/org/codelogger/utils/RangeUtils.java#L37-L71
brettonw/Bag
src/main/java/com/brettonw/bag/Bag.java
Bag.getDouble
public Double getDouble (String key, Supplier<Double> notFound) { """ Retrieve a mapped element and return it as a Double. @param key A string value used to index the element. @param notFound A function to create a new Double if the requested key was not found @return The element as a Double, or notFound if t...
java
public Double getDouble (String key, Supplier<Double> notFound) { return getParsed (key, Double::new, notFound); }
[ "public", "Double", "getDouble", "(", "String", "key", ",", "Supplier", "<", "Double", ">", "notFound", ")", "{", "return", "getParsed", "(", "key", ",", "Double", "::", "new", ",", "notFound", ")", ";", "}" ]
Retrieve a mapped element and return it as a Double. @param key A string value used to index the element. @param notFound A function to create a new Double if the requested key was not found @return The element as a Double, or notFound if the element is not found.
[ "Retrieve", "a", "mapped", "element", "and", "return", "it", "as", "a", "Double", "." ]
train
https://github.com/brettonw/Bag/blob/25c0ff74893b6c9a2c61bf0f97189ab82e0b2f56/src/main/java/com/brettonw/bag/Bag.java#L229-L231
dwdyer/reportng
reportng/src/java/main/org/uncommons/reportng/HTMLReporter.java
HTMLReporter.createFrameset
private void createFrameset(File outputDirectory) throws Exception { """ Create the index file that sets up the frameset. @param outputDirectory The target directory for the generated file(s). """ VelocityContext context = createContext(); generateFile(new File(outputDirectory, INDEX_FILE), ...
java
private void createFrameset(File outputDirectory) throws Exception { VelocityContext context = createContext(); generateFile(new File(outputDirectory, INDEX_FILE), INDEX_FILE + TEMPLATE_EXTENSION, context); }
[ "private", "void", "createFrameset", "(", "File", "outputDirectory", ")", "throws", "Exception", "{", "VelocityContext", "context", "=", "createContext", "(", ")", ";", "generateFile", "(", "new", "File", "(", "outputDirectory", ",", "INDEX_FILE", ")", ",", "IND...
Create the index file that sets up the frameset. @param outputDirectory The target directory for the generated file(s).
[ "Create", "the", "index", "file", "that", "sets", "up", "the", "frameset", "." ]
train
https://github.com/dwdyer/reportng/blob/df11f9cd9ab3fb5847fbba94ed3098ae0448f770/reportng/src/java/main/org/uncommons/reportng/HTMLReporter.java#L126-L132
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_mailingList_mailingListAddress_GET
public OvhMailingList organizationName_service_exchangeService_mailingList_mailingListAddress_GET(String organizationName, String exchangeService, String mailingListAddress) throws IOException { """ Get this object properties REST: GET /email/exchange/{organizationName}/service/{exchangeService}/mailingList/{ma...
java
public OvhMailingList organizationName_service_exchangeService_mailingList_mailingListAddress_GET(String organizationName, String exchangeService, String mailingListAddress) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/mailingList/{mailingListAddress}"; StringBui...
[ "public", "OvhMailingList", "organizationName_service_exchangeService_mailingList_mailingListAddress_GET", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "String", "mailingListAddress", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/em...
Get this object properties REST: GET /email/exchange/{organizationName}/service/{exchangeService}/mailingList/{mailingListAddress} @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] The internal name of your exchange service @param mailingListAddress [r...
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L1324-L1329
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
ResourceGroovyMethods.eachDirRecurse
public static void eachDirRecurse(final File self, @ClosureParams(value = SimpleType.class, options = "java.io.File") final Closure closure) throws FileNotFoundException, IllegalArgumentException { """ Recursively processes each descendant subdirectory in this directory. Processing consists of calling <code>closu...
java
public static void eachDirRecurse(final File self, @ClosureParams(value = SimpleType.class, options = "java.io.File") final Closure closure) throws FileNotFoundException, IllegalArgumentException { eachFileRecurse(self, FileType.DIRECTORIES, closure); }
[ "public", "static", "void", "eachDirRecurse", "(", "final", "File", "self", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"java.io.File\"", ")", "final", "Closure", "closure", ")", "throws", "FileNotFoundExcepti...
Recursively processes each descendant subdirectory in this directory. Processing consists of calling <code>closure</code> passing it the current subdirectory and then recursively processing that subdirectory. Regular files are ignored during traversal. @param self a File (that happens to be a folder/directory) @par...
[ "Recursively", "processes", "each", "descendant", "subdirectory", "in", "this", "directory", ".", "Processing", "consists", "of", "calling", "<code", ">", "closure<", "/", "code", ">", "passing", "it", "the", "current", "subdirectory", "and", "then", "recursively"...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L1500-L1502
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_CellContext.java
AT_CellContext.setPaddingTopBottom
public AT_CellContext setPaddingTopBottom(int paddingTop, int paddingBottom) { """ Sets top and bottom padding (only if both values are not smaller than 0). @param paddingTop new top padding, ignored if smaller than 0 @param paddingBottom new bottom padding, ignored if smaller than 0 @return this to allow chain...
java
public AT_CellContext setPaddingTopBottom(int paddingTop, int paddingBottom){ if(paddingTop>-1 && paddingBottom>-1){ this.paddingTop = paddingTop; this.paddingBottom = paddingBottom; } return this; }
[ "public", "AT_CellContext", "setPaddingTopBottom", "(", "int", "paddingTop", ",", "int", "paddingBottom", ")", "{", "if", "(", "paddingTop", ">", "-", "1", "&&", "paddingBottom", ">", "-", "1", ")", "{", "this", ".", "paddingTop", "=", "paddingTop", ";", "...
Sets top and bottom padding (only if both values are not smaller than 0). @param paddingTop new top padding, ignored if smaller than 0 @param paddingBottom new bottom padding, ignored if smaller than 0 @return this to allow chaining
[ "Sets", "top", "and", "bottom", "padding", "(", "only", "if", "both", "values", "are", "not", "smaller", "than", "0", ")", "." ]
train
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_CellContext.java#L340-L346
samskivert/samskivert
src/main/java/com/samskivert/util/Config.java
Config.getSubProperties
public void getSubProperties (String prefix, Properties target) { """ Fills into the supplied properties object all configuration values that start with the supplied prefix (plus a trailing "." which will be added if it doesn't already exist). The keys in the sub-properties will have had the prefix stripped off....
java
public void getSubProperties (String prefix, Properties target) { // slap a trailing dot on if necessary if (!prefix.endsWith(".")) { prefix = prefix + "."; } // build the sub-properties for (Iterator<String> iter = keys(); iter.hasNext(); ) { String ...
[ "public", "void", "getSubProperties", "(", "String", "prefix", ",", "Properties", "target", ")", "{", "// slap a trailing dot on if necessary", "if", "(", "!", "prefix", ".", "endsWith", "(", "\".\"", ")", ")", "{", "prefix", "=", "prefix", "+", "\".\"", ";", ...
Fills into the supplied properties object all configuration values that start with the supplied prefix (plus a trailing "." which will be added if it doesn't already exist). The keys in the sub-properties will have had the prefix stripped off.
[ "Fills", "into", "the", "supplied", "properties", "object", "all", "configuration", "values", "that", "start", "with", "the", "supplied", "prefix", "(", "plus", "a", "trailing", ".", "which", "will", "be", "added", "if", "it", "doesn", "t", "already", "exist...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/Config.java#L359-L378
ocelotds/ocelot
ocelot-web/src/main/java/org/ocelotds/topic/messageControl/MessageControllerManager.java
MessageControllerManager.getJsTopicMessageControllerFromIterable
JsTopicMessageController getJsTopicMessageControllerFromIterable(String topic, Iterable<JsTopicMessageController<?>> controllers) { """ without jdk8, @Repeatable doesn't work, so we use @JsTopicControls annotation and parse it @param topic @param controllers @return """ if(null == controllers || null == t...
java
JsTopicMessageController getJsTopicMessageControllerFromIterable(String topic, Iterable<JsTopicMessageController<?>> controllers) { if(null == controllers || null == topic) { return null; } for (JsTopicMessageController<?> jsTopicMessageController : controllers) { JsTopicControls jsTopicControls = jsTopicCo...
[ "JsTopicMessageController", "getJsTopicMessageControllerFromIterable", "(", "String", "topic", ",", "Iterable", "<", "JsTopicMessageController", "<", "?", ">", ">", "controllers", ")", "{", "if", "(", "null", "==", "controllers", "||", "null", "==", "topic", ")", ...
without jdk8, @Repeatable doesn't work, so we use @JsTopicControls annotation and parse it @param topic @param controllers @return
[ "without", "jdk8" ]
train
https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-web/src/main/java/org/ocelotds/topic/messageControl/MessageControllerManager.java#L93-L110
lucee/Lucee
core/src/main/java/lucee/commons/io/ini/IniFile.java
IniFile.setKeyValue
public void setKeyValue(String strSection, String key, String value) { """ Sets the KeyValue attribute of the IniFile object @param strSection the section to set @param key the key of the new value @param value the value to set """ Map section = getSectionEL(strSection); if (section == null) { sect...
java
public void setKeyValue(String strSection, String key, String value) { Map section = getSectionEL(strSection); if (section == null) { section = newMap(); sections.put(strSection.toLowerCase(), section); } section.put(key.toLowerCase(), value); }
[ "public", "void", "setKeyValue", "(", "String", "strSection", ",", "String", "key", ",", "String", "value", ")", "{", "Map", "section", "=", "getSectionEL", "(", "strSection", ")", ";", "if", "(", "section", "==", "null", ")", "{", "section", "=", "newMa...
Sets the KeyValue attribute of the IniFile object @param strSection the section to set @param key the key of the new value @param value the value to set
[ "Sets", "the", "KeyValue", "attribute", "of", "the", "IniFile", "object" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/ini/IniFile.java#L80-L87
dnsjava/dnsjava
org/xbill/DNS/DNSOutput.java
DNSOutput.writeU16At
public void writeU16At(int val, int where) { """ Writes an unsigned 16 bit value to the specified position in the stream. @param val The value to be written @param where The position to write the value. """ check(val, 16); if (where > pos - 2) throw new IllegalArgumentException("cannot write past " + ...
java
public void writeU16At(int val, int where) { check(val, 16); if (where > pos - 2) throw new IllegalArgumentException("cannot write past " + "end of data"); array[where++] = (byte)((val >>> 8) & 0xFF); array[where++] = (byte)(val & 0xFF); }
[ "public", "void", "writeU16At", "(", "int", "val", ",", "int", "where", ")", "{", "check", "(", "val", ",", "16", ")", ";", "if", "(", "where", ">", "pos", "-", "2", ")", "throw", "new", "IllegalArgumentException", "(", "\"cannot write past \"", "+", "...
Writes an unsigned 16 bit value to the specified position in the stream. @param val The value to be written @param where The position to write the value.
[ "Writes", "an", "unsigned", "16", "bit", "value", "to", "the", "specified", "position", "in", "the", "stream", "." ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/DNSOutput.java#L132-L140
UrielCh/ovh-java-sdk
ovh-java-sdk-emailmxplan/src/main/java/net/minidev/ovh/api/ApiOvhEmailmxplan.java
ApiOvhEmailmxplan.service_domain_domainName_disclaimer_DELETE
public OvhTask service_domain_domainName_disclaimer_DELETE(String service, String domainName) throws IOException { """ Delete existing organization disclaimer REST: DELETE /email/mxplan/{service}/domain/{domainName}/disclaimer @param service [required] The internal name of your mxplan organization @param doma...
java
public OvhTask service_domain_domainName_disclaimer_DELETE(String service, String domainName) throws IOException { String qPath = "/email/mxplan/{service}/domain/{domainName}/disclaimer"; StringBuilder sb = path(qPath, service, domainName); String resp = exec(qPath, "DELETE", sb.toString(), null); return conver...
[ "public", "OvhTask", "service_domain_domainName_disclaimer_DELETE", "(", "String", "service", ",", "String", "domainName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/mxplan/{service}/domain/{domainName}/disclaimer\"", ";", "StringBuilder", "sb", "=",...
Delete existing organization disclaimer REST: DELETE /email/mxplan/{service}/domain/{domainName}/disclaimer @param service [required] The internal name of your mxplan organization @param domainName [required] Domain name API beta
[ "Delete", "existing", "organization", "disclaimer" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailmxplan/src/main/java/net/minidev/ovh/api/ApiOvhEmailmxplan.java#L721-L726
Bearded-Hen/Android-Bootstrap
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/TypefaceProvider.java
TypefaceProvider.getTypeface
public static Typeface getTypeface(Context context, IconSet iconSet) { """ Returns a reference to the requested typeface, creating a new instance if none already exists @param context the current context @param iconSet the icon typeface @return a reference to the typeface instance """ String path ...
java
public static Typeface getTypeface(Context context, IconSet iconSet) { String path = iconSet.fontPath().toString(); if (TYPEFACE_MAP.get(path) == null) { final Typeface font = Typeface.createFromAsset(context.getAssets(), path); TYPEFACE_MAP.put(path, font); } re...
[ "public", "static", "Typeface", "getTypeface", "(", "Context", "context", ",", "IconSet", "iconSet", ")", "{", "String", "path", "=", "iconSet", ".", "fontPath", "(", ")", ".", "toString", "(", ")", ";", "if", "(", "TYPEFACE_MAP", ".", "get", "(", "path"...
Returns a reference to the requested typeface, creating a new instance if none already exists @param context the current context @param iconSet the icon typeface @return a reference to the typeface instance
[ "Returns", "a", "reference", "to", "the", "requested", "typeface", "creating", "a", "new", "instance", "if", "none", "already", "exists" ]
train
https://github.com/Bearded-Hen/Android-Bootstrap/blob/b3d62cc1847e26d420c53c92665a4fe1e6ee7ecf/AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/TypefaceProvider.java#L31-L39
codelibs/fess
src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java
FessMessages.addConstraintsScriptAssertMessage
public FessMessages addConstraintsScriptAssertMessage(String property, String script) { """ Add the created action message for the key 'constraints.ScriptAssert.message' with parameters. <pre> message: script expression "{script}" didn't evaluate to true. </pre> @param property The property name for the messag...
java
public FessMessages addConstraintsScriptAssertMessage(String property, String script) { assertPropertyNotNull(property); add(property, new UserMessage(CONSTRAINTS_ScriptAssert_MESSAGE, script)); return this; }
[ "public", "FessMessages", "addConstraintsScriptAssertMessage", "(", "String", "property", ",", "String", "script", ")", "{", "assertPropertyNotNull", "(", "property", ")", ";", "add", "(", "property", ",", "new", "UserMessage", "(", "CONSTRAINTS_ScriptAssert_MESSAGE", ...
Add the created action message for the key 'constraints.ScriptAssert.message' with parameters. <pre> message: script expression "{script}" didn't evaluate to true. </pre> @param property The property name for the message. (NotNull) @param script The parameter script for message. (NotNull) @return this. (NotNull)
[ "Add", "the", "created", "action", "message", "for", "the", "key", "constraints", ".", "ScriptAssert", ".", "message", "with", "parameters", ".", "<pre", ">", "message", ":", "script", "expression", "{", "script", "}", "didn", "t", "evaluate", "to", "true", ...
train
https://github.com/codelibs/fess/blob/e5e4b722549d32a4958dfd94965b21937bfe64cf/src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java#L993-L997
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/Validate.java
Validate.validIndex
public static <T> T[] validIndex(final T[] array, final int index, final String message, final Object... values) { """ <p>Validates that the index is within the bounds of the argument array; otherwise throwing an exception with the specified message.</p> <pre>Validate.validIndex(myArray, 2, "The array index is...
java
public static <T> T[] validIndex(final T[] array, final int index, final String message, final Object... values) { Validate.notNull(array); if (index < 0 || index >= array.length) { throw new IndexOutOfBoundsException(StringUtils.simpleFormat(message, values)); } return array...
[ "public", "static", "<", "T", ">", "T", "[", "]", "validIndex", "(", "final", "T", "[", "]", "array", ",", "final", "int", "index", ",", "final", "String", "message", ",", "final", "Object", "...", "values", ")", "{", "Validate", ".", "notNull", "(",...
<p>Validates that the index is within the bounds of the argument array; otherwise throwing an exception with the specified message.</p> <pre>Validate.validIndex(myArray, 2, "The array index is invalid: ");</pre> <p>If the array is {@code null}, then the message of the exception is &quot;The validated object is null&q...
[ "<p", ">", "Validates", "that", "the", "index", "is", "within", "the", "bounds", "of", "the", "argument", "array", ";", "otherwise", "throwing", "an", "exception", "with", "the", "specified", "message", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/Validate.java#L637-L643
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/properties/JSONHelpers.java
JSONHelpers.putDefault
public static <P extends Enum<P>> JSONObject putDefault(JSONObject json, P e, PointF defPoint) { """ Checks the supplied {@link JSONObject} for a value mapped by an enum; if it does not exist, or is not an object value, the specified default value will be mapped to the enum. If the value does exist, but either ...
java
public static <P extends Enum<P>> JSONObject putDefault(JSONObject json, P e, PointF defPoint) { return putDefault(json, e, defPoint, true); }
[ "public", "static", "<", "P", "extends", "Enum", "<", "P", ">", ">", "JSONObject", "putDefault", "(", "JSONObject", "json", ",", "P", "e", ",", "PointF", "defPoint", ")", "{", "return", "putDefault", "(", "json", ",", "e", ",", "defPoint", ",", "true",...
Checks the supplied {@link JSONObject} for a value mapped by an enum; if it does not exist, or is not an object value, the specified default value will be mapped to the enum. If the value does exist, but either 'x' or 'y' field is missing, the missing field(s) will be set using {@code defPoint}. However, if the value...
[ "Checks", "the", "supplied", "{", "@link", "JSONObject", "}", "for", "a", "value", "mapped", "by", "an", "enum", ";", "if", "it", "does", "not", "exist", "or", "is", "not", "an", "object", "value", "the", "specified", "default", "value", "will", "be", ...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/properties/JSONHelpers.java#L645-L647
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java
MessageFormat.readObject
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { """ Custom deserialization, new in ICU 4.8. See comments on writeObject(). @throws InvalidObjectException if the objects read from the stream is invalid. """ in.defaultReadObject(); // ICU 4.8 custom des...
java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); // ICU 4.8 custom deserialization. String languageTag = (String)in.readObject(); ulocale = ULocale.forLanguageTag(languageTag); MessagePattern.ApostropheMode aposMod...
[ "private", "void", "readObject", "(", "ObjectInputStream", "in", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "in", ".", "defaultReadObject", "(", ")", ";", "// ICU 4.8 custom deserialization.", "String", "languageTag", "=", "(", "String", ")", ...
Custom deserialization, new in ICU 4.8. See comments on writeObject(). @throws InvalidObjectException if the objects read from the stream is invalid.
[ "Custom", "deserialization", "new", "in", "ICU", "4", ".", "8", ".", "See", "comments", "on", "writeObject", "()", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java#L2328-L2352
tango-controls/JTango
server/src/main/java/org/tango/server/device/DeviceManager.java
DeviceManager.pushPipeEvent
public void pushPipeEvent(final String pipeName, final PipeValue blob) throws DevFailed { """ Push a PIPE EVENT event if some client had registered it @param pipeName The pipe name @param blob The pipe data @throws DevFailed """ // set attribute value final PipeImpl pipe = DeviceImpl.g...
java
public void pushPipeEvent(final String pipeName, final PipeValue blob) throws DevFailed { // set attribute value final PipeImpl pipe = DeviceImpl.getPipe(pipeName, device.getPipeList()); try { pipe.updateValue(blob); // push the event EventManager.getInstance(...
[ "public", "void", "pushPipeEvent", "(", "final", "String", "pipeName", ",", "final", "PipeValue", "blob", ")", "throws", "DevFailed", "{", "// set attribute value", "final", "PipeImpl", "pipe", "=", "DeviceImpl", ".", "getPipe", "(", "pipeName", ",", "device", "...
Push a PIPE EVENT event if some client had registered it @param pipeName The pipe name @param blob The pipe data @throws DevFailed
[ "Push", "a", "PIPE", "EVENT", "event", "if", "some", "client", "had", "registered", "it" ]
train
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/device/DeviceManager.java#L307-L317
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/types/Type.java
Type.convertToTypeJDBC
public Object convertToTypeJDBC(SessionInterface session, Object a, Type type) { """ Convert type for JDBC. Same as convertToType, but supports non-standard SQL conversions supported by JDBC """ return convertToType(session, a, type); }
java
public Object convertToTypeJDBC(SessionInterface session, Object a, Type type) { return convertToType(session, a, type); }
[ "public", "Object", "convertToTypeJDBC", "(", "SessionInterface", "session", ",", "Object", "a", ",", "Type", "type", ")", "{", "return", "convertToType", "(", "session", ",", "a", ",", "type", ")", ";", "}" ]
Convert type for JDBC. Same as convertToType, but supports non-standard SQL conversions supported by JDBC
[ "Convert", "type", "for", "JDBC", ".", "Same", "as", "convertToType", "but", "supports", "non", "-", "standard", "SQL", "conversions", "supported", "by", "JDBC" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/types/Type.java#L269-L272
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/ui/CmsCategoriesTab.java
CmsCategoriesTab.fillContent
public void fillContent(List<CmsCategoryTreeEntry> categoryRoot, List<String> selected) { """ Fill the content of the categories tab panel.<p> @param categoryRoot the category tree root entry @param selected the selected categories """ setInitOpen(true); updateContentTree(categoryRoot, se...
java
public void fillContent(List<CmsCategoryTreeEntry> categoryRoot, List<String> selected) { setInitOpen(true); updateContentTree(categoryRoot, selected); }
[ "public", "void", "fillContent", "(", "List", "<", "CmsCategoryTreeEntry", ">", "categoryRoot", ",", "List", "<", "String", ">", "selected", ")", "{", "setInitOpen", "(", "true", ")", ";", "updateContentTree", "(", "categoryRoot", ",", "selected", ")", ";", ...
Fill the content of the categories tab panel.<p> @param categoryRoot the category tree root entry @param selected the selected categories
[ "Fill", "the", "content", "of", "the", "categories", "tab", "panel", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/ui/CmsCategoriesTab.java#L127-L132
WolfgangFahl/Mediawiki-Japi
src/main/java/com/bitplan/mediawiki/japi/user/WikiUser.java
WikiUser.getInput
public static String getInput(String name, BufferedReader br) throws IOException { """ get input from standard in @param name @param br - the buffered reader to read from @return the input returned @throws IOException """ // prompt the user to enter the given name System.out.print("Please ...
java
public static String getInput(String name, BufferedReader br) throws IOException { // prompt the user to enter the given name System.out.print("Please Enter " + name + ": "); String value = br.readLine(); return value; }
[ "public", "static", "String", "getInput", "(", "String", "name", ",", "BufferedReader", "br", ")", "throws", "IOException", "{", "// prompt the user to enter the given name", "System", ".", "out", ".", "print", "(", "\"Please Enter \"", "+", "name", "+", "\": \"", ...
get input from standard in @param name @param br - the buffered reader to read from @return the input returned @throws IOException
[ "get", "input", "from", "standard", "in" ]
train
https://github.com/WolfgangFahl/Mediawiki-Japi/blob/78d0177ebfe02eb05da5550839727861f1e888a5/src/main/java/com/bitplan/mediawiki/japi/user/WikiUser.java#L76-L83
henkexbg/gallery-api
src/main/java/com/github/henkexbg/gallery/controller/GalleryController.java
GalleryController.getVideo
@RequestMapping(value = "/video/ { """ Requests a video of a certain format. @param request Spring request @param servletRequest Servlet request @param conversionFormat Video format @return The image as a stream with the appropriate response headers set or a not-modified response, (see {@link #returnR...
java
@RequestMapping(value = "/video/{conversionFormat}/**", method = RequestMethod.GET) public ResponseEntity<InputStreamResource> getVideo(WebRequest request, HttpServletRequest servletRequest, @PathVariable(value = "conversionFormat") String conversionFormat) th...
[ "@", "RequestMapping", "(", "value", "=", "\"/video/{conversionFormat}/**\"", ",", "method", "=", "RequestMethod", ".", "GET", ")", "public", "ResponseEntity", "<", "InputStreamResource", ">", "getVideo", "(", "WebRequest", "request", ",", "HttpServletRequest", "servl...
Requests a video of a certain format. @param request Spring request @param servletRequest Servlet request @param conversionFormat Video format @return The image as a stream with the appropriate response headers set or a not-modified response, (see {@link #returnResource(WebRequest, GalleryFile)}). @throws IOExceptio...
[ "Requests", "a", "video", "of", "a", "certain", "format", "." ]
train
https://github.com/henkexbg/gallery-api/blob/530e68c225b5e8fc3b608d670b34bd539a5b0a71/src/main/java/com/github/henkexbg/gallery/controller/GalleryController.java#L279-L302
datumbox/datumbox-framework
datumbox-framework-common/src/main/java/com/datumbox/framework/common/concurrency/ForkJoinStream.java
ForkJoinStream.forEach
public <T> void forEach(Stream<T> stream, Consumer<? super T> action) { """ Executes forEach on the provided stream. If the Stream is parallel, it is executed using the custom pool, else it is executed directly from the main thread. @param <T> @param stream @param action """ Runnable runnable = ...
java
public <T> void forEach(Stream<T> stream, Consumer<? super T> action) { Runnable runnable = () -> stream.forEach(action); ThreadMethods.forkJoinExecution(runnable, concurrencyConfiguration, stream.isParallel()); }
[ "public", "<", "T", ">", "void", "forEach", "(", "Stream", "<", "T", ">", "stream", ",", "Consumer", "<", "?", "super", "T", ">", "action", ")", "{", "Runnable", "runnable", "=", "(", ")", "->", "stream", ".", "forEach", "(", "action", ")", ";", ...
Executes forEach on the provided stream. If the Stream is parallel, it is executed using the custom pool, else it is executed directly from the main thread. @param <T> @param stream @param action
[ "Executes", "forEach", "on", "the", "provided", "stream", ".", "If", "the", "Stream", "is", "parallel", "it", "is", "executed", "using", "the", "custom", "pool", "else", "it", "is", "executed", "directly", "from", "the", "main", "thread", "." ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-common/src/main/java/com/datumbox/framework/common/concurrency/ForkJoinStream.java#L54-L57
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/util/GraphSerialization.java
GraphSerialization.saveGraph
public static void saveGraph(DirectedGraph<Integer, DefaultEdge> graph, File file) throws IOException { """ Serializes the given {@link DirectedGraph} object to the given location. @param graph Must not be {@code null}. @param file Must not be {@code null} and valid {@link File}. @throws IOException Thrown if...
java
public static void saveGraph(DirectedGraph<Integer, DefaultEdge> graph, File file) throws IOException { SerializableDirectedGraph serialGraph = new SerializableDirectedGraph(graph); BufferedOutputStream fos; ObjectOutputStream out; fos = new BufferedOutputStream(new FileOutputStream(file)); out = new ObjectOu...
[ "public", "static", "void", "saveGraph", "(", "DirectedGraph", "<", "Integer", ",", "DefaultEdge", ">", "graph", ",", "File", "file", ")", "throws", "IOException", "{", "SerializableDirectedGraph", "serialGraph", "=", "new", "SerializableDirectedGraph", "(", "graph"...
Serializes the given {@link DirectedGraph} object to the given location. @param graph Must not be {@code null}. @param file Must not be {@code null} and valid {@link File}. @throws IOException Thrown if errors occurred on the IO level.
[ "Serializes", "the", "given", "{", "@link", "DirectedGraph", "}", "object", "to", "the", "given", "location", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/util/GraphSerialization.java#L68-L77
cesarferreira/AndroidQuickUtils
library/src/main/java/quickutils/core/cache/image/AbstractCache.java
AbstractCache.put
public synchronized ValT put(KeyT key, ValT value) { """ Writes an element to the cache. NOTE: If disk caching is enabled, this will write through to the disk, which may introduce a performance penalty. """ if (isDiskCacheEnabled) { cacheToDisk(key, value); } return cache....
java
public synchronized ValT put(KeyT key, ValT value) { if (isDiskCacheEnabled) { cacheToDisk(key, value); } return cache.put(key, value); }
[ "public", "synchronized", "ValT", "put", "(", "KeyT", "key", ",", "ValT", "value", ")", "{", "if", "(", "isDiskCacheEnabled", ")", "{", "cacheToDisk", "(", "key", ",", "value", ")", ";", "}", "return", "cache", ".", "put", "(", "key", ",", "value", "...
Writes an element to the cache. NOTE: If disk caching is enabled, this will write through to the disk, which may introduce a performance penalty.
[ "Writes", "an", "element", "to", "the", "cache", ".", "NOTE", ":", "If", "disk", "caching", "is", "enabled", "this", "will", "write", "through", "to", "the", "disk", "which", "may", "introduce", "a", "performance", "penalty", "." ]
train
https://github.com/cesarferreira/AndroidQuickUtils/blob/73a91daedbb9f7be7986ea786fbc441c9e5a881c/library/src/main/java/quickutils/core/cache/image/AbstractCache.java#L303-L309