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
pac4j/pac4j
pac4j-core/src/main/java/org/pac4j/core/profile/definition/ProfileDefinition.java
ProfileDefinition.setProfileFactory
protected void setProfileFactory(final Function<Object[], P> profileFactory) { """ Define the way to build the profile. @param profileFactory the way to build the profile """ CommonHelper.assertNotNull("profileFactory", profileFactory); this.newProfile = profileFactory; }
java
protected void setProfileFactory(final Function<Object[], P> profileFactory) { CommonHelper.assertNotNull("profileFactory", profileFactory); this.newProfile = profileFactory; }
[ "protected", "void", "setProfileFactory", "(", "final", "Function", "<", "Object", "[", "]", ",", "P", ">", "profileFactory", ")", "{", "CommonHelper", ".", "assertNotNull", "(", "\"profileFactory\"", ",", "profileFactory", ")", ";", "this", ".", "newProfile", ...
Define the way to build the profile. @param profileFactory the way to build the profile
[ "Define", "the", "way", "to", "build", "the", "profile", "." ]
train
https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-core/src/main/java/org/pac4j/core/profile/definition/ProfileDefinition.java#L105-L108
libgdx/box2dlights
src/box2dLight/Light.java
Light.setColor
public void setColor(float r, float g, float b, float a) { """ Sets light color <p>NOTE: you can also use colorless light with shadows, e.g. (0,0,0,1) @param r lights color red component @param g lights color green component @param b lights color blue component @param a lights shadow intensity @see...
java
public void setColor(float r, float g, float b, float a) { color.set(r, g, b, a); colorF = color.toFloatBits(); if (staticLight) dirty = true; }
[ "public", "void", "setColor", "(", "float", "r", ",", "float", "g", ",", "float", "b", ",", "float", "a", ")", "{", "color", ".", "set", "(", "r", ",", "g", ",", "b", ",", "a", ")", ";", "colorF", "=", "color", ".", "toFloatBits", "(", ")", "...
Sets light color <p>NOTE: you can also use colorless light with shadows, e.g. (0,0,0,1) @param r lights color red component @param g lights color green component @param b lights color blue component @param a lights shadow intensity @see #setColor(Color)
[ "Sets", "light", "color" ]
train
https://github.com/libgdx/box2dlights/blob/08cf93a41464f71d32475aaa2fe280dc6af78ff3/src/box2dLight/Light.java#L191-L195
liferay/com-liferay-commerce
commerce-api/src/main/java/com/liferay/commerce/service/persistence/CPDefinitionInventoryUtil.java
CPDefinitionInventoryUtil.removeByUUID_G
public static CPDefinitionInventory removeByUUID_G(String uuid, long groupId) throws com.liferay.commerce.exception.NoSuchCPDefinitionInventoryException { """ Removes the cp definition inventory where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @retur...
java
public static CPDefinitionInventory removeByUUID_G(String uuid, long groupId) throws com.liferay.commerce.exception.NoSuchCPDefinitionInventoryException { return getPersistence().removeByUUID_G(uuid, groupId); }
[ "public", "static", "CPDefinitionInventory", "removeByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "com", ".", "liferay", ".", "commerce", ".", "exception", ".", "NoSuchCPDefinitionInventoryException", "{", "return", "getPersistence", "(", ...
Removes the cp definition inventory where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the cp definition inventory that was removed
[ "Removes", "the", "cp", "definition", "inventory", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-api/src/main/java/com/liferay/commerce/service/persistence/CPDefinitionInventoryUtil.java#L319-L322
couchbase/CouchbaseMock
src/main/java/com/couchbase/mock/CouchbaseMock.java
CouchbaseMock.createBucket
public void createBucket(BucketConfiguration config) throws BucketAlreadyExistsException, IOException { """ Create a new bucket, and start it. @param config The bucket configuration to use @throws BucketAlreadyExistsException If the bucket already exists @throws IOException If an I/O error occurs """ ...
java
public void createBucket(BucketConfiguration config) throws BucketAlreadyExistsException, IOException { if (!config.validate()) { throw new IllegalArgumentException("Invalid bucket configuration"); } synchronized (buckets) { if (buckets.containsKey(config.name)) { ...
[ "public", "void", "createBucket", "(", "BucketConfiguration", "config", ")", "throws", "BucketAlreadyExistsException", ",", "IOException", "{", "if", "(", "!", "config", ".", "validate", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Inval...
Create a new bucket, and start it. @param config The bucket configuration to use @throws BucketAlreadyExistsException If the bucket already exists @throws IOException If an I/O error occurs
[ "Create", "a", "new", "bucket", "and", "start", "it", "." ]
train
https://github.com/couchbase/CouchbaseMock/blob/2085bbebade1d5b6356480e7bf335139d08383da/src/main/java/com/couchbase/mock/CouchbaseMock.java#L326-L352
iipc/openwayback-access-control
oracle/src/main/java/org/archive/accesscontrol/webui/SurtNode.java
SurtNode.nodesFromSurt
public static List<SurtNode> nodesFromSurt(String surt) { """ Return a list of the elements in a given SURT. For example for "(org,archive," we return: [new SurtNode("(", "("), new SurtNode("org,", "(org"), new SurtNode("archive,", "archive,")] @param surt @return """ List<SurtNode> list = ...
java
public static List<SurtNode> nodesFromSurt(String surt) { List<SurtNode> list = new ArrayList<SurtNode>(); String running = ""; for (String token: new NewSurtTokenizer(surt)) { running += token; list.add(new SurtNode(token, running)); } return list; }
[ "public", "static", "List", "<", "SurtNode", ">", "nodesFromSurt", "(", "String", "surt", ")", "{", "List", "<", "SurtNode", ">", "list", "=", "new", "ArrayList", "<", "SurtNode", ">", "(", ")", ";", "String", "running", "=", "\"\"", ";", "for", "(", ...
Return a list of the elements in a given SURT. For example for "(org,archive," we return: [new SurtNode("(", "("), new SurtNode("org,", "(org"), new SurtNode("archive,", "archive,")] @param surt @return
[ "Return", "a", "list", "of", "the", "elements", "in", "a", "given", "SURT", "." ]
train
https://github.com/iipc/openwayback-access-control/blob/4a0f70f200fd8d7b6e313624b7628656d834bf31/oracle/src/main/java/org/archive/accesscontrol/webui/SurtNode.java#L42-L50
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringParser.java
StringParser.parseDouble
public static double parseDouble (@Nullable final String sStr, final double dDefault) { """ Parse the given {@link String} as double. @param sStr The string to parse. May be <code>null</code>. @param dDefault The default value to be returned if the passed object could not be converted to a valid value. @re...
java
public static double parseDouble (@Nullable final String sStr, final double dDefault) { // parseDouble throws a NPE if parameter is null if (sStr != null && sStr.length () > 0) try { // Single point where we replace "," with "." for parsing! return Double.parseDouble (_getUnifiedDe...
[ "public", "static", "double", "parseDouble", "(", "@", "Nullable", "final", "String", "sStr", ",", "final", "double", "dDefault", ")", "{", "// parseDouble throws a NPE if parameter is null", "if", "(", "sStr", "!=", "null", "&&", "sStr", ".", "length", "(", ")"...
Parse the given {@link String} as double. @param sStr The string to parse. May be <code>null</code>. @param dDefault The default value to be returned if the passed object could not be converted to a valid value. @return The default value if the string does not represent a valid value.
[ "Parse", "the", "given", "{", "@link", "String", "}", "as", "double", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringParser.java#L484-L498
networknt/light-4j
utility/src/main/java/com/networknt/utility/RegExUtils.java
RegExUtils.removeFirst
public static String removeFirst(final String text, final Pattern regex) { """ <p>Removes the first substring of the text string that matches the given regular expression pattern.</p> This method is a {@code null} safe equivalent to: <ul> <li>{@code pattern.matcher(text).replaceFirst(StringUtils.EMPTY)}</li> ...
java
public static String removeFirst(final String text, final Pattern regex) { return replaceFirst(text, regex, StringUtils.EMPTY); }
[ "public", "static", "String", "removeFirst", "(", "final", "String", "text", ",", "final", "Pattern", "regex", ")", "{", "return", "replaceFirst", "(", "text", ",", "regex", ",", "StringUtils", ".", "EMPTY", ")", ";", "}" ]
<p>Removes the first substring of the text string that matches the given regular expression pattern.</p> This method is a {@code null} safe equivalent to: <ul> <li>{@code pattern.matcher(text).replaceFirst(StringUtils.EMPTY)}</li> </ul> <p>A {@code null} reference passed to this method is a no-op.</p> <pre> StringUt...
[ "<p", ">", "Removes", "the", "first", "substring", "of", "the", "text", "string", "that", "matches", "the", "given", "regular", "expression", "pattern", ".", "<", "/", "p", ">" ]
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/utility/src/main/java/com/networknt/utility/RegExUtils.java#L142-L144
xetorthio/jedis
src/main/java/redis/clients/jedis/BinaryJedis.java
BinaryJedis.zrank
@Override public Long zrank(final byte[] key, final byte[] member) { """ Return the rank (or index) or member in the sorted set at key, with scores being ordered from low to high. <p> When the given member does not exist in the sorted set, the special value 'nil' is returned. The returned rank (or index) of ...
java
@Override public Long zrank(final byte[] key, final byte[] member) { checkIsInMultiOrPipeline(); client.zrank(key, member); return client.getIntegerReply(); }
[ "@", "Override", "public", "Long", "zrank", "(", "final", "byte", "[", "]", "key", ",", "final", "byte", "[", "]", "member", ")", "{", "checkIsInMultiOrPipeline", "(", ")", ";", "client", ".", "zrank", "(", "key", ",", "member", ")", ";", "return", "...
Return the rank (or index) or member in the sorted set at key, with scores being ordered from low to high. <p> When the given member does not exist in the sorted set, the special value 'nil' is returned. The returned rank (or index) of the member is 0-based for both commands. <p> <b>Time complexity:</b> <p> O(log(N)) @...
[ "Return", "the", "rank", "(", "or", "index", ")", "or", "member", "in", "the", "sorted", "set", "at", "key", "with", "scores", "being", "ordered", "from", "low", "to", "high", ".", "<p", ">", "When", "the", "given", "member", "does", "not", "exist", ...
train
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/BinaryJedis.java#L1760-L1765
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.createClosedListEntityRole
public UUID createClosedListEntityRole(UUID appId, String versionId, UUID entityId, CreateClosedListEntityRoleOptionalParameter createClosedListEntityRoleOptionalParameter) { """ Create an entity role for an entity in the application. @param appId The application ID. @param versionId The version ID. @param en...
java
public UUID createClosedListEntityRole(UUID appId, String versionId, UUID entityId, CreateClosedListEntityRoleOptionalParameter createClosedListEntityRoleOptionalParameter) { return createClosedListEntityRoleWithServiceResponseAsync(appId, versionId, entityId, createClosedListEntityRoleOptionalParameter).toBloc...
[ "public", "UUID", "createClosedListEntityRole", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ",", "CreateClosedListEntityRoleOptionalParameter", "createClosedListEntityRoleOptionalParameter", ")", "{", "return", "createClosedListEntityRoleWithService...
Create an entity role for an entity in the application. @param appId The application ID. @param versionId The version ID. @param entityId The entity model ID. @param createClosedListEntityRoleOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentExce...
[ "Create", "an", "entity", "role", "for", "an", "entity", "in", "the", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L8312-L8314
aws/aws-sdk-java
jmespath-java/src/main/java/com/amazonaws/jmespath/JmesPathEvaluationVisitor.java
JmesPathEvaluationVisitor.visit
@Override public JsonNode visit(JmesPathValueProjection valueProjection, JsonNode input) throws InvalidTypeException { """ Evaluates the object projection expression. This will create a list of the values of the JSON object(lhs), and project the right hand side of the projection onto the list of values. ...
java
@Override public JsonNode visit(JmesPathValueProjection valueProjection, JsonNode input) throws InvalidTypeException { JsonNode projectedResult = valueProjection.getLhsExpr().accept(this, input); if (projectedResult.isObject()) { ArrayNode projectedArrayNode = ObjectMapperSingleton.getOb...
[ "@", "Override", "public", "JsonNode", "visit", "(", "JmesPathValueProjection", "valueProjection", ",", "JsonNode", "input", ")", "throws", "InvalidTypeException", "{", "JsonNode", "projectedResult", "=", "valueProjection", ".", "getLhsExpr", "(", ")", ".", "accept", ...
Evaluates the object projection expression. This will create a list of the values of the JSON object(lhs), and project the right hand side of the projection onto the list of values. @param valueProjection JmesPath value projection type @param input Input json node against which evaluation is done @return Res...
[ "Evaluates", "the", "object", "projection", "expression", ".", "This", "will", "create", "a", "list", "of", "the", "values", "of", "the", "JSON", "object", "(", "lhs", ")", "and", "project", "the", "right", "hand", "side", "of", "the", "projection", "onto"...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/jmespath-java/src/main/java/com/amazonaws/jmespath/JmesPathEvaluationVisitor.java#L162-L177
glyptodon/guacamole-client
guacamole-ext/src/main/java/org/apache/guacamole/token/StandardTokens.java
StandardTokens.addStandardTokens
public static void addStandardTokens(TokenFilter filter, Credentials credentials) { """ Adds tokens which are standardized by guacamole-ext to the given TokenFilter using the values from the given Credentials object. These standardized tokens include the current username (GUAC_USERNAME), password (GUAC_PASSWORD...
java
public static void addStandardTokens(TokenFilter filter, Credentials credentials) { // Add username token String username = credentials.getUsername(); if (username != null) filter.setToken(USERNAME_TOKEN, username); // Add password token String password = credential...
[ "public", "static", "void", "addStandardTokens", "(", "TokenFilter", "filter", ",", "Credentials", "credentials", ")", "{", "// Add username token", "String", "username", "=", "credentials", ".", "getUsername", "(", ")", ";", "if", "(", "username", "!=", "null", ...
Adds tokens which are standardized by guacamole-ext to the given TokenFilter using the values from the given Credentials object. These standardized tokens include the current username (GUAC_USERNAME), password (GUAC_PASSWORD), and the server date and time (GUAC_DATE and GUAC_TIME respectively). If either the username o...
[ "Adds", "tokens", "which", "are", "standardized", "by", "guacamole", "-", "ext", "to", "the", "given", "TokenFilter", "using", "the", "values", "from", "the", "given", "Credentials", "object", ".", "These", "standardized", "tokens", "include", "the", "current", ...
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-ext/src/main/java/org/apache/guacamole/token/StandardTokens.java#L120-L145
52inc/android-52Kit
library/src/main/java/com/ftinc/kit/util/IntentUtils.java
IntentUtils.shareText
public static Intent shareText(String subject, String text) { """ Share text via thirdparty app like twitter, facebook, email, sms etc. @param subject Optional subject of the message @param text Text to share """ Intent intent = new Intent(); intent.setAction(Intent.ACTION_SEND); ...
java
public static Intent shareText(String subject, String text) { Intent intent = new Intent(); intent.setAction(Intent.ACTION_SEND); if (!TextUtils.isEmpty(subject)) { intent.putExtra(Intent.EXTRA_SUBJECT, subject); } intent.putExtra(Intent.EXTRA_TEXT, text); int...
[ "public", "static", "Intent", "shareText", "(", "String", "subject", ",", "String", "text", ")", "{", "Intent", "intent", "=", "new", "Intent", "(", ")", ";", "intent", ".", "setAction", "(", "Intent", ".", "ACTION_SEND", ")", ";", "if", "(", "!", "Tex...
Share text via thirdparty app like twitter, facebook, email, sms etc. @param subject Optional subject of the message @param text Text to share
[ "Share", "text", "via", "thirdparty", "app", "like", "twitter", "facebook", "email", "sms", "etc", "." ]
train
https://github.com/52inc/android-52Kit/blob/8644fab0f633477b1bb1dddd8147a9ef8bc03516/library/src/main/java/com/ftinc/kit/util/IntentUtils.java#L100-L109
nobuoka/android-lib-ZXingCaptureActivity
src/main/java/info/vividcode/android/zxing/CaptureActivity.java
CaptureActivity.handleDecode
public void handleDecode(Result rawResult, Bitmap barcode, float scaleFactor) { """ A valid barcode has been found, so give an indication of success and show the results. @param rawResult The contents of the barcode. @param scaleFactor amount by which thumbnail was scaled @param barcode A greyscale bitmap o...
java
public void handleDecode(Result rawResult, Bitmap barcode, float scaleFactor) { boolean fromLiveScan = barcode != null; if (fromLiveScan) { // Then not from history, so we have an image to draw on drawResultPoints(barcode, scaleFactor, rawResult); } handleDecodeExternally(rawResult, barcode...
[ "public", "void", "handleDecode", "(", "Result", "rawResult", ",", "Bitmap", "barcode", ",", "float", "scaleFactor", ")", "{", "boolean", "fromLiveScan", "=", "barcode", "!=", "null", ";", "if", "(", "fromLiveScan", ")", "{", "// Then not from history, so we have ...
A valid barcode has been found, so give an indication of success and show the results. @param rawResult The contents of the barcode. @param scaleFactor amount by which thumbnail was scaled @param barcode A greyscale bitmap of the camera data which was decoded.
[ "A", "valid", "barcode", "has", "been", "found", "so", "give", "an", "indication", "of", "success", "and", "show", "the", "results", "." ]
train
https://github.com/nobuoka/android-lib-ZXingCaptureActivity/blob/17aaa7cf75520d3f2e03db9796b7e8c1d1f1b1e6/src/main/java/info/vividcode/android/zxing/CaptureActivity.java#L228-L236
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/TableFormatFactoryBase.java
TableFormatFactoryBase.deriveSchema
public static TableSchema deriveSchema(Map<String, String> properties) { """ Finds the table schema that can be used for a format schema (without time attributes). """ final DescriptorProperties descriptorProperties = new DescriptorProperties(); descriptorProperties.putProperties(properties); final Tabl...
java
public static TableSchema deriveSchema(Map<String, String> properties) { final DescriptorProperties descriptorProperties = new DescriptorProperties(); descriptorProperties.putProperties(properties); final TableSchema.Builder builder = TableSchema.builder(); final TableSchema baseSchema = descriptorProperties....
[ "public", "static", "TableSchema", "deriveSchema", "(", "Map", "<", "String", ",", "String", ">", "properties", ")", "{", "final", "DescriptorProperties", "descriptorProperties", "=", "new", "DescriptorProperties", "(", ")", ";", "descriptorProperties", ".", "putPro...
Finds the table schema that can be used for a format schema (without time attributes).
[ "Finds", "the", "table", "schema", "that", "can", "be", "used", "for", "a", "format", "schema", "(", "without", "time", "attributes", ")", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/TableFormatFactoryBase.java#L131-L164
Appendium/objectlabkit
datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/ccy/DefaultCurrencyCalculatorConfig.java
DefaultCurrencyCalculatorConfig.setCurrenciesSubjectToCrossCcyForT1
public void setCurrenciesSubjectToCrossCcyForT1(final Map<String, Set<String>> currenciesSubjectToCrossCcyForT1) { """ Will take a copy of a non null set but doing so by replacing the internal one in one go for consistency. """ final Map<String, Set<String>> copy = new HashMap<>(); if (currenci...
java
public void setCurrenciesSubjectToCrossCcyForT1(final Map<String, Set<String>> currenciesSubjectToCrossCcyForT1) { final Map<String, Set<String>> copy = new HashMap<>(); if (currenciesSubjectToCrossCcyForT1 != null) { copy.putAll(currenciesSubjectToCrossCcyForT1); } this.curr...
[ "public", "void", "setCurrenciesSubjectToCrossCcyForT1", "(", "final", "Map", "<", "String", ",", "Set", "<", "String", ">", ">", "currenciesSubjectToCrossCcyForT1", ")", "{", "final", "Map", "<", "String", ",", "Set", "<", "String", ">", ">", "copy", "=", "...
Will take a copy of a non null set but doing so by replacing the internal one in one go for consistency.
[ "Will", "take", "a", "copy", "of", "a", "non", "null", "set", "but", "doing", "so", "by", "replacing", "the", "internal", "one", "in", "one", "go", "for", "consistency", "." ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/ccy/DefaultCurrencyCalculatorConfig.java#L46-L52
jaxio/javaee-lab
javaee7-jpa-query-by-example/src/main/java/com/jaxio/jpa/querybyexample/GenericRepository.java
GenericRepository.findPropertyCount
@Transactional public int findPropertyCount(E entity, SearchParameters sp, Attribute<?, ?>... attributes) { """ Count the number of E instances. @param entity a sample entity whose non-null properties may be used as search hint @param sp carries additional search information @param attributes ...
java
@Transactional public int findPropertyCount(E entity, SearchParameters sp, Attribute<?, ?>... attributes) { return findPropertyCount(entity, sp, newArrayList(attributes)); }
[ "@", "Transactional", "public", "int", "findPropertyCount", "(", "E", "entity", ",", "SearchParameters", "sp", ",", "Attribute", "<", "?", ",", "?", ">", "...", "attributes", ")", "{", "return", "findPropertyCount", "(", "entity", ",", "sp", ",", "newArrayLi...
Count the number of E instances. @param entity a sample entity whose non-null properties may be used as search hint @param sp carries additional search information @param attributes the list of attributes to the property @return the number of entities matching the search.
[ "Count", "the", "number", "of", "E", "instances", "." ]
train
https://github.com/jaxio/javaee-lab/blob/61238b967952446d81cc68424a4e809093a77fcf/javaee7-jpa-query-by-example/src/main/java/com/jaxio/jpa/querybyexample/GenericRepository.java#L392-L395
vvakame/JsonPullParser
jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonUtil.java
JsonUtil.put
public static void put(Writer writer, byte value) throws IOException { """ Writes the given value with the given writer. @param writer @param value @throws IOException @author vvakame """ writer.write(String.valueOf(value)); }
java
public static void put(Writer writer, byte value) throws IOException { writer.write(String.valueOf(value)); }
[ "public", "static", "void", "put", "(", "Writer", "writer", ",", "byte", "value", ")", "throws", "IOException", "{", "writer", ".", "write", "(", "String", ".", "valueOf", "(", "value", ")", ")", ";", "}" ]
Writes the given value with the given writer. @param writer @param value @throws IOException @author vvakame
[ "Writes", "the", "given", "value", "with", "the", "given", "writer", "." ]
train
https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonUtil.java#L234-L236
OpenLiberty/open-liberty
dev/com.ibm.ws.tx.jta.extensions/src/com/ibm/ws/jtaextensions/ExtendedJTATransactionImpl.java
ExtendedJTATransactionImpl.beforeCompletion
public static void beforeCompletion(TransactionImpl tran, int syncLevel) { """ Notify all the registered syncs of the begin of the completion phase of the given transaction """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.entry(tc, "beforeCompletion", new Object[] { ...
java
public static void beforeCompletion(TransactionImpl tran, int syncLevel) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.entry(tc, "beforeCompletion", new Object[] { tran, syncLevel }); if (syncLevel >= 0) { final ArrayList syncs = _syncLevels.get(syncLevel...
[ "public", "static", "void", "beforeCompletion", "(", "TransactionImpl", "tran", ",", "int", "syncLevel", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "Tr", ".", "entry", "(", ...
Notify all the registered syncs of the begin of the completion phase of the given transaction
[ "Notify", "all", "the", "registered", "syncs", "of", "the", "begin", "of", "the", "completion", "phase", "of", "the", "given", "transaction" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.tx.jta.extensions/src/com/ibm/ws/jtaextensions/ExtendedJTATransactionImpl.java#L283-L304
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/Camera.java
Camera.setLocation
public void setLocation(double x, double y) { """ Set the camera location. @param x The horizontal location. @param y The vertical location. """ final double dx = x - (mover.getX() + offset.getX()); final double dy = y - (mover.getY() + offset.getY()); moveLocation(1, dx, dy); }
java
public void setLocation(double x, double y) { final double dx = x - (mover.getX() + offset.getX()); final double dy = y - (mover.getY() + offset.getY()); moveLocation(1, dx, dy); }
[ "public", "void", "setLocation", "(", "double", "x", ",", "double", "y", ")", "{", "final", "double", "dx", "=", "x", "-", "(", "mover", ".", "getX", "(", ")", "+", "offset", ".", "getX", "(", ")", ")", ";", "final", "double", "dy", "=", "y", "...
Set the camera location. @param x The horizontal location. @param y The vertical location.
[ "Set", "the", "camera", "location", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/Camera.java#L129-L134
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.decodeInteger
public static int decodeInteger(ByteBuffer buf) { """ Decode an ASN.1 INTEGER. @param buf the buffer containing the DER-encoded INTEGER @return the value of the INTEGER """ DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, DerId.EncodingType.PRIMITIVE, ASN1_INTEGER_TA...
java
public static int decodeInteger(ByteBuffer buf) { DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, DerId.EncodingType.PRIMITIVE, ASN1_INTEGER_TAG_NUM)) { throw new IllegalArgumentException("Expected INTEGER identifier, received " + id); } int len = DerU...
[ "public", "static", "int", "decodeInteger", "(", "ByteBuffer", "buf", ")", "{", "DerId", "id", "=", "DerId", ".", "decode", "(", "buf", ")", ";", "if", "(", "!", "id", ".", "matches", "(", "DerId", ".", "TagClass", ".", "UNIVERSAL", ",", "DerId", "."...
Decode an ASN.1 INTEGER. @param buf the buffer containing the DER-encoded INTEGER @return the value of the INTEGER
[ "Decode", "an", "ASN", ".", "1", "INTEGER", "." ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L172-L186
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/CollectionNamingConfusion.java
CollectionNamingConfusion.visitMethod
@Override public void visitMethod(Method obj) { """ overrides the visitor to look for local variables where the name has 'Map', 'Set', 'List' in it but the type of that field isn't that. note that this only is useful if compiled with debug labels. @param obj the currently parsed method """ Loc...
java
@Override public void visitMethod(Method obj) { LocalVariableTable lvt = obj.getLocalVariableTable(); if (lvt != null) { LocalVariable[] lvs = lvt.getLocalVariableTable(); for (LocalVariable lv : lvs) { if (checkConfusedName(lv.getName(), lv.getSignature())) {...
[ "@", "Override", "public", "void", "visitMethod", "(", "Method", "obj", ")", "{", "LocalVariableTable", "lvt", "=", "obj", ".", "getLocalVariableTable", "(", ")", ";", "if", "(", "lvt", "!=", "null", ")", "{", "LocalVariable", "[", "]", "lvs", "=", "lvt"...
overrides the visitor to look for local variables where the name has 'Map', 'Set', 'List' in it but the type of that field isn't that. note that this only is useful if compiled with debug labels. @param obj the currently parsed method
[ "overrides", "the", "visitor", "to", "look", "for", "local", "variables", "where", "the", "name", "has", "Map", "Set", "List", "in", "it", "but", "the", "type", "of", "that", "field", "isn", "t", "that", ".", "note", "that", "this", "only", "is", "usef...
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/CollectionNamingConfusion.java#L112-L124
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java
GrailsHibernateUtil.getGrailsDomainClassProperty
private static PersistentProperty getGrailsDomainClassProperty(AbstractHibernateDatastore datastore, Class<?> targetClass, String propertyName) { """ Get hold of the GrailsDomainClassProperty represented by the targetClass' propertyName, assuming targetClass corresponds to a GrailsDomainClass. """ Per...
java
private static PersistentProperty getGrailsDomainClassProperty(AbstractHibernateDatastore datastore, Class<?> targetClass, String propertyName) { PersistentEntity grailsClass = datastore != null ? datastore.getMappingContext().getPersistentEntity( targetClass.getName()) : null; if (grailsClass == null) ...
[ "private", "static", "PersistentProperty", "getGrailsDomainClassProperty", "(", "AbstractHibernateDatastore", "datastore", ",", "Class", "<", "?", ">", "targetClass", ",", "String", "propertyName", ")", "{", "PersistentEntity", "grailsClass", "=", "datastore", "!=", "nu...
Get hold of the GrailsDomainClassProperty represented by the targetClass' propertyName, assuming targetClass corresponds to a GrailsDomainClass.
[ "Get", "hold", "of", "the", "GrailsDomainClassProperty", "represented", "by", "the", "targetClass", "propertyName", "assuming", "targetClass", "corresponds", "to", "a", "GrailsDomainClass", "." ]
train
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java#L242-L248
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/AVTPartXPath.java
AVTPartXPath.fixupVariables
public void fixupVariables(java.util.Vector vars, int globalsSize) { """ This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time. @param vars List of QNames that correspond to variables. This list should be searched backwards for the first qualified name that corre...
java
public void fixupVariables(java.util.Vector vars, int globalsSize) { m_xpath.fixupVariables(vars, globalsSize); }
[ "public", "void", "fixupVariables", "(", "java", ".", "util", ".", "Vector", "vars", ",", "int", "globalsSize", ")", "{", "m_xpath", ".", "fixupVariables", "(", "vars", ",", "globalsSize", ")", ";", "}" ]
This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time. @param vars List of QNames that correspond to variables. This list should be searched backwards for the first qualified name that corresponds to the variable reference qname. The position of the QName in the vector f...
[ "This", "function", "is", "used", "to", "fixup", "variables", "from", "QNames", "to", "stack", "frame", "indexes", "at", "stylesheet", "build", "time", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/AVTPartXPath.java#L54-L57
telly/groundy
library/src/main/java/com/telly/groundy/Groundy.java
Groundy.arg
public Groundy arg(String key, String[] value) { """ Inserts a String array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a String array object, or null """ mArgs.putStringArray(key, va...
java
public Groundy arg(String key, String[] value) { mArgs.putStringArray(key, value); return this; }
[ "public", "Groundy", "arg", "(", "String", "key", ",", "String", "[", "]", "value", ")", "{", "mArgs", ".", "putStringArray", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a String array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a String array object, or null
[ "Inserts", "a", "String", "array", "value", "into", "the", "mapping", "of", "this", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/Groundy.java#L705-L708
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbooksInner.java
WorkbooksInner.listByResourceGroup
public List<WorkbookInner> listByResourceGroup(String resourceGroupName, CategoryType category, List<String> tags, Boolean canFetchContent) { """ Get all Workbooks defined within a specified resource group and category. @param resourceGroupName The name of the resource group. @param category Category of workbo...
java
public List<WorkbookInner> listByResourceGroup(String resourceGroupName, CategoryType category, List<String> tags, Boolean canFetchContent) { return listByResourceGroupWithServiceResponseAsync(resourceGroupName, category, tags, canFetchContent).toBlocking().single().body(); }
[ "public", "List", "<", "WorkbookInner", ">", "listByResourceGroup", "(", "String", "resourceGroupName", ",", "CategoryType", "category", ",", "List", "<", "String", ">", "tags", ",", "Boolean", "canFetchContent", ")", "{", "return", "listByResourceGroupWithServiceResp...
Get all Workbooks defined within a specified resource group and category. @param resourceGroupName The name of the resource group. @param category Category of workbook to return. Possible values include: 'workbook', 'TSG', 'performance', 'retention' @param tags Tags presents on each workbook returned. @param canFetchC...
[ "Get", "all", "Workbooks", "defined", "within", "a", "specified", "resource", "group", "and", "category", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbooksInner.java#L184-L186
buyi/RecyclerViewPagerIndicator
recycler-viewpager-indicator/src/main/java/com/viewpagerindicator/as/library/indicator/RecyclerTitlePageIndicator.java
RecyclerTitlePageIndicator.calcBounds
private Rect calcBounds(int index, Paint paint) { """ Calculate the bounds for a view's title @param index @param paint @return """ //Calculate the text bounds Rect bounds = new Rect(); CharSequence title = getTitle(index); bounds.right = (int) paint.measureText(title, 0, t...
java
private Rect calcBounds(int index, Paint paint) { //Calculate the text bounds Rect bounds = new Rect(); CharSequence title = getTitle(index); bounds.right = (int) paint.measureText(title, 0, title.length()); bounds.bottom = (int) (paint.descent() - paint.ascent()); return...
[ "private", "Rect", "calcBounds", "(", "int", "index", ",", "Paint", "paint", ")", "{", "//Calculate the text bounds", "Rect", "bounds", "=", "new", "Rect", "(", ")", ";", "CharSequence", "title", "=", "getTitle", "(", "index", ")", ";", "bounds", ".", "rig...
Calculate the bounds for a view's title @param index @param paint @return
[ "Calculate", "the", "bounds", "for", "a", "view", "s", "title" ]
train
https://github.com/buyi/RecyclerViewPagerIndicator/blob/b3b5283801b60d40f7325c7f590c945262194fad/recycler-viewpager-indicator/src/main/java/com/viewpagerindicator/as/library/indicator/RecyclerTitlePageIndicator.java#L698-L705
pdef/pdef-java
pdef/src/main/java/io/pdef/rpc/HttpUrlConnectionRpcSession.java
HttpUrlConnectionRpcSession.sendPostData
protected void sendPostData(final HttpURLConnection connection, final RpcRequest request) throws IOException { """ Sets the connection content-type and content-length and sends the post data. """ String post = buildParamsQuery(request.getPost()); byte[] data = post.getBytes(UTF8); connection.setReque...
java
protected void sendPostData(final HttpURLConnection connection, final RpcRequest request) throws IOException { String post = buildParamsQuery(request.getPost()); byte[] data = post.getBytes(UTF8); connection.setRequestProperty(CONTENT_TYPE_HEADER, APPLICATION_X_WWW_FORM_URLENCODED); connection.setRequestPro...
[ "protected", "void", "sendPostData", "(", "final", "HttpURLConnection", "connection", ",", "final", "RpcRequest", "request", ")", "throws", "IOException", "{", "String", "post", "=", "buildParamsQuery", "(", "request", ".", "getPost", "(", ")", ")", ";", "byte",...
Sets the connection content-type and content-length and sends the post data.
[ "Sets", "the", "connection", "content", "-", "type", "and", "content", "-", "length", "and", "sends", "the", "post", "data", "." ]
train
https://github.com/pdef/pdef-java/blob/7776c44d1aab0f3dbf7267b0c32b8f9282fe6167/pdef/src/main/java/io/pdef/rpc/HttpUrlConnectionRpcSession.java#L120-L133
nextreports/nextreports-server
src/ro/nextreports/server/web/pivot/PivotTable.java
PivotTable.createTitleLabel
protected Label createTitleLabel(String id, PivotField pivotField) { """ Retrieves a label that display the pivot table title (for fields on ROW and DATA areas) """ String title = pivotField.getTitle(); if (pivotField.getArea().equals(PivotField.Area.DATA)) { title += " (" + pivotField.getAggregator().g...
java
protected Label createTitleLabel(String id, PivotField pivotField) { String title = pivotField.getTitle(); if (pivotField.getArea().equals(PivotField.Area.DATA)) { title += " (" + pivotField.getAggregator().getFunction().toUpperCase() + ")"; } return new Label(id, title); }
[ "protected", "Label", "createTitleLabel", "(", "String", "id", ",", "PivotField", "pivotField", ")", "{", "String", "title", "=", "pivotField", ".", "getTitle", "(", ")", ";", "if", "(", "pivotField", ".", "getArea", "(", ")", ".", "equals", "(", "PivotFie...
Retrieves a label that display the pivot table title (for fields on ROW and DATA areas)
[ "Retrieves", "a", "label", "that", "display", "the", "pivot", "table", "title", "(", "for", "fields", "on", "ROW", "and", "DATA", "areas", ")" ]
train
https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/web/pivot/PivotTable.java#L225-L232
alkacon/opencms-core
src-setup/org/opencms/setup/xml/CmsXmlConfigUpdater.java
CmsXmlConfigUpdater.transformConfig
public void transformConfig() throws Exception { """ Transforms the configuration. @throws Exception if something goes wrong """ List<TransformEntry> entries = readTransformEntries(new File(m_xsltDir, "transforms.xml")); for (TransformEntry entry : entries) { transform(entry.get...
java
public void transformConfig() throws Exception { List<TransformEntry> entries = readTransformEntries(new File(m_xsltDir, "transforms.xml")); for (TransformEntry entry : entries) { transform(entry.getConfigFile(), entry.getXslt()); } m_isDone = true; }
[ "public", "void", "transformConfig", "(", ")", "throws", "Exception", "{", "List", "<", "TransformEntry", ">", "entries", "=", "readTransformEntries", "(", "new", "File", "(", "m_xsltDir", ",", "\"transforms.xml\"", ")", ")", ";", "for", "(", "TransformEntry", ...
Transforms the configuration. @throws Exception if something goes wrong
[ "Transforms", "the", "configuration", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/xml/CmsXmlConfigUpdater.java#L229-L236
Stratio/stratio-cassandra
src/java/org/apache/cassandra/hadoop/pig/CqlNativeStorage.java
CqlNativeStorage.setMapTupleValues
private void setMapTupleValues(Tuple tuple, int position, Object value, AbstractType<?> validator) throws ExecException { """ set the values of set/list at and after the position of the tuple """ AbstractType<?> keyValidator = ((MapType<?, ?>) validator).getKeysType(); AbstractType<?> valueVali...
java
private void setMapTupleValues(Tuple tuple, int position, Object value, AbstractType<?> validator) throws ExecException { AbstractType<?> keyValidator = ((MapType<?, ?>) validator).getKeysType(); AbstractType<?> valueValidator = ((MapType<?, ?>) validator).getValuesType(); int i = 0; ...
[ "private", "void", "setMapTupleValues", "(", "Tuple", "tuple", ",", "int", "position", ",", "Object", "value", ",", "AbstractType", "<", "?", ">", "validator", ")", "throws", "ExecException", "{", "AbstractType", "<", "?", ">", "keyValidator", "=", "(", "(",...
set the values of set/list at and after the position of the tuple
[ "set", "the", "values", "of", "set", "/", "list", "at", "and", "after", "the", "position", "of", "the", "tuple" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/hadoop/pig/CqlNativeStorage.java#L198-L214
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.shareProjectWithGroup
public void shareProjectWithGroup(GitlabAccessLevel accessLevel, String expiration, GitlabGroup group, GitlabProject project) throws IOException { """ Share a project with a group. @param accessLevel The permissions level to grant the group. @param group The group to share with. @param project The p...
java
public void shareProjectWithGroup(GitlabAccessLevel accessLevel, String expiration, GitlabGroup group, GitlabProject project) throws IOException { Query query = new Query() .append("group_id", group.getId().toString()) .append("group_access", String.valueOf(accessLevel.accessValu...
[ "public", "void", "shareProjectWithGroup", "(", "GitlabAccessLevel", "accessLevel", ",", "String", "expiration", ",", "GitlabGroup", "group", ",", "GitlabProject", "project", ")", "throws", "IOException", "{", "Query", "query", "=", "new", "Query", "(", ")", ".", ...
Share a project with a group. @param accessLevel The permissions level to grant the group. @param group The group to share with. @param project The project to be shared. @param expiration Share expiration date in ISO 8601 format: 2016-09-26 or {@code null}. @throws IOException on gitlab api call error
[ "Share", "a", "project", "with", "a", "group", "." ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L3887-L3895
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/Collectors.java
Collectors.joining
public static Collector<CharSequence, ?, String> joining(CharSequence delimiter, CharSequence prefix, CharSequence suffix) { """ Returns a {@code Collector} that concatenates the input elements...
java
public static Collector<CharSequence, ?, String> joining(CharSequence delimiter, CharSequence prefix, CharSequence suffix) { return new CollectorImpl<>( () -> new StringJoine...
[ "public", "static", "Collector", "<", "CharSequence", ",", "?", ",", "String", ">", "joining", "(", "CharSequence", "delimiter", ",", "CharSequence", "prefix", ",", "CharSequence", "suffix", ")", "{", "return", "new", "CollectorImpl", "<>", "(", "(", ")", "-...
Returns a {@code Collector} that concatenates the input elements, separated by the specified delimiter, with the specified prefix and suffix, in encounter order. @param delimiter the delimiter to be used between each element @param prefix the sequence of characters to be used at the beginning of the joined result @pa...
[ "Returns", "a", "{", "@code", "Collector", "}", "that", "concatenates", "the", "input", "elements", "separated", "by", "the", "specified", "delimiter", "with", "the", "specified", "prefix", "and", "suffix", "in", "encounter", "order", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/Collectors.java#L295-L302
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/clique/CLIQUEUnit.java
CLIQUEUnit.addFeatureVector
public boolean addFeatureVector(DBIDRef id, NumberVector vector) { """ Adds the id of the specified feature vector to this unit, if this unit contains the feature vector. @param id Vector id @param vector the feature vector to be added @return true, if this unit contains the specified feature vector, false ...
java
public boolean addFeatureVector(DBIDRef id, NumberVector vector) { if(contains(vector)) { ids.add(id); return true; } return false; }
[ "public", "boolean", "addFeatureVector", "(", "DBIDRef", "id", ",", "NumberVector", "vector", ")", "{", "if", "(", "contains", "(", "vector", ")", ")", "{", "ids", ".", "add", "(", "id", ")", ";", "return", "true", ";", "}", "return", "false", ";", "...
Adds the id of the specified feature vector to this unit, if this unit contains the feature vector. @param id Vector id @param vector the feature vector to be added @return true, if this unit contains the specified feature vector, false otherwise
[ "Adds", "the", "id", "of", "the", "specified", "feature", "vector", "to", "this", "unit", "if", "this", "unit", "contains", "the", "feature", "vector", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/clique/CLIQUEUnit.java#L139-L145
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/faces/internal/PageFlowViewHandler.java
PageFlowViewHandler.restoreView
public UIViewRoot restoreView(FacesContext context, String viewId) { """ If we are in a request forwarded by {@link PageFlowNavigationHandler}, returns <code>null</code>; otherwise, delegates to the base ViewHandler. """ ExternalContext externalContext = context.getExternalContext(); Object re...
java
public UIViewRoot restoreView(FacesContext context, String viewId) { ExternalContext externalContext = context.getExternalContext(); Object request = externalContext.getRequest(); HttpServletRequest httpRequest = null; if ( request instanceof HttpServletRequest ) { ...
[ "public", "UIViewRoot", "restoreView", "(", "FacesContext", "context", ",", "String", "viewId", ")", "{", "ExternalContext", "externalContext", "=", "context", ".", "getExternalContext", "(", ")", ";", "Object", "request", "=", "externalContext", ".", "getRequest", ...
If we are in a request forwarded by {@link PageFlowNavigationHandler}, returns <code>null</code>; otherwise, delegates to the base ViewHandler.
[ "If", "we", "are", "in", "a", "request", "forwarded", "by", "{" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/faces/internal/PageFlowViewHandler.java#L210-L240
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/android/support/v7/widget/ChatLinearLayoutManager.java
ChatLinearLayoutManager.recycleByLayoutState
private void recycleByLayoutState(RecyclerView.Recycler recycler, LayoutState layoutState) { """ Helper method to call appropriate recycle method depending on current layout direction @param recycler Current recycler that is attached to RecyclerView @param layoutState Current layout state. Right now, this o...
java
private void recycleByLayoutState(RecyclerView.Recycler recycler, LayoutState layoutState) { if (!layoutState.mRecycle) { return; } if (layoutState.mLayoutDirection == LayoutState.LAYOUT_START) { recycleViewsFromEnd(recycler, layoutState.mScrollingOffset); } else ...
[ "private", "void", "recycleByLayoutState", "(", "RecyclerView", ".", "Recycler", "recycler", ",", "LayoutState", "layoutState", ")", "{", "if", "(", "!", "layoutState", ".", "mRecycle", ")", "{", "return", ";", "}", "if", "(", "layoutState", ".", "mLayoutDirec...
Helper method to call appropriate recycle method depending on current layout direction @param recycler Current recycler that is attached to RecyclerView @param layoutState Current layout state. Right now, this object does not change but we may consider moving it out of this view so passing around as a parameter for...
[ "Helper", "method", "to", "call", "appropriate", "recycle", "method", "depending", "on", "current", "layout", "direction" ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/android/support/v7/widget/ChatLinearLayoutManager.java#L1279-L1288
yasserg/crawler4j
crawler4j/src/main/java/edu/uci/ics/crawler4j/crawler/CrawlController.java
CrawlController.startNonBlocking
public <T extends WebCrawler> void startNonBlocking(Class<T> clazz, int numberOfCrawlers) { """ Start the crawling session and return immediately. This method utilizes default crawler factory that creates new crawler using Java reflection @param clazz the class that implements the logic for crawler threads @...
java
public <T extends WebCrawler> void startNonBlocking(Class<T> clazz, int numberOfCrawlers) { start(new DefaultWebCrawlerFactory<>(clazz), numberOfCrawlers, false); }
[ "public", "<", "T", "extends", "WebCrawler", ">", "void", "startNonBlocking", "(", "Class", "<", "T", ">", "clazz", ",", "int", "numberOfCrawlers", ")", "{", "start", "(", "new", "DefaultWebCrawlerFactory", "<>", "(", "clazz", ")", ",", "numberOfCrawlers", "...
Start the crawling session and return immediately. This method utilizes default crawler factory that creates new crawler using Java reflection @param clazz the class that implements the logic for crawler threads @param numberOfCrawlers the number of concurrent threads that will be contributing in this crawling session...
[ "Start", "the", "crawling", "session", "and", "return", "immediately", ".", "This", "method", "utilizes", "default", "crawler", "factory", "that", "creates", "new", "crawler", "using", "Java", "reflection" ]
train
https://github.com/yasserg/crawler4j/blob/4fcddc86414d1831973aff94050af55c7aeff3bc/crawler4j/src/main/java/edu/uci/ics/crawler4j/crawler/CrawlController.java#L265-L267
bluelinelabs/Conductor
conductor/src/main/java/com/bluelinelabs/conductor/Controller.java
Controller.requestPermissions
@TargetApi(Build.VERSION_CODES.M) public final void requestPermissions(@NonNull final String[] permissions, final int requestCode) { """ Calls requestPermission(String[], int) from this Controller's host Activity. Results for this request, including {@link #shouldShowRequestPermissionRationale(String)} and {...
java
@TargetApi(Build.VERSION_CODES.M) public final void requestPermissions(@NonNull final String[] permissions, final int requestCode) { requestedPermissions.addAll(Arrays.asList(permissions)); executeWithRouter(new RouterRequiringFunc() { @Override public void execute() { router.requestPer...
[ "@", "TargetApi", "(", "Build", ".", "VERSION_CODES", ".", "M", ")", "public", "final", "void", "requestPermissions", "(", "@", "NonNull", "final", "String", "[", "]", "permissions", ",", "final", "int", "requestCode", ")", "{", "requestedPermissions", ".", ...
Calls requestPermission(String[], int) from this Controller's host Activity. Results for this request, including {@link #shouldShowRequestPermissionRationale(String)} and {@link #onRequestPermissionsResult(int, String[], int[])} will be forwarded back to this Controller by the system.
[ "Calls", "requestPermission", "(", "String", "[]", "int", ")", "from", "this", "Controller", "s", "host", "Activity", ".", "Results", "for", "this", "request", "including", "{" ]
train
https://github.com/bluelinelabs/Conductor/blob/94c9121bb16f93b481954513a8e3905846829fb2/conductor/src/main/java/com/bluelinelabs/conductor/Controller.java#L563-L570
graphql-java/graphql-java
src/main/java/graphql/schema/idl/SchemaGenerator.java
SchemaGenerator.makeExecutableSchema
public GraphQLSchema makeExecutableSchema(Options options, TypeDefinitionRegistry typeRegistry, RuntimeWiring wiring) throws SchemaProblem { """ This will take a {@link TypeDefinitionRegistry} and a {@link RuntimeWiring} and put them together to create a executable schema controlled by the provided options. @p...
java
public GraphQLSchema makeExecutableSchema(Options options, TypeDefinitionRegistry typeRegistry, RuntimeWiring wiring) throws SchemaProblem { TypeDefinitionRegistry typeRegistryCopy = new TypeDefinitionRegistry(); typeRegistryCopy.merge(typeRegistry); schemaGeneratorHelper.addDeprecatedDirectiv...
[ "public", "GraphQLSchema", "makeExecutableSchema", "(", "Options", "options", ",", "TypeDefinitionRegistry", "typeRegistry", ",", "RuntimeWiring", "wiring", ")", "throws", "SchemaProblem", "{", "TypeDefinitionRegistry", "typeRegistryCopy", "=", "new", "TypeDefinitionRegistry"...
This will take a {@link TypeDefinitionRegistry} and a {@link RuntimeWiring} and put them together to create a executable schema controlled by the provided options. @param options the controlling options @param typeRegistry this can be obtained via {@link SchemaParser#parse(String)} @param wiring this can be...
[ "This", "will", "take", "a", "{", "@link", "TypeDefinitionRegistry", "}", "and", "a", "{", "@link", "RuntimeWiring", "}", "and", "put", "them", "together", "to", "create", "a", "executable", "schema", "controlled", "by", "the", "provided", "options", "." ]
train
https://github.com/graphql-java/graphql-java/blob/9214b6044317849388bd88a14b54fc1c18c9f29f/src/main/java/graphql/schema/idl/SchemaGenerator.java#L252-L266
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfAction.java
PdfAction.gotoRemotePage
public static PdfAction gotoRemotePage(String filename, String dest, boolean isName, boolean newWindow) { """ Creates a GoToR action to a named destination. @param filename the file name to go to @param dest the destination name @param isName if true sets the destination as a name, if false sets it as a String ...
java
public static PdfAction gotoRemotePage(String filename, String dest, boolean isName, boolean newWindow) { PdfAction action = new PdfAction(); action.put(PdfName.F, new PdfString(filename)); action.put(PdfName.S, PdfName.GOTOR); if (isName) action.put(PdfName.D, new PdfName(de...
[ "public", "static", "PdfAction", "gotoRemotePage", "(", "String", "filename", ",", "String", "dest", ",", "boolean", "isName", ",", "boolean", "newWindow", ")", "{", "PdfAction", "action", "=", "new", "PdfAction", "(", ")", ";", "action", ".", "put", "(", ...
Creates a GoToR action to a named destination. @param filename the file name to go to @param dest the destination name @param isName if true sets the destination as a name, if false sets it as a String @param newWindow open the document in a new window if <CODE>true</CODE>, if false the current document is replaced by ...
[ "Creates", "a", "GoToR", "action", "to", "a", "named", "destination", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfAction.java#L488-L499
ManfredTremmel/gwt-bean-validators
gwtp-spring-integration/src/main/super/de/knightsoftnet/gwtp/spring/supersource/org/springframework/util/ObjectUtils.java
ObjectUtils.containsConstant
public static boolean containsConstant(final Enum<?>[] enumValues, final String constant) { """ Check whether the given array of enum constants contains a constant with the given name, ignoring case when determining a match. @param enumValues the enum values to check, typically the product of a call to MyEnum....
java
public static boolean containsConstant(final Enum<?>[] enumValues, final String constant) { return ObjectUtils.containsConstant(enumValues, constant, false); }
[ "public", "static", "boolean", "containsConstant", "(", "final", "Enum", "<", "?", ">", "[", "]", "enumValues", ",", "final", "String", "constant", ")", "{", "return", "ObjectUtils", ".", "containsConstant", "(", "enumValues", ",", "constant", ",", "false", ...
Check whether the given array of enum constants contains a constant with the given name, ignoring case when determining a match. @param enumValues the enum values to check, typically the product of a call to MyEnum.values() @param constant the constant name to find (must not be null or empty string) @return whether th...
[ "Check", "whether", "the", "given", "array", "of", "enum", "constants", "contains", "a", "constant", "with", "the", "given", "name", "ignoring", "case", "when", "determining", "a", "match", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwtp-spring-integration/src/main/super/de/knightsoftnet/gwtp/spring/supersource/org/springframework/util/ObjectUtils.java#L218-L220
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDITimephasedWorkNormaliser.java
MSPDITimephasedWorkNormaliser.splitDays
private void splitDays(ProjectCalendar calendar, LinkedList<TimephasedWork> list) { """ This method breaks down spans of time into individual days. @param calendar current project calendar @param list list of assignment data """ LinkedList<TimephasedWork> result = new LinkedList<TimephasedWork>(); ...
java
private void splitDays(ProjectCalendar calendar, LinkedList<TimephasedWork> list) { LinkedList<TimephasedWork> result = new LinkedList<TimephasedWork>(); for (TimephasedWork assignment : list) { while (assignment != null) { Date startDay = DateHelper.getDayStartDate(as...
[ "private", "void", "splitDays", "(", "ProjectCalendar", "calendar", ",", "LinkedList", "<", "TimephasedWork", ">", "list", ")", "{", "LinkedList", "<", "TimephasedWork", ">", "result", "=", "new", "LinkedList", "<", "TimephasedWork", ">", "(", ")", ";", "for",...
This method breaks down spans of time into individual days. @param calendar current project calendar @param list list of assignment data
[ "This", "method", "breaks", "down", "spans", "of", "time", "into", "individual", "days", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDITimephasedWorkNormaliser.java#L81-L114
matomo-org/piwik-java-tracker
src/main/java/org/piwik/java/tracking/PiwikRequest.java
PiwikRequest.setRequestDatetime
public void setRequestDatetime(PiwikDate datetime) { """ Set the datetime of the request (normally the current time is used). This can be used to record visits and page views in the past. The datetime must be sent in UTC timezone. <em>Note: if you record data in the past, you will need to <a href="http://piwik....
java
public void setRequestDatetime(PiwikDate datetime){ if (datetime != null && new Date().getTime()-datetime.getTime() > REQUEST_DATETIME_AUTH_LIMIT && getAuthToken() == null){ throw new IllegalStateException("Because you are trying to set RequestDatetime for a time greater than 4 hours ago, AuthToken ...
[ "public", "void", "setRequestDatetime", "(", "PiwikDate", "datetime", ")", "{", "if", "(", "datetime", "!=", "null", "&&", "new", "Date", "(", ")", ".", "getTime", "(", ")", "-", "datetime", ".", "getTime", "(", ")", ">", "REQUEST_DATETIME_AUTH_LIMIT", "&&...
Set the datetime of the request (normally the current time is used). This can be used to record visits and page views in the past. The datetime must be sent in UTC timezone. <em>Note: if you record data in the past, you will need to <a href="http://piwik.org/faq/how-to/#faq_59">force Piwik to re-process reports for the...
[ "Set", "the", "datetime", "of", "the", "request", "(", "normally", "the", "current", "time", "is", "used", ")", ".", "This", "can", "be", "used", "to", "record", "visits", "and", "page", "views", "in", "the", "past", ".", "The", "datetime", "must", "be...
train
https://github.com/matomo-org/piwik-java-tracker/blob/23df71d27a89e89dc7a539b2eda88c90a206458b/src/main/java/org/piwik/java/tracking/PiwikRequest.java#L1219-L1224
lodborg/interval-tree
src/main/java/com/lodborg/intervaltree/Interval.java
Interval.isRightOf
public boolean isRightOf(Interval<T> other) { """ This method checks, if this current interval is entirely to the right of another interval with no common points. More formally, the method will return true, if for every point {@code x} from the current interval and for every point {@code y} from the {@code other...
java
public boolean isRightOf(Interval<T> other){ if (other == null || other.isEmpty()) return false; return isRightOf(other.end, other.isEndInclusive()); }
[ "public", "boolean", "isRightOf", "(", "Interval", "<", "T", ">", "other", ")", "{", "if", "(", "other", "==", "null", "||", "other", ".", "isEmpty", "(", ")", ")", "return", "false", ";", "return", "isRightOf", "(", "other", ".", "end", ",", "other"...
This method checks, if this current interval is entirely to the right of another interval with no common points. More formally, the method will return true, if for every point {@code x} from the current interval and for every point {@code y} from the {@code other} interval the inequality {@code x} &gt; {@code y} holds....
[ "This", "method", "checks", "if", "this", "current", "interval", "is", "entirely", "to", "the", "right", "of", "another", "interval", "with", "no", "common", "points", ".", "More", "formally", "the", "method", "will", "return", "true", "if", "for", "every", ...
train
https://github.com/lodborg/interval-tree/blob/716b18fb0a5a53c9add9926176bc263f14c9bf90/src/main/java/com/lodborg/intervaltree/Interval.java#L415-L419
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/stream/BigDecimalStream.java
BigDecimalStream.rangeClosed
public static Stream<BigDecimal> rangeClosed(BigDecimal startInclusive, BigDecimal endInclusive, BigDecimal step, MathContext mathContext) { """ Returns a sequential ordered {@code Stream<BigDecimal>} from {@code startInclusive} (inclusive) to {@code endInclusive} (inclusive) by an incremental {@code step}. <p...
java
public static Stream<BigDecimal> rangeClosed(BigDecimal startInclusive, BigDecimal endInclusive, BigDecimal step, MathContext mathContext) { if (step.signum() == 0) { throw new IllegalArgumentException("invalid step: 0"); } if (endInclusive.subtract(startInclusive).signum() == -step.signum()) { ...
[ "public", "static", "Stream", "<", "BigDecimal", ">", "rangeClosed", "(", "BigDecimal", "startInclusive", ",", "BigDecimal", "endInclusive", ",", "BigDecimal", "step", ",", "MathContext", "mathContext", ")", "{", "if", "(", "step", ".", "signum", "(", ")", "==...
Returns a sequential ordered {@code Stream<BigDecimal>} from {@code startInclusive} (inclusive) to {@code endInclusive} (inclusive) by an incremental {@code step}. <p>An equivalent sequence of increasing values can be produced sequentially using a {@code for} loop as follows: <pre>for (BigDecimal i = startInclusive; i...
[ "Returns", "a", "sequential", "ordered", "{", "@code", "Stream<BigDecimal", ">", "}", "from", "{", "@code", "startInclusive", "}", "(", "inclusive", ")", "to", "{", "@code", "endInclusive", "}", "(", "inclusive", ")", "by", "an", "incremental", "{", "@code",...
train
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/stream/BigDecimalStream.java#L96-L104
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/AccountsApi.java
AccountsApi.updatePermissionProfile
public PermissionProfile updatePermissionProfile(String accountId, String permissionProfileId, PermissionProfile permissionProfile) throws ApiException { """ Updates a permission profile within the specified account. @param accountId The external account number (int) or account ID Guid. (required) @param permi...
java
public PermissionProfile updatePermissionProfile(String accountId, String permissionProfileId, PermissionProfile permissionProfile) throws ApiException { return updatePermissionProfile(accountId, permissionProfileId, permissionProfile, null); }
[ "public", "PermissionProfile", "updatePermissionProfile", "(", "String", "accountId", ",", "String", "permissionProfileId", ",", "PermissionProfile", "permissionProfile", ")", "throws", "ApiException", "{", "return", "updatePermissionProfile", "(", "accountId", ",", "permis...
Updates a permission profile within the specified account. @param accountId The external account number (int) or account ID Guid. (required) @param permissionProfileId (required) @param permissionProfile (optional) @return PermissionProfile
[ "Updates", "a", "permission", "profile", "within", "the", "specified", "account", "." ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/AccountsApi.java#L2907-L2909
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_instance_POST
public OvhInstanceDetail project_serviceName_instance_POST(String serviceName, String flavorId, String groupId, String imageId, Boolean monthlyBilling, String name, OvhNetworkParams[] networks, String region, String sshKeyId, String userData, String volumeId) throws IOException { """ Create a new instance REST:...
java
public OvhInstanceDetail project_serviceName_instance_POST(String serviceName, String flavorId, String groupId, String imageId, Boolean monthlyBilling, String name, OvhNetworkParams[] networks, String region, String sshKeyId, String userData, String volumeId) throws IOException { String qPath = "/cloud/project/{servi...
[ "public", "OvhInstanceDetail", "project_serviceName_instance_POST", "(", "String", "serviceName", ",", "String", "flavorId", ",", "String", "groupId", ",", "String", "imageId", ",", "Boolean", "monthlyBilling", ",", "String", "name", ",", "OvhNetworkParams", "[", "]",...
Create a new instance REST: POST /cloud/project/{serviceName}/instance @param flavorId [required] Instance flavor id @param groupId [required] Start instance in group @param imageId [required] Instance image id @param monthlyBilling [required] Active monthly billing @param name [required] Instance name @param networks...
[ "Create", "a", "new", "instance" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L1791-L1807
acromusashi/acromusashi-stream
src/main/java/acromusashi/stream/bolt/hdfs/HdfsOutputSwitcher.java
HdfsOutputSwitcher.append
public void append(String target, long nowTime) throws IOException { """ メッセージをHDFSに出力する。 @param target 出力内容 @param nowTime 出力時刻 @throws IOException 入出力エラー発生時 """ if (this.nextSwitchTime <= nowTime) { switchWriter(nowTime); } this.currentWriter.append(tar...
java
public void append(String target, long nowTime) throws IOException { if (this.nextSwitchTime <= nowTime) { switchWriter(nowTime); } this.currentWriter.append(target); }
[ "public", "void", "append", "(", "String", "target", ",", "long", "nowTime", ")", "throws", "IOException", "{", "if", "(", "this", ".", "nextSwitchTime", "<=", "nowTime", ")", "{", "switchWriter", "(", "nowTime", ")", ";", "}", "this", ".", "currentWriter"...
メッセージをHDFSに出力する。 @param target 出力内容 @param nowTime 出力時刻 @throws IOException 入出力エラー発生時
[ "メッセージをHDFSに出力する。" ]
train
https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/bolt/hdfs/HdfsOutputSwitcher.java#L136-L144
kohsuke/args4j
args4j/src/org/kohsuke/args4j/spi/MapOptionHandler.java
MapOptionHandler.addToMap
protected void addToMap(String argument, Map m) throws CmdLineException { """ Encapsulates how a single string argument gets converted into key and value. """ if (String.valueOf(argument).indexOf('=') == -1) { throw new CmdLineException(owner,Messages.FORMAT_ERROR_FOR_MAP); } String mapKey; ...
java
protected void addToMap(String argument, Map m) throws CmdLineException { if (String.valueOf(argument).indexOf('=') == -1) { throw new CmdLineException(owner,Messages.FORMAT_ERROR_FOR_MAP); } String mapKey; String mapValue; //Splitting off the key from the value int idx = argument.indexO...
[ "protected", "void", "addToMap", "(", "String", "argument", ",", "Map", "m", ")", "throws", "CmdLineException", "{", "if", "(", "String", ".", "valueOf", "(", "argument", ")", ".", "indexOf", "(", "'", "'", ")", "==", "-", "1", ")", "{", "throw", "ne...
Encapsulates how a single string argument gets converted into key and value.
[ "Encapsulates", "how", "a", "single", "string", "argument", "gets", "converted", "into", "key", "and", "value", "." ]
train
https://github.com/kohsuke/args4j/blob/dc2e7e265caf15a1a146e3389c1f16a8781f06cf/args4j/src/org/kohsuke/args4j/spi/MapOptionHandler.java#L60-L86
craftercms/engine
src/main/java/org/craftercms/engine/util/spring/BeanDefinitionUtils.java
BeanDefinitionUtils.addPropertyIfNotNull
public static void addPropertyIfNotNull(BeanDefinition definition, String propertyName, Object propertyValue) { """ Adds the property to the bean definition if the values it not empty @param definition the bean definition @param propertyName the property name @param propertyValue the property value ""...
java
public static void addPropertyIfNotNull(BeanDefinition definition, String propertyName, Object propertyValue) { if (propertyValue != null) { definition.getPropertyValues().add(propertyName, propertyValue); } }
[ "public", "static", "void", "addPropertyIfNotNull", "(", "BeanDefinition", "definition", ",", "String", "propertyName", ",", "Object", "propertyValue", ")", "{", "if", "(", "propertyValue", "!=", "null", ")", "{", "definition", ".", "getPropertyValues", "(", ")", ...
Adds the property to the bean definition if the values it not empty @param definition the bean definition @param propertyName the property name @param propertyValue the property value
[ "Adds", "the", "property", "to", "the", "bean", "definition", "if", "the", "values", "it", "not", "empty" ]
train
https://github.com/craftercms/engine/blob/6b3d0349b1598172926352cdbd97f495976a8187/src/main/java/org/craftercms/engine/util/spring/BeanDefinitionUtils.java#L75-L79
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuStreamWriteValue64
public static int cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, long value, int flags) { """ Write a value to memory.<br> <br> Write a value to memory. Unless the CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER flag is passed, the write is preceded by a system-wide memory fence, equivalent to a __threadfenc...
java
public static int cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, long value, int flags) { return checkResult(cuStreamWriteValue64Native(stream, addr, value, flags)); }
[ "public", "static", "int", "cuStreamWriteValue64", "(", "CUstream", "stream", ",", "CUdeviceptr", "addr", ",", "long", "value", ",", "int", "flags", ")", "{", "return", "checkResult", "(", "cuStreamWriteValue64Native", "(", "stream", ",", "addr", ",", "value", ...
Write a value to memory.<br> <br> Write a value to memory. Unless the CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER flag is passed, the write is preceded by a system-wide memory fence, equivalent to a __threadfence_system() but scoped to the stream rather than a CUDA thread.<br> <br> If the memory was registered via cuMemHos...
[ "Write", "a", "value", "to", "memory", ".", "<br", ">", "<br", ">", "Write", "a", "value", "to", "memory", ".", "Unless", "the", "CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER", "flag", "is", "passed", "the", "write", "is", "preceded", "by", "a", "system", "-", ...
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L13791-L13794
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getWvWAbilityInfo
public void getWvWAbilityInfo(int[] ids, Callback<List<WvWAbility>> callback) throws GuildWars2Exception, NullPointerException { """ For more info on WvW abilities API go <a href="https://wiki.guildwars2.com/wiki/API:2/wvw/abilities">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)...
java
public void getWvWAbilityInfo(int[] ids, Callback<List<WvWAbility>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ids)); gw2API.getWvWAbilityInfo(processIds(ids), GuildWars2.lang.getValue()).enqueue(callback); }
[ "public", "void", "getWvWAbilityInfo", "(", "int", "[", "]", "ids", ",", "Callback", "<", "List", "<", "WvWAbility", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "(", ...
For more info on WvW abilities API go <a href="https://wiki.guildwars2.com/wiki/API:2/wvw/abilities">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param ids list of WvW abilities id @param callback...
[ "For", "more", "info", "on", "WvW", "abilities", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "wvw", "/", "abilities", ">", "here<", "/", "a", ">", "<br", "/", ...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L2582-L2585
alkacon/opencms-core
src-modules/org/opencms/workplace/comparison/A_CmsDiffViewDialog.java
A_CmsDiffViewDialog.deactivatedEmphasizedButtonHtml
public String deactivatedEmphasizedButtonHtml(String name, String iconPath) { """ Returns the html code for a deactivated empfasized button.<p> @param name the label of the button @param iconPath the path to the icon @return the html code for a deactivated empfasized button """ StringBuffer res...
java
public String deactivatedEmphasizedButtonHtml(String name, String iconPath) { StringBuffer result = new StringBuffer(); result.append( "<span style='vertical-align:middle;'><img style='width:20px;height:20px;display:inline;vertical-align:middle;text-decoration:none;' src=\'"); resul...
[ "public", "String", "deactivatedEmphasizedButtonHtml", "(", "String", "name", ",", "String", "iconPath", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", ")", ";", "result", ".", "append", "(", "\"<span style='vertical-align:middle;'><img style='widt...
Returns the html code for a deactivated empfasized button.<p> @param name the label of the button @param iconPath the path to the icon @return the html code for a deactivated empfasized button
[ "Returns", "the", "html", "code", "for", "a", "deactivated", "empfasized", "button", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/comparison/A_CmsDiffViewDialog.java#L208-L223
GenesysPureEngage/authentication-client-java
src/main/java/com/genesys/internal/authentication/api/AuthenticationApi.java
AuthenticationApi.retrieveTokenAsync
public com.squareup.okhttp.Call retrieveTokenAsync(String grantType, String accept, String authorization, String clientId, String password, String refreshToken, String scope, String username, final ApiCallback<DefaultOAuth2AccessToken> callback) throws ApiException { """ Retrieve access token (asynchronously) Ret...
java
public com.squareup.okhttp.Call retrieveTokenAsync(String grantType, String accept, String authorization, String clientId, String password, String refreshToken, String scope, String username, final ApiCallback<DefaultOAuth2AccessToken> callback) throws ApiException { ProgressResponseBody.ProgressListener progr...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "retrieveTokenAsync", "(", "String", "grantType", ",", "String", "accept", ",", "String", "authorization", ",", "String", "clientId", ",", "String", "password", ",", "String", "refreshToken", ",", "...
Retrieve access token (asynchronously) Retrieve an access token based on the grant type &amp;mdash; Authorization Code Grant, Resource Owner Password Credentials Grant or Client Credentials Grant. For more information, see [Token Endpoint](https://tools.ietf.org/html/rfc6749). **Note:** For the optional **scope** param...
[ "Retrieve", "access", "token", "(", "asynchronously", ")", "Retrieve", "an", "access", "token", "based", "on", "the", "grant", "type", "&amp", ";", "mdash", ";", "Authorization", "Code", "Grant", "Resource", "Owner", "Password", "Credentials", "Grant", "or", "...
train
https://github.com/GenesysPureEngage/authentication-client-java/blob/eb0d58343ee42ebd3c037163c1137f611dfcbb3a/src/main/java/com/genesys/internal/authentication/api/AuthenticationApi.java#L1089-L1114
vst/commons-math-extensions
src/main/java/com/vsthost/rnd/commons/math/ext/linear/DMatrixUtils.java
DMatrixUtils.getOrder
public static int[] getOrder(int[] values, int[] indices, boolean descending) { """ Get the order of the specified elements in descending or ascending order. @param values A vector of integer values. @param indices The indices which will be considered for ordering. @param descending Flag indicating if we go d...
java
public static int[] getOrder(int[] values, int[] indices, boolean descending) { // Create an index series: Integer[] opIndices = ArrayUtils.toObject(indices); // Sort indices: Arrays.sort(opIndices, new Comparator<Integer>() { @Override public int compare(Integer...
[ "public", "static", "int", "[", "]", "getOrder", "(", "int", "[", "]", "values", ",", "int", "[", "]", "indices", ",", "boolean", "descending", ")", "{", "// Create an index series:", "Integer", "[", "]", "opIndices", "=", "ArrayUtils", ".", "toObject", "(...
Get the order of the specified elements in descending or ascending order. @param values A vector of integer values. @param indices The indices which will be considered for ordering. @param descending Flag indicating if we go descending or not. @return A vector of indices sorted in the provided order.
[ "Get", "the", "order", "of", "the", "specified", "elements", "in", "descending", "or", "ascending", "order", "." ]
train
https://github.com/vst/commons-math-extensions/blob/a11ee78ffe53ab7c016062be93c5af07aa8e1823/src/main/java/com/vsthost/rnd/commons/math/ext/linear/DMatrixUtils.java#L264-L281
finmath/finmath-lib
src/main/java/net/finmath/functions/LinearAlgebra.java
LinearAlgebra.solveLinearEquationTikonov
public static double[] solveLinearEquationTikonov(double[][] matrixA, double[] b, double lambda) { """ Find a solution of the linear equation A x = b where <ul> <li>A is an n x m - matrix given as double[n][m]</li> <li>b is an m - vector given as double[m],</li> <li>x is an n - vector given as double[n],</li> ...
java
public static double[] solveLinearEquationTikonov(double[][] matrixA, double[] b, double lambda) { if(lambda == 0) { return solveLinearEquationLeastSquare(matrixA, b); } /* * The copy of the array is inefficient, but the use cases for this method are currently limited. * And SVD is an alternative to thi...
[ "public", "static", "double", "[", "]", "solveLinearEquationTikonov", "(", "double", "[", "]", "[", "]", "matrixA", ",", "double", "[", "]", "b", ",", "double", "lambda", ")", "{", "if", "(", "lambda", "==", "0", ")", "{", "return", "solveLinearEquationL...
Find a solution of the linear equation A x = b where <ul> <li>A is an n x m - matrix given as double[n][m]</li> <li>b is an m - vector given as double[m],</li> <li>x is an n - vector given as double[n],</li> </ul> using a standard Tikhonov regularization, i.e., we solve in the least square sense A* x = b* where A* = (A...
[ "Find", "a", "solution", "of", "the", "linear", "equation", "A", "x", "=", "b", "where", "<ul", ">", "<li", ">", "A", "is", "an", "n", "x", "m", "-", "matrix", "given", "as", "double", "[", "n", "]", "[", "m", "]", "<", "/", "li", ">", "<li",...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/functions/LinearAlgebra.java#L81-L109
mgm-tp/jfunk
jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/DumpFileCreator.java
DumpFileCreator.createDumpFile
public File createDumpFile(final File dir, final String extension, final String urlString, final String additionalInfo) { """ Computes the best file to save the response to the current page. """ URI uri = URI.create(urlString); String path = uri.getPath(); if (path == null) { log.warn("Cannot create d...
java
public File createDumpFile(final File dir, final String extension, final String urlString, final String additionalInfo) { URI uri = URI.create(urlString); String path = uri.getPath(); if (path == null) { log.warn("Cannot create dump file for URI: " + uri); return null; } String name = PATTERN_FIRST_LAS...
[ "public", "File", "createDumpFile", "(", "final", "File", "dir", ",", "final", "String", "extension", ",", "final", "String", "urlString", ",", "final", "String", "additionalInfo", ")", "{", "URI", "uri", "=", "URI", ".", "create", "(", "urlString", ")", "...
Computes the best file to save the response to the current page.
[ "Computes", "the", "best", "file", "to", "save", "the", "response", "to", "the", "current", "page", "." ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/DumpFileCreator.java#L52-L85
basho/riak-java-client
src/main/java/com/basho/riak/client/api/convert/reflection/AnnotationUtil.java
AnnotationUtil.getKey
public static <T> BinaryValue getKey(T domainObject, BinaryValue defaultKey) { """ Attempts to get a key from <code>domainObject</code> by looking for a {@literal @RiakKey} annotated member. If non-present it simply returns <code>defaultKey</code> @param <T> the type of <code>domainObject</code> @param domai...
java
public static <T> BinaryValue getKey(T domainObject, BinaryValue defaultKey) { BinaryValue key = getKey(domainObject); if (key == null) { key = defaultKey; } return key; }
[ "public", "static", "<", "T", ">", "BinaryValue", "getKey", "(", "T", "domainObject", ",", "BinaryValue", "defaultKey", ")", "{", "BinaryValue", "key", "=", "getKey", "(", "domainObject", ")", ";", "if", "(", "key", "==", "null", ")", "{", "key", "=", ...
Attempts to get a key from <code>domainObject</code> by looking for a {@literal @RiakKey} annotated member. If non-present it simply returns <code>defaultKey</code> @param <T> the type of <code>domainObject</code> @param domainObject the object to search for a key @param defaultKey the pass through value that will get...
[ "Attempts", "to", "get", "a", "key", "from", "<code", ">", "domainObject<", "/", "code", ">", "by", "looking", "for", "a", "{", "@literal", "@RiakKey", "}", "annotated", "member", ".", "If", "non", "-", "present", "it", "simply", "returns", "<code", ">",...
train
https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/api/convert/reflection/AnnotationUtil.java#L65-L73
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/taglib/jsf/AbstractHtmlImageTag.java
AbstractHtmlImageTag.prepareAttribute
protected void prepareAttribute(StringBuffer handlers, String name, Object value) { """ Prepares an attribute if the value is not null, appending it to the the given StringBuffer. @param handlers The StringBuffer that output will be appended to. @param name the property name @param value the property valu...
java
protected void prepareAttribute(StringBuffer handlers, String name, Object value) { if (value != null) { handlers.append(" "); handlers.append(name); handlers.append("=\""); handlers.append(value); handlers.append("\""); } }
[ "protected", "void", "prepareAttribute", "(", "StringBuffer", "handlers", ",", "String", "name", ",", "Object", "value", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "handlers", ".", "append", "(", "\" \"", ")", ";", "handlers", ".", "append", "...
Prepares an attribute if the value is not null, appending it to the the given StringBuffer. @param handlers The StringBuffer that output will be appended to. @param name the property name @param value the property value
[ "Prepares", "an", "attribute", "if", "the", "value", "is", "not", "null", "appending", "it", "to", "the", "the", "given", "StringBuffer", "." ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/taglib/jsf/AbstractHtmlImageTag.java#L138-L146
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/Model.java
Model.setTS
@Deprecated public void setTS(String name, java.util.Date date) { """ Performs a primitive conversion of <code>java.util.Date</code> to <code>java.sql.Timestamp</code> based on the time value. @param name name of field. @param date date value. @deprecated use {@link #setTimestamp(String, Object)} instea...
java
@Deprecated public void setTS(String name, java.util.Date date) { if(date == null) { set(name, null); } else { set(name, new java.sql.Timestamp(date.getTime())); } }
[ "@", "Deprecated", "public", "void", "setTS", "(", "String", "name", ",", "java", ".", "util", ".", "Date", "date", ")", "{", "if", "(", "date", "==", "null", ")", "{", "set", "(", "name", ",", "null", ")", ";", "}", "else", "{", "set", "(", "n...
Performs a primitive conversion of <code>java.util.Date</code> to <code>java.sql.Timestamp</code> based on the time value. @param name name of field. @param date date value. @deprecated use {@link #setTimestamp(String, Object)} instead.
[ "Performs", "a", "primitive", "conversion", "of", "<code", ">", "java", ".", "util", ".", "Date<", "/", "code", ">", "to", "<code", ">", "java", ".", "sql", ".", "Timestamp<", "/", "code", ">", "based", "on", "the", "time", "value", "." ]
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Model.java#L328-L335
lessthanoptimal/BoofCV
integration/boofcv-android/src/main/java/boofcv/android/camera2/VisualizeCamera2Activity.java
VisualizeCamera2Activity.onDrawFrame
protected void onDrawFrame( SurfaceView view , Canvas canvas ) { """ Renders the visualizations. Override and invoke super to add your own """ // Code below is usefull when debugging display issues // Paint paintFill = new Paint(); // paintFill.setColor(Color.RED); // paintFill.setStyle(Paint.Style.FILL)...
java
protected void onDrawFrame( SurfaceView view , Canvas canvas ) { // Code below is usefull when debugging display issues // Paint paintFill = new Paint(); // paintFill.setColor(Color.RED); // paintFill.setStyle(Paint.Style.FILL); // Paint paintBorder = new Paint(); // paintBorder.setColor(Color.BLUE); // paintB...
[ "protected", "void", "onDrawFrame", "(", "SurfaceView", "view", ",", "Canvas", "canvas", ")", "{", "// Code below is usefull when debugging display issues", "//\t\tPaint paintFill = new Paint();", "//\t\tpaintFill.setColor(Color.RED);", "//\t\tpaintFill.setStyle(Paint.Style.FILL);", "/...
Renders the visualizations. Override and invoke super to add your own
[ "Renders", "the", "visualizations", ".", "Override", "and", "invoke", "super", "to", "add", "your", "own" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera2/VisualizeCamera2Activity.java#L452-L480
sai-pullabhotla/catatumbo
src/main/java/com/jmethods/catatumbo/impl/IdClassMetadata.java
IdClassMetadata.findConstructor
private MethodHandle findConstructor() { """ Creates and returns the MethodHandle for the constructor. @return the MethodHandle for the constructor. """ try { MethodHandle mh = MethodHandles.publicLookup().findConstructor(clazz, MethodType.methodType(void.class, getIdType())); retu...
java
private MethodHandle findConstructor() { try { MethodHandle mh = MethodHandles.publicLookup().findConstructor(clazz, MethodType.methodType(void.class, getIdType())); return mh; } catch (NoSuchMethodException | IllegalAccessException exp) { String pattern = "Class %s requires a public...
[ "private", "MethodHandle", "findConstructor", "(", ")", "{", "try", "{", "MethodHandle", "mh", "=", "MethodHandles", ".", "publicLookup", "(", ")", ".", "findConstructor", "(", "clazz", ",", "MethodType", ".", "methodType", "(", "void", ".", "class", ",", "g...
Creates and returns the MethodHandle for the constructor. @return the MethodHandle for the constructor.
[ "Creates", "and", "returns", "the", "MethodHandle", "for", "the", "constructor", "." ]
train
https://github.com/sai-pullabhotla/catatumbo/blob/96d4c6dce3a5009624f7112a398406914dd19165/src/main/java/com/jmethods/catatumbo/impl/IdClassMetadata.java#L131-L141
OpenLiberty/open-liberty
dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/RecoveryDirectorImpl.java
RecoveryDirectorImpl.removeRecoveryRecord
private boolean removeRecoveryRecord(RecoveryAgent recoveryAgent, FailureScope failureScope) { """ <p> Internal method to remove the record of an outstanding 'initialRecoveryComplete' call from the supplied RecoveryAgent for the given failure scope. </p> <p> This call will wake up all threads waiting for in...
java
private boolean removeRecoveryRecord(RecoveryAgent recoveryAgent, FailureScope failureScope) { if (tc.isEntryEnabled()) Tr.entry(tc, "removeRecoveryRecord", new Object[] { recoveryAgent, failureScope, this }); boolean found = false; synchronized (_outstandingRecoveryRecords) { ...
[ "private", "boolean", "removeRecoveryRecord", "(", "RecoveryAgent", "recoveryAgent", ",", "FailureScope", "failureScope", ")", "{", "if", "(", "tc", ".", "isEntryEnabled", "(", ")", ")", "Tr", ".", "entry", "(", "tc", ",", "\"removeRecoveryRecord\"", ",", "new",...
<p> Internal method to remove the record of an outstanding 'initialRecoveryComplete' call from the supplied RecoveryAgent for the given failure scope. </p> <p> This call will wake up all threads waiting for initial recovery to be completed. </p> <p> Just prior to requesting a RecoveryAgent to "initiateRecovery" of a ...
[ "<p", ">", "Internal", "method", "to", "remove", "the", "record", "of", "an", "outstanding", "initialRecoveryComplete", "call", "from", "the", "supplied", "RecoveryAgent", "for", "the", "given", "failure", "scope", ".", "<", "/", "p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/RecoveryDirectorImpl.java#L1223-L1240
ineunetOS/knife-commons
knife-commons-utils/src/main/java/com/ineunet/knife/util/DecimalUtils.java
DecimalUtils.isValueEquals
public static boolean isValueEquals(BigDecimal decimal1, BigDecimal decimal2) { """ e.g. 0.30 equals 0.3 && 0.30 equals 0.30 && 0.30 equals 0.300. """ if (decimal1 == null && decimal2 == null) return true; if (decimal1 == null && decimal2 != null) return false; if (decimal1 != null && decimal2 == null) r...
java
public static boolean isValueEquals(BigDecimal decimal1, BigDecimal decimal2) { if (decimal1 == null && decimal2 == null) return true; if (decimal1 == null && decimal2 != null) return false; if (decimal1 != null && decimal2 == null) return false; return cutInvalidSacle(decimal1).equals(cutInvalidSacle(decimal2)...
[ "public", "static", "boolean", "isValueEquals", "(", "BigDecimal", "decimal1", ",", "BigDecimal", "decimal2", ")", "{", "if", "(", "decimal1", "==", "null", "&&", "decimal2", "==", "null", ")", "return", "true", ";", "if", "(", "decimal1", "==", "null", "&...
e.g. 0.30 equals 0.3 && 0.30 equals 0.30 && 0.30 equals 0.300.
[ "e", ".", "g", ".", "0", ".", "30", "equals", "0", ".", "3", "&&", "0", ".", "30", "equals", "0", ".", "30", "&&", "0", ".", "30", "equals", "0", ".", "300", "." ]
train
https://github.com/ineunetOS/knife-commons/blob/eae9e59afa020a00ae8977c10d43ac8ae46ae236/knife-commons-utils/src/main/java/com/ineunet/knife/util/DecimalUtils.java#L49-L54
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_user_userId_openrc_GET
public OvhOpenrc project_serviceName_user_userId_openrc_GET(String serviceName, Long userId, String region, OvhOpenrcVersionEnum version) throws IOException { """ Get RC file of OpenStack REST: GET /cloud/project/{serviceName}/user/{userId}/openrc @param region [required] Region @param serviceName [required] ...
java
public OvhOpenrc project_serviceName_user_userId_openrc_GET(String serviceName, Long userId, String region, OvhOpenrcVersionEnum version) throws IOException { String qPath = "/cloud/project/{serviceName}/user/{userId}/openrc"; StringBuilder sb = path(qPath, serviceName, userId); query(sb, "region", region); que...
[ "public", "OvhOpenrc", "project_serviceName_user_userId_openrc_GET", "(", "String", "serviceName", ",", "Long", "userId", ",", "String", "region", ",", "OvhOpenrcVersionEnum", "version", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{service...
Get RC file of OpenStack REST: GET /cloud/project/{serviceName}/user/{userId}/openrc @param region [required] Region @param serviceName [required] Service name @param userId [required] User id @param version [required] Identity API version
[ "Get", "RC", "file", "of", "OpenStack" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L478-L485
betfair/cougar
cougar-codegen-plugin/src/main/java/com/betfair/cougar/codegen/IdlToDSMojo.java
IdlToDSMojo.derivePackageName
private String derivePackageName(Service service, Document iddDoc) { """ Package name comes from explicit plugin param (if set), else the namespace definition, else skream and die. <p> Having the plugin override allows backwards compatibility as well as being useful for fiddling and tweaking. """ String...
java
private String derivePackageName(Service service, Document iddDoc) { String packageName = service.getPackageName(); if (packageName == null) { packageName = readNamespaceAttr(iddDoc); if (packageName == null) { throw new PluginException("Cannot find a package name " + "(not specified in plugin an...
[ "private", "String", "derivePackageName", "(", "Service", "service", ",", "Document", "iddDoc", ")", "{", "String", "packageName", "=", "service", ".", "getPackageName", "(", ")", ";", "if", "(", "packageName", "==", "null", ")", "{", "packageName", "=", "re...
Package name comes from explicit plugin param (if set), else the namespace definition, else skream and die. <p> Having the plugin override allows backwards compatibility as well as being useful for fiddling and tweaking.
[ "Package", "name", "comes", "from", "explicit", "plugin", "param", "(", "if", "set", ")", "else", "the", "namespace", "definition", "else", "skream", "and", "die", ".", "<p", ">", "Having", "the", "plugin", "override", "allows", "backwards", "compatibility", ...
train
https://github.com/betfair/cougar/blob/08d1fe338fbd0e8572a9c2305bb5796402d5b1f5/cougar-codegen-plugin/src/main/java/com/betfair/cougar/codegen/IdlToDSMojo.java#L478-L489
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/template/engine/velocity/VelocityUtil.java
VelocityUtil.toWriter
public static void toWriter(String templateFileName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) { """ 生成内容写到响应内容中<br> 模板的变量来自于Request的Attribute对象 @param templateFileName 模板文件 @param request 请求对象,用于获取模板中的变量值 @param response 响应对象 """ final VelocityCon...
java
public static void toWriter(String templateFileName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) { final VelocityContext context = new VelocityContext(); parseRequest(context, request); parseSession(context, request.getSession(false)); Writer writer = nu...
[ "public", "static", "void", "toWriter", "(", "String", "templateFileName", ",", "javax", ".", "servlet", ".", "http", ".", "HttpServletRequest", "request", ",", "javax", ".", "servlet", ".", "http", ".", "HttpServletResponse", "response", ")", "{", "final", "V...
生成内容写到响应内容中<br> 模板的变量来自于Request的Attribute对象 @param templateFileName 模板文件 @param request 请求对象,用于获取模板中的变量值 @param response 响应对象
[ "生成内容写到响应内容中<br", ">", "模板的变量来自于Request的Attribute对象" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/template/engine/velocity/VelocityUtil.java#L214-L228
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.readPropertiesFileQuietly
public static Properties readPropertiesFileQuietly( File file, Logger logger ) { """ Reads properties from a file but does not throw any error in case of problem. @param file a properties file (can be null) @param logger a logger (not null) @return a {@link Properties} instance (never null) """ Propertie...
java
public static Properties readPropertiesFileQuietly( File file, Logger logger ) { Properties result = new Properties(); try { if( file != null && file.exists()) result = readPropertiesFile( file ); } catch( Exception e ) { logger.severe( "Properties file " + file + " could not be read." ); logExcept...
[ "public", "static", "Properties", "readPropertiesFileQuietly", "(", "File", "file", ",", "Logger", "logger", ")", "{", "Properties", "result", "=", "new", "Properties", "(", ")", ";", "try", "{", "if", "(", "file", "!=", "null", "&&", "file", ".", "exists"...
Reads properties from a file but does not throw any error in case of problem. @param file a properties file (can be null) @param logger a logger (not null) @return a {@link Properties} instance (never null)
[ "Reads", "properties", "from", "a", "file", "but", "does", "not", "throw", "any", "error", "in", "case", "of", "problem", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L555-L568
mapbox/mapbox-navigation-android
libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/utils/DistanceFormatter.java
DistanceFormatter.shouldUpdate
public boolean shouldUpdate(@NonNull String language, @NonNull String unitType, int roundingIncrement) { """ Method that can be used to check if an instance of {@link DistanceFormatter} needs to be updated based on the passed language / unitType. @param language to check against the current formatter language ...
java
public boolean shouldUpdate(@NonNull String language, @NonNull String unitType, int roundingIncrement) { return !this.language.equals(language) || !this.unitType.equals(unitType) || !(this.roundingIncrement == roundingIncrement); }
[ "public", "boolean", "shouldUpdate", "(", "@", "NonNull", "String", "language", ",", "@", "NonNull", "String", "unitType", ",", "int", "roundingIncrement", ")", "{", "return", "!", "this", ".", "language", ".", "equals", "(", "language", ")", "||", "!", "t...
Method that can be used to check if an instance of {@link DistanceFormatter} needs to be updated based on the passed language / unitType. @param language to check against the current formatter language @param unitType to check against the current formatter unitType @return true if new formatter is needed, false otherw...
[ "Method", "that", "can", "be", "used", "to", "check", "if", "an", "instance", "of", "{", "@link", "DistanceFormatter", "}", "needs", "to", "be", "updated", "based", "on", "the", "passed", "language", "/", "unitType", "." ]
train
https://github.com/mapbox/mapbox-navigation-android/blob/375a89c017d360b9defc2c90d0c03468165162ec/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/utils/DistanceFormatter.java#L116-L119
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/view/facelets/tag/composite/AttributeHandler.java
AttributeHandler._createPropertyDescriptor
private PropertyDescriptor _createPropertyDescriptor(boolean development) { """ This method could be called only if it is not necessary to set the following properties: targets, default, required, methodSignature and type @param development true if the current ProjectStage is Development @return """ ...
java
private PropertyDescriptor _createPropertyDescriptor(boolean development) { try { CompositeComponentPropertyDescriptor attributeDescriptor = new CompositeComponentPropertyDescriptor(_name.getValue()); // If ProjectStage is Development, The "displ...
[ "private", "PropertyDescriptor", "_createPropertyDescriptor", "(", "boolean", "development", ")", "{", "try", "{", "CompositeComponentPropertyDescriptor", "attributeDescriptor", "=", "new", "CompositeComponentPropertyDescriptor", "(", "_name", ".", "getValue", "(", ")", ")"...
This method could be called only if it is not necessary to set the following properties: targets, default, required, methodSignature and type @param development true if the current ProjectStage is Development @return
[ "This", "method", "could", "be", "called", "only", "if", "it", "is", "not", "necessary", "to", "set", "the", "following", "properties", ":", "targets", "default", "required", "methodSignature", "and", "type" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/view/facelets/tag/composite/AttributeHandler.java#L284-L312
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java
CheckedMemorySegment.putShort
public final CheckedMemorySegment putShort(int index, short value) { """ Writes two memory containing the given short value, in the current byte order, into this buffer at the given position. @param position The position at which the memory will be written. @param value The short value to be written. @return...
java
public final CheckedMemorySegment putShort(int index, short value) { if (index >= 0 && index < this.size - 1) { this.memory[this.offset + index + 0] = (byte) (value >> 8); this.memory[this.offset + index + 1] = (byte) value; return this; } else { throw new IndexOutOfBoundsException(); } }
[ "public", "final", "CheckedMemorySegment", "putShort", "(", "int", "index", ",", "short", "value", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "this", ".", "size", "-", "1", ")", "{", "this", ".", "memory", "[", "this", ".", "offset"...
Writes two memory containing the given short value, in the current byte order, into this buffer at the given position. @param position The position at which the memory will be written. @param value The short value to be written. @return This view itself. @throws IndexOutOfBoundsException Thrown, if the index is negat...
[ "Writes", "two", "memory", "containing", "the", "given", "short", "value", "in", "the", "current", "byte", "order", "into", "this", "buffer", "at", "the", "given", "position", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java#L427-L435
xmlunit/xmlunit
xmlunit-core/src/main/java/org/xmlunit/diff/DefaultComparisonFormatter.java
DefaultComparisonFormatter.getFullFormattedXml
protected String getFullFormattedXml(final Node node, ComparisonType type, boolean formatXml) { """ Formats the node using a format suitable for the node type and comparison. <p>The implementation outputs the document prolog and start element for {@code Document} and {@code DocumentType} nodes and may elect to...
java
protected String getFullFormattedXml(final Node node, ComparisonType type, boolean formatXml) { StringBuilder sb = new StringBuilder(); final Node nodeToConvert; if (type == ComparisonType.CHILD_NODELIST_SEQUENCE) { nodeToConvert = node.getParentNode(); } else if (node instan...
[ "protected", "String", "getFullFormattedXml", "(", "final", "Node", "node", ",", "ComparisonType", "type", ",", "boolean", "formatXml", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "final", "Node", "nodeToConvert", ";", "if", "(...
Formats the node using a format suitable for the node type and comparison. <p>The implementation outputs the document prolog and start element for {@code Document} and {@code DocumentType} nodes and may elect to format the node's parent element rather than just the node depending on the node and comparison type. It de...
[ "Formats", "the", "node", "using", "a", "format", "suitable", "for", "the", "node", "type", "and", "comparison", "." ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DefaultComparisonFormatter.java#L359-L382
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerHandlerImpl.java
TransformerHandlerImpl.processingInstruction
public void processingInstruction(String target, String data) throws SAXException { """ Filter a processing instruction event. @param target The processing instruction target. @param data The text following the target. @throws SAXException The client may throw an exception during processing. @see ...
java
public void processingInstruction(String target, String data) throws SAXException { if (DEBUG) System.out.println("TransformerHandlerImpl#processingInstruction: " + target + ", " + data); if (m_contentHandler != null) { m_contentHandler.processingInstructio...
[ "public", "void", "processingInstruction", "(", "String", "target", ",", "String", "data", ")", "throws", "SAXException", "{", "if", "(", "DEBUG", ")", "System", ".", "out", ".", "println", "(", "\"TransformerHandlerImpl#processingInstruction: \"", "+", "target", ...
Filter a processing instruction event. @param target The processing instruction target. @param data The text following the target. @throws SAXException The client may throw an exception during processing. @see org.xml.sax.ContentHandler#processingInstruction
[ "Filter", "a", "processing", "instruction", "event", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerHandlerImpl.java#L584-L596
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.telephony_billingAccount_line_GET
public OvhOrder telephony_billingAccount_line_GET(String billingAccount, String brand, Boolean[] displayUniversalDirectories, Long[] extraSimultaneousLines, String mondialRelayId, String[] offers, Long[] ownerContactIds, Long quantity, Boolean retractation, Long shippingContactId, OvhLineTypeEnum[] types, String[] zone...
java
public OvhOrder telephony_billingAccount_line_GET(String billingAccount, String brand, Boolean[] displayUniversalDirectories, Long[] extraSimultaneousLines, String mondialRelayId, String[] offers, Long[] ownerContactIds, Long quantity, Boolean retractation, Long shippingContactId, OvhLineTypeEnum[] types, String[] zone...
[ "public", "OvhOrder", "telephony_billingAccount_line_GET", "(", "String", "billingAccount", ",", "String", "brand", ",", "Boolean", "[", "]", "displayUniversalDirectories", ",", "Long", "[", "]", "extraSimultaneousLines", ",", "String", "mondialRelayId", ",", "String", ...
Get prices and contracts information REST: GET /order/telephony/{billingAccount}/line @param extraSimultaneousLines [required] Additional simultaneous numbers. Set several simultaneous lines for each line per phone @param quantity [required] Quantity of request repetition in this configuration @param retractation [req...
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L6335-L6351
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/RepositoryCache.java
RepositoryCache.createExternalWorkspace
public WorkspaceCache createExternalWorkspace(String name, Connectors connectors) { """ Creates a new workspace in the repository coupled with external document store. @param name the name of the repository @param connectors connectors to the external systems. @return workspace cache for the new workspace. ...
java
public WorkspaceCache createExternalWorkspace(String name, Connectors connectors) { String[] tokens = name.split(":"); String sourceName = tokens[0]; String workspaceName = tokens[1]; this.workspaceNames.add(workspaceName); refreshRepositoryMetadata(true); ...
[ "public", "WorkspaceCache", "createExternalWorkspace", "(", "String", "name", ",", "Connectors", "connectors", ")", "{", "String", "[", "]", "tokens", "=", "name", ".", "split", "(", "\":\"", ")", ";", "String", "sourceName", "=", "tokens", "[", "0", "]", ...
Creates a new workspace in the repository coupled with external document store. @param name the name of the repository @param connectors connectors to the external systems. @return workspace cache for the new workspace.
[ "Creates", "a", "new", "workspace", "in", "the", "repository", "coupled", "with", "external", "document", "store", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/RepositoryCache.java#L891-L927
facebookarchive/swift
swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java
ThriftCodecByteCodeGenerator.buildStruct
private LocalVariableDefinition buildStruct(MethodDefinition read, Map<Short, LocalVariableDefinition> structData) { """ Defines the code to build the struct instance using the data in the local variables. """ // construct the instance and store it in the instance local variable LocalVariableDe...
java
private LocalVariableDefinition buildStruct(MethodDefinition read, Map<Short, LocalVariableDefinition> structData) { // construct the instance and store it in the instance local variable LocalVariableDefinition instance = constructStructInstance(read, structData); // inject fields i...
[ "private", "LocalVariableDefinition", "buildStruct", "(", "MethodDefinition", "read", ",", "Map", "<", "Short", ",", "LocalVariableDefinition", ">", "structData", ")", "{", "// construct the instance and store it in the instance local variable", "LocalVariableDefinition", "instan...
Defines the code to build the struct instance using the data in the local variables.
[ "Defines", "the", "code", "to", "build", "the", "struct", "instance", "using", "the", "data", "in", "the", "local", "variables", "." ]
train
https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java#L404-L419
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.cut
public static void cut(Image srcImage, ImageOutputStream destImageStream, Rectangle rectangle) throws IORuntimeException { """ 图像切割(按指定起点坐标和宽高切割),此方法并不关闭流 @param srcImage 源图像 @param destImageStream 切片后的图像输出流 @param rectangle 矩形对象,表示矩形区域的x,y,width,height @since 3.1.0 @throws IORuntimeException IO异常 """ ...
java
public static void cut(Image srcImage, ImageOutputStream destImageStream, Rectangle rectangle) throws IORuntimeException { writeJpg(cut(srcImage, rectangle), destImageStream); }
[ "public", "static", "void", "cut", "(", "Image", "srcImage", ",", "ImageOutputStream", "destImageStream", ",", "Rectangle", "rectangle", ")", "throws", "IORuntimeException", "{", "writeJpg", "(", "cut", "(", "srcImage", ",", "rectangle", ")", ",", "destImageStream...
图像切割(按指定起点坐标和宽高切割),此方法并不关闭流 @param srcImage 源图像 @param destImageStream 切片后的图像输出流 @param rectangle 矩形对象,表示矩形区域的x,y,width,height @since 3.1.0 @throws IORuntimeException IO异常
[ "图像切割", "(", "按指定起点坐标和宽高切割", ")", ",此方法并不关闭流" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L319-L321
jcuda/jnvgraph
JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java
JNvgraph.nvgraphContractGraph
public static int nvgraphContractGraph( nvgraphHandle handle, nvgraphGraphDescr descrG, nvgraphGraphDescr contrdescrG, Pointer aggregates, long numaggregates, int VertexCombineOp, int VertexReduceOp, int EdgeCombineOp, int EdgeReduceOp, ...
java
public static int nvgraphContractGraph( nvgraphHandle handle, nvgraphGraphDescr descrG, nvgraphGraphDescr contrdescrG, Pointer aggregates, long numaggregates, int VertexCombineOp, int VertexReduceOp, int EdgeCombineOp, int EdgeReduceOp, ...
[ "public", "static", "int", "nvgraphContractGraph", "(", "nvgraphHandle", "handle", ",", "nvgraphGraphDescr", "descrG", ",", "nvgraphGraphDescr", "contrdescrG", ",", "Pointer", "aggregates", ",", "long", "numaggregates", ",", "int", "VertexCombineOp", ",", "int", "Vert...
<pre> nvGRAPH contraction given array of agregates contract graph with given (Combine, Reduce) operators for Vertex Set and Edge Set; </pre>
[ "<pre", ">", "nvGRAPH", "contraction", "given", "array", "of", "agregates", "contract", "graph", "with", "given", "(", "Combine", "Reduce", ")", "operators", "for", "Vertex", "Set", "and", "Edge", "Set", ";", "<", "/", "pre", ">" ]
train
https://github.com/jcuda/jnvgraph/blob/2c6bd7c58edac181753bacf30af2cceeb1989a78/JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java#L678-L691
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/FastaAFPChainConverter.java
FastaAFPChainConverter.fastaFileToAfpChain
public static AFPChain fastaFileToAfpChain(File fastaFile, Structure structure1, Structure structure2) throws IOException, StructureException { """ Reads the file {@code fastaFile}, expecting exactly two sequences which give a pairwise alignment. Uses this and two structures to create an AFPChain corresponding ...
java
public static AFPChain fastaFileToAfpChain(File fastaFile, Structure structure1, Structure structure2) throws IOException, StructureException { InputStream inStream = new FileInputStream(fastaFile); SequenceCreatorInterface<AminoAcidCompound> creator = new CasePreservingProteinSequenceCreator( AminoAcidCompo...
[ "public", "static", "AFPChain", "fastaFileToAfpChain", "(", "File", "fastaFile", ",", "Structure", "structure1", ",", "Structure", "structure2", ")", "throws", "IOException", ",", "StructureException", "{", "InputStream", "inStream", "=", "new", "FileInputStream", "("...
Reads the file {@code fastaFile}, expecting exactly two sequences which give a pairwise alignment. Uses this and two structures to create an AFPChain corresponding to the alignment. Uses a {@link CasePreservingProteinSequenceCreator} and assumes that a residue is aligned if and only if it is given by an uppercase lette...
[ "Reads", "the", "file", "{", "@code", "fastaFile", "}", "expecting", "exactly", "two", "sequences", "which", "give", "a", "pairwise", "alignment", ".", "Uses", "this", "and", "two", "structures", "to", "create", "an", "AFPChain", "corresponding", "to", "the", ...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/FastaAFPChainConverter.java#L194-L205
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/filetype/FileType.java
FileType.isContentType
public static boolean isContentType(URL filename, String desiredMimeType) { """ Replies if the given file is compatible with the given MIME type. @param filename is the name of the file to test. @param desiredMimeType is the desired MIME type. @return <code>true</code> if the given file has type equal to the ...
java
public static boolean isContentType(URL filename, String desiredMimeType) { final ContentFileTypeMap map = ensureContentTypeManager(); return map.isContentType(filename, desiredMimeType); }
[ "public", "static", "boolean", "isContentType", "(", "URL", "filename", ",", "String", "desiredMimeType", ")", "{", "final", "ContentFileTypeMap", "map", "=", "ensureContentTypeManager", "(", ")", ";", "return", "map", ".", "isContentType", "(", "filename", ",", ...
Replies if the given file is compatible with the given MIME type. @param filename is the name of the file to test. @param desiredMimeType is the desired MIME type. @return <code>true</code> if the given file has type equal to the given MIME type, otherwise <code>false</code>.
[ "Replies", "if", "the", "given", "file", "is", "compatible", "with", "the", "given", "MIME", "type", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/filetype/FileType.java#L196-L199
HubSpot/Singularity
SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java
SingularityClient.getHistoryForRequest
public Collection<SingularityRequestHistory> getHistoryForRequest(String requestId, Optional<Integer> count, Optional<Integer> page) { """ Retrieve a paged list of updates for a particular {@link SingularityRequest} @param requestId Request ID to look up @param count Number of items to return per page @par...
java
public Collection<SingularityRequestHistory> getHistoryForRequest(String requestId, Optional<Integer> count, Optional<Integer> page) { final Function<String, String> requestUri = (host) -> String.format(REQUEST_HISTORY_FORMAT, getApiBase(host), requestId); Optional<Map<String, Object>> maybeQueryParams = Opti...
[ "public", "Collection", "<", "SingularityRequestHistory", ">", "getHistoryForRequest", "(", "String", "requestId", ",", "Optional", "<", "Integer", ">", "count", ",", "Optional", "<", "Integer", ">", "page", ")", "{", "final", "Function", "<", "String", ",", "...
Retrieve a paged list of updates for a particular {@link SingularityRequest} @param requestId Request ID to look up @param count Number of items to return per page @param page Which page of items to return @return A list of {@link SingularityRequestHistory}
[ "Retrieve", "a", "paged", "list", "of", "updates", "for", "a", "particular", "{", "@link", "SingularityRequest", "}" ]
train
https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1023-L1044
OpenLiberty/open-liberty
dev/com.ibm.ws.diagnostics/src/com/ibm/ws/diagnostics/AbstractMBeanIntrospector.java
AbstractMBeanIntrospector.getFormattedTabularData
@SuppressWarnings("unchecked") String getFormattedTabularData(TabularData td, String indent) { """ Format an open MBean tabular data attribute. @param td the tabular data attribute @param indent the current indent level of the formatted report @return the formatted composite data """ StringB...
java
@SuppressWarnings("unchecked") String getFormattedTabularData(TabularData td, String indent) { StringBuilder sb = new StringBuilder(); indent += INDENT; sb.append("{"); Collection<CompositeData> values = (Collection<CompositeData>) td.values(); int valuesRemaining = values.s...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "String", "getFormattedTabularData", "(", "TabularData", "td", ",", "String", "indent", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "indent", "+=", "INDENT", ";", "sb", ".", ...
Format an open MBean tabular data attribute. @param td the tabular data attribute @param indent the current indent level of the formatted report @return the formatted composite data
[ "Format", "an", "open", "MBean", "tabular", "data", "attribute", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.diagnostics/src/com/ibm/ws/diagnostics/AbstractMBeanIntrospector.java#L271-L288
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/VMath.java
VMath.setMatrix
public static void setMatrix(final double[][] m1, final int r0, final int r1, final int[] c, final double[][] m2) { """ Set a submatrix. @param m1 Input matrix @param r0 Initial row index @param r1 Final row index @param c Array of column indices. @param m2 New values for m1(r0:r1-1,c(:)) """ assert...
java
public static void setMatrix(final double[][] m1, final int r0, final int r1, final int[] c, final double[][] m2) { assert r0 <= r1 : ERR_INVALID_RANGE; assert r1 <= m1.length : ERR_MATRIX_DIMENSIONS; for(int i = r0; i < r1; i++) { final double[] row1 = m1[i], row2 = m2[i - r0]; for(int j = 0; j...
[ "public", "static", "void", "setMatrix", "(", "final", "double", "[", "]", "[", "]", "m1", ",", "final", "int", "r0", ",", "final", "int", "r1", ",", "final", "int", "[", "]", "c", ",", "final", "double", "[", "]", "[", "]", "m2", ")", "{", "as...
Set a submatrix. @param m1 Input matrix @param r0 Initial row index @param r1 Final row index @param c Array of column indices. @param m2 New values for m1(r0:r1-1,c(:))
[ "Set", "a", "submatrix", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/VMath.java#L1049-L1058
jhalterman/failsafe
src/main/java/net/jodah/failsafe/PolicyExecutor.java
PolicyExecutor.postExecuteAsync
protected CompletableFuture<ExecutionResult> postExecuteAsync(ExecutionResult result, Scheduler scheduler, FailsafeFuture<Object> future) { """ Performs potentially asynchronous post-execution handling for a {@code result}. """ if (isFailure(result)) { result = result.with(false, false); ...
java
protected CompletableFuture<ExecutionResult> postExecuteAsync(ExecutionResult result, Scheduler scheduler, FailsafeFuture<Object> future) { if (isFailure(result)) { result = result.with(false, false); return onFailureAsync(result, scheduler, future).whenComplete((postResult, error) -> { ca...
[ "protected", "CompletableFuture", "<", "ExecutionResult", ">", "postExecuteAsync", "(", "ExecutionResult", "result", ",", "Scheduler", "scheduler", ",", "FailsafeFuture", "<", "Object", ">", "future", ")", "{", "if", "(", "isFailure", "(", "result", ")", ")", "{...
Performs potentially asynchronous post-execution handling for a {@code result}.
[ "Performs", "potentially", "asynchronous", "post", "-", "execution", "handling", "for", "a", "{" ]
train
https://github.com/jhalterman/failsafe/blob/65fcd3a82f7b232d2ff59bc525a59d693dd8e223/src/main/java/net/jodah/failsafe/PolicyExecutor.java#L95-L108
atomix/atomix
cluster/src/main/java/io/atomix/cluster/MemberBuilder.java
MemberBuilder.withProperty
public MemberBuilder withProperty(String key, String value) { """ Sets a member property. @param key the property key to set @param value the property value to set @return the member builder @throws NullPointerException if the property is null """ config.setProperty(key, value); return this; ...
java
public MemberBuilder withProperty(String key, String value) { config.setProperty(key, value); return this; }
[ "public", "MemberBuilder", "withProperty", "(", "String", "key", ",", "String", "value", ")", "{", "config", ".", "setProperty", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Sets a member property. @param key the property key to set @param value the property value to set @return the member builder @throws NullPointerException if the property is null
[ "Sets", "a", "member", "property", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/cluster/src/main/java/io/atomix/cluster/MemberBuilder.java#L198-L201
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/logs/SegmentMetadataUpdateTransaction.java
SegmentMetadataUpdateTransaction.acceptAsTargetSegment
void acceptAsTargetSegment(MergeSegmentOperation operation, SegmentMetadataUpdateTransaction sourceMetadata) throws MetadataUpdateException { """ Accepts the given MergeSegmentOperation as a Target Segment (where it will be merged into). @param operation The operation to accept. @param sourceMetadata The ...
java
void acceptAsTargetSegment(MergeSegmentOperation operation, SegmentMetadataUpdateTransaction sourceMetadata) throws MetadataUpdateException { ensureSegmentId(operation); if (operation.getStreamSegmentOffset() != this.length) { throw new MetadataUpdateException(containerId, ...
[ "void", "acceptAsTargetSegment", "(", "MergeSegmentOperation", "operation", ",", "SegmentMetadataUpdateTransaction", "sourceMetadata", ")", "throws", "MetadataUpdateException", "{", "ensureSegmentId", "(", "operation", ")", ";", "if", "(", "operation", ".", "getStreamSegmen...
Accepts the given MergeSegmentOperation as a Target Segment (where it will be merged into). @param operation The operation to accept. @param sourceMetadata The metadata for the Source Segment to merge. @throws MetadataUpdateException If the operation cannot be processed because of the current state of the metada...
[ "Accepts", "the", "given", "MergeSegmentOperation", "as", "a", "Target", "Segment", "(", "where", "it", "will", "be", "merged", "into", ")", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/logs/SegmentMetadataUpdateTransaction.java#L574-L591
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParserWpt.java
AbstractGpxParserWpt.endElement
@Override public void endElement(String uri, String localName, String qName) throws SAXException { """ Fires whenever an XML end markup is encountered. It catches attributes of the waypoint and saves them in corresponding values[]. @param uri URI of the local element @param localName Name of the local ele...
java
@Override public void endElement(String uri, String localName, String qName) throws SAXException { // currentElement represents the last string encountered in the document setCurrentElement(getElementNames().pop()); if (getCurrentElement().equalsIgnoreCase(GPXTags.WPT)) { //if <...
[ "@", "Override", "public", "void", "endElement", "(", "String", "uri", ",", "String", "localName", ",", "String", "qName", ")", "throws", "SAXException", "{", "// currentElement represents the last string encountered in the document", "setCurrentElement", "(", "getElementNa...
Fires whenever an XML end markup is encountered. It catches attributes of the waypoint and saves them in corresponding values[]. @param uri URI of the local element @param localName Name of the local element (without prefix) @param qName qName of the local element (with prefix) @throws SAXException Any SAX exception, ...
[ "Fires", "whenever", "an", "XML", "end", "markup", "is", "encountered", ".", "It", "catches", "attributes", "of", "the", "waypoint", "and", "saves", "them", "in", "corresponding", "values", "[]", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParserWpt.java#L86-L110
michael-rapp/AndroidPreferenceActivity
example/src/main/java/de/mrapp/android/preference/activity/example/fragment/AppearancePreferenceFragment.java
AppearancePreferenceFragment.createNavigationWidthChangeListener
private OnPreferenceChangeListener createNavigationWidthChangeListener() { """ Creates and returns a listener, which allows to adapt the width of the navigation, when the value of the corresponding preference has been changed. @return The listener, which has been created, as an instance of the type {@link OnP...
java
private OnPreferenceChangeListener createNavigationWidthChangeListener() { return new OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(final Preference preference, final Object newValue) { int width = Integer.valueOf((String) newValue); ...
[ "private", "OnPreferenceChangeListener", "createNavigationWidthChangeListener", "(", ")", "{", "return", "new", "OnPreferenceChangeListener", "(", ")", "{", "@", "Override", "public", "boolean", "onPreferenceChange", "(", "final", "Preference", "preference", ",", "final",...
Creates and returns a listener, which allows to adapt the width of the navigation, when the value of the corresponding preference has been changed. @return The listener, which has been created, as an instance of the type {@link OnPreferenceChangeListener}
[ "Creates", "and", "returns", "a", "listener", "which", "allows", "to", "adapt", "the", "width", "of", "the", "navigation", "when", "the", "value", "of", "the", "corresponding", "preference", "has", "been", "changed", "." ]
train
https://github.com/michael-rapp/AndroidPreferenceActivity/blob/0fcde73815b4b3bf6bcb36acd3d5733e301bbba5/example/src/main/java/de/mrapp/android/preference/activity/example/fragment/AppearancePreferenceFragment.java#L87-L99
youseries/urule
urule-console/src/main/java/com/bstek/urule/console/repository/database/journal/DatabaseJournal.java
DatabaseJournal.doSync
@Override protected void doSync(long startRevision, boolean startup) throws JournalException { """ Synchronize contents from journal. May be overridden by subclasses. Do the initial sync in batchMode, since some databases (PSQL) when not in transactional mode, load all results in memory which causes out of ...
java
@Override protected void doSync(long startRevision, boolean startup) throws JournalException { if (!startup) { // if the cluster node is not starting do a normal sync doSync(startRevision); } else { try { startBatch(); try { ...
[ "@", "Override", "protected", "void", "doSync", "(", "long", "startRevision", ",", "boolean", "startup", ")", "throws", "JournalException", "{", "if", "(", "!", "startup", ")", "{", "// if the cluster node is not starting do a normal sync", "doSync", "(", "startRevisi...
Synchronize contents from journal. May be overridden by subclasses. Do the initial sync in batchMode, since some databases (PSQL) when not in transactional mode, load all results in memory which causes out of memory. See JCR-2832 @param startRevision start point (exclusive) @param startup indicates if the cluster node...
[ "Synchronize", "contents", "from", "journal", ".", "May", "be", "overridden", "by", "subclasses", ".", "Do", "the", "initial", "sync", "in", "batchMode", "since", "some", "databases", "(", "PSQL", ")", "when", "not", "in", "transactional", "mode", "load", "a...
train
https://github.com/youseries/urule/blob/3fa0eb4439e97aa292e744bcbd88a9faa36661d8/urule-console/src/main/java/com/bstek/urule/console/repository/database/journal/DatabaseJournal.java#L375-L392
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/Async.java
Async.fromRunnable
public static <R> Observable<R> fromRunnable(final Runnable run, final R result) { """ Return an Observable that calls the given Runnable and emits the given result when an Observer subscribes. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/fromRunnable.png" alt=""> ...
java
public static <R> Observable<R> fromRunnable(final Runnable run, final R result) { return fromRunnable(run, result, Schedulers.computation()); }
[ "public", "static", "<", "R", ">", "Observable", "<", "R", ">", "fromRunnable", "(", "final", "Runnable", "run", ",", "final", "R", "result", ")", "{", "return", "fromRunnable", "(", "run", ",", "result", ",", "Schedulers", ".", "computation", "(", ")", ...
Return an Observable that calls the given Runnable and emits the given result when an Observer subscribes. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/fromRunnable.png" alt=""> <p> The Runnable is called on the default thread pool for computation. @param <R> the return ty...
[ "Return", "an", "Observable", "that", "calls", "the", "given", "Runnable", "and", "emits", "the", "given", "result", "when", "an", "Observer", "subscribes", ".", "<p", ">", "<img", "width", "=", "640", "src", "=", "https", ":", "//", "raw", ".", "github"...
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L2025-L2027
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.readFile
public CmsFile readFile(CmsRequestContext context, CmsResource resource) throws CmsException { """ Reads a file resource (including it's binary content) from the VFS.<p> In case you do not need the file content, use <code>{@link #readResource(CmsRequestContext, String, CmsResourceFilter)}</code> instead.<p> ...
java
public CmsFile readFile(CmsRequestContext context, CmsResource resource) throws CmsException { CmsFile result = null; CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { result = m_driverManager.readFile(dbc, resource); } catch (Exception e) { if (...
[ "public", "CmsFile", "readFile", "(", "CmsRequestContext", "context", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "CmsFile", "result", "=", "null", ";", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ...
Reads a file resource (including it's binary content) from the VFS.<p> In case you do not need the file content, use <code>{@link #readResource(CmsRequestContext, String, CmsResourceFilter)}</code> instead.<p> @param context the current request context @param resource the resource to be read @return the file read fr...
[ "Reads", "a", "file", "resource", "(", "including", "it", "s", "binary", "content", ")", "from", "the", "VFS", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L4263-L4285
spotify/async-google-pubsub-client
src/main/java/com/spotify/google/cloud/pubsub/client/Pubsub.java
Pubsub.getSubscription
public PubsubFuture<Subscription> getSubscription(final String project, final String subscription) { """ Get a Pub/Sub subscription. @param project The Google Cloud project. @param subscription The name of the subscription to get. @return A future that is completed when this request is completed. The fut...
java
public PubsubFuture<Subscription> getSubscription(final String project, final String subscription) { return getSubscription(canonicalSubscription(project, subscription)); }
[ "public", "PubsubFuture", "<", "Subscription", ">", "getSubscription", "(", "final", "String", "project", ",", "final", "String", "subscription", ")", "{", "return", "getSubscription", "(", "canonicalSubscription", "(", "project", ",", "subscription", ")", ")", ";...
Get a Pub/Sub subscription. @param project The Google Cloud project. @param subscription The name of the subscription to get. @return A future that is completed when this request is completed. The future will be completed with {@code null} if the response is 404.
[ "Get", "a", "Pub", "/", "Sub", "subscription", "." ]
train
https://github.com/spotify/async-google-pubsub-client/blob/7d021528fa5bc29be458e6f210fa62f59b71d004/src/main/java/com/spotify/google/cloud/pubsub/client/Pubsub.java#L432-L434
actframework/actframework
src/main/java/act/util/JsonUtilConfig.java
JsonUtilConfig.writeJson
private static final void writeJson(Writer os, // Object object, // SerializeConfig config, // SerializeFilter[] filters, // DateFormat dateFormat, // ...
java
private static final void writeJson(Writer os, // Object object, // SerializeConfig config, // SerializeFilter[] filters, // DateFormat dateFormat, // ...
[ "private", "static", "final", "void", "writeJson", "(", "Writer", "os", ",", "//", "Object", "object", ",", "//", "SerializeConfig", "config", ",", "//", "SerializeFilter", "[", "]", "filters", ",", "//", "DateFormat", "dateFormat", ",", "//", "int", "defaul...
FastJSON does not provide the API so we have to create our own
[ "FastJSON", "does", "not", "provide", "the", "API", "so", "we", "have", "to", "create", "our", "own" ]
train
https://github.com/actframework/actframework/blob/55a8f8b45e71159a79ec6e157c02f71700f8cd54/src/main/java/act/util/JsonUtilConfig.java#L235-L261
Jasig/uPortal
uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceIndividualGroupService.java
ReferenceIndividualGroupService.updateGroup
@Override public void updateGroup(ILockableEntityGroup group, boolean renewLock) throws GroupsException { """ Updates the <code>ILockableEntityGroup</code> in the store and removes it from the cache. @param group ILockableEntityGroup """ throwExceptionIfNotInternallyManaged(); try { ...
java
@Override public void updateGroup(ILockableEntityGroup group, boolean renewLock) throws GroupsException { throwExceptionIfNotInternallyManaged(); try { if (!group.getLock().isValid()) { throw new GroupsException( "Could not update group " + group....
[ "@", "Override", "public", "void", "updateGroup", "(", "ILockableEntityGroup", "group", ",", "boolean", "renewLock", ")", "throws", "GroupsException", "{", "throwExceptionIfNotInternallyManaged", "(", ")", ";", "try", "{", "if", "(", "!", "group", ".", "getLock", ...
Updates the <code>ILockableEntityGroup</code> in the store and removes it from the cache. @param group ILockableEntityGroup
[ "Updates", "the", "<code", ">", "ILockableEntityGroup<", "/", "code", ">", "in", "the", "store", "and", "removes", "it", "from", "the", "cache", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceIndividualGroupService.java#L613-L639
google/closure-templates
java/src/com/google/template/soy/jssrc/dsl/Operation.java
Operation.shouldProtect
private boolean shouldProtect(Expression operand, OperandPosition operandPosition) { """ An operand needs to be protected with parens if <ul> <li>its {@link #precedence} is lower than the operator's precedence, or <li>its precedence is the same as the operator's, it is {@link Associativity#LEFT left associat...
java
private boolean shouldProtect(Expression operand, OperandPosition operandPosition) { if (operand instanceof Operation) { Operation operation = (Operation) operand; return operation.precedence() < this.precedence() || (operation.precedence() == this.precedence() && operandPosition...
[ "private", "boolean", "shouldProtect", "(", "Expression", "operand", ",", "OperandPosition", "operandPosition", ")", "{", "if", "(", "operand", "instanceof", "Operation", ")", "{", "Operation", "operation", "=", "(", "Operation", ")", "operand", ";", "return", "...
An operand needs to be protected with parens if <ul> <li>its {@link #precedence} is lower than the operator's precedence, or <li>its precedence is the same as the operator's, it is {@link Associativity#LEFT left associative}, and it appears to the right of the operator, or <li>its precedence is the same as the operato...
[ "An", "operand", "needs", "to", "be", "protected", "with", "parens", "if" ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jssrc/dsl/Operation.java#L64-L77
microfocus-idol/java-content-parameter-api
src/main/java/com/hp/autonomy/aci/content/fieldtext/FieldTextBuilder.java
FieldTextBuilder.WHEN
@Override public FieldTextBuilder WHEN(final FieldText fieldText) { """ Appends the specified fieldtext onto the builder using the WHEN operator. A simplification is made in the case where the passed {@code fieldText} is equal to {@code this}: <p> <pre>(A WHEN A) {@literal =>} A</pre> @param fieldText A ...
java
@Override public FieldTextBuilder WHEN(final FieldText fieldText) { Validate.notNull(fieldText, "FieldText should not be null"); Validate.isTrue(fieldText.size() >= 1, "FieldText must have a size greater or equal to 1"); if(size() < 1) { throw new IllegalStateException("Size mus...
[ "@", "Override", "public", "FieldTextBuilder", "WHEN", "(", "final", "FieldText", "fieldText", ")", "{", "Validate", ".", "notNull", "(", "fieldText", ",", "\"FieldText should not be null\"", ")", ";", "Validate", ".", "isTrue", "(", "fieldText", ".", "size", "(...
Appends the specified fieldtext onto the builder using the WHEN operator. A simplification is made in the case where the passed {@code fieldText} is equal to {@code this}: <p> <pre>(A WHEN A) {@literal =>} A</pre> @param fieldText A fieldtext expression or specifier. @return {@code this}
[ "Appends", "the", "specified", "fieldtext", "onto", "the", "builder", "using", "the", "WHEN", "operator", ".", "A", "simplification", "is", "made", "in", "the", "case", "where", "the", "passed", "{", "@code", "fieldText", "}", "is", "equal", "to", "{", "@c...
train
https://github.com/microfocus-idol/java-content-parameter-api/blob/8d33dc633f8df2a470a571ac7694e423e7004ad0/src/main/java/com/hp/autonomy/aci/content/fieldtext/FieldTextBuilder.java#L228-L247
rollbar/rollbar-java
rollbar-android/src/main/java/com/rollbar/android/Rollbar.java
Rollbar.log
public void log(String message, Map<String, Object> custom, Level level) { """ Record a message with extra information attached at the specified level. @param message the message. @param custom the extra information. @param level the level. """ log(null, custom, message, level); }
java
public void log(String message, Map<String, Object> custom, Level level) { log(null, custom, message, level); }
[ "public", "void", "log", "(", "String", "message", ",", "Map", "<", "String", ",", "Object", ">", "custom", ",", "Level", "level", ")", "{", "log", "(", "null", ",", "custom", ",", "message", ",", "level", ")", ";", "}" ]
Record a message with extra information attached at the specified level. @param message the message. @param custom the extra information. @param level the level.
[ "Record", "a", "message", "with", "extra", "information", "attached", "at", "the", "specified", "level", "." ]
train
https://github.com/rollbar/rollbar-java/blob/5eb4537d1363722b51cfcce55b427cbd8489f17b/rollbar-android/src/main/java/com/rollbar/android/Rollbar.java#L776-L778
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/connector/filesystem/FileSystemConnector.java
FileSystemConnector.idFor
protected String idFor( File file ) { """ Utility method for determining the node identifier for the supplied file. Subclasses may override this method to change the format of the identifiers, but in that case should also override the {@link #fileFor(String)}, {@link #isContentNode(String)}, and {@link #isRoot(S...
java
protected String idFor( File file ) { String path = file.getAbsolutePath(); if (!path.startsWith(directoryAbsolutePath)) { if (directory.getAbsolutePath().equals(path)) { // This is the root return DELIMITER; } String msg = JcrI18n.file...
[ "protected", "String", "idFor", "(", "File", "file", ")", "{", "String", "path", "=", "file", ".", "getAbsolutePath", "(", ")", ";", "if", "(", "!", "path", ".", "startsWith", "(", "directoryAbsolutePath", ")", ")", "{", "if", "(", "directory", ".", "g...
Utility method for determining the node identifier for the supplied file. Subclasses may override this method to change the format of the identifiers, but in that case should also override the {@link #fileFor(String)}, {@link #isContentNode(String)}, and {@link #isRoot(String)} methods. @param file the file; may not b...
[ "Utility", "method", "for", "determining", "the", "node", "identifier", "for", "the", "supplied", "file", ".", "Subclasses", "may", "override", "this", "method", "to", "change", "the", "format", "of", "the", "identifiers", "but", "in", "that", "case", "should"...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/connector/filesystem/FileSystemConnector.java#L363-L377
OpenLiberty/open-liberty
dev/com.ibm.ws.webserver.plugin.utility/src/com/ibm/ws/webserver/plugin/utility/utils/CommonMBeanConnection.java
CommonMBeanConnection.createPromptingTrustManager
private X509TrustManager createPromptingTrustManager() { """ Create a custom trust manager which will prompt for trust acceptance. @return """ TrustManager[] trustManagers = null; try { String defaultAlg = TrustManagerFactory.getDefaultAlgorithm(); TrustManagerFactory...
java
private X509TrustManager createPromptingTrustManager() { TrustManager[] trustManagers = null; try { String defaultAlg = TrustManagerFactory.getDefaultAlgorithm(); TrustManagerFactory tmf = TrustManagerFactory.getInstance(defaultAlg); tmf.init((KeyStore) null); ...
[ "private", "X509TrustManager", "createPromptingTrustManager", "(", ")", "{", "TrustManager", "[", "]", "trustManagers", "=", "null", ";", "try", "{", "String", "defaultAlg", "=", "TrustManagerFactory", ".", "getDefaultAlgorithm", "(", ")", ";", "TrustManagerFactory", ...
Create a custom trust manager which will prompt for trust acceptance. @return
[ "Create", "a", "custom", "trust", "manager", "which", "will", "prompt", "for", "trust", "acceptance", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webserver.plugin.utility/src/com/ibm/ws/webserver/plugin/utility/utils/CommonMBeanConnection.java#L55-L72
atomix/copycat
server/src/main/java/io/atomix/copycat/server/storage/snapshot/SnapshotFile.java
SnapshotFile.createSnapshotFile
static File createSnapshotFile(String name, File directory, long index, long timestamp) { """ Creates a snapshot file for the given directory, log name, and snapshot index. """ return new File(directory, String.format("%s-%d-%s.snapshot", Assert.notNull(name, "name"), index, TIMESTAMP_FORMAT.format(new Dat...
java
static File createSnapshotFile(String name, File directory, long index, long timestamp) { return new File(directory, String.format("%s-%d-%s.snapshot", Assert.notNull(name, "name"), index, TIMESTAMP_FORMAT.format(new Date(timestamp)))); }
[ "static", "File", "createSnapshotFile", "(", "String", "name", ",", "File", "directory", ",", "long", "index", ",", "long", "timestamp", ")", "{", "return", "new", "File", "(", "directory", ",", "String", ".", "format", "(", "\"%s-%d-%s.snapshot\"", ",", "As...
Creates a snapshot file for the given directory, log name, and snapshot index.
[ "Creates", "a", "snapshot", "file", "for", "the", "given", "directory", "log", "name", "and", "snapshot", "index", "." ]
train
https://github.com/atomix/copycat/blob/c90b88ccd5c63d6ea0b49fb77c25e2f3272a7b10/server/src/main/java/io/atomix/copycat/server/storage/snapshot/SnapshotFile.java#L69-L71
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java
KeyVaultClientCustomImpl.listCertificates
public PagedList<CertificateItem> listCertificates(final String vaultBaseUrl, final Integer maxresults) { """ List certificates in the specified vault. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @param maxresults Maximum number of results to return in a page. If not specified t...
java
public PagedList<CertificateItem> listCertificates(final String vaultBaseUrl, final Integer maxresults) { return getCertificates(vaultBaseUrl, maxresults); }
[ "public", "PagedList", "<", "CertificateItem", ">", "listCertificates", "(", "final", "String", "vaultBaseUrl", ",", "final", "Integer", "maxresults", ")", "{", "return", "getCertificates", "(", "vaultBaseUrl", ",", "maxresults", ")", ";", "}" ]
List certificates in the specified vault. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results. @return the PagedList&lt;CertificateItem&gt; if successful.
[ "List", "certificates", "in", "the", "specified", "vault", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java#L1323-L1325