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
http-builder-ng/http-builder-ng
http-builder-ng-core/src/main/java/groovyx/net/http/HttpBuilder.java
HttpBuilder.patchAsync
public CompletableFuture<Object> patchAsync(final Consumer<HttpConfig> configuration) { """ Executes an asynchronous PATCH request on the configured URI (asynchronous alias to `patch(Consumer)`), with additional configuration provided by the configuration function. This method is generally used for Java-specif...
java
public CompletableFuture<Object> patchAsync(final Consumer<HttpConfig> configuration) { return CompletableFuture.supplyAsync(() -> patch(configuration), getExecutor()); }
[ "public", "CompletableFuture", "<", "Object", ">", "patchAsync", "(", "final", "Consumer", "<", "HttpConfig", ">", "configuration", ")", "{", "return", "CompletableFuture", ".", "supplyAsync", "(", "(", ")", "->", "patch", "(", "configuration", ")", ",", "getE...
Executes an asynchronous PATCH request on the configured URI (asynchronous alias to `patch(Consumer)`), with additional configuration provided by the configuration function. This method is generally used for Java-specific configuration. [source,java] ---- HttpBuilder http = HttpBuilder.configure(config -> { config.ge...
[ "Executes", "an", "asynchronous", "PATCH", "request", "on", "the", "configured", "URI", "(", "asynchronous", "alias", "to", "patch", "(", "Consumer", ")", ")", "with", "additional", "configuration", "provided", "by", "the", "configuration", "function", "." ]
train
https://github.com/http-builder-ng/http-builder-ng/blob/865f37732c102c748d3db8b905199dac9222a525/http-builder-ng-core/src/main/java/groovyx/net/http/HttpBuilder.java#L1691-L1693
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java
CustomerAccountUrl.setPasswordChangeRequiredUrl
public static MozuUrl setPasswordChangeRequiredUrl(Integer accountId, String userId) { """ Get Resource Url for SetPasswordChangeRequired @param accountId Unique identifier of the customer account. @param userId Unique identifier of the user whose tenant scopes you want to retrieve. @return String Resource Ur...
java
public static MozuUrl setPasswordChangeRequiredUrl(Integer accountId, String userId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/Set-Password-Change-Required?userId={userId}"); formatter.formatUrl("accountId", accountId); formatter.formatUrl("userId", userId); ...
[ "public", "static", "MozuUrl", "setPasswordChangeRequiredUrl", "(", "Integer", "accountId", ",", "String", "userId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/customer/accounts/{accountId}/Set-Password-Change-Required?userId={userId}...
Get Resource Url for SetPasswordChangeRequired @param accountId Unique identifier of the customer account. @param userId Unique identifier of the user whose tenant scopes you want to retrieve. @return String Resource Url
[ "Get", "Resource", "Url", "for", "SetPasswordChangeRequired" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java#L150-L156
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/rectify/RectifyFundamental.java
RectifyFundamental.translateToOrigin
private SimpleMatrix translateToOrigin( int x0 , int y0 ) { """ Create a transform which will move the specified point to the origin """ SimpleMatrix T = SimpleMatrix.identity(3); T.set(0, 2, -x0); T.set(1, 2, -y0); return T; }
java
private SimpleMatrix translateToOrigin( int x0 , int y0 ) { SimpleMatrix T = SimpleMatrix.identity(3); T.set(0, 2, -x0); T.set(1, 2, -y0); return T; }
[ "private", "SimpleMatrix", "translateToOrigin", "(", "int", "x0", ",", "int", "y0", ")", "{", "SimpleMatrix", "T", "=", "SimpleMatrix", ".", "identity", "(", "3", ")", ";", "T", ".", "set", "(", "0", ",", "2", ",", "-", "x0", ")", ";", "T", ".", ...
Create a transform which will move the specified point to the origin
[ "Create", "a", "transform", "which", "will", "move", "the", "specified", "point", "to", "the", "origin" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/rectify/RectifyFundamental.java#L118-L126
ksclarke/freelib-utils
src/main/java/info/freelibrary/util/StringUtils.java
StringUtils.readBytes
private static byte[] readBytes(final File aFile) throws IOException { """ Reads the contents of a file into a byte array. @param aFile The file from which to read @return The bytes read from the file @throws IOException If the supplied file could not be read in its entirety """ final FileInputStr...
java
private static byte[] readBytes(final File aFile) throws IOException { final FileInputStream fileStream = new FileInputStream(aFile); final ByteBuffer buf = ByteBuffer.allocate((int) aFile.length()); final int read = fileStream.getChannel().read(buf); if (read != aFile.length()) { ...
[ "private", "static", "byte", "[", "]", "readBytes", "(", "final", "File", "aFile", ")", "throws", "IOException", "{", "final", "FileInputStream", "fileStream", "=", "new", "FileInputStream", "(", "aFile", ")", ";", "final", "ByteBuffer", "buf", "=", "ByteBuffe...
Reads the contents of a file into a byte array. @param aFile The file from which to read @return The bytes read from the file @throws IOException If the supplied file could not be read in its entirety
[ "Reads", "the", "contents", "of", "a", "file", "into", "a", "byte", "array", "." ]
train
https://github.com/ksclarke/freelib-utils/blob/54e822ae4c11b3d74793fd82a1a535ffafffaf45/src/main/java/info/freelibrary/util/StringUtils.java#L481-L493
JodaOrg/joda-money
src/main/java/org/joda/money/BigMoney.java
BigMoney.withCurrencyUnit
public BigMoney withCurrencyUnit(CurrencyUnit currency) { """ Returns a copy of this monetary value with the specified currency. <p> The returned instance will have the specified currency and the amount from this instance. No currency conversion or alteration to the scale occurs. <p> This instance is immutabl...
java
public BigMoney withCurrencyUnit(CurrencyUnit currency) { MoneyUtils.checkNotNull(currency, "CurrencyUnit must not be null"); if (this.currency == currency) { return this; } return new BigMoney(currency, amount); }
[ "public", "BigMoney", "withCurrencyUnit", "(", "CurrencyUnit", "currency", ")", "{", "MoneyUtils", ".", "checkNotNull", "(", "currency", ",", "\"CurrencyUnit must not be null\"", ")", ";", "if", "(", "this", ".", "currency", "==", "currency", ")", "{", "return", ...
Returns a copy of this monetary value with the specified currency. <p> The returned instance will have the specified currency and the amount from this instance. No currency conversion or alteration to the scale occurs. <p> This instance is immutable and unaffected by this method. @param currency the currency to use, ...
[ "Returns", "a", "copy", "of", "this", "monetary", "value", "with", "the", "specified", "currency", ".", "<p", ">", "The", "returned", "instance", "will", "have", "the", "specified", "currency", "and", "the", "amount", "from", "this", "instance", ".", "No", ...
train
https://github.com/JodaOrg/joda-money/blob/e1f2de75aa36610a695358696c8a88a18ca66cde/src/main/java/org/joda/money/BigMoney.java#L467-L473
cloudant/sync-android
cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/common/ValueListMap.java
ValueListMap.addValueToKey
public void addValueToKey(K key, V value) { """ Add a value to the map under the existing key or creating a new key if it does not yet exist. @param key the key to associate the values with @param value the value to add to the key """ this.addValuesToKey(key, Collections.singletonList(value)); ...
java
public void addValueToKey(K key, V value) { this.addValuesToKey(key, Collections.singletonList(value)); }
[ "public", "void", "addValueToKey", "(", "K", "key", ",", "V", "value", ")", "{", "this", ".", "addValuesToKey", "(", "key", ",", "Collections", ".", "singletonList", "(", "value", ")", ")", ";", "}" ]
Add a value to the map under the existing key or creating a new key if it does not yet exist. @param key the key to associate the values with @param value the value to add to the key
[ "Add", "a", "value", "to", "the", "map", "under", "the", "existing", "key", "or", "creating", "a", "new", "key", "if", "it", "does", "not", "yet", "exist", "." ]
train
https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/common/ValueListMap.java#L55-L57
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/MessageRequest.java
MessageRequest.withAddresses
public MessageRequest withAddresses(java.util.Map<String, AddressConfiguration> addresses) { """ A map of key-value pairs, where each key is an address and each value is an AddressConfiguration object. An address can be a push notification token, a phone number, or an email address. @param addresses A map of ...
java
public MessageRequest withAddresses(java.util.Map<String, AddressConfiguration> addresses) { setAddresses(addresses); return this; }
[ "public", "MessageRequest", "withAddresses", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "AddressConfiguration", ">", "addresses", ")", "{", "setAddresses", "(", "addresses", ")", ";", "return", "this", ";", "}" ]
A map of key-value pairs, where each key is an address and each value is an AddressConfiguration object. An address can be a push notification token, a phone number, or an email address. @param addresses A map of key-value pairs, where each key is an address and each value is an AddressConfiguration object. An address...
[ "A", "map", "of", "key", "-", "value", "pairs", "where", "each", "key", "is", "an", "address", "and", "each", "value", "is", "an", "AddressConfiguration", "object", ".", "An", "address", "can", "be", "a", "push", "notification", "token", "a", "phone", "n...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/MessageRequest.java#L85-L88
aws/aws-sdk-java
jmespath-java/src/main/java/com/amazonaws/jmespath/JmesPathEvaluationVisitor.java
JmesPathEvaluationVisitor.visit
@Override public JsonNode visit(JmesPathFilter filter, JsonNode input) throws InvalidTypeException { """ Evaluates a filter expression as follows. For each element in an array evaluate the expression against the element. If the expression evaluates to a truth-like value, the item (in its entirety) is added ...
java
@Override public JsonNode visit(JmesPathFilter filter, JsonNode input) throws InvalidTypeException { JsonNode filterExpression = filter.getLhsExpr().accept(this, input); if (filterExpression.isArray()) { Iterator<JsonNode> elements = filterExpression.elements(); ArrayNode pro...
[ "@", "Override", "public", "JsonNode", "visit", "(", "JmesPathFilter", "filter", ",", "JsonNode", "input", ")", "throws", "InvalidTypeException", "{", "JsonNode", "filterExpression", "=", "filter", ".", "getLhsExpr", "(", ")", ".", "accept", "(", "this", ",", ...
Evaluates a filter expression as follows. For each element in an array evaluate the expression against the element. If the expression evaluates to a truth-like value, the item (in its entirety) is added to the result list. Otherwise it is excluded from the result list. A filter expression is only defined for a JSON arr...
[ "Evaluates", "a", "filter", "expression", "as", "follows", ".", "For", "each", "element", "in", "an", "array", "evaluate", "the", "expression", "against", "the", "element", ".", "If", "the", "expression", "evaluates", "to", "a", "truth", "-", "like", "value"...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/jmespath-java/src/main/java/com/amazonaws/jmespath/JmesPathEvaluationVisitor.java#L229-L247
kiegroup/jbpm
jbpm-human-task/jbpm-human-task-jpa/src/main/java/org/jbpm/services/task/persistence/TaskSummaryQueryCriteriaUtil.java
TaskSummaryQueryCriteriaUtil.checkExistingCriteriaForUserBasedLimit
private void checkExistingCriteriaForUserBasedLimit(QueryWhere queryWhere, String userId, UserGroupCallback userGroupCallback) { """ This method checks whether or not the query *already* contains a limiting criteria (in short, a criteria that limits results of the query) that refers to the user or (the user's gro...
java
private void checkExistingCriteriaForUserBasedLimit(QueryWhere queryWhere, String userId, UserGroupCallback userGroupCallback) { List<String> groupIds = userGroupCallback.getGroupsForUser(userId); Set<String> userAndGroupIds = new HashSet<String>(); if( groupIds != null ) { userAndGr...
[ "private", "void", "checkExistingCriteriaForUserBasedLimit", "(", "QueryWhere", "queryWhere", ",", "String", "userId", ",", "UserGroupCallback", "userGroupCallback", ")", "{", "List", "<", "String", ">", "groupIds", "=", "userGroupCallback", ".", "getGroupsForUser", "("...
This method checks whether or not the query *already* contains a limiting criteria (in short, a criteria that limits results of the query) that refers to the user or (the user's groups). If there is no user/group limiting criteria, then a {@link QueryCriteria} with the user and group ids is added to the {@link QueryWh...
[ "This", "method", "checks", "whether", "or", "not", "the", "query", "*", "already", "*", "contains", "a", "limiting", "criteria", "(", "in", "short", "a", "criteria", "that", "limits", "results", "of", "the", "query", ")", "that", "refers", "to", "the", ...
train
https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-human-task/jbpm-human-task-jpa/src/main/java/org/jbpm/services/task/persistence/TaskSummaryQueryCriteriaUtil.java#L303-L313
messagebird/java-rest-api
api/src/main/java/com/messagebird/MessageBirdClient.java
MessageBirdClient.viewCallLegByCallIdAndLegId
public VoiceCallLeg viewCallLegByCallIdAndLegId(final String callId, String legId) throws UnsupportedEncodingException, NotFoundException, GeneralException, UnauthorizedException { """ Retrieves a leg resource. The parameters are the unique ID of the call and of the leg that were returned upon their respective cr...
java
public VoiceCallLeg viewCallLegByCallIdAndLegId(final String callId, String legId) throws UnsupportedEncodingException, NotFoundException, GeneralException, UnauthorizedException { if (callId == null) { throw new IllegalArgumentException("Voice call ID must be specified."); } if (le...
[ "public", "VoiceCallLeg", "viewCallLegByCallIdAndLegId", "(", "final", "String", "callId", ",", "String", "legId", ")", "throws", "UnsupportedEncodingException", ",", "NotFoundException", ",", "GeneralException", ",", "UnauthorizedException", "{", "if", "(", "callId", "...
Retrieves a leg resource. The parameters are the unique ID of the call and of the leg that were returned upon their respective creation. @param callId Voice call ID @param legId ID of leg of specified call {callId} @return VoiceCallLeg @throws UnsupportedEncodingException no UTF8 supported url @throws NotFoundExcepti...
[ "Retrieves", "a", "leg", "resource", ".", "The", "parameters", "are", "the", "unique", "ID", "of", "the", "call", "and", "of", "the", "leg", "that", "were", "returned", "upon", "their", "respective", "creation", "." ]
train
https://github.com/messagebird/java-rest-api/blob/f92cd93afff413e6dc12aa6e41e69f26cbae8941/api/src/main/java/com/messagebird/MessageBirdClient.java#L1011-L1034
vznet/mongo-jackson-mapper
src/main/java/net/vz/mongodb/jackson/JacksonDBCollection.java
JacksonDBCollection.findOne
public T findOne(DBObject query, DBObject fields) { """ Returns a single object from this collection matching the query. @param query the query object @param fields the fields to return @return the object found, or <code>null</code> if no such object exists """ return findOne(query, fields, getRe...
java
public T findOne(DBObject query, DBObject fields) { return findOne(query, fields, getReadPreference()); }
[ "public", "T", "findOne", "(", "DBObject", "query", ",", "DBObject", "fields", ")", "{", "return", "findOne", "(", "query", ",", "fields", ",", "getReadPreference", "(", ")", ")", ";", "}" ]
Returns a single object from this collection matching the query. @param query the query object @param fields the fields to return @return the object found, or <code>null</code> if no such object exists
[ "Returns", "a", "single", "object", "from", "this", "collection", "matching", "the", "query", "." ]
train
https://github.com/vznet/mongo-jackson-mapper/blob/ecd189aefa89636cddf70fb383f5d676be347976/src/main/java/net/vz/mongodb/jackson/JacksonDBCollection.java#L902-L904
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/BOCSU.java
BOCSU.getNegDivMod
private static final long getNegDivMod(int number, int factor) { """ Integer division and modulo with negative numerators yields negative modulo results and quotients that are one more than what we need here. @param number which operations are to be performed on @param factor the factor to use for division @r...
java
private static final long getNegDivMod(int number, int factor) { int modulo = number % factor; long result = number / factor; if (modulo < 0) { -- result; modulo += factor; } return (result << 32) | modulo; }
[ "private", "static", "final", "long", "getNegDivMod", "(", "int", "number", ",", "int", "factor", ")", "{", "int", "modulo", "=", "number", "%", "factor", ";", "long", "result", "=", "number", "/", "factor", ";", "if", "(", "modulo", "<", "0", ")", "...
Integer division and modulo with negative numerators yields negative modulo results and quotients that are one more than what we need here. @param number which operations are to be performed on @param factor the factor to use for division @return (result of division) << 32 | modulo
[ "Integer", "division", "and", "modulo", "with", "negative", "numerators", "yields", "negative", "modulo", "results", "and", "quotients", "that", "are", "one", "more", "than", "what", "we", "need", "here", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/BOCSU.java#L240-L249
JodaOrg/joda-time
src/main/java/org/joda/time/LocalDateTime.java
LocalDateTime.withField
public LocalDateTime withField(DateTimeFieldType fieldType, int value) { """ Returns a copy of this datetime with the specified field set to a new value. <p> For example, if the field type is <code>hourOfDay</code> then the hour of day field would be changed in the returned instance. If the field type is null,...
java
public LocalDateTime withField(DateTimeFieldType fieldType, int value) { if (fieldType == null) { throw new IllegalArgumentException("Field must not be null"); } long instant = fieldType.getField(getChronology()).set(getLocalMillis(), value); return withLocalMillis(instant); ...
[ "public", "LocalDateTime", "withField", "(", "DateTimeFieldType", "fieldType", ",", "int", "value", ")", "{", "if", "(", "fieldType", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Field must not be null\"", ")", ";", "}", "long", "i...
Returns a copy of this datetime with the specified field set to a new value. <p> For example, if the field type is <code>hourOfDay</code> then the hour of day field would be changed in the returned instance. If the field type is null, then <code>this</code> is returned. <p> These three lines are equivalent: <pre> Local...
[ "Returns", "a", "copy", "of", "this", "datetime", "with", "the", "specified", "field", "set", "to", "a", "new", "value", ".", "<p", ">", "For", "example", "if", "the", "field", "type", "is", "<code", ">", "hourOfDay<", "/", "code", ">", "then", "the", ...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/LocalDateTime.java#L986-L992
xiaosunzhu/resource-utils
src/main/java/net/sunyijun/resource/config/Configs.java
Configs.getHavePathSelfConfigDecimal
public static BigDecimal getHavePathSelfConfigDecimal(String keyPrefix, IConfigKeyWithPath key) { """ Get self config decimal. Config key include prefix. Example:<br> If key.getKeyString() is "test", <br> getSelfConfigDecimal("1.", key); will return "1.test" config value in {@linkplain IConfigKeyWithPath#getCo...
java
public static BigDecimal getHavePathSelfConfigDecimal(String keyPrefix, IConfigKeyWithPath key) { String configAbsoluteClassPath = key.getConfigPath(); return getSelfConfigDecimal(configAbsoluteClassPath, keyPrefix, key); }
[ "public", "static", "BigDecimal", "getHavePathSelfConfigDecimal", "(", "String", "keyPrefix", ",", "IConfigKeyWithPath", "key", ")", "{", "String", "configAbsoluteClassPath", "=", "key", ".", "getConfigPath", "(", ")", ";", "return", "getSelfConfigDecimal", "(", "conf...
Get self config decimal. Config key include prefix. Example:<br> If key.getKeyString() is "test", <br> getSelfConfigDecimal("1.", key); will return "1.test" config value in {@linkplain IConfigKeyWithPath#getConfigPath() path} set in key. @param keyPrefix config key prefix @param key config key with configAbsolut...
[ "Get", "self", "config", "decimal", ".", "Config", "key", "include", "prefix", ".", "Example", ":", "<br", ">", "If", "key", ".", "getKeyString", "()", "is", "test", "<br", ">", "getSelfConfigDecimal", "(", "1", ".", "key", ")", ";", "will", "return", ...
train
https://github.com/xiaosunzhu/resource-utils/blob/4f2bf3f36df10195a978f122ed682ba1eb0462b5/src/main/java/net/sunyijun/resource/config/Configs.java#L411-L414
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/PassThruTable.java
PassThruTable.addListener
public void addListener(Record record, FileListener listener) { """ Add a listener to the chain. The listener must be cloned and added to all records on the list. @param listener The listener to add. """ if (this.getNextTable() != null) this.getNextTable().addListener(record, listener); ...
java
public void addListener(Record record, FileListener listener) { if (this.getNextTable() != null) this.getNextTable().addListener(record, listener); }
[ "public", "void", "addListener", "(", "Record", "record", ",", "FileListener", "listener", ")", "{", "if", "(", "this", ".", "getNextTable", "(", ")", "!=", "null", ")", "this", ".", "getNextTable", "(", ")", ".", "addListener", "(", "record", ",", "list...
Add a listener to the chain. The listener must be cloned and added to all records on the list. @param listener The listener to add.
[ "Add", "a", "listener", "to", "the", "chain", ".", "The", "listener", "must", "be", "cloned", "and", "added", "to", "all", "records", "on", "the", "list", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/PassThruTable.java#L138-L142
baratine/baratine
framework/src/main/java/com/caucho/v5/bartender/heartbeat/HeartbeatImpl.java
HeartbeatImpl.updateServer
void updateServer(ServerHeartbeat server, UpdateServerHeartbeat update) { """ Update a server with a heartbeat update. @param server the server to be updated @param update the new update information """ if (server.isSelf()) { return; } String externalId = update.getExternalId(); ...
java
void updateServer(ServerHeartbeat server, UpdateServerHeartbeat update) { if (server.isSelf()) { return; } String externalId = update.getExternalId(); updateExternal(server, externalId); // XXX: validation server.setSeedIndex(update.getSeedIndex()); if (server.onHeartbeatUpda...
[ "void", "updateServer", "(", "ServerHeartbeat", "server", ",", "UpdateServerHeartbeat", "update", ")", "{", "if", "(", "server", ".", "isSelf", "(", ")", ")", "{", "return", ";", "}", "String", "externalId", "=", "update", ".", "getExternalId", "(", ")", "...
Update a server with a heartbeat update. @param server the server to be updated @param update the new update information
[ "Update", "a", "server", "with", "a", "heartbeat", "update", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/bartender/heartbeat/HeartbeatImpl.java#L712-L733
alkacon/opencms-core
src/org/opencms/configuration/CmsConfigurationManager.java
CmsConfigurationManager.loadXmlConfiguration
private void loadXmlConfiguration(URL url, I_CmsXmlConfiguration configuration) throws SAXException, IOException { """ Loads the OpenCms configuration from the given XML URL.<p> @param url the base URL of the XML configuration to load @param configuration the configuration to load @throws SAXException in case...
java
private void loadXmlConfiguration(URL url, I_CmsXmlConfiguration configuration) throws SAXException, IOException { // generate the file URL for the XML input URL fileUrl = new URL(url, configuration.getXmlFileName()); CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_LOAD_CONFIG_XML...
[ "private", "void", "loadXmlConfiguration", "(", "URL", "url", ",", "I_CmsXmlConfiguration", "configuration", ")", "throws", "SAXException", ",", "IOException", "{", "// generate the file URL for the XML input", "URL", "fileUrl", "=", "new", "URL", "(", "url", ",", "co...
Loads the OpenCms configuration from the given XML URL.<p> @param url the base URL of the XML configuration to load @param configuration the configuration to load @throws SAXException in case of XML parse errors @throws IOException in case of file IO errors
[ "Loads", "the", "OpenCms", "configuration", "from", "the", "given", "XML", "URL", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/configuration/CmsConfigurationManager.java#L636-L674
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/eig/EigenvalueSmall_F64.java
EigenvalueSmall_F64.value2x2
public void value2x2( double a11 , double a12, double a21 , double a22 ) { """ if |a11-a22| >> |a12+a21| there might be a better way. see pg371 """ // apply a rotators such that th a11 and a22 elements are the same double c,s; if( a12 + a21 == 0 ) { // is this pointless since ...
java
public void value2x2( double a11 , double a12, double a21 , double a22 ) { // apply a rotators such that th a11 and a22 elements are the same double c,s; if( a12 + a21 == 0 ) { // is this pointless since c = s = 1.0 / Math.sqrt(2); } else { double aa = (a11-a...
[ "public", "void", "value2x2", "(", "double", "a11", ",", "double", "a12", ",", "double", "a21", ",", "double", "a22", ")", "{", "// apply a rotators such that th a11 and a22 elements are the same", "double", "c", ",", "s", ";", "if", "(", "a12", "+", "a21", "=...
if |a11-a22| >> |a12+a21| there might be a better way. see pg371
[ "if", "|a11", "-", "a22|", ">>", "|a12", "+", "a21|", "there", "might", "be", "a", "better", "way", ".", "see", "pg371" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/eig/EigenvalueSmall_F64.java#L33-L89
tvesalainen/util
rpm/src/main/java/org/vesalainen/pm/deb/DEBBuilder.java
DEBBuilder.addSymbolicLink
@Override public ComponentBuilder addSymbolicLink(String target, String linkTarget) throws IOException { """ Add symbolic link to package. @param target @param linkTarget @return @throws IOException """ checkTarget(target); checkTarget(linkTarget); FileBuilder fb = new FileB...
java
@Override public ComponentBuilder addSymbolicLink(String target, String linkTarget) throws IOException { checkTarget(target); checkTarget(linkTarget); FileBuilder fb = new FileBuilder(target, linkTarget); fileBuilders.add(fb); return fb; }
[ "@", "Override", "public", "ComponentBuilder", "addSymbolicLink", "(", "String", "target", ",", "String", "linkTarget", ")", "throws", "IOException", "{", "checkTarget", "(", "target", ")", ";", "checkTarget", "(", "linkTarget", ")", ";", "FileBuilder", "fb", "=...
Add symbolic link to package. @param target @param linkTarget @return @throws IOException
[ "Add", "symbolic", "link", "to", "package", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/rpm/src/main/java/org/vesalainen/pm/deb/DEBBuilder.java#L346-L354
twitter/cloudhopper-commons
ch-commons-util/src/main/java/com/cloudhopper/commons/util/time/DateTimePeriod.java
DateTimePeriod.toFiveMinutes
public List<DateTimePeriod> toFiveMinutes() { """ Converts this period to a list of five minute periods. Partial five minute periods will not be included. For example, a period of "January 20, 2009 7 to 8 AM" will return a list of 12 five minute periods - one for each 5 minute block of time 0, 5, 10, 15, etc. ...
java
public List<DateTimePeriod> toFiveMinutes() { ArrayList<DateTimePeriod> list = new ArrayList<DateTimePeriod>(); // default "current" five minutes to start datetime DateTime currentStart = getStart(); // calculate "next" five minutes DateTime nextStart = currentStart.plusMinutes(...
[ "public", "List", "<", "DateTimePeriod", ">", "toFiveMinutes", "(", ")", "{", "ArrayList", "<", "DateTimePeriod", ">", "list", "=", "new", "ArrayList", "<", "DateTimePeriod", ">", "(", ")", ";", "// default \"current\" five minutes to start datetime", "DateTime", "c...
Converts this period to a list of five minute periods. Partial five minute periods will not be included. For example, a period of "January 20, 2009 7 to 8 AM" will return a list of 12 five minute periods - one for each 5 minute block of time 0, 5, 10, 15, etc. On the other hand, a period of "January 20, 2009 at 13:04...
[ "Converts", "this", "period", "to", "a", "list", "of", "five", "minute", "periods", ".", "Partial", "five", "minute", "periods", "will", "not", "be", "included", ".", "For", "example", "a", "period", "of", "January", "20", "2009", "7", "to", "8", "AM", ...
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-util/src/main/java/com/cloudhopper/commons/util/time/DateTimePeriod.java#L243-L260
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/PatternStream.java
PatternStream.flatSelect
public <L, R> SingleOutputStreamOperator<R> flatSelect( final OutputTag<L> timedOutPartialMatchesTag, final PatternFlatTimeoutFunction<T, L> patternFlatTimeoutFunction, final TypeInformation<R> outTypeInfo, final PatternFlatSelectFunction<T, R> patternFlatSelectFunction) { """ Applies a flat select fun...
java
public <L, R> SingleOutputStreamOperator<R> flatSelect( final OutputTag<L> timedOutPartialMatchesTag, final PatternFlatTimeoutFunction<T, L> patternFlatTimeoutFunction, final TypeInformation<R> outTypeInfo, final PatternFlatSelectFunction<T, R> patternFlatSelectFunction) { final PatternProcessFunction<T,...
[ "public", "<", "L", ",", "R", ">", "SingleOutputStreamOperator", "<", "R", ">", "flatSelect", "(", "final", "OutputTag", "<", "L", ">", "timedOutPartialMatchesTag", ",", "final", "PatternFlatTimeoutFunction", "<", "T", ",", "L", ">", "patternFlatTimeoutFunction", ...
Applies a flat select function to the detected pattern sequence. For each pattern sequence the provided {@link PatternFlatSelectFunction} is called. The pattern select function can produce exactly one resulting element. <p>Applies a timeout function to a partial pattern sequence which has timed out. For each partial p...
[ "Applies", "a", "flat", "select", "function", "to", "the", "detected", "pattern", "sequence", ".", "For", "each", "pattern", "sequence", "the", "provided", "{", "@link", "PatternFlatSelectFunction", "}", "is", "called", ".", "The", "pattern", "select", "function...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/PatternStream.java#L440-L452
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newRole
public Predicate.Role newRole(String id, Predicate predicate, String semRole, Span<Term> span) { """ Creates a Role object to load an existing role. It receives the ID as an argument. It doesn't add the role to the predicate. @param id role's ID. @param predicate the predicate which this role is part of @param ...
java
public Predicate.Role newRole(String id, Predicate predicate, String semRole, Span<Term> span) { idManager.updateCounter(AnnotationType.ROLE, id); Predicate.Role newRole = new Predicate.Role(id, semRole, span); return newRole; }
[ "public", "Predicate", ".", "Role", "newRole", "(", "String", "id", ",", "Predicate", "predicate", ",", "String", "semRole", ",", "Span", "<", "Term", ">", "span", ")", "{", "idManager", ".", "updateCounter", "(", "AnnotationType", ".", "ROLE", ",", "id", ...
Creates a Role object to load an existing role. It receives the ID as an argument. It doesn't add the role to the predicate. @param id role's ID. @param predicate the predicate which this role is part of @param semRole semantic role @param span span containing all the targets of the role @return a new role.
[ "Creates", "a", "Role", "object", "to", "load", "an", "existing", "role", ".", "It", "receives", "the", "ID", "as", "an", "argument", ".", "It", "doesn", "t", "add", "the", "role", "to", "the", "predicate", "." ]
train
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1021-L1025
OpenLiberty/open-liberty
dev/com.ibm.ws.ras.instrument/src/com/ibm/ws/ras/instrument/internal/bci/CheckInstrumentableClassAdapter.java
CheckInstrumentableClassAdapter.visit
@Override public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { """ Begin processing a class. We save some of the header information that we only get from the header to assist with processing. """ this.classInternalName = name; t...
java
@Override public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { this.classInternalName = name; this.isInterface = (access & Opcodes.ACC_INTERFACE) != 0; this.isSynthetic = (access & Opcodes.ACC_SYNTHETIC) != 0; super.visit...
[ "@", "Override", "public", "void", "visit", "(", "int", "version", ",", "int", "access", ",", "String", "name", ",", "String", "signature", ",", "String", "superName", ",", "String", "[", "]", "interfaces", ")", "{", "this", ".", "classInternalName", "=", ...
Begin processing a class. We save some of the header information that we only get from the header to assist with processing.
[ "Begin", "processing", "a", "class", ".", "We", "save", "some", "of", "the", "header", "information", "that", "we", "only", "get", "from", "the", "header", "to", "assist", "with", "processing", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ras.instrument/src/com/ibm/ws/ras/instrument/internal/bci/CheckInstrumentableClassAdapter.java#L52-L59
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGUtil.java
SVGUtil.makeMarginTransform
public static String makeMarginTransform(double owidth, double oheight, double iwidth, double iheight, double margin) { """ Make a transform string to add margins @param owidth Width of outer (embedding) canvas @param oheight Height of outer (embedding) canvas @param iwidth Width of inner (embedded) canvas @...
java
public static String makeMarginTransform(double owidth, double oheight, double iwidth, double iheight, double margin) { return makeMarginTransform(owidth, oheight, iwidth, iheight, margin, margin, margin, margin); }
[ "public", "static", "String", "makeMarginTransform", "(", "double", "owidth", ",", "double", "oheight", ",", "double", "iwidth", ",", "double", "iheight", ",", "double", "margin", ")", "{", "return", "makeMarginTransform", "(", "owidth", ",", "oheight", ",", "...
Make a transform string to add margins @param owidth Width of outer (embedding) canvas @param oheight Height of outer (embedding) canvas @param iwidth Width of inner (embedded) canvas @param iheight Height of inner (embedded) canvas @param margin Margin (in inner canvas' units) @return Transform string
[ "Make", "a", "transform", "string", "to", "add", "margins" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGUtil.java#L614-L616
spring-projects/spring-social
spring-social-web/src/main/java/org/springframework/social/connect/web/ConnectController.java
ConnectController.removeConnections
@RequestMapping(value="/ { """ Remove all provider connections for a user account. The user has decided they no longer wish to use the service provider from this application. Note: requires {@link HiddenHttpMethodFilter} to be registered with the '_method' request parameter set to 'DELETE' to convert web browser...
java
@RequestMapping(value="/{providerId}", method=RequestMethod.DELETE) public RedirectView removeConnections(@PathVariable String providerId, NativeWebRequest request) { ConnectionFactory<?> connectionFactory = connectionFactoryLocator.getConnectionFactory(providerId); preDisconnect(connectionFactory, request); con...
[ "@", "RequestMapping", "(", "value", "=", "\"/{providerId}\"", ",", "method", "=", "RequestMethod", ".", "DELETE", ")", "public", "RedirectView", "removeConnections", "(", "@", "PathVariable", "String", "providerId", ",", "NativeWebRequest", "request", ")", "{", "...
Remove all provider connections for a user account. The user has decided they no longer wish to use the service provider from this application. Note: requires {@link HiddenHttpMethodFilter} to be registered with the '_method' request parameter set to 'DELETE' to convert web browser POSTs to DELETE requests. @param prov...
[ "Remove", "all", "provider", "connections", "for", "a", "user", "account", ".", "The", "user", "has", "decided", "they", "no", "longer", "wish", "to", "use", "the", "service", "provider", "from", "this", "application", ".", "Note", ":", "requires", "{" ]
train
https://github.com/spring-projects/spring-social/blob/e41cfecb288022b83c79413b58f52511c3c9d4fc/spring-social-web/src/main/java/org/springframework/social/connect/web/ConnectController.java#L332-L339
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPFriendlyURLEntryPersistenceImpl.java
CPFriendlyURLEntryPersistenceImpl.findAll
@Override public List<CPFriendlyURLEntry> findAll(int start, int end) { """ Returns a range of all the cp friendly url entries. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the res...
java
@Override public List<CPFriendlyURLEntry> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CPFriendlyURLEntry", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the cp friendly url entries. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <co...
[ "Returns", "a", "range", "of", "all", "the", "cp", "friendly", "url", "entries", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPFriendlyURLEntryPersistenceImpl.java#L5834-L5837
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/Stream.java
Stream.takeUntilIndexed
@NotNull public Stream<T> takeUntilIndexed(@NotNull IndexedPredicate<? super T> stopPredicate) { """ Takes elements while the {@code IndexedPredicate} returns {@code false}. Once predicate condition is satisfied by an element, the stream finishes with this element. <p>This is an intermediate operation. ...
java
@NotNull public Stream<T> takeUntilIndexed(@NotNull IndexedPredicate<? super T> stopPredicate) { return takeUntilIndexed(0, 1, stopPredicate); }
[ "@", "NotNull", "public", "Stream", "<", "T", ">", "takeUntilIndexed", "(", "@", "NotNull", "IndexedPredicate", "<", "?", "super", "T", ">", "stopPredicate", ")", "{", "return", "takeUntilIndexed", "(", "0", ",", "1", ",", "stopPredicate", ")", ";", "}" ]
Takes elements while the {@code IndexedPredicate} returns {@code false}. Once predicate condition is satisfied by an element, the stream finishes with this element. <p>This is an intermediate operation. <p>Example: <pre> stopPredicate: (index, value) -&gt; (index + value) &gt; 4 stream: [1, 2, 3, 4, 0, 1, 2] index: ...
[ "Takes", "elements", "while", "the", "{", "@code", "IndexedPredicate", "}", "returns", "{", "@code", "false", "}", ".", "Once", "predicate", "condition", "is", "satisfied", "by", "an", "element", "the", "stream", "finishes", "with", "this", "element", "." ]
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/Stream.java#L1401-L1404
igniterealtime/Smack
smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MultiUserChatLightManager.java
MultiUserChatLightManager.blockRoom
public void blockRoom(DomainBareJid mucLightService, Jid roomJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Block a room. @param mucLightService @param roomJid @throws NoResponseException @throws XMPPErrorException @throws NotConnectedExcep...
java
public void blockRoom(DomainBareJid mucLightService, Jid roomJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { HashMap<Jid, Boolean> rooms = new HashMap<>(); rooms.put(roomJid, false); sendBlockRooms(mucLightService, rooms); }
[ "public", "void", "blockRoom", "(", "DomainBareJid", "mucLightService", ",", "Jid", "roomJid", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "HashMap", "<", "Jid", ",", "Boolean", ">", ...
Block a room. @param mucLightService @param roomJid @throws NoResponseException @throws XMPPErrorException @throws NotConnectedException @throws InterruptedException
[ "Block", "a", "room", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MultiUserChatLightManager.java#L252-L257
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_historyRepaymentConsumption_POST
public OvhHistoryRepaymentConsumption billingAccount_historyRepaymentConsumption_POST(String billingAccount, String billingNumber) throws IOException { """ Ask for a new repayment REST: POST /telephony/{billingAccount}/historyRepaymentConsumption @param billingNumber [required] The number of the bill @param b...
java
public OvhHistoryRepaymentConsumption billingAccount_historyRepaymentConsumption_POST(String billingAccount, String billingNumber) throws IOException { String qPath = "/telephony/{billingAccount}/historyRepaymentConsumption"; StringBuilder sb = path(qPath, billingAccount); HashMap<String, Object>o = new HashMap<S...
[ "public", "OvhHistoryRepaymentConsumption", "billingAccount_historyRepaymentConsumption_POST", "(", "String", "billingAccount", ",", "String", "billingNumber", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/historyRepaymentConsumption\"", ...
Ask for a new repayment REST: POST /telephony/{billingAccount}/historyRepaymentConsumption @param billingNumber [required] The number of the bill @param billingAccount [required] The name of your billingAccount
[ "Ask", "for", "a", "new", "repayment" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L8412-L8419
dnsjava/dnsjava
org/xbill/DNS/Zone.java
Zone.findExactMatch
public RRset findExactMatch(Name name, int type) { """ Looks up Records in the zone, finding exact matches only. @param name The name to look up @param type The type to look up @return The matching RRset @see RRset """ Object types = exactName(name); if (types == null) return null; return oneRRset(typ...
java
public RRset findExactMatch(Name name, int type) { Object types = exactName(name); if (types == null) return null; return oneRRset(types, type); }
[ "public", "RRset", "findExactMatch", "(", "Name", "name", ",", "int", "type", ")", "{", "Object", "types", "=", "exactName", "(", "name", ")", ";", "if", "(", "types", "==", "null", ")", "return", "null", ";", "return", "oneRRset", "(", "types", ",", ...
Looks up Records in the zone, finding exact matches only. @param name The name to look up @param type The type to look up @return The matching RRset @see RRset
[ "Looks", "up", "Records", "in", "the", "zone", "finding", "exact", "matches", "only", "." ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/Zone.java#L444-L450
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/compare/SimpleCompareFileExtensions.java
SimpleCompareFileExtensions.compareFilesByContent
public static boolean compareFilesByContent(final File sourceFile, final File fileToCompare) { """ Compare files by content. @param sourceFile the source file @param fileToCompare the file to compare @return true if the content are equal, otherwise false. """ return CompareFileExtensions .compare...
java
public static boolean compareFilesByContent(final File sourceFile, final File fileToCompare) { return CompareFileExtensions .compareFiles(sourceFile, fileToCompare, true, true, true, true, true, false) .getContentEquality(); }
[ "public", "static", "boolean", "compareFilesByContent", "(", "final", "File", "sourceFile", ",", "final", "File", "fileToCompare", ")", "{", "return", "CompareFileExtensions", ".", "compareFiles", "(", "sourceFile", ",", "fileToCompare", ",", "true", ",", "true", ...
Compare files by content. @param sourceFile the source file @param fileToCompare the file to compare @return true if the content are equal, otherwise false.
[ "Compare", "files", "by", "content", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/compare/SimpleCompareFileExtensions.java#L131-L136
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java
TypeAnnotationPosition.methodRefTypeArg
public static TypeAnnotationPosition methodRefTypeArg(final List<TypePathEntry> location, final int type_index) { """ Create a {@code TypeAnnotationPosition} for a method reference type argument. @param location The type path. @param type_index The index of the type argument. ...
java
public static TypeAnnotationPosition methodRefTypeArg(final List<TypePathEntry> location, final int type_index) { return methodRefTypeArg(location, null, type_index, -1); }
[ "public", "static", "TypeAnnotationPosition", "methodRefTypeArg", "(", "final", "List", "<", "TypePathEntry", ">", "location", ",", "final", "int", "type_index", ")", "{", "return", "methodRefTypeArg", "(", "location", ",", "null", ",", "type_index", ",", "-", "...
Create a {@code TypeAnnotationPosition} for a method reference type argument. @param location The type path. @param type_index The index of the type argument.
[ "Create", "a", "{", "@code", "TypeAnnotationPosition", "}", "for", "a", "method", "reference", "type", "argument", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java#L1070-L1074
xcesco/kripton
kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/KriptonDatabaseWrapper.java
KriptonDatabaseWrapper.updateDelete
public static int updateDelete(SQLiteStatement ps, KriptonContentValues contentValues) { """ Update delete. @param ps the ps @param contentValues the content values @return the int """ contentValues.bind(ps); return ps.executeUpdateDelete(); }
java
public static int updateDelete(SQLiteStatement ps, KriptonContentValues contentValues) { contentValues.bind(ps); return ps.executeUpdateDelete(); }
[ "public", "static", "int", "updateDelete", "(", "SQLiteStatement", "ps", ",", "KriptonContentValues", "contentValues", ")", "{", "contentValues", ".", "bind", "(", "ps", ")", ";", "return", "ps", ".", "executeUpdateDelete", "(", ")", ";", "}" ]
Update delete. @param ps the ps @param contentValues the content values @return the int
[ "Update", "delete", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/KriptonDatabaseWrapper.java#L77-L82
dustin/java-memcached-client
src/main/java/net/spy/memcached/MemcachedClient.java
MemcachedClient.getAndTouch
@Override public <T> CASValue<T> getAndTouch(String key, int exp, Transcoder<T> tc) { """ Get with a single key and reset its expiration. @param <T> @param key the key to get @param exp the new expiration for the key @param tc the transcoder to serialize and unserialize value @return the result from the c...
java
@Override public <T> CASValue<T> getAndTouch(String key, int exp, Transcoder<T> tc) { try { return asyncGetAndTouch(key, exp, tc).get(operationTimeout, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { throw new RuntimeException("Interrupted waiting for value", e); } catch (...
[ "@", "Override", "public", "<", "T", ">", "CASValue", "<", "T", ">", "getAndTouch", "(", "String", "key", ",", "int", "exp", ",", "Transcoder", "<", "T", ">", "tc", ")", "{", "try", "{", "return", "asyncGetAndTouch", "(", "key", ",", "exp", ",", "t...
Get with a single key and reset its expiration. @param <T> @param key the key to get @param exp the new expiration for the key @param tc the transcoder to serialize and unserialize value @return the result from the cache (null if there is none) @throws OperationTimeoutException if the global operation timeout is excee...
[ "Get", "with", "a", "single", "key", "and", "reset", "its", "expiration", "." ]
train
https://github.com/dustin/java-memcached-client/blob/c232307ad8e0c7ccc926e495dd7d5aad2d713318/src/main/java/net/spy/memcached/MemcachedClient.java#L1164-L1180
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/CFG.java
CFG.createEdge
public Edge createEdge(BasicBlock source, BasicBlock dest, @Edge.Type int type) { """ Add a unique edge to the graph. There must be no other edge already in the CFG with the same source and destination blocks. @param source the source basic block @param dest the destination basic block @param type the typ...
java
public Edge createEdge(BasicBlock source, BasicBlock dest, @Edge.Type int type) { Edge edge = createEdge(source, dest); edge.setType(type); return edge; }
[ "public", "Edge", "createEdge", "(", "BasicBlock", "source", ",", "BasicBlock", "dest", ",", "@", "Edge", ".", "Type", "int", "type", ")", "{", "Edge", "edge", "=", "createEdge", "(", "source", ",", "dest", ")", ";", "edge", ".", "setType", "(", "type"...
Add a unique edge to the graph. There must be no other edge already in the CFG with the same source and destination blocks. @param source the source basic block @param dest the destination basic block @param type the type of edge; see constants in EdgeTypes interface @return the newly created Edge @throws IllegalState...
[ "Add", "a", "unique", "edge", "to", "the", "graph", ".", "There", "must", "be", "no", "other", "edge", "already", "in", "the", "CFG", "with", "the", "same", "source", "and", "destination", "blocks", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/CFG.java#L258-L262
google/closure-compiler
src/com/google/javascript/jscomp/NodeUtil.java
NodeUtil.getArgumentForCallOrNew
static Node getArgumentForCallOrNew(Node call, int index) { """ Given the new or call, this returns the nth argument of the call or null if no such argument exists. """ checkState(isCallOrNew(call)); return getNthSibling(call.getSecondChild(), index); }
java
static Node getArgumentForCallOrNew(Node call, int index) { checkState(isCallOrNew(call)); return getNthSibling(call.getSecondChild(), index); }
[ "static", "Node", "getArgumentForCallOrNew", "(", "Node", "call", ",", "int", "index", ")", "{", "checkState", "(", "isCallOrNew", "(", "call", ")", ")", ";", "return", "getNthSibling", "(", "call", ".", "getSecondChild", "(", ")", ",", "index", ")", ";", ...
Given the new or call, this returns the nth argument of the call or null if no such argument exists.
[ "Given", "the", "new", "or", "call", "this", "returns", "the", "nth", "argument", "of", "the", "call", "or", "null", "if", "no", "such", "argument", "exists", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/NodeUtil.java#L5220-L5223
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Maybe.java
Maybe.flatMapSingleElement
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <R> Maybe<R> flatMapSingleElement(final Function<? super T, ? extends SingleSource<? extends R>> mapper) { """ Returns a {@link Maybe} based on applying a specified function to the item emitted by the source {@link Maybe}, where that ...
java
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <R> Maybe<R> flatMapSingleElement(final Function<? super T, ? extends SingleSource<? extends R>> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); return RxJavaPlugins.onAssembly(new MaybeFlatMapSingleElement<...
[ "@", "CheckReturnValue", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "<", "R", ">", "Maybe", "<", "R", ">", "flatMapSingleElement", "(", "final", "Function", "<", "?", "super", "T", ",", "?", "extends", "SingleSourc...
Returns a {@link Maybe} based on applying a specified function to the item emitted by the source {@link Maybe}, where that function returns a {@link Single}. When this Maybe just completes the resulting {@code Maybe} completes as well. <p> <img width="640" height="356" src="https://raw.github.com/wiki/ReactiveX/RxJava/...
[ "Returns", "a", "{", "@link", "Maybe", "}", "based", "on", "applying", "a", "specified", "function", "to", "the", "item", "emitted", "by", "the", "source", "{", "@link", "Maybe", "}", "where", "that", "function", "returns", "a", "{", "@link", "Single", "...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Maybe.java#L3118-L3123
alkacon/opencms-core
src-gwt/org/opencms/ade/publish/client/CmsBrokenLinksPanel.java
CmsBrokenLinksPanel.setEntries
public void setEntries(Collection<CmsPublishResource> resourceBeans, List<CmsWorkflowAction> actions) { """ Sets the resources to be displayed.<p> @param resourceBeans the resource beans to be displayed @param actions the available actions """ m_list.clear(); CmsListItemWidget listItemWidg...
java
public void setEntries(Collection<CmsPublishResource> resourceBeans, List<CmsWorkflowAction> actions) { m_list.clear(); CmsListItemWidget listItemWidget = null; for (CmsPublishResource res : resourceBeans) { listItemWidget = addEntry(res); } if (listItemWidget != nul...
[ "public", "void", "setEntries", "(", "Collection", "<", "CmsPublishResource", ">", "resourceBeans", ",", "List", "<", "CmsWorkflowAction", ">", "actions", ")", "{", "m_list", ".", "clear", "(", ")", ";", "CmsListItemWidget", "listItemWidget", "=", "null", ";", ...
Sets the resources to be displayed.<p> @param resourceBeans the resource beans to be displayed @param actions the available actions
[ "Sets", "the", "resources", "to", "be", "displayed", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/publish/client/CmsBrokenLinksPanel.java#L188-L208
syphr42/prom
src/main/java/org/syphr/prom/PropertiesManagers.java
PropertiesManagers.newManager
public static <T extends Enum<T>> PropertiesManager<T> newManager(File file, File defaultFile, Class<T> keyType, ...
java
public static <T extends Enum<T>> PropertiesManager<T> newManager(File file, File defaultFile, Class<T> keyType, ...
[ "public", "static", "<", "T", "extends", "Enum", "<", "T", ">", ">", "PropertiesManager", "<", "T", ">", "newManager", "(", "File", "file", ",", "File", "defaultFile", ",", "Class", "<", "T", ">", "keyType", ",", "final", "Retriever", "...", "retrievers"...
Build a new manager for the given properties file. @param <T> the type of key used for the new manager @param file the file system location of the properties represented by the new manager @param defaultFile a file containing default values for the properties represented by the new manager @param keyType the enumerat...
[ "Build", "a", "new", "manager", "for", "the", "given", "properties", "file", "." ]
train
https://github.com/syphr42/prom/blob/074d67c4ebb3afb0b163fcb0bc4826ee577ac803/src/main/java/org/syphr/prom/PropertiesManagers.java#L81-L87
liyiorg/weixin-popular
src/main/java/weixin/popular/api/UserAPI.java
UserAPI.groupsMembersUpdate
public static BaseResult groupsMembersUpdate(String access_token,String openid,String to_groupid) { """ 移动用户分组 @param access_token access_token @param openid openid @param to_groupid to_groupid @return BaseResult """ String groupJson = "{\"openid\":\""+openid+"\",\"to_groupid\":"+to_groupid+"}"; HttpUr...
java
public static BaseResult groupsMembersUpdate(String access_token,String openid,String to_groupid){ String groupJson = "{\"openid\":\""+openid+"\",\"to_groupid\":"+to_groupid+"}"; HttpUriRequest httpUriRequest = RequestBuilder.post() .setHeader(jsonHeader) .setUri(BASE_URI+"/cgi-bin/groups/member...
[ "public", "static", "BaseResult", "groupsMembersUpdate", "(", "String", "access_token", ",", "String", "openid", ",", "String", "to_groupid", ")", "{", "String", "groupJson", "=", "\"{\\\"openid\\\":\\\"\"", "+", "openid", "+", "\"\\\",\\\"to_groupid\\\":\"", "+", "to...
移动用户分组 @param access_token access_token @param openid openid @param to_groupid to_groupid @return BaseResult
[ "移动用户分组" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/UserAPI.java#L227-L236
mgormley/pacaya
src/main/java/edu/jhu/pacaya/autodiff/StochasticGradientApproximation.java
StochasticGradientApproximation.getGradDotDirApprox
public static double getGradDotDirApprox(Function fn, IntDoubleVector x, IntDoubleVector d) { """ Compute f'(x)^T d = ( L(x + c * d) - L(x - c * d) ) / (2c) @param fn Function, f. @param x Point at which to evaluate the gradient, x. @param d Random direction, d. @param c Epsilon constant. @return """ ...
java
public static double getGradDotDirApprox(Function fn, IntDoubleVector x, IntDoubleVector d) { return getGradDotDirApprox(fn, x, d, getEpsilon(x, d)); }
[ "public", "static", "double", "getGradDotDirApprox", "(", "Function", "fn", ",", "IntDoubleVector", "x", ",", "IntDoubleVector", "d", ")", "{", "return", "getGradDotDirApprox", "(", "fn", ",", "x", ",", "d", ",", "getEpsilon", "(", "x", ",", "d", ")", ")",...
Compute f'(x)^T d = ( L(x + c * d) - L(x - c * d) ) / (2c) @param fn Function, f. @param x Point at which to evaluate the gradient, x. @param d Random direction, d. @param c Epsilon constant. @return
[ "Compute", "f", "(", "x", ")", "^T", "d", "=", "(", "L", "(", "x", "+", "c", "*", "d", ")", "-", "L", "(", "x", "-", "c", "*", "d", ")", ")", "/", "(", "2c", ")" ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/autodiff/StochasticGradientApproximation.java#L86-L88
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/conf/layers/LayerValidation.java
LayerValidation.assertNOutSet
public static void assertNOutSet(String layerType, String layerName, long layerIndex, long nOut) { """ Asserts that the layer nOut value is set for the layer @param layerType Type of layer ("DenseLayer", etc) @param layerName Name of the layer (may be null if not set) @param layerIndex Index of the...
java
public static void assertNOutSet(String layerType, String layerName, long layerIndex, long nOut) { if (nOut <= 0) { if (layerName == null) layerName = "(name not set)"; throw new DL4JInvalidConfigException(layerType + " (index=" + layerIndex + ", name=" + layerName + ") n...
[ "public", "static", "void", "assertNOutSet", "(", "String", "layerType", ",", "String", "layerName", ",", "long", "layerIndex", ",", "long", "nOut", ")", "{", "if", "(", "nOut", "<=", "0", ")", "{", "if", "(", "layerName", "==", "null", ")", "layerName",...
Asserts that the layer nOut value is set for the layer @param layerType Type of layer ("DenseLayer", etc) @param layerName Name of the layer (may be null if not set) @param layerIndex Index of the layer @param nOut nOut value
[ "Asserts", "that", "the", "layer", "nOut", "value", "is", "set", "for", "the", "layer" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/conf/layers/LayerValidation.java#L67-L74
kaichunlin/android-transition
core/src/main/java/com/kaichunlin/transition/ViewTransitionBuilder.java
ViewTransitionBuilder.transitViewGroup
public ViewTransitionBuilder transitViewGroup(@NonNull ViewGroupTransition viewGroupTransition) { """ The view previously set (through {@link #target(View)}) is casted as a ViewGroup, and the specified {@link ViewGroupTransition} will {@link ViewGroupTransition#transit(ViewTransitionBuilder, ViewGroupTransitionCo...
java
public ViewTransitionBuilder transitViewGroup(@NonNull ViewGroupTransition viewGroupTransition) { ViewGroup vg = (ViewGroup) mView; int total = vg.getChildCount(); View view; ViewGroupTransitionConfig config = new ViewGroupTransitionConfig(vg, total); for (int i = 0; i < total; i...
[ "public", "ViewTransitionBuilder", "transitViewGroup", "(", "@", "NonNull", "ViewGroupTransition", "viewGroupTransition", ")", "{", "ViewGroup", "vg", "=", "(", "ViewGroup", ")", "mView", ";", "int", "total", "=", "vg", ".", "getChildCount", "(", ")", ";", "View...
The view previously set (through {@link #target(View)}) is casted as a ViewGroup, and the specified {@link ViewGroupTransition} will {@link ViewGroupTransition#transit(ViewTransitionBuilder, ViewGroupTransitionConfig)} all the children views. @param viewGroupTransition @return @throws ClassCastException If the target ...
[ "The", "view", "previously", "set", "(", "through", "{", "@link", "#target", "(", "View", ")", "}", ")", "is", "casted", "as", "a", "ViewGroup", "and", "the", "specified", "{", "@link", "ViewGroupTransition", "}", "will", "{", "@link", "ViewGroupTransition#t...
train
https://github.com/kaichunlin/android-transition/blob/7b53074206622f5cf5d82091d891a7ed8b9f06cd/core/src/main/java/com/kaichunlin/transition/ViewTransitionBuilder.java#L495-L507
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/common/Similarity.java
Similarity.cosineSimilarity
public static double cosineSimilarity(double[] a, double[] b) { """ Returns the cosine similarity of the two arrays. @throws IllegalArgumentException when the length of the two vectors are not the same. """ check(a,b); double dotProduct = 0.0; double aMagnitude = 0.0; double...
java
public static double cosineSimilarity(double[] a, double[] b) { check(a,b); double dotProduct = 0.0; double aMagnitude = 0.0; double bMagnitude = 0.0; for (int i = 0; i < b.length ; i++) { double aValue = a[i]; double bValue = b[i]; aMagnitude ...
[ "public", "static", "double", "cosineSimilarity", "(", "double", "[", "]", "a", ",", "double", "[", "]", "b", ")", "{", "check", "(", "a", ",", "b", ")", ";", "double", "dotProduct", "=", "0.0", ";", "double", "aMagnitude", "=", "0.0", ";", "double",...
Returns the cosine similarity of the two arrays. @throws IllegalArgumentException when the length of the two vectors are not the same.
[ "Returns", "the", "cosine", "similarity", "of", "the", "two", "arrays", "." ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/common/Similarity.java#L325-L342
alibaba/vlayout
vlayout/src/main/java/com/alibaba/android/vlayout/ExposeLinearLayoutManagerEx.java
ExposeLinearLayoutManagerEx.scrollInternalBy
protected int scrollInternalBy(int dy, RecyclerView.Recycler recycler, RecyclerView.State state) { """ Handle scroll event internally, cover both horizontal and vertical @param dy Pixel that will be scrolled @param recycler Recycler hold recycled views @param state Current {@link RecyclerView} state,...
java
protected int scrollInternalBy(int dy, RecyclerView.Recycler recycler, RecyclerView.State state) { if (getChildCount() == 0 || dy == 0) { return 0; } // indicate whether need recycle in this pass, true when scrolling, false when layout mLayoutState.mRecycle = true; ...
[ "protected", "int", "scrollInternalBy", "(", "int", "dy", ",", "RecyclerView", ".", "Recycler", "recycler", ",", "RecyclerView", ".", "State", "state", ")", "{", "if", "(", "getChildCount", "(", ")", "==", "0", "||", "dy", "==", "0", ")", "{", "return", ...
Handle scroll event internally, cover both horizontal and vertical @param dy Pixel that will be scrolled @param recycler Recycler hold recycled views @param state Current {@link RecyclerView} state, hold whether in preLayout, etc. @return The actual scrolled pixel, it may not be the same as {@code dy}, like w...
[ "Handle", "scroll", "event", "internally", "cover", "both", "horizontal", "and", "vertical" ]
train
https://github.com/alibaba/vlayout/blob/8a5a51d9d2eeb91fed2ee331a4cf3496282452ce/vlayout/src/main/java/com/alibaba/android/vlayout/ExposeLinearLayoutManagerEx.java#L970-L1000
digipost/signature-api-client-java
src/main/java/no/digipost/signature/client/direct/DirectClient.java
DirectClient.getStatus
public DirectJobStatusResponse getStatus(StatusReference statusReference) { """ Get the current status for the given {@link StatusReference}, which references the status for a specific job. When processing of the status is complete (e.g. retrieving {@link #getPAdES(PAdESReference) PAdES} and/or {@link #getXAdES(...
java
public DirectJobStatusResponse getStatus(StatusReference statusReference) { XMLDirectSignatureJobStatusResponse xmlSignatureJobStatusResponse = client.sendSignatureJobStatusRequest(statusReference.getStatusUrl()); return fromJaxb(xmlSignatureJobStatusResponse, null); }
[ "public", "DirectJobStatusResponse", "getStatus", "(", "StatusReference", "statusReference", ")", "{", "XMLDirectSignatureJobStatusResponse", "xmlSignatureJobStatusResponse", "=", "client", ".", "sendSignatureJobStatusRequest", "(", "statusReference", ".", "getStatusUrl", "(", ...
Get the current status for the given {@link StatusReference}, which references the status for a specific job. When processing of the status is complete (e.g. retrieving {@link #getPAdES(PAdESReference) PAdES} and/or {@link #getXAdES(XAdESReference) XAdES} documents for a {@link DirectJobStatus#COMPLETED_SUCCESSFULLY co...
[ "Get", "the", "current", "status", "for", "the", "given", "{", "@link", "StatusReference", "}", "which", "references", "the", "status", "for", "a", "specific", "job", ".", "When", "processing", "of", "the", "status", "is", "complete", "(", "e", ".", "g", ...
train
https://github.com/digipost/signature-api-client-java/blob/246207571641fbac6beda5ffc585eec188825c45/src/main/java/no/digipost/signature/client/direct/DirectClient.java#L58-L61
akamai/AkamaiOPEN-edgegrid-java
edgerc-reader/src/main/java/com/akamai/edgegrid/signer/EdgeRcClientCredentialProvider.java
EdgeRcClientCredentialProvider.fromEdgeRc
public static EdgeRcClientCredentialProvider fromEdgeRc(String filename, String section) throws ConfigurationException, IOException { """ Loads an EdgeRc configuration file and returns an {@link EdgeRcClientCredentialProvider} to read {@link ClientCredential}s from it. @param filename a filename po...
java
public static EdgeRcClientCredentialProvider fromEdgeRc(String filename, String section) throws ConfigurationException, IOException { if (filename == null || "".equals(filename)) { throw new IllegalArgumentException("filename cannot be null"); } filename = filename.replac...
[ "public", "static", "EdgeRcClientCredentialProvider", "fromEdgeRc", "(", "String", "filename", ",", "String", "section", ")", "throws", "ConfigurationException", ",", "IOException", "{", "if", "(", "filename", "==", "null", "||", "\"\"", ".", "equals", "(", "filen...
Loads an EdgeRc configuration file and returns an {@link EdgeRcClientCredentialProvider} to read {@link ClientCredential}s from it. @param filename a filename pointing to an EdgeRc file @param section a config section ({@code null} for the default section) @return a {@link EdgeRcClientCredentialProvider} @throws Confi...
[ "Loads", "an", "EdgeRc", "configuration", "file", "and", "returns", "an", "{", "@link", "EdgeRcClientCredentialProvider", "}", "to", "read", "{", "@link", "ClientCredential", "}", "s", "from", "it", "." ]
train
https://github.com/akamai/AkamaiOPEN-edgegrid-java/blob/29aa39f0f70f62503e6a434c4470ee25cb640f58/edgerc-reader/src/main/java/com/akamai/edgegrid/signer/EdgeRcClientCredentialProvider.java#L110-L118
hivemq/hivemq-spi
src/main/java/com/hivemq/spi/callback/schedule/ScheduleExpressions.java
ScheduleExpressions.everyMinutes
public static String everyMinutes(final int minutes) { """ Returns a quartz-style cron expression which is used to schedule something every X minutes. <p/> This is useful if you want to run a scheduled callback e.g. every 10 minutes. <p/> @param minutes the minutes @return the quartz-style cron expression f...
java
public static String everyMinutes(final int minutes) { final String minutePattern = "0 0/{0,number,#} * * * ?"; checkArgument(minutes > 0, "Only a number of minutes > 0 can be used for scheduling. %s was provided.", minutes); return format(minutePattern, minutes); }
[ "public", "static", "String", "everyMinutes", "(", "final", "int", "minutes", ")", "{", "final", "String", "minutePattern", "=", "\"0 0/{0,number,#} * * * ?\"", ";", "checkArgument", "(", "minutes", ">", "0", ",", "\"Only a number of minutes > 0 can be used for scheduling...
Returns a quartz-style cron expression which is used to schedule something every X minutes. <p/> This is useful if you want to run a scheduled callback e.g. every 10 minutes. <p/> @param minutes the minutes @return the quartz-style cron expression for the number of minutes passed @throws IllegalArgumentException if th...
[ "Returns", "a", "quartz", "-", "style", "cron", "expression", "which", "is", "used", "to", "schedule", "something", "every", "X", "minutes", ".", "<p", "/", ">", "This", "is", "useful", "if", "you", "want", "to", "run", "a", "scheduled", "callback", "e",...
train
https://github.com/hivemq/hivemq-spi/blob/55fa89ccb081ad5b6d46eaca02179272148e64ed/src/main/java/com/hivemq/spi/callback/schedule/ScheduleExpressions.java#L44-L49
liferay/com-liferay-commerce
commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationQueueEntryPersistenceImpl.java
CommerceNotificationQueueEntryPersistenceImpl.findByGroupId
@Override public List<CommerceNotificationQueueEntry> findByGroupId(long groupId) { """ Returns all the commerce notification queue entries where groupId = &#63;. @param groupId the group ID @return the matching commerce notification queue entries """ return findByGroupId(groupId, QueryUtil.ALL_POS, Que...
java
@Override public List<CommerceNotificationQueueEntry> findByGroupId(long groupId) { return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceNotificationQueueEntry", ">", "findByGroupId", "(", "long", "groupId", ")", "{", "return", "findByGroupId", "(", "groupId", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", "...
Returns all the commerce notification queue entries where groupId = &#63;. @param groupId the group ID @return the matching commerce notification queue entries
[ "Returns", "all", "the", "commerce", "notification", "queue", "entries", "where", "groupId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationQueueEntryPersistenceImpl.java#L128-L131
citrusframework/citrus
modules/citrus-rmi/src/main/java/com/consol/citrus/rmi/message/RmiMessageConverter.java
RmiMessageConverter.getServiceInvocation
private RmiServiceInvocation getServiceInvocation(Message message, RmiEndpointConfiguration endpointConfiguration) { """ Reads Citrus internal RMI message model object from message payload. Either payload is actually a service invocation object or XML payload String is unmarshalled to proper object representation...
java
private RmiServiceInvocation getServiceInvocation(Message message, RmiEndpointConfiguration endpointConfiguration) { Object payload = message.getPayload(); RmiServiceInvocation serviceInvocation = null; if (payload != null) { if (payload instanceof RmiServiceInvocation) { ...
[ "private", "RmiServiceInvocation", "getServiceInvocation", "(", "Message", "message", ",", "RmiEndpointConfiguration", "endpointConfiguration", ")", "{", "Object", "payload", "=", "message", ".", "getPayload", "(", ")", ";", "RmiServiceInvocation", "serviceInvocation", "=...
Reads Citrus internal RMI message model object from message payload. Either payload is actually a service invocation object or XML payload String is unmarshalled to proper object representation. @param message @param endpointConfiguration @return
[ "Reads", "Citrus", "internal", "RMI", "message", "model", "object", "from", "message", "payload", ".", "Either", "payload", "is", "actually", "a", "service", "invocation", "object", "or", "XML", "payload", "String", "is", "unmarshalled", "to", "proper", "object"...
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-rmi/src/main/java/com/consol/citrus/rmi/message/RmiMessageConverter.java#L68-L84
stripe/stripe-java
src/main/java/com/stripe/model/File.java
File.create
public static File create(FileCreateParams params, RequestOptions options) throws StripeException { """ To upload a file to Stripe, you’ll need to send a request of type {@code multipart/form-data}. The request should contain the file you would like to upload, as well as the parameters for creating a file....
java
public static File create(FileCreateParams params, RequestOptions options) throws StripeException { checkNullTypedParams(classUrl(File.class, Stripe.getUploadBase()), params); return create(params.toMap(), options); }
[ "public", "static", "File", "create", "(", "FileCreateParams", "params", ",", "RequestOptions", "options", ")", "throws", "StripeException", "{", "checkNullTypedParams", "(", "classUrl", "(", "File", ".", "class", ",", "Stripe", ".", "getUploadBase", "(", ")", "...
To upload a file to Stripe, you’ll need to send a request of type {@code multipart/form-data}. The request should contain the file you would like to upload, as well as the parameters for creating a file.
[ "To", "upload", "a", "file", "to", "Stripe", "you’ll", "need", "to", "send", "a", "request", "of", "type", "{" ]
train
https://github.com/stripe/stripe-java/blob/acfa8becef3e73bfe3e9d8880bea3f3f30dadeac/src/main/java/com/stripe/model/File.java#L93-L97
SonarSource/sonarqube
server/sonar-server/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java
ServerPluginRepository.appendDependentPluginKeys
private void appendDependentPluginKeys(String pluginKey, Set<String> appendTo) { """ Appends dependent plugins, only the ones that still exist in the plugins folder. """ for (PluginInfo otherPlugin : getPluginInfos()) { if (!otherPlugin.getKey().equals(pluginKey)) { for (PluginInfo.RequiredPl...
java
private void appendDependentPluginKeys(String pluginKey, Set<String> appendTo) { for (PluginInfo otherPlugin : getPluginInfos()) { if (!otherPlugin.getKey().equals(pluginKey)) { for (PluginInfo.RequiredPlugin requirement : otherPlugin.getRequiredPlugins()) { if (requirement.getKey().equals(p...
[ "private", "void", "appendDependentPluginKeys", "(", "String", "pluginKey", ",", "Set", "<", "String", ">", "appendTo", ")", "{", "for", "(", "PluginInfo", "otherPlugin", ":", "getPluginInfos", "(", ")", ")", "{", "if", "(", "!", "otherPlugin", ".", "getKey"...
Appends dependent plugins, only the ones that still exist in the plugins folder.
[ "Appends", "dependent", "plugins", "only", "the", "ones", "that", "still", "exist", "in", "the", "plugins", "folder", "." ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java#L314-L325
StripesFramework/stripes-stuff
src/main/java/org/stripesstuff/plugin/security/SecurityInterceptor.java
SecurityInterceptor.handleAccessDenied
protected Resolution handleAccessDenied(ActionBean bean, Method handler) { """ Determine what to do when access has been denied. If the SecurityManager implements the optional interface [@Link SecurityHandler}, ask the SecurityManager. Otherwise, return the HTTP error "forbidden". @param bean the action bea...
java
protected Resolution handleAccessDenied(ActionBean bean, Method handler) { Resolution resolution; if (securityManager instanceof SecurityHandler) { resolution = ((SecurityHandler)securityManager).handleAccessDenied(bean, handler); } else { resolution = new ErrorResolution(HttpServletResponse.SC_UNAUT...
[ "protected", "Resolution", "handleAccessDenied", "(", "ActionBean", "bean", ",", "Method", "handler", ")", "{", "Resolution", "resolution", ";", "if", "(", "securityManager", "instanceof", "SecurityHandler", ")", "{", "resolution", "=", "(", "(", "SecurityHandler", ...
Determine what to do when access has been denied. If the SecurityManager implements the optional interface [@Link SecurityHandler}, ask the SecurityManager. Otherwise, return the HTTP error "forbidden". @param bean the action bean to which access was denied @param handler the event handler to which access was denie...
[ "Determine", "what", "to", "do", "when", "access", "has", "been", "denied", ".", "If", "the", "SecurityManager", "implements", "the", "optional", "interface", "[", "@Link", "SecurityHandler", "}", "ask", "the", "SecurityManager", ".", "Otherwise", "return", "the...
train
https://github.com/StripesFramework/stripes-stuff/blob/51ad92b4bd5862ba34d7c18c5829fb00ea3a3811/src/main/java/org/stripesstuff/plugin/security/SecurityInterceptor.java#L267-L279
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/GridMemoryFieldTable.java
GridMemoryFieldTable.init
public void init(Rec record, PTable tableRemote, PhysicalDatabaseParent dbOwner) { """ Constructor. @param record The record to handle. @param tableRemote The remote table. @param server The remote server (only used for synchronization). """ super.init(record, tableRemote, dbOwner); m_iPhysi...
java
public void init(Rec record, PTable tableRemote, PhysicalDatabaseParent dbOwner) { super.init(record, tableRemote, dbOwner); m_iPhysicalIndex = NO_INDEX; m_iLogicalIndex = NO_INDEX; }
[ "public", "void", "init", "(", "Rec", "record", ",", "PTable", "tableRemote", ",", "PhysicalDatabaseParent", "dbOwner", ")", "{", "super", ".", "init", "(", "record", ",", "tableRemote", ",", "dbOwner", ")", ";", "m_iPhysicalIndex", "=", "NO_INDEX", ";", "m_...
Constructor. @param record The record to handle. @param tableRemote The remote table. @param server The remote server (only used for synchronization).
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/GridMemoryFieldTable.java#L77-L82
xsonorg/xson
src/main/java/org/xson/core/asm/ClassReader.java
ClassReader.readUTF
private String readUTF(int index, final int utfLen, final char[] buf) { """ Reads UTF8 string in {@link #b b}. @param index start offset of the UTF8 string to be read. @param utfLen length of the UTF8 string to be read. @param buf buffer to be used to read the string. This buffer must be sufficiently large. ...
java
private String readUTF(int index, final int utfLen, final char[] buf) { int endIndex = index + utfLen; byte[] b = this.b; int strLen = 0; int c, d, e; while (index < endIndex) { c = b[index++] & 0xFF; switch (c >> 4) { case 0: ...
[ "private", "String", "readUTF", "(", "int", "index", ",", "final", "int", "utfLen", ",", "final", "char", "[", "]", "buf", ")", "{", "int", "endIndex", "=", "index", "+", "utfLen", ";", "byte", "[", "]", "b", "=", "this", ".", "b", ";", "int", "s...
Reads UTF8 string in {@link #b b}. @param index start offset of the UTF8 string to be read. @param utfLen length of the UTF8 string to be read. @param buf buffer to be used to read the string. This buffer must be sufficiently large. It is not automatically resized. @return the String corresponding to the specified UTF...
[ "Reads", "UTF8", "string", "in", "{", "@link", "#b", "b", "}", "." ]
train
https://github.com/xsonorg/xson/blob/ce1e197ec4ef9be448ed6ca96513e886151f83a9/src/main/java/org/xson/core/asm/ClassReader.java#L1924-L1959
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.updateNote
public GitlabNote updateNote(GitlabMergeRequest mergeRequest, Integer noteId, String body) throws IOException { """ Update a Merge Request Note @param mergeRequest The merge request @param noteId The id of the note @param body The content of the note @return the Gitlab Note @throws IOException...
java
public GitlabNote updateNote(GitlabMergeRequest mergeRequest, Integer noteId, String body) throws IOException { Query query = new Query() .appendIf("body", body); String tailUrl = GitlabProject.URL + "/" + mergeRequest.getProjectId() + GitlabMergeRequest.URL + "/" + merg...
[ "public", "GitlabNote", "updateNote", "(", "GitlabMergeRequest", "mergeRequest", ",", "Integer", "noteId", ",", "String", "body", ")", "throws", "IOException", "{", "Query", "query", "=", "new", "Query", "(", ")", ".", "appendIf", "(", "\"body\"", ",", "body",...
Update a Merge Request Note @param mergeRequest The merge request @param noteId The id of the note @param body The content of the note @return the Gitlab Note @throws IOException on gitlab api call error
[ "Update", "a", "Merge", "Request", "Note" ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L2267-L2275
rhuss/jolokia
agent/core/src/main/java/org/jolokia/handler/ExecHandler.java
ExecHandler.doHandleRequest
@Override public Object doHandleRequest(MBeanServerConnection server, JmxExecRequest request) throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException, IOException { """ Execute an JMX operation. The operation name is taken from the request, as well as the ...
java
@Override public Object doHandleRequest(MBeanServerConnection server, JmxExecRequest request) throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException, IOException { OperationAndParamType types = extractOperationTypes(server,request); int nrParams...
[ "@", "Override", "public", "Object", "doHandleRequest", "(", "MBeanServerConnection", "server", ",", "JmxExecRequest", "request", ")", "throws", "InstanceNotFoundException", ",", "AttributeNotFoundException", ",", "ReflectionException", ",", "MBeanException", ",", "IOExcept...
Execute an JMX operation. The operation name is taken from the request, as well as the arguments to use. If the operation is given in the format "op(type1,type2,...)" (e.g "getText(java.lang.String,int)" then the argument types are taken into account as well. This way, overloaded JMX operation can be used. If an overlo...
[ "Execute", "an", "JMX", "operation", ".", "The", "operation", "name", "is", "taken", "from", "the", "request", "as", "well", "as", "the", "arguments", "to", "use", ".", "If", "the", "operation", "is", "given", "in", "the", "format", "op", "(", "type1", ...
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/handler/ExecHandler.java#L81-L99
CloudSlang/cs-actions
cs-commons/src/main/java/io/cloudslang/content/utils/StringEscapeUtilities.java
StringEscapeUtilities.unescapeChars
@NotNull public static String unescapeChars(@NotNull final String string, final char[] toUnescape) { """ Unscape all the occurrences of the <toUnescape> characters from the <string> @param string the string from which to unescape the characters @param toUnescape the characters to unescape as Array @re...
java
@NotNull public static String unescapeChars(@NotNull final String string, final char[] toUnescape) { String toReturn = string; for (char character : toUnescape) { toReturn = unescapeChar(toReturn, character); } return toReturn; }
[ "@", "NotNull", "public", "static", "String", "unescapeChars", "(", "@", "NotNull", "final", "String", "string", ",", "final", "char", "[", "]", "toUnescape", ")", "{", "String", "toReturn", "=", "string", ";", "for", "(", "char", "character", ":", "toUnes...
Unscape all the occurrences of the <toUnescape> characters from the <string> @param string the string from which to unescape the characters @param toUnescape the characters to unescape as Array @return a new string with the unescaped <toUnescape> characters
[ "Unscape", "all", "the", "occurrences", "of", "the", "<toUnescape", ">", "characters", "from", "the", "<string", ">" ]
train
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-commons/src/main/java/io/cloudslang/content/utils/StringEscapeUtilities.java#L81-L88
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/entity/Dashboard.java
Dashboard.findByNameAndOwner
public static Dashboard findByNameAndOwner(EntityManager em, String dashboardName, PrincipalUser owner) { """ Finds Dashboard in the database with the specified dashboard name and owned by the specified owner. @param em The entity manager to use. @param dashboardName The name of the dashboard ...
java
public static Dashboard findByNameAndOwner(EntityManager em, String dashboardName, PrincipalUser owner) { TypedQuery<Dashboard> query = em.createNamedQuery("Dashboard.findByNameAndOwner", Dashboard.class); try { query.setParameter("name", dashboardName); query.setParameter("owne...
[ "public", "static", "Dashboard", "findByNameAndOwner", "(", "EntityManager", "em", ",", "String", "dashboardName", ",", "PrincipalUser", "owner", ")", "{", "TypedQuery", "<", "Dashboard", ">", "query", "=", "em", ".", "createNamedQuery", "(", "\"Dashboard.findByName...
Finds Dashboard in the database with the specified dashboard name and owned by the specified owner. @param em The entity manager to use. @param dashboardName The name of the dashboard to retrieve. Cannot be null or empty. @param owner The owner of the dashboard. Cannot be null. @return Th...
[ "Finds", "Dashboard", "in", "the", "database", "with", "the", "specified", "dashboard", "name", "and", "owned", "by", "the", "specified", "owner", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/entity/Dashboard.java#L176-L186
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceSubscriptionEntryPersistenceImpl.java
CommerceSubscriptionEntryPersistenceImpl.findAll
@Override public List<CommerceSubscriptionEntry> findAll(int start, int end) { """ Returns a range of all the commerce subscription entries. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are index...
java
@Override public List<CommerceSubscriptionEntry> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceSubscriptionEntry", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the commerce subscription entries. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting bo...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "subscription", "entries", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceSubscriptionEntryPersistenceImpl.java#L4141-L4144
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/StringUtils.java
StringUtils.printToFileLn
public static void printToFileLn(File file, String message, boolean append) { """ Prints to a file. If the file already exists, appends if <code>append=true</code>, and overwrites if <code>append=false</code>. """ PrintWriter pw = null; try { Writer fw = new FileWriter(file, append); ...
java
public static void printToFileLn(File file, String message, boolean append) { PrintWriter pw = null; try { Writer fw = new FileWriter(file, append); pw = new PrintWriter(fw); pw.println(message); } catch (Exception e) { System.err.println("Exception: in printToFileLn " + file....
[ "public", "static", "void", "printToFileLn", "(", "File", "file", ",", "String", "message", ",", "boolean", "append", ")", "{", "PrintWriter", "pw", "=", "null", ";", "try", "{", "Writer", "fw", "=", "new", "FileWriter", "(", "file", ",", "append", ")", ...
Prints to a file. If the file already exists, appends if <code>append=true</code>, and overwrites if <code>append=false</code>.
[ "Prints", "to", "a", "file", ".", "If", "the", "file", "already", "exists", "appends", "if", "<code", ">", "append", "=", "true<", "/", "code", ">", "and", "overwrites", "if", "<code", ">", "append", "=", "false<", "/", "code", ">", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/StringUtils.java#L909-L924
w3c/epubcheck
src/main/java/com/adobe/epubcheck/opf/MetadataSet.java
MetadataSet.containsPrimary
public boolean containsPrimary(Property property, String value) { """ Returns <code>true</code> if this metadata set contains a primary expression for the given property and the given value @param property a property from a metadata vocabulary @param value the value to search @return <code>true</code> if t...
java
public boolean containsPrimary(Property property, String value) { for (Metadata meta : primary.get(property)) { if (meta.getValue().equals(value)) { return true; } } return false; }
[ "public", "boolean", "containsPrimary", "(", "Property", "property", ",", "String", "value", ")", "{", "for", "(", "Metadata", "meta", ":", "primary", ".", "get", "(", "property", ")", ")", "{", "if", "(", "meta", ".", "getValue", "(", ")", ".", "equal...
Returns <code>true</code> if this metadata set contains a primary expression for the given property and the given value @param property a property from a metadata vocabulary @param value the value to search @return <code>true</code> if this metadata set contains a primary expression for the given property and value
[ "Returns", "<code", ">", "true<", "/", "code", ">", "if", "this", "metadata", "set", "contains", "a", "primary", "expression", "for", "the", "given", "property", "and", "the", "given", "value" ]
train
https://github.com/w3c/epubcheck/blob/4d5a24d9f2878a2a5497eb11c036cc18fe2c0a78/src/main/java/com/adobe/epubcheck/opf/MetadataSet.java#L124-L134
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/Index.java
Index.dropNamedPrimaryIndex
public static UsingPath dropNamedPrimaryIndex(String namespace, String keyspace, String customPrimaryName) { """ Drop the primary index of the given namespace:keyspace that has a custom name. @param namespace the namespace prefix (will be escaped). @param keyspace the keyspace (bucket, will be escaped). @para...
java
public static UsingPath dropNamedPrimaryIndex(String namespace, String keyspace, String customPrimaryName) { //N1QL syntax for dropping a primary with a name is actually similar to dropping secondary index return new DefaultDropPath().drop(namespace, keyspace, customPrimaryName); }
[ "public", "static", "UsingPath", "dropNamedPrimaryIndex", "(", "String", "namespace", ",", "String", "keyspace", ",", "String", "customPrimaryName", ")", "{", "//N1QL syntax for dropping a primary with a name is actually similar to dropping secondary index", "return", "new", "Def...
Drop the primary index of the given namespace:keyspace that has a custom name. @param namespace the namespace prefix (will be escaped). @param keyspace the keyspace (bucket, will be escaped). @param customPrimaryName the custom name for the primary index (will be escaped).
[ "Drop", "the", "primary", "index", "of", "the", "given", "namespace", ":", "keyspace", "that", "has", "a", "custom", "name", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/Index.java#L128-L131
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/core/DynamicJasperHelper.java
DynamicJasperHelper.generateJasperPrint
public static JasperPrint generateJasperPrint(DynamicReport dr, LayoutManager layoutManager, JRDataSource ds, Map<String, Object> _parameters) throws JRException { """ Compiles and fills the reports design. @param dr the DynamicReport @param layoutManager the object in charge of doing the layout @p...
java
public static JasperPrint generateJasperPrint(DynamicReport dr, LayoutManager layoutManager, JRDataSource ds, Map<String, Object> _parameters) throws JRException { log.info("generating JasperPrint"); JasperPrint jp; JasperReport jr = DynamicJasperHelper.generateJasperReport(dr, layoutManager, ...
[ "public", "static", "JasperPrint", "generateJasperPrint", "(", "DynamicReport", "dr", ",", "LayoutManager", "layoutManager", ",", "JRDataSource", "ds", ",", "Map", "<", "String", ",", "Object", ">", "_parameters", ")", "throws", "JRException", "{", "log", ".", "...
Compiles and fills the reports design. @param dr the DynamicReport @param layoutManager the object in charge of doing the layout @param ds The datasource @param _parameters Map with parameters that the report may need @return @throws JRException
[ "Compiles", "and", "fills", "the", "reports", "design", "." ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/DynamicJasperHelper.java#L238-L247
twitter/cloudhopper-commons
ch-commons-util/src/main/java/com/cloudhopper/commons/util/MetaFieldUtil.java
MetaFieldUtil.toMetaFieldInfoArray
public static MetaFieldInfo[] toMetaFieldInfoArray(Object obj, String stringForNullValues) { """ Returns a new MetaFieldInfo array of all Fields annotated with MetaField in the runtime object type. If the object is null, this method will return null. NOTE: This method recursively searches the object. @param obj...
java
public static MetaFieldInfo[] toMetaFieldInfoArray(Object obj, String stringForNullValues) { return toMetaFieldInfoArray(obj, stringForNullValues, false); }
[ "public", "static", "MetaFieldInfo", "[", "]", "toMetaFieldInfoArray", "(", "Object", "obj", ",", "String", "stringForNullValues", ")", "{", "return", "toMetaFieldInfoArray", "(", "obj", ",", "stringForNullValues", ",", "false", ")", ";", "}" ]
Returns a new MetaFieldInfo array of all Fields annotated with MetaField in the runtime object type. If the object is null, this method will return null. NOTE: This method recursively searches the object. @param obj The runtime instance of the object to search. It must be an instance of the type. If its a subclass of ...
[ "Returns", "a", "new", "MetaFieldInfo", "array", "of", "all", "Fields", "annotated", "with", "MetaField", "in", "the", "runtime", "object", "type", ".", "If", "the", "object", "is", "null", "this", "method", "will", "return", "null", ".", "NOTE", ":", "Thi...
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-util/src/main/java/com/cloudhopper/commons/util/MetaFieldUtil.java#L95-L97
xwiki/xwiki-rendering
xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/WikiScannerUtil.java
WikiScannerUtil.extractSubstring
public static String extractSubstring(String str, String open, String close) { """ Extracts and returns a substring of the given string starting from the given open sequence and finishing by the specified close sequence. This method unescapes all symbols prefixed by the given escape symbol. @param str from th...
java
public static String extractSubstring(String str, String open, String close) { return extractSubstring(str, open, close, DEFAULT_ESCAPECHAR, true); }
[ "public", "static", "String", "extractSubstring", "(", "String", "str", ",", "String", "open", ",", "String", "close", ")", "{", "return", "extractSubstring", "(", "str", ",", "open", ",", "close", ",", "DEFAULT_ESCAPECHAR", ",", "true", ")", ";", "}" ]
Extracts and returns a substring of the given string starting from the given open sequence and finishing by the specified close sequence. This method unescapes all symbols prefixed by the given escape symbol. @param str from this string the substring framed by the specified open and close sequence will be returned @pa...
[ "Extracts", "and", "returns", "a", "substring", "of", "the", "given", "string", "starting", "from", "the", "given", "open", "sequence", "and", "finishing", "by", "the", "specified", "close", "sequence", ".", "This", "method", "unescapes", "all", "symbols", "pr...
train
https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/WikiScannerUtil.java#L51-L54
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/util/MirrorTable.java
MirrorTable.syncTables
public Record syncTables(BaseTable tblTarget, Record recSource) throws DBException { """ Read the mirrored record. @param tblTarget The table to read the same record from. @param recSource Source record @return The target table's record. """ tblTarget.getRecord().readSameRecord(recSource, false, fal...
java
public Record syncTables(BaseTable tblTarget, Record recSource) throws DBException { tblTarget.getRecord().readSameRecord(recSource, false, false); return tblTarget.getRecord(); }
[ "public", "Record", "syncTables", "(", "BaseTable", "tblTarget", ",", "Record", "recSource", ")", "throws", "DBException", "{", "tblTarget", ".", "getRecord", "(", ")", ".", "readSameRecord", "(", "recSource", ",", "false", ",", "false", ")", ";", "return", ...
Read the mirrored record. @param tblTarget The table to read the same record from. @param recSource Source record @return The target table's record.
[ "Read", "the", "mirrored", "record", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/util/MirrorTable.java#L372-L376
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/Preconditions.java
Preconditions.checkNotNull
public static <T> T checkNotNull(T argument, String errorMessage) { """ Tests if an argument is not null. @param argument the argument tested to see if it is not null. @param errorMessage the errorMessage @return the argument that was tested. @throws java.lang.NullPointerException if argument is null ...
java
public static <T> T checkNotNull(T argument, String errorMessage) { if (argument == null) { throw new NullPointerException(errorMessage); } return argument; }
[ "public", "static", "<", "T", ">", "T", "checkNotNull", "(", "T", "argument", ",", "String", "errorMessage", ")", "{", "if", "(", "argument", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "errorMessage", ")", ";", "}", "return", "a...
Tests if an argument is not null. @param argument the argument tested to see if it is not null. @param errorMessage the errorMessage @return the argument that was tested. @throws java.lang.NullPointerException if argument is null
[ "Tests", "if", "an", "argument", "is", "not", "null", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/Preconditions.java#L57-L62
nemerosa/ontrack
ontrack-extension-jenkins/src/main/java/net/nemerosa/ontrack/extension/jenkins/JenkinsBuildPropertyType.java
JenkinsBuildPropertyType.canEdit
@Override public boolean canEdit(ProjectEntity entity, SecurityService securityService) { """ Depends on the nature of the entity. Allowed to the ones who can create the associated entity. """ switch (entity.getProjectEntityType()) { case BUILD: return securityService.is...
java
@Override public boolean canEdit(ProjectEntity entity, SecurityService securityService) { switch (entity.getProjectEntityType()) { case BUILD: return securityService.isProjectFunctionGranted(entity, BuildCreate.class); case PROMOTION_RUN: return securi...
[ "@", "Override", "public", "boolean", "canEdit", "(", "ProjectEntity", "entity", ",", "SecurityService", "securityService", ")", "{", "switch", "(", "entity", ".", "getProjectEntityType", "(", ")", ")", "{", "case", "BUILD", ":", "return", "securityService", "."...
Depends on the nature of the entity. Allowed to the ones who can create the associated entity.
[ "Depends", "on", "the", "nature", "of", "the", "entity", ".", "Allowed", "to", "the", "ones", "who", "can", "create", "the", "associated", "entity", "." ]
train
https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-jenkins/src/main/java/net/nemerosa/ontrack/extension/jenkins/JenkinsBuildPropertyType.java#L52-L64
alkacon/opencms-core
src/org/opencms/gwt/shared/property/CmsPropertyModification.java
CmsPropertyModification.updatePropertyInMap
public void updatePropertyInMap(Map<String, CmsClientProperty> props) { """ Helper method for applying the change to a property map.<p> @param props a map of properties """ CmsClientProperty prop = props.get(getName()); if (prop == null) { prop = new CmsClientProperty(getName(),...
java
public void updatePropertyInMap(Map<String, CmsClientProperty> props) { CmsClientProperty prop = props.get(getName()); if (prop == null) { prop = new CmsClientProperty(getName(), "", ""); props.put(getName(), prop); } if (isStructureValue()) { prop.se...
[ "public", "void", "updatePropertyInMap", "(", "Map", "<", "String", ",", "CmsClientProperty", ">", "props", ")", "{", "CmsClientProperty", "prop", "=", "props", ".", "get", "(", "getName", "(", ")", ")", ";", "if", "(", "prop", "==", "null", ")", "{", ...
Helper method for applying the change to a property map.<p> @param props a map of properties
[ "Helper", "method", "for", "applying", "the", "change", "to", "a", "property", "map", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/shared/property/CmsPropertyModification.java#L168-L180
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/TimedMessage.java
TimedMessage.addMessage
public void addMessage(String message, int x, int y, long time) { """ Add a timed message. @param message The message string. @param x The horizontal location. @param y The vertical location. @param time The remaining time. """ messages.add(new MessageData(message, x, y, time)); hasMess...
java
public void addMessage(String message, int x, int y, long time) { messages.add(new MessageData(message, x, y, time)); hasMessage = true; }
[ "public", "void", "addMessage", "(", "String", "message", ",", "int", "x", ",", "int", "y", ",", "long", "time", ")", "{", "messages", ".", "add", "(", "new", "MessageData", "(", "message", ",", "x", ",", "y", ",", "time", ")", ")", ";", "hasMessag...
Add a timed message. @param message The message string. @param x The horizontal location. @param y The vertical location. @param time The remaining time.
[ "Add", "a", "timed", "message", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/TimedMessage.java#L69-L73
TheHortonMachine/hortonmachine
dbs/src/main/java/org/hortonmachine/ssh/SshUtilities.java
SshUtilities.getPreference
public static String getPreference( String preferenceKey, String defaultValue ) { """ Get from preference. @param preferenceKey the preference key. @param defaultValue the default value in case of <code>null</code>. @return the string preference asked. """ Preferences preferences = Preferences.u...
java
public static String getPreference( String preferenceKey, String defaultValue ) { Preferences preferences = Preferences.userRoot().node(PREFS_NODE_NAME); String preference = preferences.get(preferenceKey, defaultValue); return preference; }
[ "public", "static", "String", "getPreference", "(", "String", "preferenceKey", ",", "String", "defaultValue", ")", "{", "Preferences", "preferences", "=", "Preferences", ".", "userRoot", "(", ")", ".", "node", "(", "PREFS_NODE_NAME", ")", ";", "String", "prefere...
Get from preference. @param preferenceKey the preference key. @param defaultValue the default value in case of <code>null</code>. @return the string preference asked.
[ "Get", "from", "preference", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/dbs/src/main/java/org/hortonmachine/ssh/SshUtilities.java#L56-L60
sporniket/core
sporniket-core-ui/src/main/java/com/sporniket/libre/ui/swing/ComponentFactory.java
ComponentFactory.getImageIcon
public static Icon getImageIcon(UrlProvider urlProvider, String fileName) throws UrlProviderException { """ Create an Image based icon from a String. @param urlProvider The URL provider. @param fileName the name of the file. @return an Icon. @throws UrlProviderException if there is a problem to deal with. ...
java
public static Icon getImageIcon(UrlProvider urlProvider, String fileName) throws UrlProviderException { URL _icon = urlProvider.getUrl(fileName); return new ImageIcon(_icon); }
[ "public", "static", "Icon", "getImageIcon", "(", "UrlProvider", "urlProvider", ",", "String", "fileName", ")", "throws", "UrlProviderException", "{", "URL", "_icon", "=", "urlProvider", ".", "getUrl", "(", "fileName", ")", ";", "return", "new", "ImageIcon", "(",...
Create an Image based icon from a String. @param urlProvider The URL provider. @param fileName the name of the file. @return an Icon. @throws UrlProviderException if there is a problem to deal with.
[ "Create", "an", "Image", "based", "icon", "from", "a", "String", "." ]
train
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-ui/src/main/java/com/sporniket/libre/ui/swing/ComponentFactory.java#L119-L123
elki-project/elki
elki-index-various/src/main/java/de/lmu/ifi/dbs/elki/index/invertedlist/InMemoryInvertedIndex.java
InMemoryInvertedIndex.indexSparse
private void indexSparse(DBIDRef ref, SparseNumberVector obj) { """ Index a single (sparse) instance. @param ref Object reference @param obj Object to index. """ double len = 0.; for(int iter = obj.iter(); obj.iterValid(iter); iter = obj.iterAdvance(iter)) { final int dim = obj.iterDim(iter);...
java
private void indexSparse(DBIDRef ref, SparseNumberVector obj) { double len = 0.; for(int iter = obj.iter(); obj.iterValid(iter); iter = obj.iterAdvance(iter)) { final int dim = obj.iterDim(iter); final double val = obj.iterDoubleValue(iter); if(val == 0. || val != val) { continue; ...
[ "private", "void", "indexSparse", "(", "DBIDRef", "ref", ",", "SparseNumberVector", "obj", ")", "{", "double", "len", "=", "0.", ";", "for", "(", "int", "iter", "=", "obj", ".", "iter", "(", ")", ";", "obj", ".", "iterValid", "(", "iter", ")", ";", ...
Index a single (sparse) instance. @param ref Object reference @param obj Object to index.
[ "Index", "a", "single", "(", "sparse", ")", "instance", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-various/src/main/java/de/lmu/ifi/dbs/elki/index/invertedlist/InMemoryInvertedIndex.java#L126-L138
xvik/dropwizard-guicey
src/main/java/ru/vyarus/dropwizard/guice/module/installer/util/BundleSupport.java
BundleSupport.processBundles
public static void processBundles(final ConfigurationContext context) { """ Process initially registered and all transitive bundles. <ul> <li>Executing initial bundles (registered in {@link ru.vyarus.dropwizard.guice.GuiceBundle} and by bundle lookup)</li> <li>During execution bundles may register other bundle...
java
public static void processBundles(final ConfigurationContext context) { final List<GuiceyBundle> bundles = context.getEnabledBundles(); final List<Class<? extends GuiceyBundle>> installedBundles = Lists.newArrayList(); final GuiceyBootstrap guiceyBootstrap = new GuiceyBootstrap(context, bundles)...
[ "public", "static", "void", "processBundles", "(", "final", "ConfigurationContext", "context", ")", "{", "final", "List", "<", "GuiceyBundle", ">", "bundles", "=", "context", ".", "getEnabledBundles", "(", ")", ";", "final", "List", "<", "Class", "<", "?", "...
Process initially registered and all transitive bundles. <ul> <li>Executing initial bundles (registered in {@link ru.vyarus.dropwizard.guice.GuiceBundle} and by bundle lookup)</li> <li>During execution bundles may register other bundles (through {@link GuiceyBootstrap})</li> <li>Execute registered bundles and repeat fr...
[ "Process", "initially", "registered", "and", "all", "transitive", "bundles", ".", "<ul", ">", "<li", ">", "Executing", "initial", "bundles", "(", "registered", "in", "{", "@link", "ru", ".", "vyarus", ".", "dropwizard", ".", "guice", ".", "GuiceBundle", "}",...
train
https://github.com/xvik/dropwizard-guicey/blob/dd39ad77283555be21f606d5ebf0f11207a733d4/src/main/java/ru/vyarus/dropwizard/guice/module/installer/util/BundleSupport.java#L40-L67
UrielCh/ovh-java-sdk
ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java
ApiOvhIp.ip_game_ipOnGame_GET
public OvhGameMitigation ip_game_ipOnGame_GET(String ip, String ipOnGame) throws IOException { """ Get this object properties REST: GET /ip/{ip}/game/{ipOnGame} @param ip [required] @param ipOnGame [required] """ String qPath = "/ip/{ip}/game/{ipOnGame}"; StringBuilder sb = path(qPath, ip, ipOnGame); ...
java
public OvhGameMitigation ip_game_ipOnGame_GET(String ip, String ipOnGame) throws IOException { String qPath = "/ip/{ip}/game/{ipOnGame}"; StringBuilder sb = path(qPath, ip, ipOnGame); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhGameMitigation.class); }
[ "public", "OvhGameMitigation", "ip_game_ipOnGame_GET", "(", "String", "ip", ",", "String", "ipOnGame", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ip/{ip}/game/{ipOnGame}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "ip", ",",...
Get this object properties REST: GET /ip/{ip}/game/{ipOnGame} @param ip [required] @param ipOnGame [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L391-L396
google/closure-compiler
src/com/google/javascript/jscomp/ControlFlowAnalysis.java
ControlFlowAnalysis.isBreakTarget
public static boolean isBreakTarget(Node target, String label) { """ Checks if target is actually the break target of labeled continue. The label can be null if it is an unlabeled break. """ return isBreakStructure(target, label != null) && matchLabel(target.getParent(), label); }
java
public static boolean isBreakTarget(Node target, String label) { return isBreakStructure(target, label != null) && matchLabel(target.getParent(), label); }
[ "public", "static", "boolean", "isBreakTarget", "(", "Node", "target", ",", "String", "label", ")", "{", "return", "isBreakStructure", "(", "target", ",", "label", "!=", "null", ")", "&&", "matchLabel", "(", "target", ".", "getParent", "(", ")", ",", "labe...
Checks if target is actually the break target of labeled continue. The label can be null if it is an unlabeled break.
[ "Checks", "if", "target", "is", "actually", "the", "break", "target", "of", "labeled", "continue", ".", "The", "label", "can", "be", "null", "if", "it", "is", "an", "unlabeled", "break", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/ControlFlowAnalysis.java#L928-L931
spockframework/spock
spock-core/src/main/java/spock/mock/DetachedMockFactory.java
DetachedMockFactory.Spy
@Override public <T> T Spy(Map<String, Object> options, Class<T> type) { """ Creates a spy with the specified options and type. The mock name will be the types simple name. Example: <pre> def person = Spy(Person, name: "myPerson") // type is Person.class, name is "myPerson" </pre> @param options optio...
java
@Override public <T> T Spy(Map<String, Object> options, Class<T> type) { return createMock(inferNameFromType(type), type, MockNature.SPY, options); }
[ "@", "Override", "public", "<", "T", ">", "T", "Spy", "(", "Map", "<", "String", ",", "Object", ">", "options", ",", "Class", "<", "T", ">", "type", ")", "{", "return", "createMock", "(", "inferNameFromType", "(", "type", ")", ",", "type", ",", "Mo...
Creates a spy with the specified options and type. The mock name will be the types simple name. Example: <pre> def person = Spy(Person, name: "myPerson") // type is Person.class, name is "myPerson" </pre> @param options optional options for creating the spy @param type the class type of the spy @param <T> the class ...
[ "Creates", "a", "spy", "with", "the", "specified", "options", "and", "type", ".", "The", "mock", "name", "will", "be", "the", "types", "simple", "name", "." ]
train
https://github.com/spockframework/spock/blob/d751a0abd8d5a2ec5338aa10bc2d19371b3b3ad9/spock-core/src/main/java/spock/mock/DetachedMockFactory.java#L148-L151
JM-Lab/utils-java8
src/main/java/kr/jm/utils/time/JMTimeUtil.java
JMTimeUtil.getTimeMillis
public static long getTimeMillis(int year, int month, int dayOfMonth, String zoneId) { """ Gets time millis. @param year the year @param month the month @param dayOfMonth the day of month @param zoneId the zone id @return the time millis """ return getTimeMillis(year, ...
java
public static long getTimeMillis(int year, int month, int dayOfMonth, String zoneId) { return getTimeMillis(year, month, dayOfMonth, 0, 0, 0, zoneId); }
[ "public", "static", "long", "getTimeMillis", "(", "int", "year", ",", "int", "month", ",", "int", "dayOfMonth", ",", "String", "zoneId", ")", "{", "return", "getTimeMillis", "(", "year", ",", "month", ",", "dayOfMonth", ",", "0", ",", "0", ",", "0", ",...
Gets time millis. @param year the year @param month the month @param dayOfMonth the day of month @param zoneId the zone id @return the time millis
[ "Gets", "time", "millis", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/time/JMTimeUtil.java#L781-L784
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionValuePersistenceImpl.java
CPOptionValuePersistenceImpl.findByCompanyId
@Override public List<CPOptionValue> findByCompanyId(long companyId, int start, int end) { """ Returns a range of all the cp option values where companyId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not pri...
java
@Override public List<CPOptionValue> findByCompanyId(long companyId, int start, int end) { return findByCompanyId(companyId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CPOptionValue", ">", "findByCompanyId", "(", "long", "companyId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByCompanyId", "(", "companyId", ",", "start", ",", "end", ",", "null", ")", ";", "...
Returns a range of all the cp option values where companyId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set....
[ "Returns", "a", "range", "of", "all", "the", "cp", "option", "values", "where", "companyId", "=", "&#63", ";", "." ]
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#L2036-L2040
apache/incubator-gobblin
gobblin-modules/gobblin-compliance/src/main/java/org/apache/gobblin/compliance/restore/LKGRestorePolicy.java
LKGRestorePolicy.isRestorable
private boolean isRestorable(HivePartitionDataset dataset, HivePartitionVersion version) throws IOException { """ A version is called restorable if it can be used to restore dataset. If a version is pointing to same data location as of the dataset, then it can't be used for restoring If a version is poin...
java
private boolean isRestorable(HivePartitionDataset dataset, HivePartitionVersion version) throws IOException { if (version.getLocation().toString().equalsIgnoreCase(dataset.getLocation().toString())) { return false; } FileSystem fs = ProxyUtils.getOwnerFs(new State(this.state), version.getOwner()...
[ "private", "boolean", "isRestorable", "(", "HivePartitionDataset", "dataset", ",", "HivePartitionVersion", "version", ")", "throws", "IOException", "{", "if", "(", "version", ".", "getLocation", "(", ")", ".", "toString", "(", ")", ".", "equalsIgnoreCase", "(", ...
A version is called restorable if it can be used to restore dataset. If a version is pointing to same data location as of the dataset, then it can't be used for restoring If a version is pointing to an empty data location, then it can't be used for restoring
[ "A", "version", "is", "called", "restorable", "if", "it", "can", "be", "used", "to", "restore", "dataset", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-compliance/src/main/java/org/apache/gobblin/compliance/restore/LKGRestorePolicy.java#L81-L91
Nordstrom/JUnit-Foundation
src/main/java/com/nordstrom/automation/junit/RunReflectiveCall.java
RunReflectiveCall.methodHash
public static int methodHash(Object runner, FrameworkMethod method) { """ Generate a hash code for the specified runner/method pair. @param runner JUnit test runner @param method {@link FrameworkMethod} object @return hash code for the specified runner/method pair """ return ((Thread.currentThrea...
java
public static int methodHash(Object runner, FrameworkMethod method) { return ((Thread.currentThread().hashCode() * 31) + runner.hashCode()) * 31 + method.hashCode(); }
[ "public", "static", "int", "methodHash", "(", "Object", "runner", ",", "FrameworkMethod", "method", ")", "{", "return", "(", "(", "Thread", ".", "currentThread", "(", ")", ".", "hashCode", "(", ")", "*", "31", ")", "+", "runner", ".", "hashCode", "(", ...
Generate a hash code for the specified runner/method pair. @param runner JUnit test runner @param method {@link FrameworkMethod} object @return hash code for the specified runner/method pair
[ "Generate", "a", "hash", "code", "for", "the", "specified", "runner", "/", "method", "pair", "." ]
train
https://github.com/Nordstrom/JUnit-Foundation/blob/f24d91f8677d262c27d18ef29ed633eaac717be5/src/main/java/com/nordstrom/automation/junit/RunReflectiveCall.java#L217-L219
aboutsip/pkts
pkts-buffers/src/main/java/io/pkts/buffer/Buffers.java
Buffers.wrap
public static Buffer wrap(final Buffer one, final Buffer two) { """ Combine two buffers into one. The resulting buffer will share the underlying byte storage so changing the value in one will affect the other. However, the original two buffers will still have their own reader and writer index. @param one @p...
java
public static Buffer wrap(final Buffer one, final Buffer two) { // TODO: create an actual composite buffer. final int size1 = one != null ? one.getReadableBytes() : 0; final int size2 = two != null ? two.getReadableBytes() : 0; if (size1 == 0 && size2 > 0) { return two.slice...
[ "public", "static", "Buffer", "wrap", "(", "final", "Buffer", "one", ",", "final", "Buffer", "two", ")", "{", "// TODO: create an actual composite buffer. ", "final", "int", "size1", "=", "one", "!=", "null", "?", "one", ".", "getReadableBytes", "(", ")", ":",...
Combine two buffers into one. The resulting buffer will share the underlying byte storage so changing the value in one will affect the other. However, the original two buffers will still have their own reader and writer index. @param one @param two @return
[ "Combine", "two", "buffers", "into", "one", ".", "The", "resulting", "buffer", "will", "share", "the", "underlying", "byte", "storage", "so", "changing", "the", "value", "in", "one", "will", "affect", "the", "other", ".", "However", "the", "original", "two",...
train
https://github.com/aboutsip/pkts/blob/0f06bb0dac76c812187829f580a8d476ca99a1a1/pkts-buffers/src/main/java/io/pkts/buffer/Buffers.java#L142-L158
landawn/AbacusUtil
src/com/landawn/abacus/util/stream/EntryStream.java
EntryStream.collapseByKey
@SequentialOnly public <R, A> Stream<R> collapseByKey(final BiPredicate<? super K, ? super K> collapsible, final Collector<? super V, A, R> collector) { """ Merge series of adjacent elements which satisfy the given predicate using the merger function and return a new stream. <br /> This method only run s...
java
@SequentialOnly public <R, A> Stream<R> collapseByKey(final BiPredicate<? super K, ? super K> collapsible, final Collector<? super V, A, R> collector) { final BiPredicate<? super Entry<K, V>, ? super Entry<K, V>> collapsible2 = new BiPredicate<Entry<K, V>, Entry<K, V>>() { @Override ...
[ "@", "SequentialOnly", "public", "<", "R", ",", "A", ">", "Stream", "<", "R", ">", "collapseByKey", "(", "final", "BiPredicate", "<", "?", "super", "K", ",", "?", "super", "K", ">", "collapsible", ",", "final", "Collector", "<", "?", "super", "V", ",...
Merge series of adjacent elements which satisfy the given predicate using the merger function and return a new stream. <br /> This method only run sequentially, even in parallel stream. @param collapsible @param collector @return
[ "Merge", "series", "of", "adjacent", "elements", "which", "satisfy", "the", "given", "predicate", "using", "the", "merger", "function", "and", "return", "a", "new", "stream", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/stream/EntryStream.java#L651-L663
threerings/nenya
core/src/main/java/com/threerings/media/sound/SoundLoader.java
SoundLoader.getSound
public InputStream getSound (String bundle, String path) throws IOException { """ Attempts to load a sound stream from the given path from the given bundle and from the classpath. If nothing is found, a FileNotFoundException is thrown. """ InputStream rsrc; try { rsrc = _rm...
java
public InputStream getSound (String bundle, String path) throws IOException { InputStream rsrc; try { rsrc = _rmgr.getResource(bundle, path); } catch (FileNotFoundException notFound) { // try from the classpath try { rsrc = _rmgr.ge...
[ "public", "InputStream", "getSound", "(", "String", "bundle", ",", "String", "path", ")", "throws", "IOException", "{", "InputStream", "rsrc", ";", "try", "{", "rsrc", "=", "_rmgr", ".", "getResource", "(", "bundle", ",", "path", ")", ";", "}", "catch", ...
Attempts to load a sound stream from the given path from the given bundle and from the classpath. If nothing is found, a FileNotFoundException is thrown.
[ "Attempts", "to", "load", "a", "sound", "stream", "from", "the", "given", "path", "from", "the", "given", "bundle", "and", "from", "the", "classpath", ".", "If", "nothing", "is", "found", "a", "FileNotFoundException", "is", "thrown", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sound/SoundLoader.java#L92-L107
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/descriptivestatistics/Ranks.java
Ranks._buildRankArrays
private static void _buildRankArrays(FlatDataList flatDataCollection, AssociativeArray tiesCounter, Map<Object, Double> key2AvgRank) { """ Internal method used by getRanksFromValues() to produce the tiesCounter and key2AvgRank arrays. @param flatDataCollection @param tiesCounter @param key2AvgRank """ ...
java
private static void _buildRankArrays(FlatDataList flatDataCollection, AssociativeArray tiesCounter, Map<Object, Double> key2AvgRank) { for (Object value : flatDataCollection) { Object count = tiesCounter.get(value); if (count == null) { count = 0; } ...
[ "private", "static", "void", "_buildRankArrays", "(", "FlatDataList", "flatDataCollection", ",", "AssociativeArray", "tiesCounter", ",", "Map", "<", "Object", ",", "Double", ">", "key2AvgRank", ")", "{", "for", "(", "Object", "value", ":", "flatDataCollection", ")...
Internal method used by getRanksFromValues() to produce the tiesCounter and key2AvgRank arrays. @param flatDataCollection @param tiesCounter @param key2AvgRank
[ "Internal", "method", "used", "by", "getRanksFromValues", "()", "to", "produce", "the", "tiesCounter", "and", "key2AvgRank", "arrays", "." ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/descriptivestatistics/Ranks.java#L81-L103
googleapis/google-cloud-java
google-cloud-clients/google-cloud-websecurityscanner/src/main/java/com/google/cloud/websecurityscanner/v1alpha/WebSecurityScannerClient.java
WebSecurityScannerClient.createScanConfig
public final ScanConfig createScanConfig(ProjectName parent, ScanConfig scanConfig) { """ Creates a new ScanConfig. <p>Sample code: <pre><code> try (WebSecurityScannerClient webSecurityScannerClient = WebSecurityScannerClient.create()) { ProjectName parent = ProjectName.of("[PROJECT]"); ScanConfig scanCon...
java
public final ScanConfig createScanConfig(ProjectName parent, ScanConfig scanConfig) { CreateScanConfigRequest request = CreateScanConfigRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setScanConfig(scanConfig) .build(); return createScanCo...
[ "public", "final", "ScanConfig", "createScanConfig", "(", "ProjectName", "parent", ",", "ScanConfig", "scanConfig", ")", "{", "CreateScanConfigRequest", "request", "=", "CreateScanConfigRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", "==", "n...
Creates a new ScanConfig. <p>Sample code: <pre><code> try (WebSecurityScannerClient webSecurityScannerClient = WebSecurityScannerClient.create()) { ProjectName parent = ProjectName.of("[PROJECT]"); ScanConfig scanConfig = ScanConfig.newBuilder().build(); ScanConfig response = webSecurityScannerClient.createScanConfig...
[ "Creates", "a", "new", "ScanConfig", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-websecurityscanner/src/main/java/com/google/cloud/websecurityscanner/v1alpha/WebSecurityScannerClient.java#L181-L189
groupon/odo
proxyserver/src/main/java/com/groupon/odo/Proxy.java
Proxy.processVirtualHostName
private void processVirtualHostName(HttpMethod httpMethodProxyRequest, HttpServletRequest httpServletRequest) { """ Set virtual host so the server can direct the request. Value is the host header if it is set, otherwise use the hostname from the original request. @param httpMethodProxyRequest @param httpServl...
java
private void processVirtualHostName(HttpMethod httpMethodProxyRequest, HttpServletRequest httpServletRequest) { String virtualHostName; if (httpMethodProxyRequest.getRequestHeader(STRING_HOST_HEADER_NAME) != null) { virtualHostName = HttpUtilities.removePortFromHostHeaderString(httpMethodPro...
[ "private", "void", "processVirtualHostName", "(", "HttpMethod", "httpMethodProxyRequest", ",", "HttpServletRequest", "httpServletRequest", ")", "{", "String", "virtualHostName", ";", "if", "(", "httpMethodProxyRequest", ".", "getRequestHeader", "(", "STRING_HOST_HEADER_NAME",...
Set virtual host so the server can direct the request. Value is the host header if it is set, otherwise use the hostname from the original request. @param httpMethodProxyRequest @param httpServletRequest
[ "Set", "virtual", "host", "so", "the", "server", "can", "direct", "the", "request", ".", "Value", "is", "the", "host", "header", "if", "it", "is", "set", "otherwise", "use", "the", "hostname", "from", "the", "original", "request", "." ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxyserver/src/main/java/com/groupon/odo/Proxy.java#L791-L799
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java
FacebookRestClient.friends_areFriends
public T friends_areFriends(Collection<Integer> userIds1, Collection<Integer> userIds2) throws FacebookException, IOException { """ Retrieves whether pairs of users are friends. Returns whether the first user in <code>userIds1</code> is friends with the first user in <code>userIds2</code>, the second user in...
java
public T friends_areFriends(Collection<Integer> userIds1, Collection<Integer> userIds2) throws FacebookException, IOException { if (userIds1 == null || userIds2 == null || userIds1.isEmpty() || userIds2.isEmpty()) { throw new IllegalArgumentException("Collections passed to friends_areFriends should not be...
[ "public", "T", "friends_areFriends", "(", "Collection", "<", "Integer", ">", "userIds1", ",", "Collection", "<", "Integer", ">", "userIds2", ")", "throws", "FacebookException", ",", "IOException", "{", "if", "(", "userIds1", "==", "null", "||", "userIds2", "==...
Retrieves whether pairs of users are friends. Returns whether the first user in <code>userIds1</code> is friends with the first user in <code>userIds2</code>, the second user in <code>userIds1</code> is friends with the second user in <code>userIds2</code>, etc. @param userIds1 @param userIds2 @return T @throws Illegal...
[ "Retrieves", "whether", "pairs", "of", "users", "are", "friends", ".", "Returns", "whether", "the", "first", "user", "in", "<code", ">", "userIds1<", "/", "code", ">", "is", "friends", "with", "the", "first", "user", "in", "<code", ">", "userIds2<", "/", ...
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java#L186-L199
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/data/AnyValue.java
AnyValue.getAsType
@JsonIgnore public <T> T getAsType(Class<T> type) { """ Converts object value into a value defined by specied typecode. If conversion is not possible it returns default value for the specified type. @param type the Class type that defined the type of the result @return value defined by the typecode or type d...
java
@JsonIgnore public <T> T getAsType(Class<T> type) { return getAsTypeWithDefault(type, null); }
[ "@", "JsonIgnore", "public", "<", "T", ">", "T", "getAsType", "(", "Class", "<", "T", ">", "type", ")", "{", "return", "getAsTypeWithDefault", "(", "type", ",", "null", ")", ";", "}" ]
Converts object value into a value defined by specied typecode. If conversion is not possible it returns default value for the specified type. @param type the Class type that defined the type of the result @return value defined by the typecode or type default value if conversion is not supported. @see #getAsTypeWithD...
[ "Converts", "object", "value", "into", "a", "value", "defined", "by", "specied", "typecode", ".", "If", "conversion", "is", "not", "possible", "it", "returns", "default", "value", "for", "the", "specified", "type", "." ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/data/AnyValue.java#L425-L428
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/ocr/AipOcr.java
AipOcr.tableResultGet
public JSONObject tableResultGet(String requestId, HashMap<String, String> options) { """ 表格识别结果接口 获取表格文字识别结果 @param requestId - 发送表格文字识别请求时返回的request id @param options - 可选参数对象,key: value都为string类型 options - options列表: result_type 期望获取结果的类型,取值为“excel”时返回xls文件的地址,取值为“json”时返回json格式的字符串,默认为”excel” @return J...
java
public JSONObject tableResultGet(String requestId, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); request.addBody("request_id", requestId); if (options != null) { request.addBody(options); } request.se...
[ "public", "JSONObject", "tableResultGet", "(", "String", "requestId", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "AipRequest", "request", "=", "new", "AipRequest", "(", ")", ";", "preOperation", "(", "request", ")", ";", "request...
表格识别结果接口 获取表格文字识别结果 @param requestId - 发送表格文字识别请求时返回的request id @param options - 可选参数对象,key: value都为string类型 options - options列表: result_type 期望获取结果的类型,取值为“excel”时返回xls文件的地址,取值为“json”时返回json格式的字符串,默认为”excel” @return JSONObject
[ "表格识别结果接口", "获取表格文字识别结果" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/ocr/AipOcr.java#L929-L940
nohana/Amalgam
amalgam/src/main/java/com/amalgam/app/DialogFragmentUtils.java
DialogFragmentUtils.supportFindDialogFragmentByTag
@SuppressWarnings("unchecked") // we know the dialog fragment is a child of fragment. public static <F extends android.support.v4.app.DialogFragment> F supportFindDialogFragmentByTag(android.support.v4.app.FragmentManager manager, String tag) { """ Find fragment registered on the manager. @param manager the m...
java
@SuppressWarnings("unchecked") // we know the dialog fragment is a child of fragment. public static <F extends android.support.v4.app.DialogFragment> F supportFindDialogFragmentByTag(android.support.v4.app.FragmentManager manager, String tag) { return (F) manager.findFragmentByTag(tag); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "// we know the dialog fragment is a child of fragment.", "public", "static", "<", "F", "extends", "android", ".", "support", ".", "v4", ".", "app", ".", "DialogFragment", ">", "F", "supportFindDialogFragmentByTag", "(...
Find fragment registered on the manager. @param manager the manager. @param tag the tag string that is related to the {@link android.support.v4.app.DialogFragment}. @param <F> the dialog fragment impl. @return the {@link android.support.v4.app.DialogFragment}. {@code null} if the fragment not found.
[ "Find", "fragment", "registered", "on", "the", "manager", "." ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/app/DialogFragmentUtils.java#L54-L57
beihaifeiwu/dolphin
dolphin-common/src/main/java/com/freetmp/common/annotation/AnnotationUtils.java
AnnotationUtils.getAnnotation
public static <T extends Annotation> T getAnnotation(AnnotatedElement annotatedElement, Class<T> annotationType) { """ Get a single {@link Annotation} of {@code annotationType} from the supplied Method, Constructor or Field. Meta-annotations will be searched if the annotation is not declared locally on the suppl...
java
public static <T extends Annotation> T getAnnotation(AnnotatedElement annotatedElement, Class<T> annotationType) { try { T ann = annotatedElement.getAnnotation(annotationType); if (ann == null) { for (Annotation metaAnn : annotatedElement.getAnnotations()) { ann = metaAnn.annotationType().getAnnotation...
[ "public", "static", "<", "T", "extends", "Annotation", ">", "T", "getAnnotation", "(", "AnnotatedElement", "annotatedElement", ",", "Class", "<", "T", ">", "annotationType", ")", "{", "try", "{", "T", "ann", "=", "annotatedElement", ".", "getAnnotation", "(", ...
Get a single {@link Annotation} of {@code annotationType} from the supplied Method, Constructor or Field. Meta-annotations will be searched if the annotation is not declared locally on the supplied element. @param annotatedElement the Method, Constructor or Field from which to get the annotation @param annotationType t...
[ "Get", "a", "single", "{" ]
train
https://github.com/beihaifeiwu/dolphin/blob/b100579cc6986dce5eba5593ebb5fbae7bad9d1a/dolphin-common/src/main/java/com/freetmp/common/annotation/AnnotationUtils.java#L107-L125
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Bidi.java
Bidi.writeReverse
public static String writeReverse(String src, int options) { """ Reverse a Right-To-Left run of Unicode text. This method preserves the integrity of characters with multiple code units and (optionally) combining characters. Characters can be replaced by mirror-image characters in the destination buffer. Note...
java
public static String writeReverse(String src, int options) { /* error checking */ if (src == null) { throw new IllegalArgumentException(); } if (src.length() > 0) { return BidiWriter.writeReverse(src, options); } else { /* nothing to do */...
[ "public", "static", "String", "writeReverse", "(", "String", "src", ",", "int", "options", ")", "{", "/* error checking */", "if", "(", "src", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "if", "(", "src", ".", ...
Reverse a Right-To-Left run of Unicode text. This method preserves the integrity of characters with multiple code units and (optionally) combining characters. Characters can be replaced by mirror-image characters in the destination buffer. Note that "real" mirroring has to be done in a rendering engine by glyph select...
[ "Reverse", "a", "Right", "-", "To", "-", "Left", "run", "of", "Unicode", "text", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Bidi.java#L5661-L5674
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/resource/BatchLinkingService.java
BatchLinkingService.resolveBatched
public EObject resolveBatched(EObject context, EReference reference, String uriFragment, CancelIndicator monitor) { """ @param context the current instance that owns the referenced proxy. @param reference the {@link EReference} that has the proxy value. @param uriFragment the lazy linking fragment. @param monit...
java
public EObject resolveBatched(EObject context, EReference reference, String uriFragment, CancelIndicator monitor) { if (reference.isMany()) throw new IllegalArgumentException("Not yet implemented for #many references"); batchTypeResolver.resolveTypes(context, monitor); EObject result = (EObject) context.eGet(r...
[ "public", "EObject", "resolveBatched", "(", "EObject", "context", ",", "EReference", "reference", ",", "String", "uriFragment", ",", "CancelIndicator", "monitor", ")", "{", "if", "(", "reference", ".", "isMany", "(", ")", ")", "throw", "new", "IllegalArgumentExc...
@param context the current instance that owns the referenced proxy. @param reference the {@link EReference} that has the proxy value. @param uriFragment the lazy linking fragment. @param monitor used to cancel type resolution @return the resolved object for the given context or <code>null</code> if it couldn't be reso...
[ "@param", "context", "the", "current", "instance", "that", "owns", "the", "referenced", "proxy", ".", "@param", "reference", "the", "{", "@link", "EReference", "}", "that", "has", "the", "proxy", "value", ".", "@param", "uriFragment", "the", "lazy", "linking",...
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/resource/BatchLinkingService.java#L57-L65
Crab2died/Excel4J
src/main/java/com/github/crab2died/ExcelUtils.java
ExcelUtils.readExcel2Objects
public <T> List<T> readExcel2Objects(InputStream is, Class<T> clazz, int offsetLine, int limitLine, int sheetIndex) throws Excel4JException, IOException, InvalidFormatException { """ 读取Excel操作基于注解映射成绑定的java对象 @param is 待导出Excel的数据流 @param clazz ...
java
public <T> List<T> readExcel2Objects(InputStream is, Class<T> clazz, int offsetLine, int limitLine, int sheetIndex) throws Excel4JException, IOException, InvalidFormatException { try (Workbook workbook = WorkbookFactory.create(is)) { return readE...
[ "public", "<", "T", ">", "List", "<", "T", ">", "readExcel2Objects", "(", "InputStream", "is", ",", "Class", "<", "T", ">", "clazz", ",", "int", "offsetLine", ",", "int", "limitLine", ",", "int", "sheetIndex", ")", "throws", "Excel4JException", ",", "IOE...
读取Excel操作基于注解映射成绑定的java对象 @param is 待导出Excel的数据流 @param clazz 待绑定的类(绑定属性注解{@link com.github.crab2died.annotation.ExcelField}) @param offsetLine Excel表头行(默认是0) @param limitLine 最大读取行数(默认表尾) @param sheetIndex Sheet索引(默认0) @param <T> 绑定的数据类 @return 返回转换为设置绑定的java对象集合 @throws Excel4JException 异常...
[ "读取Excel操作基于注解映射成绑定的java对象" ]
train
https://github.com/Crab2died/Excel4J/blob/2ab0a3b8226a69ff868c3ead6e724f3a774f5f77/src/main/java/com/github/crab2died/ExcelUtils.java#L150-L157
blinkfox/zealot
src/main/java/com/blinkfox/zealot/core/Zealot.java
Zealot.getSqlInfo
public static SqlInfo getSqlInfo(String nameSpace, String zealotId) { """ 通过传入zealot xml文件对应的命名空间和zealot节点的ID来生成和获取sqlInfo信息(无参的SQL). @param nameSpace xml命名空间 @param zealotId xml中的zealotId @return 返回SqlInfo对象 """ return getSqlInfo(nameSpace, zealotId, null); }
java
public static SqlInfo getSqlInfo(String nameSpace, String zealotId) { return getSqlInfo(nameSpace, zealotId, null); }
[ "public", "static", "SqlInfo", "getSqlInfo", "(", "String", "nameSpace", ",", "String", "zealotId", ")", "{", "return", "getSqlInfo", "(", "nameSpace", ",", "zealotId", ",", "null", ")", ";", "}" ]
通过传入zealot xml文件对应的命名空间和zealot节点的ID来生成和获取sqlInfo信息(无参的SQL). @param nameSpace xml命名空间 @param zealotId xml中的zealotId @return 返回SqlInfo对象
[ "通过传入zealot", "xml文件对应的命名空间和zealot节点的ID来生成和获取sqlInfo信息", "(", "无参的SQL", ")", "." ]
train
https://github.com/blinkfox/zealot/blob/21b00fa3e4ed42188eef3116d494e112e7a4194c/src/main/java/com/blinkfox/zealot/core/Zealot.java#L68-L70
restfb/restfb
src/main/java/com/restfb/util/DateUtils.java
DateUtils.toDateFromMonthYearFormat
public static Date toDateFromMonthYearFormat(String date) { """ Returns a Java representation of a Facebook "month-year" {@code date} string. @param date Facebook {@code date} string. @return Java date representation of the given Facebook "month-year" {@code date} string or {@code null} if {@code date} is {@...
java
public static Date toDateFromMonthYearFormat(String date) { if (date == null) { return null; } if ("0000-00".equals(date)) { return null; } return toDateWithFormatString(date, FACEBOOK_MONTH_YEAR_DATE_FORMAT); }
[ "public", "static", "Date", "toDateFromMonthYearFormat", "(", "String", "date", ")", "{", "if", "(", "date", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "\"0000-00\"", ".", "equals", "(", "date", ")", ")", "{", "return", "null", ";",...
Returns a Java representation of a Facebook "month-year" {@code date} string. @param date Facebook {@code date} string. @return Java date representation of the given Facebook "month-year" {@code date} string or {@code null} if {@code date} is {@code null} or invalid.
[ "Returns", "a", "Java", "representation", "of", "a", "Facebook", "month", "-", "year", "{", "@code", "date", "}", "string", "." ]
train
https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/java/com/restfb/util/DateUtils.java#L146-L156
google/closure-compiler
src/com/google/javascript/jscomp/CheckMissingAndExtraRequires.java
CheckMissingAndExtraRequires.maybeAddGoogScopeUsage
private void maybeAddGoogScopeUsage(NodeTraversal t, Node n, Node parent) { """ "var Dog = some.cute.Dog;" counts as a usage of some.cute.Dog, if it's immediately inside a goog.scope function. """ checkState(NodeUtil.isNameDeclaration(n)); if (n.hasOneChild() && parent == googScopeBlock) { Node ...
java
private void maybeAddGoogScopeUsage(NodeTraversal t, Node n, Node parent) { checkState(NodeUtil.isNameDeclaration(n)); if (n.hasOneChild() && parent == googScopeBlock) { Node rhs = n.getFirstFirstChild(); if (rhs != null && rhs.isQualifiedName()) { Node root = NodeUtil.getRootOfQualifiedName...
[ "private", "void", "maybeAddGoogScopeUsage", "(", "NodeTraversal", "t", ",", "Node", "n", ",", "Node", "parent", ")", "{", "checkState", "(", "NodeUtil", ".", "isNameDeclaration", "(", "n", ")", ")", ";", "if", "(", "n", ".", "hasOneChild", "(", ")", "&&...
"var Dog = some.cute.Dog;" counts as a usage of some.cute.Dog, if it's immediately inside a goog.scope function.
[ "var", "Dog", "=", "some", ".", "cute", ".", "Dog", ";", "counts", "as", "a", "usage", "of", "some", ".", "cute", ".", "Dog", "if", "it", "s", "immediately", "inside", "a", "goog", ".", "scope", "function", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/CheckMissingAndExtraRequires.java#L633-L647
davidmoten/grumpy
grumpy-core/src/main/java/com/github/davidmoten/grumpy/core/Position.java
Position.ensureContinuous
public final Position ensureContinuous(Position lastPosition) { """ normalize the lat lon values of this to ensure that no large longitude jumps are made from lastPosition (e.g. 179 to -180) @param lastPosition """ double lon = this.lon; if (abs(lon - lastPosition.lon) > 180) { ...
java
public final Position ensureContinuous(Position lastPosition) { double lon = this.lon; if (abs(lon - lastPosition.lon) > 180) { if (lastPosition.lon < 0) lon -= 360; else lon += 360; return new Position(lat, lon); } else ...
[ "public", "final", "Position", "ensureContinuous", "(", "Position", "lastPosition", ")", "{", "double", "lon", "=", "this", ".", "lon", ";", "if", "(", "abs", "(", "lon", "-", "lastPosition", ".", "lon", ")", ">", "180", ")", "{", "if", "(", "lastPosit...
normalize the lat lon values of this to ensure that no large longitude jumps are made from lastPosition (e.g. 179 to -180) @param lastPosition
[ "normalize", "the", "lat", "lon", "values", "of", "this", "to", "ensure", "that", "no", "large", "longitude", "jumps", "are", "made", "from", "lastPosition", "(", "e", ".", "g", ".", "179", "to", "-", "180", ")" ]
train
https://github.com/davidmoten/grumpy/blob/f2d03e6b9771f15425fb3f76314837efc08c1233/grumpy-core/src/main/java/com/github/davidmoten/grumpy/core/Position.java#L436-L447