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
unic/neba
spring/src/main/java/io/neba/spring/mvc/BundleSpecificDispatcherServlet.java
BundleSpecificDispatcherServlet.onApplicationEvent
@Override public void onApplicationEvent(@Nonnull ApplicationEvent event) { """ Configures the context's bean factory with MVC infrastructure beans. @param event can be <code>null</code>, in which case the event is ignored. """ if (event instanceof ContextRefreshedEvent) { synchroniz...
java
@Override public void onApplicationEvent(@Nonnull ApplicationEvent event) { if (event instanceof ContextRefreshedEvent) { synchronized (this) { ApplicationContext applicationContext = ((ContextRefreshedEvent) event).getApplicationContext(); setApplicationContext(n...
[ "@", "Override", "public", "void", "onApplicationEvent", "(", "@", "Nonnull", "ApplicationEvent", "event", ")", "{", "if", "(", "event", "instanceof", "ContextRefreshedEvent", ")", "{", "synchronized", "(", "this", ")", "{", "ApplicationContext", "applicationContext...
Configures the context's bean factory with MVC infrastructure beans. @param event can be <code>null</code>, in which case the event is ignored.
[ "Configures", "the", "context", "s", "bean", "factory", "with", "MVC", "infrastructure", "beans", "." ]
train
https://github.com/unic/neba/blob/4d762e60112a1fcb850926a56a9843d5aa424c4b/spring/src/main/java/io/neba/spring/mvc/BundleSpecificDispatcherServlet.java#L109-L130
yanzhenjie/Album
album/src/main/java/com/yanzhenjie/album/api/BasicGalleryWrapper.java
BasicGalleryWrapper.currentPosition
public Returner currentPosition(@IntRange(from = 0, to = Integer.MAX_VALUE) int currentPosition) { """ Set the show position of List. @param currentPosition the current position. """ this.mCurrentPosition = currentPosition; return (Returner) this; }
java
public Returner currentPosition(@IntRange(from = 0, to = Integer.MAX_VALUE) int currentPosition) { this.mCurrentPosition = currentPosition; return (Returner) this; }
[ "public", "Returner", "currentPosition", "(", "@", "IntRange", "(", "from", "=", "0", ",", "to", "=", "Integer", ".", "MAX_VALUE", ")", "int", "currentPosition", ")", "{", "this", ".", "mCurrentPosition", "=", "currentPosition", ";", "return", "(", "Returner...
Set the show position of List. @param currentPosition the current position.
[ "Set", "the", "show", "position", "of", "List", "." ]
train
https://github.com/yanzhenjie/Album/blob/b17506440d32909d42aba41f6a388041a25c8363/album/src/main/java/com/yanzhenjie/album/api/BasicGalleryWrapper.java#L75-L78
jenkinsci/github-plugin
src/main/java/com/cloudbees/jenkins/GitHubRepositoryNameContributor.java
GitHubRepositoryNameContributor.parseAssociatedNames
@SuppressWarnings("deprecation") public /*abstract*/ void parseAssociatedNames(Item item, Collection<GitHubRepositoryName> result) { """ Looks at the definition of {@link Item} and list up the related github repositories, then puts them into the collection. @param item the item. @param result the collection...
java
@SuppressWarnings("deprecation") public /*abstract*/ void parseAssociatedNames(Item item, Collection<GitHubRepositoryName> result) { if (Util.isOverridden( GitHubRepositoryNameContributor.class, getClass(), "parseAssociatedNames", Job.class, ...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "public", "/*abstract*/", "void", "parseAssociatedNames", "(", "Item", "item", ",", "Collection", "<", "GitHubRepositoryName", ">", "result", ")", "{", "if", "(", "Util", ".", "isOverridden", "(", "GitHubReposi...
Looks at the definition of {@link Item} and list up the related github repositories, then puts them into the collection. @param item the item. @param result the collection to add repository names to @since 1.25.0
[ "Looks", "at", "the", "definition", "of", "{" ]
train
https://github.com/jenkinsci/github-plugin/blob/4e05b9aeb488af5342c78f78aa3c55114e8d462a/src/main/java/com/cloudbees/jenkins/GitHubRepositoryNameContributor.java#L64-L91
anotheria/moskito
moskito-extensions/moskito-monitoring-plugin/src/main/java/net/anotheria/moskito/extensions/monitoring/stats/GenericStats.java
GenericStats.getStatValueAsString
public String getStatValueAsString(T metric, String interval) { """ Get value of provided metric for the given interval as String value. @param metric metric which value we wanna get @param interval the name of the Interval or <code>null</code> to get the absolute value @return the current value """ ...
java
public String getStatValueAsString(T metric, String interval) { if (metric.isRateMetric()) { return String.valueOf(getStatValueAsDouble(metric, interval)); } return getMonitoredStatValue(metric).getValueAsString(interval); }
[ "public", "String", "getStatValueAsString", "(", "T", "metric", ",", "String", "interval", ")", "{", "if", "(", "metric", ".", "isRateMetric", "(", ")", ")", "{", "return", "String", ".", "valueOf", "(", "getStatValueAsDouble", "(", "metric", ",", "interval"...
Get value of provided metric for the given interval as String value. @param metric metric which value we wanna get @param interval the name of the Interval or <code>null</code> to get the absolute value @return the current value
[ "Get", "value", "of", "provided", "metric", "for", "the", "given", "interval", "as", "String", "value", "." ]
train
https://github.com/anotheria/moskito/blob/0fdb79053b98a6ece610fa159f59bc3331e4cf05/moskito-extensions/moskito-monitoring-plugin/src/main/java/net/anotheria/moskito/extensions/monitoring/stats/GenericStats.java#L191-L196
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/ConnectApi.java
ConnectApi.listUsers
public IntegratedUserInfoList listUsers(String accountId, String connectId, ConnectApi.ListUsersOptions options) throws ApiException { """ Returns users from the configured Connect service. Returns users from the configured Connect service. @param accountId The external account number (int) or account ID Guid. (...
java
public IntegratedUserInfoList listUsers(String accountId, String connectId, ConnectApi.ListUsersOptions options) throws ApiException { Object localVarPostBody = "{}"; // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException(400, "Missing the required...
[ "public", "IntegratedUserInfoList", "listUsers", "(", "String", "accountId", ",", "String", "connectId", ",", "ConnectApi", ".", "ListUsersOptions", "options", ")", "throws", "ApiException", "{", "Object", "localVarPostBody", "=", "\"{}\"", ";", "// verify the required ...
Returns users from the configured Connect service. Returns users from the configured Connect service. @param accountId The external account number (int) or account ID Guid. (required) @param connectId The ID of the custom Connect configuration being accessed. (required) @param options for modifying the method behavior....
[ "Returns", "users", "from", "the", "configured", "Connect", "service", ".", "Returns", "users", "from", "the", "configured", "Connect", "service", "." ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/ConnectApi.java#L711-L758
tomgibara/bits
src/main/java/com/tomgibara/bits/BitVector.java
BitVector.fromBigInteger
public static final BitVector fromBigInteger(BigInteger bigInt) { """ Creates a {@link BitVector} from a <code>BigInteger</code>. The bits of the integer copied into the new bit vector. The size of the returned {@link BitVector} is <code>bigInt.bitLength()</code>. Negative values are recorded using 2's compleme...
java
public static final BitVector fromBigInteger(BigInteger bigInt) { if (bigInt == null) throw new IllegalArgumentException(); final int length = bigInt.bitLength(); return fromBigIntegerImpl(bigInt, length); }
[ "public", "static", "final", "BitVector", "fromBigInteger", "(", "BigInteger", "bigInt", ")", "{", "if", "(", "bigInt", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", ")", ";", "final", "int", "length", "=", "bigInt", ".", "bitLength", "...
Creates a {@link BitVector} from a <code>BigInteger</code>. The bits of the integer copied into the new bit vector. The size of the returned {@link BitVector} is <code>bigInt.bitLength()</code>. Negative values are recorded using 2's complement encoding. No sign-bit is included in the returned {@link BitVector}. @para...
[ "Creates", "a", "{", "@link", "BitVector", "}", "from", "a", "<code", ">", "BigInteger<", "/", "code", ">", ".", "The", "bits", "of", "the", "integer", "copied", "into", "the", "new", "bit", "vector", ".", "The", "size", "of", "the", "returned", "{", ...
train
https://github.com/tomgibara/bits/blob/56c32c0a30efd3d7c4e7c6600a0ca39e51eecc97/src/main/java/com/tomgibara/bits/BitVector.java#L113-L117
dbracewell/mango
src/main/java/com/davidbracewell/json/JsonReader.java
JsonReader.nextMap
public <T> Map<String, T> nextMap(@NonNull Class<T> valueType) throws IOException { """ Reads in the next object as a map with an expected value type @param <T> the value type parameter @param valueType the value type class information @return the map @throws IOException Something went wrong reading ...
java
public <T> Map<String, T> nextMap(@NonNull Class<T> valueType) throws IOException { return nextMap(null, valueType); }
[ "public", "<", "T", ">", "Map", "<", "String", ",", "T", ">", "nextMap", "(", "@", "NonNull", "Class", "<", "T", ">", "valueType", ")", "throws", "IOException", "{", "return", "nextMap", "(", "null", ",", "valueType", ")", ";", "}" ]
Reads in the next object as a map with an expected value type @param <T> the value type parameter @param valueType the value type class information @return the map @throws IOException Something went wrong reading
[ "Reads", "in", "the", "next", "object", "as", "a", "map", "with", "an", "expected", "value", "type" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/json/JsonReader.java#L536-L538
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.updateVariable
public Variable updateVariable(Object projectIdOrPath, String key, String value, Boolean isProtected, String environmentScope) throws GitLabApiException { """ Update a project variable. <p>NOTE: Updating the environmentScope is only available on GitLab EE.</p> <pre><code>GitLab Endpoint: PUT /projects/:id/va...
java
public Variable updateVariable(Object projectIdOrPath, String key, String value, Boolean isProtected, String environmentScope) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("value", value, true) .withParam("protected", isProtected) ...
[ "public", "Variable", "updateVariable", "(", "Object", "projectIdOrPath", ",", "String", "key", ",", "String", "value", ",", "Boolean", "isProtected", ",", "String", "environmentScope", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new...
Update a project variable. <p>NOTE: Updating the environmentScope is only available on GitLab EE.</p> <pre><code>GitLab Endpoint: PUT /projects/:id/variables/:key</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param key the ...
[ "Update", "a", "project", "variable", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2561-L2569
termsuite/termsuite-core
src/main/java/fr/univnantes/termsuite/utils/TermOccurrenceUtils.java
TermOccurrenceUtils.removeOverlaps
public static void removeOverlaps(Collection<TermOccurrence> referenceSet, Collection<TermOccurrence> occurrenceSet) { """ Removes from an occurrence set all occurrences that overlap at least one occurrence in a reference occurrence set. @param referenceSet the reference set, not modified by this method @par...
java
public static void removeOverlaps(Collection<TermOccurrence> referenceSet, Collection<TermOccurrence> occurrenceSet) { Iterator<TermOccurrence> it = occurrenceSet.iterator(); while(it.hasNext()) { TermOccurrence occ = it.next(); for(TermOccurrence refOcc:referenceSet) { if(occ.getSourceDocument().equals(r...
[ "public", "static", "void", "removeOverlaps", "(", "Collection", "<", "TermOccurrence", ">", "referenceSet", ",", "Collection", "<", "TermOccurrence", ">", "occurrenceSet", ")", "{", "Iterator", "<", "TermOccurrence", ">", "it", "=", "occurrenceSet", ".", "iterato...
Removes from an occurrence set all occurrences that overlap at least one occurrence in a reference occurrence set. @param referenceSet the reference set, not modified by this method @param occurrenceSet the occurrence set to analyze, will be modified by this method
[ "Removes", "from", "an", "occurrence", "set", "all", "occurrences", "that", "overlap", "at", "least", "one", "occurrence", "in", "a", "reference", "occurrence", "set", "." ]
train
https://github.com/termsuite/termsuite-core/blob/731e5d0bc7c14180713c01a9c7dffe1925f26130/src/main/java/fr/univnantes/termsuite/utils/TermOccurrenceUtils.java#L112-L124
openengsb/openengsb
components/util/src/main/java/org/openengsb/core/util/CipherUtils.java
CipherUtils.deserializePublicKey
public static PublicKey deserializePublicKey(byte[] keyData, String algorithm) { """ converts a byte[] that originally was created using {@link PublicKey#getEncoded()} back to the corresponding instance. Example: CipherUtils.deserializePublicKey(data, "RSA") """ LOGGER.trace("deserialize public key...
java
public static PublicKey deserializePublicKey(byte[] keyData, String algorithm) { LOGGER.trace("deserialize public key from data using algorithm \"{}\"", algorithm); X509EncodedKeySpec pubSpec = new X509EncodedKeySpec(keyData); try { KeyFactory keyFactory = KeyFactory.getInstance(algo...
[ "public", "static", "PublicKey", "deserializePublicKey", "(", "byte", "[", "]", "keyData", ",", "String", "algorithm", ")", "{", "LOGGER", ".", "trace", "(", "\"deserialize public key from data using algorithm \\\"{}\\\"\"", ",", "algorithm", ")", ";", "X509EncodedKeySp...
converts a byte[] that originally was created using {@link PublicKey#getEncoded()} back to the corresponding instance. Example: CipherUtils.deserializePublicKey(data, "RSA")
[ "converts", "a", "byte", "[]", "that", "originally", "was", "created", "using", "{", "@link", "PublicKey#getEncoded", "()", "}", "back", "to", "the", "corresponding", "instance", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/util/src/main/java/org/openengsb/core/util/CipherUtils.java#L127-L137
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/spatial/geometry/GeometryFactory.java
GeometryFactory.createLineString
public LineString createLineString(Coordinate[] coordinates) { """ Create a new {@link LineString}, given an array of coordinates. @param coordinates An array of {@link Coordinate} objects. @return Returns a {@link LineString} object. """ if (coordinates == null) { return new LineString(srid, precisi...
java
public LineString createLineString(Coordinate[] coordinates) { if (coordinates == null) { return new LineString(srid, precision); } Coordinate[] clones = new Coordinate[coordinates.length]; for (int i = 0; i < coordinates.length; i++) { clones[i] = (Coordinate) coordinates[i].clone(); } return new Lin...
[ "public", "LineString", "createLineString", "(", "Coordinate", "[", "]", "coordinates", ")", "{", "if", "(", "coordinates", "==", "null", ")", "{", "return", "new", "LineString", "(", "srid", ",", "precision", ")", ";", "}", "Coordinate", "[", "]", "clones...
Create a new {@link LineString}, given an array of coordinates. @param coordinates An array of {@link Coordinate} objects. @return Returns a {@link LineString} object.
[ "Create", "a", "new", "{", "@link", "LineString", "}", "given", "an", "array", "of", "coordinates", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/geometry/GeometryFactory.java#L90-L99
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/quickfix/SARLQuickfixProvider.java
SARLQuickfixProvider.fixInvalidExtendedType
@Fix(io.sarl.lang.validation.IssueCodes.INVALID_EXTENDED_TYPE) public void fixInvalidExtendedType(final Issue issue, IssueResolutionAcceptor acceptor) { """ Quick fix for "Invalid extended type". @param issue the issue. @param acceptor the quick fix acceptor. """ ExtendedTypeRemoveModification.accept(th...
java
@Fix(io.sarl.lang.validation.IssueCodes.INVALID_EXTENDED_TYPE) public void fixInvalidExtendedType(final Issue issue, IssueResolutionAcceptor acceptor) { ExtendedTypeRemoveModification.accept(this, issue, acceptor); }
[ "@", "Fix", "(", "io", ".", "sarl", ".", "lang", ".", "validation", ".", "IssueCodes", ".", "INVALID_EXTENDED_TYPE", ")", "public", "void", "fixInvalidExtendedType", "(", "final", "Issue", "issue", ",", "IssueResolutionAcceptor", "acceptor", ")", "{", "ExtendedT...
Quick fix for "Invalid extended type". @param issue the issue. @param acceptor the quick fix acceptor.
[ "Quick", "fix", "for", "Invalid", "extended", "type", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/quickfix/SARLQuickfixProvider.java#L815-L818
googleapis/google-cloud-java
google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java
SecurityCenterClient.groupFindings
public final GroupFindingsPagedResponse groupFindings(String parent, String groupBy) { """ Filters an organization or source's findings and groups them by their specified properties. <p>To group across all sources provide a `-` as the source id. Example: /v1/organizations/123/sources/-/findings <p>Sample co...
java
public final GroupFindingsPagedResponse groupFindings(String parent, String groupBy) { GroupFindingsRequest request = GroupFindingsRequest.newBuilder().setParent(parent).setGroupBy(groupBy).build(); return groupFindings(request); }
[ "public", "final", "GroupFindingsPagedResponse", "groupFindings", "(", "String", "parent", ",", "String", "groupBy", ")", "{", "GroupFindingsRequest", "request", "=", "GroupFindingsRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", ")", ".", "...
Filters an organization or source's findings and groups them by their specified properties. <p>To group across all sources provide a `-` as the source id. Example: /v1/organizations/123/sources/-/findings <p>Sample code: <pre><code> try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { So...
[ "Filters", "an", "organization", "or", "source", "s", "findings", "and", "groups", "them", "by", "their", "specified", "properties", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java#L853-L857
knightliao/disconf
disconf-core/src/main/java/com/baidu/disconf/core/common/utils/OsUtil.java
OsUtil.getRelativePath
public static String getRelativePath(File file, File folder) { """ 获取File相对于Folder的相对路径 <p/> returns null if file isn't relative to folder """ String filePath = file.getAbsolutePath(); String folderPath = folder.getAbsolutePath(); if (filePath.startsWith(folderPath)) { r...
java
public static String getRelativePath(File file, File folder) { String filePath = file.getAbsolutePath(); String folderPath = folder.getAbsolutePath(); if (filePath.startsWith(folderPath)) { return filePath.substring(folderPath.length() + 1); } else { return null...
[ "public", "static", "String", "getRelativePath", "(", "File", "file", ",", "File", "folder", ")", "{", "String", "filePath", "=", "file", ".", "getAbsolutePath", "(", ")", ";", "String", "folderPath", "=", "folder", ".", "getAbsolutePath", "(", ")", ";", "...
获取File相对于Folder的相对路径 <p/> returns null if file isn't relative to folder
[ "获取File相对于Folder的相对路径", "<p", "/", ">", "returns", "null", "if", "file", "isn", "t", "relative", "to", "folder" ]
train
https://github.com/knightliao/disconf/blob/d413cbce9334fe38a5a24982ce4db3a6ed8e98ea/disconf-core/src/main/java/com/baidu/disconf/core/common/utils/OsUtil.java#L105-L115
sockeqwe/sqlbrite-dao
dao/src/main/java/com/hannesdorfmann/sqlbrite/dao/Dao.java
Dao.rawQuery
protected QueryBuilder rawQuery(@Nullable final String table, @NonNull String sql) { """ Creates a raw query and enables auto updates for the given single table @param table the affected table. updates get triggered if the observed tables changes. Use {@code null} or {@link #rawQuery(String)} if you don't wan...
java
protected QueryBuilder rawQuery(@Nullable final String table, @NonNull String sql) { return rawQueryOnManyTables(table == null ? null : Collections.singleton(table), sql); }
[ "protected", "QueryBuilder", "rawQuery", "(", "@", "Nullable", "final", "String", "table", ",", "@", "NonNull", "String", "sql", ")", "{", "return", "rawQueryOnManyTables", "(", "table", "==", "null", "?", "null", ":", "Collections", ".", "singleton", "(", "...
Creates a raw query and enables auto updates for the given single table @param table the affected table. updates get triggered if the observed tables changes. Use {@code null} or {@link #rawQuery(String)} if you don't want to register for automatic updates @param sql The sql query statement
[ "Creates", "a", "raw", "query", "and", "enables", "auto", "updates", "for", "the", "given", "single", "table" ]
train
https://github.com/sockeqwe/sqlbrite-dao/blob/8d02b76f00bd2f8997a58d33146b98b2eec35452/dao/src/main/java/com/hannesdorfmann/sqlbrite/dao/Dao.java#L182-L184
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/Kickflip.java
Kickflip.startMediaPlayerActivity
public static void startMediaPlayerActivity(Activity host, String streamUrl, boolean newTask) { """ Start {@link io.kickflip.sdk.activity.MediaPlayerActivity}. This Activity facilitates playing back a Kickflip broadcast. <p/> <b>Must be called after {@link Kickflip#setup(android.content.Context, String, String)...
java
public static void startMediaPlayerActivity(Activity host, String streamUrl, boolean newTask) { Intent playbackIntent = new Intent(host, MediaPlayerActivity.class); playbackIntent.putExtra("mediaUrl", streamUrl); if (newTask) { playbackIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | ...
[ "public", "static", "void", "startMediaPlayerActivity", "(", "Activity", "host", ",", "String", "streamUrl", ",", "boolean", "newTask", ")", "{", "Intent", "playbackIntent", "=", "new", "Intent", "(", "host", ",", "MediaPlayerActivity", ".", "class", ")", ";", ...
Start {@link io.kickflip.sdk.activity.MediaPlayerActivity}. This Activity facilitates playing back a Kickflip broadcast. <p/> <b>Must be called after {@link Kickflip#setup(android.content.Context, String, String)} or {@link Kickflip#setup(android.content.Context, String, String, io.kickflip.sdk.api.KickflipCallback)}.<...
[ "Start", "{", "@link", "io", ".", "kickflip", ".", "sdk", ".", "activity", ".", "MediaPlayerActivity", "}", ".", "This", "Activity", "facilitates", "playing", "back", "a", "Kickflip", "broadcast", ".", "<p", "/", ">", "<b", ">", "Must", "be", "called", "...
train
https://github.com/Kickflip/kickflip-android-sdk/blob/af3aae5f1128d7376e67aefe11a3a1a3844be734/sdk/src/main/java/io/kickflip/sdk/Kickflip.java#L174-L181
alkacon/opencms-core
src/org/opencms/file/types/CmsResourceTypeXmlContent.java
CmsResourceTypeXmlContent.getXsdLink
protected CmsLink getXsdLink(CmsObject cms, CmsXmlContent xmlContent) { """ Creates a new link object for the schema definition.<p> @param cms the current CMS context @param xmlContent the xml content to crete the link for @return the generated link """ String schema = xmlContent.getContentDefi...
java
protected CmsLink getXsdLink(CmsObject cms, CmsXmlContent xmlContent) { String schema = xmlContent.getContentDefinition().getSchemaLocation(); if (schema.startsWith(CmsXmlEntityResolver.OPENCMS_SCHEME)) { if (CmsXmlEntityResolver.isInternalId(schema)) { return null; ...
[ "protected", "CmsLink", "getXsdLink", "(", "CmsObject", "cms", ",", "CmsXmlContent", "xmlContent", ")", "{", "String", "schema", "=", "xmlContent", ".", "getContentDefinition", "(", ")", ".", "getSchemaLocation", "(", ")", ";", "if", "(", "schema", ".", "start...
Creates a new link object for the schema definition.<p> @param cms the current CMS context @param xmlContent the xml content to crete the link for @return the generated link
[ "Creates", "a", "new", "link", "object", "for", "the", "schema", "definition", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/types/CmsResourceTypeXmlContent.java#L597-L622
auth0/auth0-java
src/main/java/com/auth0/client/mgmt/UsersEntity.java
UsersEntity.removePermissions
public Request removePermissions(String userId, List<Permission> permissions) { """ Remove permissions from a user. A token with update:users is needed. See https://auth0.com/docs/api/management/v2#!/Users/delete_permissions @param userId the user id @param permissions a list of permission objects to remove ...
java
public Request removePermissions(String userId, List<Permission> permissions) { Asserts.assertNotNull(userId, "user id"); Asserts.assertNotEmpty(permissions, "permissions"); Map<String, List<Permission>> body = new HashMap<>(); body.put("permissions", permissions); final String...
[ "public", "Request", "removePermissions", "(", "String", "userId", ",", "List", "<", "Permission", ">", "permissions", ")", "{", "Asserts", ".", "assertNotNull", "(", "userId", ",", "\"user id\"", ")", ";", "Asserts", ".", "assertNotEmpty", "(", "permissions", ...
Remove permissions from a user. A token with update:users is needed. See https://auth0.com/docs/api/management/v2#!/Users/delete_permissions @param userId the user id @param permissions a list of permission objects to remove from the user @return a Request to execute
[ "Remove", "permissions", "from", "a", "user", ".", "A", "token", "with", "update", ":", "users", "is", "needed", ".", "See", "https", ":", "//", "auth0", ".", "com", "/", "docs", "/", "api", "/", "management", "/", "v2#!", "/", "Users", "/", "delete_...
train
https://github.com/auth0/auth0-java/blob/b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c/src/main/java/com/auth0/client/mgmt/UsersEntity.java#L410-L428
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java
Boot.startJanusWithModule
public static Kernel startJanusWithModule(Module startupModule, Class<? extends Agent> agentCls, Object... params) throws Exception { """ Launch the Janus kernel and the first agent in the kernel. <p>Thus function does not parse the command line. See {@link #main(String[])} for the command line management. When...
java
public static Kernel startJanusWithModule(Module startupModule, Class<? extends Agent> agentCls, Object... params) throws Exception { // Set the boot agent classname System.setProperty(JanusConfig.BOOT_AGENT, agentCls.getName()); // Get the start-up injection module final Kernel k = startWithoutAgent(startupMod...
[ "public", "static", "Kernel", "startJanusWithModule", "(", "Module", "startupModule", ",", "Class", "<", "?", "extends", "Agent", ">", "agentCls", ",", "Object", "...", "params", ")", "throws", "Exception", "{", "// Set the boot agent classname", "System", ".", "s...
Launch the Janus kernel and the first agent in the kernel. <p>Thus function does not parse the command line. See {@link #main(String[])} for the command line management. When this function is called, it is assumed that all the system's properties are correctly set. <p>The startupModule parameter permits to specify th...
[ "Launch", "the", "Janus", "kernel", "and", "the", "first", "agent", "in", "the", "kernel", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java#L983-L999
sundrio/sundrio
annotations/builder/src/main/java/io/sundr/builder/internal/functions/ToPojo.java
ToPojo.convertMap
private static String convertMap(String ref, TypeDef source, TypeDef target) { """ Converts a map describing the source type, to the target. @param ref The ref. @param source The source type of the reference.. @param target The target type. @return """ Method cto...
java
private static String convertMap(String ref, TypeDef source, TypeDef target) { Method ctor = BuilderUtils.findBuildableConstructor(target); String arguments = ctor.getArguments().stream() .map(p -> readMapValue(ref, source, p)) .collect(joining(",\n","\n", "")); ...
[ "private", "static", "String", "convertMap", "(", "String", "ref", ",", "TypeDef", "source", ",", "TypeDef", "target", ")", "{", "Method", "ctor", "=", "BuilderUtils", ".", "findBuildableConstructor", "(", "target", ")", ";", "String", "arguments", "=", "ctor"...
Converts a map describing the source type, to the target. @param ref The ref. @param source The source type of the reference.. @param target The target type. @return
[ "Converts", "a", "map", "describing", "the", "source", "type", "to", "the", "target", "." ]
train
https://github.com/sundrio/sundrio/blob/4e38368f4db0d950f7c41a8c75e15b0baff1f69a/annotations/builder/src/main/java/io/sundr/builder/internal/functions/ToPojo.java#L710-L719
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java
TasksImpl.listSubtasksAsync
public Observable<CloudTaskListSubtasksResult> listSubtasksAsync(String jobId, String taskId, TaskListSubtasksOptions taskListSubtasksOptions) { """ Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection....
java
public Observable<CloudTaskListSubtasksResult> listSubtasksAsync(String jobId, String taskId, TaskListSubtasksOptions taskListSubtasksOptions) { return listSubtasksWithServiceResponseAsync(jobId, taskId, taskListSubtasksOptions).map(new Func1<ServiceResponseWithHeaders<CloudTaskListSubtasksResult, TaskListSubta...
[ "public", "Observable", "<", "CloudTaskListSubtasksResult", ">", "listSubtasksAsync", "(", "String", "jobId", ",", "String", "taskId", ",", "TaskListSubtasksOptions", "taskListSubtasksOptions", ")", "{", "return", "listSubtasksWithServiceResponseAsync", "(", "jobId", ",", ...
Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection. @param jobId The ID of the job. @param taskId The ID of the task. @param taskListSubtasksOptions Additional parameters for the operation @throws IllegalA...
[ "Lists", "all", "of", "the", "subtasks", "that", "are", "associated", "with", "the", "specified", "multi", "-", "instance", "task", ".", "If", "the", "task", "is", "not", "a", "multi", "-", "instance", "task", "then", "this", "returns", "an", "empty", "c...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java#L1748-L1755
lucee/Lucee
core/src/main/java/lucee/runtime/op/Caster.java
Caster.toLocale
public static Locale toLocale(String strLocale, Locale defaultValue) { """ casts a string to a Locale @param strLocale @param defaultValue @return Locale from String """ return LocaleFactory.getLocale(strLocale, defaultValue); }
java
public static Locale toLocale(String strLocale, Locale defaultValue) { return LocaleFactory.getLocale(strLocale, defaultValue); }
[ "public", "static", "Locale", "toLocale", "(", "String", "strLocale", ",", "Locale", "defaultValue", ")", "{", "return", "LocaleFactory", ".", "getLocale", "(", "strLocale", ",", "defaultValue", ")", ";", "}" ]
casts a string to a Locale @param strLocale @param defaultValue @return Locale from String
[ "casts", "a", "string", "to", "a", "Locale" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Caster.java#L4233-L4235
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/FilterQuery.java
FilterQuery.addFilter
public void addFilter(String field, String valueToFilter) { """ add a filter to the to build FilterQuery instance @param field @param valueToFilter """ if(StringUtils.isEmpty(field) || StringUtils.isEmpty(valueToFilter)){ throw new IllegalArgumentException("Expected all attributes to be n...
java
public void addFilter(String field, String valueToFilter){ if(StringUtils.isEmpty(field) || StringUtils.isEmpty(valueToFilter)){ throw new IllegalArgumentException("Expected all attributes to be non empty"); } Set<String> valuesToFilter = new HashSet<String>(); valuesToFilter...
[ "public", "void", "addFilter", "(", "String", "field", ",", "String", "valueToFilter", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "field", ")", "||", "StringUtils", ".", "isEmpty", "(", "valueToFilter", ")", ")", "{", "throw", "new", "Illegal...
add a filter to the to build FilterQuery instance @param field @param valueToFilter
[ "add", "a", "filter", "to", "the", "to", "build", "FilterQuery", "instance" ]
train
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/FilterQuery.java#L91-L98
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/svm/extended/CPM.java
CPM.setEntropyThreshold
public void setEntropyThreshold(double entropyThreshold) { """ Sets the entropy threshold used for training. It ensures a diversity of hyper-planes are used, where larger values encourage using more of the hyper planes.<br> <br> This method is adjusted from the paper's definition so that the input can be any ...
java
public void setEntropyThreshold(double entropyThreshold) { if(entropyThreshold < 0 || Double.isNaN(entropyThreshold) || Double.isInfinite(entropyThreshold)) throw new IllegalArgumentException("Entropy threshold must be non-negative, not " + entropyThreshold); this.entropyThreshold = entr...
[ "public", "void", "setEntropyThreshold", "(", "double", "entropyThreshold", ")", "{", "if", "(", "entropyThreshold", "<", "0", "||", "Double", ".", "isNaN", "(", "entropyThreshold", ")", "||", "Double", ".", "isInfinite", "(", "entropyThreshold", ")", ")", "th...
Sets the entropy threshold used for training. It ensures a diversity of hyper-planes are used, where larger values encourage using more of the hyper planes.<br> <br> This method is adjusted from the paper's definition so that the input can be any non-negative value. It is recommended to try values in the range of [0, 1...
[ "Sets", "the", "entropy", "threshold", "used", "for", "training", ".", "It", "ensures", "a", "diversity", "of", "hyper", "-", "planes", "are", "used", "where", "larger", "values", "encourage", "using", "more", "of", "the", "hyper", "planes", ".", "<br", ">...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/svm/extended/CPM.java#L175-L181
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java
XSLTAttributeDef.processQNAMESRNU
final Vector processQNAMESRNU(StylesheetHandler handler, String uri, String name, String rawName, String value) throws org.xml.sax.SAXException { """ Process an attribute string of type T_QNAMES_RESOLVE_NULL into a vector of QNames where the specification requires non-prefixed elements to be placed in th...
java
final Vector processQNAMESRNU(StylesheetHandler handler, String uri, String name, String rawName, String value) throws org.xml.sax.SAXException { StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f"); int nQNames = tokenizer.countTokens(); Vector qnames = new Vector(nQNames); S...
[ "final", "Vector", "processQNAMESRNU", "(", "StylesheetHandler", "handler", ",", "String", "uri", ",", "String", "name", ",", "String", "rawName", ",", "String", "value", ")", "throws", "org", ".", "xml", ".", "sax", ".", "SAXException", "{", "StringTokenizer"...
Process an attribute string of type T_QNAMES_RESOLVE_NULL into a vector of QNames where the specification requires non-prefixed elements to be placed in the default namespace. (See section 16 of XSLT 1.0; the <em>only</em> time that this will get called is for the <code>cdata-section-elements</code> attribute on <code...
[ "Process", "an", "attribute", "string", "of", "type", "T_QNAMES_RESOLVE_NULL", "into", "a", "vector", "of", "QNames", "where", "the", "specification", "requires", "non", "-", "prefixed", "elements", "to", "be", "placed", "in", "the", "default", "namespace", ".",...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L1120-L1140
spring-projects/spring-hateoas
src/main/java/org/springframework/hateoas/config/HateoasConfiguration.java
HateoasConfiguration.linkRelationMessageSource
@Bean public MessageSourceAccessor linkRelationMessageSource() { """ The {@link MessageSourceAccessor} to provide messages for {@link ResourceDescription}s being rendered. @return """ try { ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource(); messageS...
java
@Bean public MessageSourceAccessor linkRelationMessageSource() { try { ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource(); messageSource.setBasename("classpath:rest-messages"); return new MessageSourceAccessor(messageSource); } catch (Exception o_O) { ...
[ "@", "Bean", "public", "MessageSourceAccessor", "linkRelationMessageSource", "(", ")", "{", "try", "{", "ReloadableResourceBundleMessageSource", "messageSource", "=", "new", "ReloadableResourceBundleMessageSource", "(", ")", ";", "messageSource", ".", "setBasename", "(", ...
The {@link MessageSourceAccessor} to provide messages for {@link ResourceDescription}s being rendered. @return
[ "The", "{", "@link", "MessageSourceAccessor", "}", "to", "provide", "messages", "for", "{", "@link", "ResourceDescription", "}", "s", "being", "rendered", "." ]
train
https://github.com/spring-projects/spring-hateoas/blob/70ebff9309f086cd8d6a97daf67e0dc215c87d9c/src/main/java/org/springframework/hateoas/config/HateoasConfiguration.java#L55-L68
finmath/finmath-lib
src/main/java/net/finmath/montecarlo/interestrate/products/components/Cashflow.java
Cashflow.getValue
@Override public RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException { """ This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value c...
java
@Override public RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException { // Note: We use > here. To distinguish an end of day valuation use hour of day for cash flows and evaluation date. if(evaluationTime > flowDate) { return model.getRandomVaria...
[ "@", "Override", "public", "RandomVariable", "getValue", "(", "double", "evaluationTime", ",", "LIBORModelMonteCarloSimulationModel", "model", ")", "throws", "CalculationException", "{", "// Note: We use > here. To distinguish an end of day valuation use hour of day for cash flows and ...
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value conditional to evalutationTime, for a Monte-Carlo simulation this is the (sum of) value discounted to evaluation time. cash-flows prior evaluationTim...
[ "This", "method", "returns", "the", "value", "random", "variable", "of", "the", "product", "within", "the", "specified", "model", "evaluated", "at", "a", "given", "evalutationTime", ".", "Note", ":", "For", "a", "lattice", "this", "is", "often", "the", "valu...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/interestrate/products/components/Cashflow.java#L67-L91
BoltsFramework/Bolts-Android
bolts-tasks/src/main/java/bolts/AndroidExecutors.java
AndroidExecutors.allowCoreThreadTimeout
@SuppressLint("NewApi") public static void allowCoreThreadTimeout(ThreadPoolExecutor executor, boolean value) { """ Compatibility helper function for {@link java.util.concurrent.ThreadPoolExecutor#allowCoreThreadTimeOut(boolean)} Only available on android-9+. @param executor the {@link java.util.concurren...
java
@SuppressLint("NewApi") public static void allowCoreThreadTimeout(ThreadPoolExecutor executor, boolean value) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) { executor.allowCoreThreadTimeOut(value); } }
[ "@", "SuppressLint", "(", "\"NewApi\"", ")", "public", "static", "void", "allowCoreThreadTimeout", "(", "ThreadPoolExecutor", "executor", ",", "boolean", "value", ")", "{", "if", "(", "Build", ".", "VERSION", ".", "SDK_INT", ">=", "Build", ".", "VERSION_CODES", ...
Compatibility helper function for {@link java.util.concurrent.ThreadPoolExecutor#allowCoreThreadTimeOut(boolean)} Only available on android-9+. @param executor the {@link java.util.concurrent.ThreadPoolExecutor} @param value true if should time out, else false
[ "Compatibility", "helper", "function", "for", "{", "@link", "java", ".", "util", ".", "concurrent", ".", "ThreadPoolExecutor#allowCoreThreadTimeOut", "(", "boolean", ")", "}" ]
train
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-tasks/src/main/java/bolts/AndroidExecutors.java#L115-L120
liferay/com-liferay-commerce
commerce-product-api/src/main/java/com/liferay/commerce/product/model/CPAttachmentFileEntryWrapper.java
CPAttachmentFileEntryWrapper.getTitle
@Override public String getTitle(String languageId, boolean useDefault) { """ Returns the localized title of this cp attachment file entry in the language, optionally using the default language if no localization exists for the requested language. @param languageId the ID of the language @param useDefault whe...
java
@Override public String getTitle(String languageId, boolean useDefault) { return _cpAttachmentFileEntry.getTitle(languageId, useDefault); }
[ "@", "Override", "public", "String", "getTitle", "(", "String", "languageId", ",", "boolean", "useDefault", ")", "{", "return", "_cpAttachmentFileEntry", ".", "getTitle", "(", "languageId", ",", "useDefault", ")", ";", "}" ]
Returns the localized title of this cp attachment file entry in the language, optionally using the default language if no localization exists for the requested language. @param languageId the ID of the language @param useDefault whether to use the default language if no localization exists for the requested language @...
[ "Returns", "the", "localized", "title", "of", "this", "cp", "attachment", "file", "entry", "in", "the", "language", "optionally", "using", "the", "default", "language", "if", "no", "localization", "exists", "for", "the", "requested", "language", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/model/CPAttachmentFileEntryWrapper.java#L531-L534
dkmfbk/knowledgestore
ks-core/src/main/java/eu/fbk/knowledgestore/data/Stream.java
Stream.toSortedList
public final List<T> toSortedList(final Class<? extends Comparable<?>> type, final boolean lenient, final Object... path) { """ Terminal operation returning an immutable List with all the elements of this Stream, sorted based on a sort key obtained by applying an optional <i>navigation path</i> and co...
java
public final List<T> toSortedList(final Class<? extends Comparable<?>> type, final boolean lenient, final Object... path) { return Ordering.from(new PathComparator(type, lenient, path)).immutableSortedCopy( toCollection(Lists.<T>newArrayListWithCapacity(256))); }
[ "public", "final", "List", "<", "T", ">", "toSortedList", "(", "final", "Class", "<", "?", "extends", "Comparable", "<", "?", ">", ">", "type", ",", "final", "boolean", "lenient", ",", "final", "Object", "...", "path", ")", "{", "return", "Ordering", "...
Terminal operation returning an immutable List with all the elements of this Stream, sorted based on a sort key obtained by applying an optional <i>navigation path</i> and conversion to a specified type. The path is a sequence of keys ({@code String}s, {@code URI}s, generic objects) that are applied to {@code Record}, ...
[ "Terminal", "operation", "returning", "an", "immutable", "List", "with", "all", "the", "elements", "of", "this", "Stream", "sorted", "based", "on", "a", "sort", "key", "obtained", "by", "applying", "an", "optional", "<i", ">", "navigation", "path<", "/", "i"...
train
https://github.com/dkmfbk/knowledgestore/blob/a548101b1dd67fcf72a1ec6f838ea7539bdbbe7a/ks-core/src/main/java/eu/fbk/knowledgestore/data/Stream.java#L618-L622
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlot.java
TaskSlot.generateSlotOffer
public SlotOffer generateSlotOffer() { """ Generate the slot offer from this TaskSlot. @return The sot offer which this task slot can provide """ Preconditions.checkState(TaskSlotState.ACTIVE == state || TaskSlotState.ALLOCATED == state, "The task slot is not in state active or allocated."); Precondi...
java
public SlotOffer generateSlotOffer() { Preconditions.checkState(TaskSlotState.ACTIVE == state || TaskSlotState.ALLOCATED == state, "The task slot is not in state active or allocated."); Preconditions.checkState(allocationId != null, "The task slot are not allocated"); return new SlotOffer(allocationId, index,...
[ "public", "SlotOffer", "generateSlotOffer", "(", ")", "{", "Preconditions", ".", "checkState", "(", "TaskSlotState", ".", "ACTIVE", "==", "state", "||", "TaskSlotState", ".", "ALLOCATED", "==", "state", ",", "\"The task slot is not in state active or allocated.\"", ")",...
Generate the slot offer from this TaskSlot. @return The sot offer which this task slot can provide
[ "Generate", "the", "slot", "offer", "from", "this", "TaskSlot", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlot.java#L295-L301
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.boot.nested/src/com/ibm/ws/kernel/launch/internal/NoRethrowSecurityManager.java
NoRethrowSecurityManager.isOffendingClass
boolean isOffendingClass(Class<?>[] classes, int j, ProtectionDomain pd2, Permission inPerm) { """ isOffendingClass determines the offending class from the classes defined in the stack. """ // Return true if ... return (!classes[j].getName().startsWith("java")) && // as long as not ...
java
boolean isOffendingClass(Class<?>[] classes, int j, ProtectionDomain pd2, Permission inPerm) { // Return true if ... return (!classes[j].getName().startsWith("java")) && // as long as not // starting with ...
[ "boolean", "isOffendingClass", "(", "Class", "<", "?", ">", "[", "]", "classes", ",", "int", "j", ",", "ProtectionDomain", "pd2", ",", "Permission", "inPerm", ")", "{", "// Return true if ...", "return", "(", "!", "classes", "[", "j", "]", ".", "getName", ...
isOffendingClass determines the offending class from the classes defined in the stack.
[ "isOffendingClass", "determines", "the", "offending", "class", "from", "the", "classes", "defined", "in", "the", "stack", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.nested/src/com/ibm/ws/kernel/launch/internal/NoRethrowSecurityManager.java#L280-L295
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java
PatternBox.usedToProduce
public static Pattern usedToProduce(Blacklist blacklist) { """ Constructs a pattern where first small molecule is an input a biochemical reaction that produces the second small molecule. biochemical reaction. @param blacklist a skip-list of ubiquitous molecules @return the pattern """ Pattern p = new P...
java
public static Pattern usedToProduce(Blacklist blacklist) { Pattern p = new Pattern(SmallMoleculeReference.class, "SMR1"); p.add(erToPE(), "SMR1", "SPE1"); p.add(notGeneric(), "SPE1"); p.add(linkToComplex(blacklist), "SPE1", "PE1"); p.add(new ParticipatesInConv(RelType.INPUT, blacklist), "PE1", "Conv"); p.a...
[ "public", "static", "Pattern", "usedToProduce", "(", "Blacklist", "blacklist", ")", "{", "Pattern", "p", "=", "new", "Pattern", "(", "SmallMoleculeReference", ".", "class", ",", "\"SMR1\"", ")", ";", "p", ".", "add", "(", "erToPE", "(", ")", ",", "\"SMR1\"...
Constructs a pattern where first small molecule is an input a biochemical reaction that produces the second small molecule. biochemical reaction. @param blacklist a skip-list of ubiquitous molecules @return the pattern
[ "Constructs", "a", "pattern", "where", "first", "small", "molecule", "is", "an", "input", "a", "biochemical", "reaction", "that", "produces", "the", "second", "small", "molecule", ".", "biochemical", "reaction", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L622-L640
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/ControlBar.java
ControlBar.addControl
public void addControl(String name, JSONObject properties, Widget.OnTouchListener listener) { """ Add new control at the end of control bar with specified touch listener. Size of control bar is updated based on new number of controls. @param name name of the control to remove @param properties JSON control spec...
java
public void addControl(String name, JSONObject properties, Widget.OnTouchListener listener) { final JSONObject allowedProperties = new JSONObject(); put(allowedProperties, Widget.Properties.name, optString(properties, Widget.Properties.name)); put(allowedProperties, Widget.Properties.size, new P...
[ "public", "void", "addControl", "(", "String", "name", ",", "JSONObject", "properties", ",", "Widget", ".", "OnTouchListener", "listener", ")", "{", "final", "JSONObject", "allowedProperties", "=", "new", "JSONObject", "(", ")", ";", "put", "(", "allowedProperti...
Add new control at the end of control bar with specified touch listener. Size of control bar is updated based on new number of controls. @param name name of the control to remove @param properties JSON control specific properties @param listener touch listener
[ "Add", "new", "control", "at", "the", "end", "of", "control", "bar", "with", "specified", "touch", "listener", ".", "Size", "of", "control", "bar", "is", "updated", "based", "on", "new", "number", "of", "controls", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/ControlBar.java#L153-L161
Jasig/uPortal
uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java
UpdatePreferencesServlet.chooseSkin
@RequestMapping(method = RequestMethod.POST, params = "action=chooseSkin") public ModelAndView chooseSkin(HttpServletRequest request, @RequestParam String skinName) throws IOException { """ Update the user's preferred skin. @param request HTTP Request @param skinName name of the Skin @throws I...
java
@RequestMapping(method = RequestMethod.POST, params = "action=chooseSkin") public ModelAndView chooseSkin(HttpServletRequest request, @RequestParam String skinName) throws IOException { this.stylesheetUserPreferencesService.setStylesheetParameter( request, PreferencesScope.THEME...
[ "@", "RequestMapping", "(", "method", "=", "RequestMethod", ".", "POST", ",", "params", "=", "\"action=chooseSkin\"", ")", "public", "ModelAndView", "chooseSkin", "(", "HttpServletRequest", "request", ",", "@", "RequestParam", "String", "skinName", ")", "throws", ...
Update the user's preferred skin. @param request HTTP Request @param skinName name of the Skin @throws IOException @throws PortalException
[ "Update", "the", "user", "s", "preferred", "skin", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java#L854-L862
OpenLiberty/open-liberty
dev/com.ibm.ws.product.utility/src/com/ibm/ws/product/utility/extension/IFixCompareCommandTask.java
IFixCompareCommandTask.findFixPackAparIds
private Set<String> findFixPackAparIds(File installLocation, CommandConsole console, ExecutionContext context) throws IllegalArgumentException, ZipException, IOException { """ This method will look in the wlp/lib/versions/aparIds.zip file for a file named aparIds.csv which it will then read to obtain a set of APA...
java
private Set<String> findFixPackAparIds(File installLocation, CommandConsole console, ExecutionContext context) throws IllegalArgumentException, ZipException, IOException { // First need to work out what type of installation we have, is it an // archive or extracted? Set<String> fixPackAparIds; ...
[ "private", "Set", "<", "String", ">", "findFixPackAparIds", "(", "File", "installLocation", ",", "CommandConsole", "console", ",", "ExecutionContext", "context", ")", "throws", "IllegalArgumentException", ",", "ZipException", ",", "IOException", "{", "// First need to w...
This method will look in the wlp/lib/versions/aparIds.zip file for a file named aparIds.csv which it will then read to obtain a set of APARs that are included in this Fix Pack. @param installLocation The location of the installation file to get the APAR IDs from, it can be either an archive file (zip or jar) or an ext...
[ "This", "method", "will", "look", "in", "the", "wlp", "/", "lib", "/", "versions", "/", "aparIds", ".", "zip", "file", "for", "a", "file", "named", "aparIds", ".", "csv", "which", "it", "will", "then", "read", "to", "obtain", "a", "set", "of", "APARs...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.product.utility/src/com/ibm/ws/product/utility/extension/IFixCompareCommandTask.java#L527-L551
ZuInnoTe/hadoopoffice
hiveserde/src/main/java/org/zuinnote/hadoop/excel/hive/daoserde/ExcelSpreadSheetCellDAOSerde.java
ExcelSpreadSheetCellDAOSerde.serialize
@Override public Writable serialize(Object arg0, ObjectInspector arg1) throws SerDeException { """ Writes a row in Hive containing exactly 5 elements (String) to a SpreadSheetCellDAO. Order: "formattedValue","comment","formula","address","sheetName" """ if (!(arg1 instanceof StructObjectInspector)) { thr...
java
@Override public Writable serialize(Object arg0, ObjectInspector arg1) throws SerDeException { if (!(arg1 instanceof StructObjectInspector)) { throw new SerDeException("Expect a row of Strings for serialization"); } final StructObjectInspector outputOI = (StructObjectInspector) arg1; final List<? extends St...
[ "@", "Override", "public", "Writable", "serialize", "(", "Object", "arg0", ",", "ObjectInspector", "arg1", ")", "throws", "SerDeException", "{", "if", "(", "!", "(", "arg1", "instanceof", "StructObjectInspector", ")", ")", "{", "throw", "new", "SerDeException", ...
Writes a row in Hive containing exactly 5 elements (String) to a SpreadSheetCellDAO. Order: "formattedValue","comment","formula","address","sheetName"
[ "Writes", "a", "row", "in", "Hive", "containing", "exactly", "5", "elements", "(", "String", ")", "to", "a", "SpreadSheetCellDAO", ".", "Order", ":", "formattedValue", "comment", "formula", "address", "sheetName" ]
train
https://github.com/ZuInnoTe/hadoopoffice/blob/58fc9223ee290bcb14847aaaff3fadf39c465e46/hiveserde/src/main/java/org/zuinnote/hadoop/excel/hive/daoserde/ExcelSpreadSheetCellDAOSerde.java#L111-L151
GenesysPureEngage/provisioning-client-java
src/main/java/com/genesys/provisioning/ExportApi.java
ExportApi.getExportStatus
public BigDecimal getExportStatus(String id) throws ProvisioningApiException { """ Get export status. Check the status of the specified export and return the percentage complete. @param id The ID of a previously started export. (required) @return Export status. @throws ProvisioningApiException if the call is u...
java
public BigDecimal getExportStatus(String id) throws ProvisioningApiException { try { ExportStatusResponse resp = exportApi.getExportStatus(id); if (!resp.getStatus().getCode().equals(0)) { throw new ProvisioningApiException("Error getting export status. Code: " + resp.getStatus().getCode()); } ...
[ "public", "BigDecimal", "getExportStatus", "(", "String", "id", ")", "throws", "ProvisioningApiException", "{", "try", "{", "ExportStatusResponse", "resp", "=", "exportApi", ".", "getExportStatus", "(", "id", ")", ";", "if", "(", "!", "resp", ".", "getStatus", ...
Get export status. Check the status of the specified export and return the percentage complete. @param id The ID of a previously started export. (required) @return Export status. @throws ProvisioningApiException if the call is unsuccessful.
[ "Get", "export", "status", ".", "Check", "the", "status", "of", "the", "specified", "export", "and", "return", "the", "percentage", "complete", "." ]
train
https://github.com/GenesysPureEngage/provisioning-client-java/blob/1ad594c3767cec83052168e350994f922a26f75e/src/main/java/com/genesys/provisioning/ExportApi.java#L70-L82
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/ArrayFunctions.java
ArrayFunctions.arrayPosition
public static Expression arrayPosition(JsonArray array, Expression value) { """ Returned expression results in the first position of value within the array, or -1. Array position is zero-based, i.e. the first position is 0. """ return arrayPosition(x(array), value); }
java
public static Expression arrayPosition(JsonArray array, Expression value) { return arrayPosition(x(array), value); }
[ "public", "static", "Expression", "arrayPosition", "(", "JsonArray", "array", ",", "Expression", "value", ")", "{", "return", "arrayPosition", "(", "x", "(", "array", ")", ",", "value", ")", ";", "}" ]
Returned expression results in the first position of value within the array, or -1. Array position is zero-based, i.e. the first position is 0.
[ "Returned", "expression", "results", "in", "the", "first", "position", "of", "value", "within", "the", "array", "or", "-", "1", ".", "Array", "position", "is", "zero", "-", "based", "i", ".", "e", ".", "the", "first", "position", "is", "0", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/ArrayFunctions.java#L275-L277
awslabs/jsii
packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiClient.java
JsiiClient.getStaticPropertyValue
public JsonNode getStaticPropertyValue(final String fqn, final String property) { """ Gets a value of a static property. @param fqn The FQN of the class @param property The name of the static property @return The value of the static property """ ObjectNode req = makeRequest("sget"); req.put(...
java
public JsonNode getStaticPropertyValue(final String fqn, final String property) { ObjectNode req = makeRequest("sget"); req.put("fqn", fqn); req.put("property", property); return this.runtime.requestResponse(req).get("value"); }
[ "public", "JsonNode", "getStaticPropertyValue", "(", "final", "String", "fqn", ",", "final", "String", "property", ")", "{", "ObjectNode", "req", "=", "makeRequest", "(", "\"sget\"", ")", ";", "req", ".", "put", "(", "\"fqn\"", ",", "fqn", ")", ";", "req",...
Gets a value of a static property. @param fqn The FQN of the class @param property The name of the static property @return The value of the static property
[ "Gets", "a", "value", "of", "a", "static", "property", "." ]
train
https://github.com/awslabs/jsii/blob/6bbf743f5f65e98e5199ad31c93961533ffc40e5/packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiClient.java#L136-L141
drinkjava2/jBeanBox
jbeanbox/src/main/java/com/github/drinkjava2/jbeanbox/ReflectionUtils.java
ReflectionUtils.declaresException
public static boolean declaresException(Method method, Class<?> exceptionType) { """ Determine whether the given method explicitly declares the given exception or one of its superclasses, which means that an exception of that type can be propagated as-is within a reflective invocation. @param method the decla...
java
public static boolean declaresException(Method method, Class<?> exceptionType) { BeanBoxException.assureNotNull(method, "Method must not be null"); Class<?>[] declaredExceptions = method.getExceptionTypes(); for (Class<?> declaredException : declaredExceptions) { if (declaredException.isAssignableFrom(exceptio...
[ "public", "static", "boolean", "declaresException", "(", "Method", "method", ",", "Class", "<", "?", ">", "exceptionType", ")", "{", "BeanBoxException", ".", "assureNotNull", "(", "method", ",", "\"Method must not be null\"", ")", ";", "Class", "<", "?", ">", ...
Determine whether the given method explicitly declares the given exception or one of its superclasses, which means that an exception of that type can be propagated as-is within a reflective invocation. @param method the declaring method @param exceptionType the exception to throw @return {@code true} if the exception ...
[ "Determine", "whether", "the", "given", "method", "explicitly", "declares", "the", "given", "exception", "or", "one", "of", "its", "superclasses", "which", "means", "that", "an", "exception", "of", "that", "type", "can", "be", "propagated", "as", "-", "is", ...
train
https://github.com/drinkjava2/jBeanBox/blob/01c216599ffa2e5f2d9c01df2adaad0f45567c04/jbeanbox/src/main/java/com/github/drinkjava2/jbeanbox/ReflectionUtils.java#L379-L388
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/pact/runtime/task/RegularPactTask.java
RegularPactTask.openUserCode
public static void openUserCode(Function stub, Configuration parameters) throws Exception { """ Opens the given stub using its {@link Function#open(Configuration)} method. If the open call produces an exception, a new exception with a standard error message is created, using the encountered exception as its caus...
java
public static void openUserCode(Function stub, Configuration parameters) throws Exception { try { stub.open(parameters); } catch (Throwable t) { throw new Exception("The user defined 'open(Configuration)' method in " + stub.getClass().toString() + " caused an exception: " + t.getMessage(), t); } }
[ "public", "static", "void", "openUserCode", "(", "Function", "stub", ",", "Configuration", "parameters", ")", "throws", "Exception", "{", "try", "{", "stub", ".", "open", "(", "parameters", ")", ";", "}", "catch", "(", "Throwable", "t", ")", "{", "throw", ...
Opens the given stub using its {@link Function#open(Configuration)} method. If the open call produces an exception, a new exception with a standard error message is created, using the encountered exception as its cause. @param stub The user code instance to be opened. @param parameters The parameters supplied to the u...
[ "Opens", "the", "given", "stub", "using", "its", "{", "@link", "Function#open", "(", "Configuration", ")", "}", "method", ".", "If", "the", "open", "call", "produces", "an", "exception", "a", "new", "exception", "with", "a", "standard", "error", "message", ...
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/pact/runtime/task/RegularPactTask.java#L1387-L1393
pkiraly/metadata-qa-api
src/main/java/de/gwdg/metadataqa/api/model/JsonPathCache.java
JsonPathCache.getFragment
public Object getFragment(String address, String jsonPath, Object jsonFragment) { """ Get a JSON fragment from cache. @param address - a unique address for cahce @param jsonPath - a JSON path expression @param jsonFragment - a JSON fragment in which the path should be searched for @return The JSON fragmen...
java
public Object getFragment(String address, String jsonPath, Object jsonFragment) { Object jsonFragment2 = null; if (!fragmentCache.containsKey(address)) { jsonFragment2 = read(jsonPath, jsonFragment); fragmentCache.put(address, jsonFragment2); } else { jsonFragment2 = fragmentCache.get(addr...
[ "public", "Object", "getFragment", "(", "String", "address", ",", "String", "jsonPath", ",", "Object", "jsonFragment", ")", "{", "Object", "jsonFragment2", "=", "null", ";", "if", "(", "!", "fragmentCache", ".", "containsKey", "(", "address", ")", ")", "{", ...
Get a JSON fragment from cache. @param address - a unique address for cahce @param jsonPath - a JSON path expression @param jsonFragment - a JSON fragment in which the path should be searched for @return The JSON fragment
[ "Get", "a", "JSON", "fragment", "from", "cache", "." ]
train
https://github.com/pkiraly/metadata-qa-api/blob/622a69e7c1628ccf64047070817ecfaa68f15b1d/src/main/java/de/gwdg/metadataqa/api/model/JsonPathCache.java#L124-L133
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teaservlet/TeaServletAdmin.java
TeaServletAdmin.getFunctions
public FunctionInfo[] getFunctions() { """ Returns information about all functions available to the templates. """ // TODO: make this a little more useful by showing more function // details. ApplicationInfo[] AppInf = getApplications(); FunctionInfo[] funcArray = null; ...
java
public FunctionInfo[] getFunctions() { // TODO: make this a little more useful by showing more function // details. ApplicationInfo[] AppInf = getApplications(); FunctionInfo[] funcArray = null; try { MethodDescriptor[] methods = Introspector .getBe...
[ "public", "FunctionInfo", "[", "]", "getFunctions", "(", ")", "{", "// TODO: make this a little more useful by showing more function", "// details.", "ApplicationInfo", "[", "]", "AppInf", "=", "getApplications", "(", ")", ";", "FunctionInfo", "[", "]", "funcArray", "="...
Returns information about all functions available to the templates.
[ "Returns", "information", "about", "all", "functions", "available", "to", "the", "templates", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teaservlet/TeaServletAdmin.java#L240-L280
trello/RxLifecycle
rxlifecycle-android-lifecycle/src/main/java/com/trello/lifecycle2/android/lifecycle/RxLifecycleAndroidLifecycle.java
RxLifecycleAndroidLifecycle.bindLifecycle
@NonNull @CheckResult public static <T> LifecycleTransformer<T> bindLifecycle(@NonNull Observable<Lifecycle.Event> lifecycle) { """ Binds the given source to an Android lifecycle. <p> This helper automatically determines (based on the lifecycle sequence itself) when the source should stop emitting items...
java
@NonNull @CheckResult public static <T> LifecycleTransformer<T> bindLifecycle(@NonNull Observable<Lifecycle.Event> lifecycle) { return bind(lifecycle, LIFECYCLE); }
[ "@", "NonNull", "@", "CheckResult", "public", "static", "<", "T", ">", "LifecycleTransformer", "<", "T", ">", "bindLifecycle", "(", "@", "NonNull", "Observable", "<", "Lifecycle", ".", "Event", ">", "lifecycle", ")", "{", "return", "bind", "(", "lifecycle", ...
Binds the given source to an Android lifecycle. <p> This helper automatically determines (based on the lifecycle sequence itself) when the source should stop emitting items. In the case that the lifecycle sequence is in the creation phase (ON_CREATE, ON_START, etc) it will choose the equivalent destructive phase (ON_DE...
[ "Binds", "the", "given", "source", "to", "an", "Android", "lifecycle", ".", "<p", ">", "This", "helper", "automatically", "determines", "(", "based", "on", "the", "lifecycle", "sequence", "itself", ")", "when", "the", "source", "should", "stop", "emitting", ...
train
https://github.com/trello/RxLifecycle/blob/b0a9eb54867f0d72b9614d24091c59dfd4b2d5c1/rxlifecycle-android-lifecycle/src/main/java/com/trello/lifecycle2/android/lifecycle/RxLifecycleAndroidLifecycle.java#L32-L36
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/AbstractFieldComparator.java
AbstractFieldComparator.getIndexReaders
private static void getIndexReaders(List<IndexReader> readers, IndexReader reader) { """ Checks if <code>reader</code> is of type {@link MultiIndexReader} and if so calls itself recursively for each reader within the <code>MultiIndexReader</code> or otherwise adds the reader to the list. @param readers list ...
java
private static void getIndexReaders(List<IndexReader> readers, IndexReader reader) { if (reader instanceof MultiIndexReader) { for (IndexReader r : ((MultiIndexReader)reader).getIndexReaders()) { getIndexReaders(readers, r); } } else { rea...
[ "private", "static", "void", "getIndexReaders", "(", "List", "<", "IndexReader", ">", "readers", ",", "IndexReader", "reader", ")", "{", "if", "(", "reader", "instanceof", "MultiIndexReader", ")", "{", "for", "(", "IndexReader", "r", ":", "(", "(", "MultiInd...
Checks if <code>reader</code> is of type {@link MultiIndexReader} and if so calls itself recursively for each reader within the <code>MultiIndexReader</code> or otherwise adds the reader to the list. @param readers list of index readers. @param reader reader to decompose
[ "Checks", "if", "<code", ">", "reader<", "/", "code", ">", "is", "of", "type", "{", "@link", "MultiIndexReader", "}", "and", "if", "so", "calls", "itself", "recursively", "for", "each", "reader", "within", "the", "<code", ">", "MultiIndexReader<", "/", "co...
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/AbstractFieldComparator.java#L142-L155
JOML-CI/JOML
src/org/joml/Intersectiond.java
Intersectiond.intersectRayAab
public static boolean intersectRayAab(Rayd ray, AABBd aabb, Vector2d result) { """ Test whether the given ray intersects given the axis-aligned box and return the values of the parameter <i>t</i> in the ray equation <i>p(t) = origin + t * dir</i> of the near and far point of intersection.. <p> This method retur...
java
public static boolean intersectRayAab(Rayd ray, AABBd aabb, Vector2d result) { return intersectRayAab(ray.oX, ray.oY, ray.oZ, ray.dX, ray.dY, ray.dZ, aabb.minX, aabb.minY, aabb.minZ, aabb.maxX, aabb.maxY, aabb.maxZ, result); }
[ "public", "static", "boolean", "intersectRayAab", "(", "Rayd", "ray", ",", "AABBd", "aabb", ",", "Vector2d", "result", ")", "{", "return", "intersectRayAab", "(", "ray", ".", "oX", ",", "ray", ".", "oY", ",", "ray", ".", "oZ", ",", "ray", ".", "dX", ...
Test whether the given ray intersects given the axis-aligned box and return the values of the parameter <i>t</i> in the ray equation <i>p(t) = origin + t * dir</i> of the near and far point of intersection.. <p> This method returns <code>true</code> for a ray whose origin lies inside the axis-aligned box. <p> If many b...
[ "Test", "whether", "the", "given", "ray", "intersects", "given", "the", "axis", "-", "aligned", "box", "and", "return", "the", "values", "of", "the", "parameter", "<i", ">", "t<", "/", "i", ">", "in", "the", "ray", "equation", "<i", ">", "p", "(", "t...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Intersectiond.java#L2438-L2440
radkovo/CSSBox
src/main/java/org/fit/cssbox/layout/BlockBox.java
BlockBox.doLayout
@Override public boolean doLayout(int availw, boolean force, boolean linestart) { """ Layout the sub-elements. @param availw Maximal width available to the child elements @param force Use the area even if the used width is greater than maxwidth @param linestart Indicates whether the element is placed at the...
java
@Override public boolean doLayout(int availw, boolean force, boolean linestart) { //if (getElement() != null && getElement().getAttribute("id").equals("gbzc")) // System.out.println("jo!"); //Skip if not displayed if (!displayed) { content.setSize(0, 0); ...
[ "@", "Override", "public", "boolean", "doLayout", "(", "int", "availw", ",", "boolean", "force", ",", "boolean", "linestart", ")", "{", "//if (getElement() != null && getElement().getAttribute(\"id\").equals(\"gbzc\"))", "//\tSystem.out.println(\"jo!\");", "//Skip if not displaye...
Layout the sub-elements. @param availw Maximal width available to the child elements @param force Use the area even if the used width is greater than maxwidth @param linestart Indicates whether the element is placed at the line start @return <code>true</code> if the box has been succesfully placed
[ "Layout", "the", "sub", "-", "elements", "." ]
train
https://github.com/radkovo/CSSBox/blob/38aaf8f22d233d7b4dbc12a56cdbc72b447bc559/src/main/java/org/fit/cssbox/layout/BlockBox.java#L804-L848
nostra13/Android-Universal-Image-Loader
library/src/main/java/com/nostra13/universalimageloader/utils/MemoryCacheUtils.java
MemoryCacheUtils.generateKey
public static String generateKey(String imageUri, ImageSize targetSize) { """ Generates key for memory cache for incoming image (URI + size).<br /> Pattern for cache key - <b>[imageUri]_[width]x[height]</b>. """ return new StringBuilder(imageUri).append(URI_AND_SIZE_SEPARATOR).append(targetSize.getWidth())....
java
public static String generateKey(String imageUri, ImageSize targetSize) { return new StringBuilder(imageUri).append(URI_AND_SIZE_SEPARATOR).append(targetSize.getWidth()).append(WIDTH_AND_HEIGHT_SEPARATOR).append(targetSize.getHeight()).toString(); }
[ "public", "static", "String", "generateKey", "(", "String", "imageUri", ",", "ImageSize", "targetSize", ")", "{", "return", "new", "StringBuilder", "(", "imageUri", ")", ".", "append", "(", "URI_AND_SIZE_SEPARATOR", ")", ".", "append", "(", "targetSize", ".", ...
Generates key for memory cache for incoming image (URI + size).<br /> Pattern for cache key - <b>[imageUri]_[width]x[height]</b>.
[ "Generates", "key", "for", "memory", "cache", "for", "incoming", "image", "(", "URI", "+", "size", ")", ".", "<br", "/", ">", "Pattern", "for", "cache", "key", "-", "<b", ">", "[", "imageUri", "]", "_", "[", "width", "]", "x", "[", "height", "]", ...
train
https://github.com/nostra13/Android-Universal-Image-Loader/blob/fc3c5f6779bb4f702e233653b61bd9d559e345cc/library/src/main/java/com/nostra13/universalimageloader/utils/MemoryCacheUtils.java#L46-L48
mfornos/humanize
humanize-slim/src/main/java/humanize/Humanize.java
Humanize.oxford
public static String oxford(final Object[] items, final int limit, final String limitStr) { """ <p> Converts a list of items to a human readable string with an optional limit. </p> @param items The items array @param limit The number of items to print. -1 for unbounded. @param limitStr The string to be ...
java
public static String oxford(final Object[] items, final int limit, final String limitStr) { if (items == null || items.length == 0) { return ""; } int itemsNum = items.length; if (itemsNum == 1) { return items[0].toString(); } ...
[ "public", "static", "String", "oxford", "(", "final", "Object", "[", "]", "items", ",", "final", "int", "limit", ",", "final", "String", "limitStr", ")", "{", "if", "(", "items", "==", "null", "||", "items", ".", "length", "==", "0", ")", "{", "retur...
<p> Converts a list of items to a human readable string with an optional limit. </p> @param items The items array @param limit The number of items to print. -1 for unbounded. @param limitStr The string to be appended after extra items. Null or "" for default. @return human readable representation of a bounded list of ...
[ "<p", ">", "Converts", "a", "list", "of", "items", "to", "a", "human", "readable", "string", "with", "an", "optional", "limit", ".", "<", "/", "p", ">" ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-slim/src/main/java/humanize/Humanize.java#L1854-L1892
SahaginOrg/sahagin-java
src/main/java/org/sahagin/share/yaml/YamlUtils.java
YamlUtils.getBooleanValue
public static Boolean getBooleanValue(Map<String, Object> yamlObject, String key, boolean allowsEmpty) throws YamlConvertException { """ if allowsEmpty, returns null for the case no key entry or null value """ Object obj = getObjectValue(yamlObject, key, allowsEmpty); if (obj == nul...
java
public static Boolean getBooleanValue(Map<String, Object> yamlObject, String key, boolean allowsEmpty) throws YamlConvertException { Object obj = getObjectValue(yamlObject, key, allowsEmpty); if (obj == null) { if (allowsEmpty) { return null; } else { ...
[ "public", "static", "Boolean", "getBooleanValue", "(", "Map", "<", "String", ",", "Object", ">", "yamlObject", ",", "String", "key", ",", "boolean", "allowsEmpty", ")", "throws", "YamlConvertException", "{", "Object", "obj", "=", "getObjectValue", "(", "yamlObje...
if allowsEmpty, returns null for the case no key entry or null value
[ "if", "allowsEmpty", "returns", "null", "for", "the", "case", "no", "key", "entry", "or", "null", "value" ]
train
https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/share/yaml/YamlUtils.java#L50-L66
synchronoss/cpo-api
cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/jta/JdbcCpoXaAdapter.java
JdbcCpoXaAdapter.executeObject
@Override public <T> T executeObject(String name, T object) throws CpoException { """ Executes an Object whose metadata will call an executable within the datasource. It is assumed that the executable object exists in the metadatasource. If the executable does not exist, an exception will be thrown. <p> <pre>...
java
@Override public <T> T executeObject(String name, T object) throws CpoException { return getCurrentResource().executeObject( name, object ); }
[ "@", "Override", "public", "<", "T", ">", "T", "executeObject", "(", "String", "name", ",", "T", "object", ")", "throws", "CpoException", "{", "return", "getCurrentResource", "(", ")", ".", "executeObject", "(", "name", ",", "object", ")", ";", "}" ]
Executes an Object whose metadata will call an executable within the datasource. It is assumed that the executable object exists in the metadatasource. If the executable does not exist, an exception will be thrown. <p> <pre>Example: <code> <p> class SomeObject so = new SomeObject(); class CpoAdapter cpo = null; <p> try...
[ "Executes", "an", "Object", "whose", "metadata", "will", "call", "an", "executable", "within", "the", "datasource", ".", "It", "is", "assumed", "that", "the", "executable", "object", "exists", "in", "the", "metadatasource", ".", "If", "the", "executable", "doe...
train
https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/jta/JdbcCpoXaAdapter.java#L772-L775
banq/jdonframework
JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandler.java
ModelHandler.formCopyToModelIF
public void formCopyToModelIF(ModelForm form, Object model) throws Exception { """ ModelForm object's data transfer to Model object default implemention is copy mapping between with them; another implemention: String propertyName = StringUtil.getLastString(model.getClass().getName()); Model hasDataModel = ...
java
public void formCopyToModelIF(ModelForm form, Object model) throws Exception { if (model == null || form == null) return; if (model instanceof Model) { // for below 1.4 version formCopyToModel(form, (Model) model); return; } try { PropertyUtils.copyProperties(model, form); } catch (Invoca...
[ "public", "void", "formCopyToModelIF", "(", "ModelForm", "form", ",", "Object", "model", ")", "throws", "Exception", "{", "if", "(", "model", "==", "null", "||", "form", "==", "null", ")", "return", ";", "if", "(", "model", "instanceof", "Model", ")", "{...
ModelForm object's data transfer to Model object default implemention is copy mapping between with them; another implemention: String propertyName = StringUtil.getLastString(model.getClass().getName()); Model hasDataModel = PropertyUtils.getProperty(form, propertyName); model = hasDataModel; extends this class , and...
[ "ModelForm", "object", "s", "data", "transfer", "to", "Model", "object" ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/ModelHandler.java#L214-L233
fedups/com.obdobion.algebrain
src/main/java/com/obdobion/algebrain/Equ.java
Equ.registerOperator
public void registerOperator(final String name, final Class<?> operatorSubclass) throws Exception { """ <p> registerOperator. </p> @param name a {@link java.lang.String} object. @param operatorSubclass a {@link java.lang.Class} object. @throws java.lang.Exception if any. """ final String token =...
java
public void registerOperator(final String name, final Class<?> operatorSubclass) throws Exception { final String token = name.toLowerCase(); if (operatorMap.containsKey(name)) throw new Exception("duplicate operator: " + token); try { operatorMap.put(token, op...
[ "public", "void", "registerOperator", "(", "final", "String", "name", ",", "final", "Class", "<", "?", ">", "operatorSubclass", ")", "throws", "Exception", "{", "final", "String", "token", "=", "name", ".", "toLowerCase", "(", ")", ";", "if", "(", "operato...
<p> registerOperator. </p> @param name a {@link java.lang.String} object. @param operatorSubclass a {@link java.lang.Class} object. @throws java.lang.Exception if any.
[ "<p", ">", "registerOperator", ".", "<", "/", "p", ">" ]
train
https://github.com/fedups/com.obdobion.algebrain/blob/d0adaa9fbbba907bdcf820961e9058b0d2b15a8a/src/main/java/com/obdobion/algebrain/Equ.java#L589-L603
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/attributedefinition/producttypes/ProductTypeOptionUrl.java
ProductTypeOptionUrl.deleteOptionUrl
public static MozuUrl deleteOptionUrl(String attributeFQN, Integer productTypeId) { """ Get Resource Url for DeleteOption @param attributeFQN Fully qualified name for an attribute. @param productTypeId Identifier of the product type. @return String Resource Url """ UrlFormatter formatter = new UrlForma...
java
public static MozuUrl deleteOptionUrl(String attributeFQN, Integer productTypeId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options/{attributeFQN}"); formatter.formatUrl("attributeFQN", attributeFQN); formatter.formatUrl("product...
[ "public", "static", "MozuUrl", "deleteOptionUrl", "(", "String", "attributeFQN", ",", "Integer", "productTypeId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options/{attri...
Get Resource Url for DeleteOption @param attributeFQN Fully qualified name for an attribute. @param productTypeId Identifier of the product type. @return String Resource Url
[ "Get", "Resource", "Url", "for", "DeleteOption" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/attributedefinition/producttypes/ProductTypeOptionUrl.java#L80-L86
OpenTSDB/opentsdb
src/core/BatchedDataPoints.java
BatchedDataPoints.isInteger
private boolean isInteger(final int i, final int q_offset) { """ Tells whether or not the ith value is integer. Uses pre-computed qualifier offset. @param i @param q_offset qualifier offset @return """ final short flags = Internal.getFlagsFromQualifier(batched_qualifier, q_offset); return (flags & C...
java
private boolean isInteger(final int i, final int q_offset) { final short flags = Internal.getFlagsFromQualifier(batched_qualifier, q_offset); return (flags & Const.FLAG_FLOAT) == 0x0; }
[ "private", "boolean", "isInteger", "(", "final", "int", "i", ",", "final", "int", "q_offset", ")", "{", "final", "short", "flags", "=", "Internal", ".", "getFlagsFromQualifier", "(", "batched_qualifier", ",", "q_offset", ")", ";", "return", "(", "flags", "&"...
Tells whether or not the ith value is integer. Uses pre-computed qualifier offset. @param i @param q_offset qualifier offset @return
[ "Tells", "whether", "or", "not", "the", "ith", "value", "is", "integer", ".", "Uses", "pre", "-", "computed", "qualifier", "offset", "." ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/core/BatchedDataPoints.java#L429-L432
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/RunbooksInner.java
RunbooksInner.updateAsync
public Observable<RunbookInner> updateAsync(String resourceGroupName, String automationAccountName, String runbookName, RunbookUpdateParameters parameters) { """ Update the runbook identified by runbook name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the...
java
public Observable<RunbookInner> updateAsync(String resourceGroupName, String automationAccountName, String runbookName, RunbookUpdateParameters parameters) { return updateWithServiceResponseAsync(resourceGroupName, automationAccountName, runbookName, parameters).map(new Func1<ServiceResponse<RunbookInner>, Runb...
[ "public", "Observable", "<", "RunbookInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "runbookName", ",", "RunbookUpdateParameters", "parameters", ")", "{", "return", "updateWithServiceResponseAsync", "...
Update the runbook identified by runbook name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param runbookName The runbook name. @param parameters The update parameters for runbook. @throws IllegalArgumentException thrown if parameters fail ...
[ "Update", "the", "runbook", "identified", "by", "runbook", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/RunbooksInner.java#L422-L429
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/VelocityRenderer.java
VelocityRenderer.addToContext
private void addToContext(final VelocityContext context, final String name, final Object value) { """ Adds a name/value pair to the Velocity context. If the name parameter ends with {@link #LIST_SUFFIX} @param context the context to add to. @param name the name @param value the value """ if (name.endsWi...
java
private void addToContext(final VelocityContext context, final String name, final Object value) { if (name.endsWith(LIST_SUFFIX)) { // We want to use lists Object already = context.get(name); if (already != null && !(already instanceof List)) { throw new SystemException( "VelocityContext contained ...
[ "private", "void", "addToContext", "(", "final", "VelocityContext", "context", ",", "final", "String", "name", ",", "final", "Object", "value", ")", "{", "if", "(", "name", ".", "endsWith", "(", "LIST_SUFFIX", ")", ")", "{", "// We want to use lists", "Object"...
Adds a name/value pair to the Velocity context. If the name parameter ends with {@link #LIST_SUFFIX} @param context the context to add to. @param name the name @param value the value
[ "Adds", "a", "name", "/", "value", "pair", "to", "the", "Velocity", "context", ".", "If", "the", "name", "parameter", "ends", "with", "{", "@link", "#LIST_SUFFIX", "}" ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/VelocityRenderer.java#L289-L309
TakahikoKawasaki/nv-websocket-client
src/main/java/com/neovisionaries/ws/client/ByteArray.java
ByteArray.put
public void put(ByteArray source, int index, int length) { """ Add data at the current position. @param source Source data. @param index The index in the source data. Data from the index is copied. @param length The length of data to copy. """ put(source.mBuffer.array(), index, length); ...
java
public void put(ByteArray source, int index, int length) { put(source.mBuffer.array(), index, length); }
[ "public", "void", "put", "(", "ByteArray", "source", ",", "int", "index", ",", "int", "length", ")", "{", "put", "(", "source", ".", "mBuffer", ".", "array", "(", ")", ",", "index", ",", "length", ")", ";", "}" ]
Add data at the current position. @param source Source data. @param index The index in the source data. Data from the index is copied. @param length The length of data to copy.
[ "Add", "data", "at", "the", "current", "position", "." ]
train
https://github.com/TakahikoKawasaki/nv-websocket-client/blob/efaec21181d740ad3808313acf679313179e0825/src/main/java/com/neovisionaries/ws/client/ByteArray.java#L179-L182
hortonworks/dstream
dstream-tez/src/main/java/io/dstream/tez/utils/ClassPathUtils.java
ClassPathUtils.toJar
public static File toJar(File sourceDir, String jarName) { """ Will create a JAR file from base dir @param sourceDir @param jarName @return """ if (!sourceDir.isAbsolute()) { throw new IllegalArgumentException("Source must be expressed through absolute path"); } Manifest manifest = new Manifest()...
java
public static File toJar(File sourceDir, String jarName) { if (!sourceDir.isAbsolute()) { throw new IllegalArgumentException("Source must be expressed through absolute path"); } Manifest manifest = new Manifest(); manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0"); File jarFile = new...
[ "public", "static", "File", "toJar", "(", "File", "sourceDir", ",", "String", "jarName", ")", "{", "if", "(", "!", "sourceDir", ".", "isAbsolute", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Source must be expressed through absolute pat...
Will create a JAR file from base dir @param sourceDir @param jarName @return
[ "Will", "create", "a", "JAR", "file", "from", "base", "dir" ]
train
https://github.com/hortonworks/dstream/blob/3a106c0f14725b028fe7fe2dbc660406d9a5f142/dstream-tez/src/main/java/io/dstream/tez/utils/ClassPathUtils.java#L76-L93
js-lib-com/template.xhtml
src/main/java/js/template/xhtml/OperatorFactory.java
OperatorFactory.geInstance
@SuppressWarnings("unchecked") public <T extends Operator> T geInstance(Opcode opcode) { """ Get operator instance for requested opcode. @param opcode requested operator opcode. @return operator instance. @throws TemplateException if operator is not implemented. """ Operator operator = this.operators...
java
@SuppressWarnings("unchecked") public <T extends Operator> T geInstance(Opcode opcode) { Operator operator = this.operators.get(opcode); if (operator == null) { throw new TemplateException("Operator |%s| is not implemented.", opcode); } return (T) operator; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "Operator", ">", "T", "geInstance", "(", "Opcode", "opcode", ")", "{", "Operator", "operator", "=", "this", ".", "operators", ".", "get", "(", "opcode", ")", ";", "if", "(...
Get operator instance for requested opcode. @param opcode requested operator opcode. @return operator instance. @throws TemplateException if operator is not implemented.
[ "Get", "operator", "instance", "for", "requested", "opcode", "." ]
train
https://github.com/js-lib-com/template.xhtml/blob/d50cec08aca9ab9680baebe2a26a341c096564fb/src/main/java/js/template/xhtml/OperatorFactory.java#L58-L65
alkacon/opencms-core
src/org/opencms/widgets/CmsVfsFileWidget.java
CmsVfsFileWidget.getDefaultSearchTypes
public static String getDefaultSearchTypes(CmsObject cms, CmsResource resource) { """ Returns a comma separated list of the default search type names.<p> @param cms the CMS context @param resource the edited resource @return a comma separated list of the default search type names """ StringBuff...
java
public static String getDefaultSearchTypes(CmsObject cms, CmsResource resource) { StringBuffer result = new StringBuffer(); String referenceSitePath = cms.getSitePath(resource); String configPath; if (resource == null) { // not sure if this can ever happen? confi...
[ "public", "static", "String", "getDefaultSearchTypes", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", ")", ";", "String", "referenceSitePath", "=", "cms", ".", "getSitePath", "(", "re...
Returns a comma separated list of the default search type names.<p> @param cms the CMS context @param resource the edited resource @return a comma separated list of the default search type names
[ "Returns", "a", "comma", "separated", "list", "of", "the", "default", "search", "type", "names", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/CmsVfsFileWidget.java#L229-L256
dbracewell/hermes
hermes-wordnet/src/main/java/com/davidbracewell/hermes/wordnet/io/WordNetPropertyLoader.java
WordNetPropertyLoader.setProperty
protected final void setProperty(Synset synset, PropertyName name, Property property) { """ Set property. @param synset the synset @param name the name @param property the property """ Cast.as(synset, SynsetImpl.class).setProperty(name, property); }
java
protected final void setProperty(Synset synset, PropertyName name, Property property) { Cast.as(synset, SynsetImpl.class).setProperty(name, property); }
[ "protected", "final", "void", "setProperty", "(", "Synset", "synset", ",", "PropertyName", "name", ",", "Property", "property", ")", "{", "Cast", ".", "as", "(", "synset", ",", "SynsetImpl", ".", "class", ")", ".", "setProperty", "(", "name", ",", "propert...
Set property. @param synset the synset @param name the name @param property the property
[ "Set", "property", "." ]
train
https://github.com/dbracewell/hermes/blob/9ebefe7ad5dea1b731ae6931a30771eb75325ea3/hermes-wordnet/src/main/java/com/davidbracewell/hermes/wordnet/io/WordNetPropertyLoader.java#L52-L54
EdwardRaff/JSAT
JSAT/src/jsat/linear/RowColumnOps.java
RowColumnOps.swapCol
public static void swapCol(Matrix A, int j, int k) { """ Swaps the columns <tt>j</tt> and <tt>k</tt> in the given matrix. @param A the matrix to perform he update on @param j the first column to swap @param k the second column to swap """ swapCol(A, j, k, 0, A.rows()); }
java
public static void swapCol(Matrix A, int j, int k) { swapCol(A, j, k, 0, A.rows()); }
[ "public", "static", "void", "swapCol", "(", "Matrix", "A", ",", "int", "j", ",", "int", "k", ")", "{", "swapCol", "(", "A", ",", "j", ",", "k", ",", "0", ",", "A", ".", "rows", "(", ")", ")", ";", "}" ]
Swaps the columns <tt>j</tt> and <tt>k</tt> in the given matrix. @param A the matrix to perform he update on @param j the first column to swap @param k the second column to swap
[ "Swaps", "the", "columns", "<tt", ">", "j<", "/", "tt", ">", "and", "<tt", ">", "k<", "/", "tt", ">", "in", "the", "given", "matrix", "." ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/linear/RowColumnOps.java#L375-L378
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bcc/BccClient.java
BccClient.createImageFromInstance
public CreateImageResponse createImageFromInstance(String imageName, String instanceId) { """ Creating a customized image from the instance.. <p> While creating an image from an instance,the instance must be Running or Stopped, otherwise,it's will get <code>409</code> errorCode. This is an asynchronous int...
java
public CreateImageResponse createImageFromInstance(String imageName, String instanceId) { return createImage(new CreateImageRequest() .withImageName(imageName).withInstanceId(instanceId)); }
[ "public", "CreateImageResponse", "createImageFromInstance", "(", "String", "imageName", ",", "String", "instanceId", ")", "{", "return", "createImage", "(", "new", "CreateImageRequest", "(", ")", ".", "withImageName", "(", "imageName", ")", ".", "withInstanceId", "(...
Creating a customized image from the instance.. <p> While creating an image from an instance,the instance must be Running or Stopped, otherwise,it's will get <code>409</code> errorCode. This is an asynchronous interface, you can get the latest status by invoke {@link #getImage(GetImageRequest)} @param imageName The ...
[ "Creating", "a", "customized", "image", "from", "the", "instance", ".." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bcc/BccClient.java#L1206-L1209
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLLiteralImplPlain_CustomFieldSerializer.java
OWLLiteralImplPlain_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLLiteralImplPlain instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.u...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLLiteralImplPlain instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLLiteralImplPlain", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user.clie...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{" ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLLiteralImplPlain_CustomFieldSerializer.java#L87-L90
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java
DBService.getRows
public Iterable<DRow> getRows(String storeName, Collection<String> rowKeys) { """ Get iterator for rows with a specific set of keys. Results are returned as an Iterator of {@link DRow} objects. If any given row is not found, no entry with its key will be returned. @param storeName Name of store to query. @pa...
java
public Iterable<DRow> getRows(String storeName, Collection<String> rowKeys) { List<DRow> rows = new ArrayList<>(rowKeys.size()); for(String rowKey: rowKeys) { rows.add(new DRow(m_tenant, storeName, rowKey)); } return rows; }
[ "public", "Iterable", "<", "DRow", ">", "getRows", "(", "String", "storeName", ",", "Collection", "<", "String", ">", "rowKeys", ")", "{", "List", "<", "DRow", ">", "rows", "=", "new", "ArrayList", "<>", "(", "rowKeys", ".", "size", "(", ")", ")", ";...
Get iterator for rows with a specific set of keys. Results are returned as an Iterator of {@link DRow} objects. If any given row is not found, no entry with its key will be returned. @param storeName Name of store to query. @param rowKeys Collection of row keys to read. @return Iterator of {@link DRow} obje...
[ "Get", "iterator", "for", "rows", "with", "a", "specific", "set", "of", "keys", ".", "Results", "are", "returned", "as", "an", "Iterator", "of", "{", "@link", "DRow", "}", "objects", ".", "If", "any", "given", "row", "is", "not", "found", "no", "entry"...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java#L324-L330
apache/reef
lang/java/reef-bridge-client/src/main/java/org/apache/reef/bridge/client/LocalSubmissionFromCS.java
LocalSubmissionFromCS.fromSubmissionParameterFiles
static LocalSubmissionFromCS fromSubmissionParameterFiles(final File localJobSubmissionParametersFile, final File localAppSubmissionParametersFile) throws IOException { """ Takes the local job submission configuration file, deserializes it, and crea...
java
static LocalSubmissionFromCS fromSubmissionParameterFiles(final File localJobSubmissionParametersFile, final File localAppSubmissionParametersFile) throws IOException { final AvroLocalAppSubmissionParameters localAppSubmissionParameters; final A...
[ "static", "LocalSubmissionFromCS", "fromSubmissionParameterFiles", "(", "final", "File", "localJobSubmissionParametersFile", ",", "final", "File", "localAppSubmissionParametersFile", ")", "throws", "IOException", "{", "final", "AvroLocalAppSubmissionParameters", "localAppSubmission...
Takes the local job submission configuration file, deserializes it, and creates submission object.
[ "Takes", "the", "local", "job", "submission", "configuration", "file", "deserializes", "it", "and", "creates", "submission", "object", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-bridge-client/src/main/java/org/apache/reef/bridge/client/LocalSubmissionFromCS.java#L168-L192
Jasig/uPortal
uPortal-portlets/src/main/java/org/apereo/portal/portlets/PortletPreferencesJsonDaoImpl.java
PortletPreferencesJsonDaoImpl.getJson
@Override public <E> E getJson(PortletPreferences prefs, String key, Class<E> type) throws IOException { """ Read the specified portlet preference and parse it as a JSON string into the specified type. If the preference is null returns null. @param prefs Preferences to read from @param key Preference key ...
java
@Override public <E> E getJson(PortletPreferences prefs, String key, Class<E> type) throws IOException { final String prefValue = StringUtils.trimToNull(prefs.getValue(key, null)); if (prefValue == null) { return null; } return mapper.readValue(prefValue, type); }
[ "@", "Override", "public", "<", "E", ">", "E", "getJson", "(", "PortletPreferences", "prefs", ",", "String", "key", ",", "Class", "<", "E", ">", "type", ")", "throws", "IOException", "{", "final", "String", "prefValue", "=", "StringUtils", ".", "trimToNull...
Read the specified portlet preference and parse it as a JSON string into the specified type. If the preference is null returns null. @param prefs Preferences to read from @param key Preference key to read from @param type The class type parse the JSON into
[ "Read", "the", "specified", "portlet", "preference", "and", "parse", "it", "as", "a", "JSON", "string", "into", "the", "specified", "type", ".", "If", "the", "preference", "is", "null", "returns", "null", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/PortletPreferencesJsonDaoImpl.java#L64-L71
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java
Provider.removeInvalidServices
private void removeInvalidServices(Map<ServiceKey,Service> map) { """ Remove all invalid services from the Map. Invalid services can only occur if the legacy properties are inconsistent or incomplete. """ for (Iterator t = map.entrySet().iterator(); t.hasNext(); ) { Map.Entry entry = (Map....
java
private void removeInvalidServices(Map<ServiceKey,Service> map) { for (Iterator t = map.entrySet().iterator(); t.hasNext(); ) { Map.Entry entry = (Map.Entry)t.next(); Service s = (Service)entry.getValue(); if (s.isValid() == false) { t.remove(); } ...
[ "private", "void", "removeInvalidServices", "(", "Map", "<", "ServiceKey", ",", "Service", ">", "map", ")", "{", "for", "(", "Iterator", "t", "=", "map", ".", "entrySet", "(", ")", ".", "iterator", "(", ")", ";", "t", ".", "hasNext", "(", ")", ";", ...
Remove all invalid services from the Map. Invalid services can only occur if the legacy properties are inconsistent or incomplete.
[ "Remove", "all", "invalid", "services", "from", "the", "Map", ".", "Invalid", "services", "can", "only", "occur", "if", "the", "legacy", "properties", "are", "inconsistent", "or", "incomplete", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java#L592-L600
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java
VirtualNetworkGatewaysInner.generatevpnclientpackage
public String generatevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { """ Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. @param resourceGroupName The name of the resource group. @param vi...
java
public String generatevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { return generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().last().body(); }
[ "public", "String", "generatevpnclientpackage", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayName", ",", "VpnClientParameters", "parameters", ")", "{", "return", "generatevpnclientpackageWithServiceResponseAsync", "(", "resourceGroupName", ",", "virt...
Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @param parameters Parameters supplied to the generate virtual network gateway VP...
[ "Generates", "VPN", "client", "package", "for", "P2S", "client", "of", "the", "virtual", "network", "gateway", "in", "the", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java#L1465-L1467
msgpack/msgpack-java
msgpack-core/src/main/java/org/msgpack/core/MessageUnpacker.java
MessageUnpacker.unpackArrayHeader
public int unpackArrayHeader() throws IOException { """ Reads header of an array. <p> This method returns number of elements to be read. After this method call, you call unpacker methods for each element. You don't have to call anything at the end of iteration. @return the size of the array to ...
java
public int unpackArrayHeader() throws IOException { byte b = readByte(); if (Code.isFixedArray(b)) { // fixarray return b & 0x0f; } switch (b) { case Code.ARRAY16: { // array 16 int len = readNextLength16(); return l...
[ "public", "int", "unpackArrayHeader", "(", ")", "throws", "IOException", "{", "byte", "b", "=", "readByte", "(", ")", ";", "if", "(", "Code", ".", "isFixedArray", "(", "b", ")", ")", "{", "// fixarray", "return", "b", "&", "0x0f", ";", "}", "switch", ...
Reads header of an array. <p> This method returns number of elements to be read. After this method call, you call unpacker methods for each element. You don't have to call anything at the end of iteration. @return the size of the array to be read @throws MessageTypeException when value is not MessagePack Array type @...
[ "Reads", "header", "of", "an", "array", "." ]
train
https://github.com/msgpack/msgpack-java/blob/16e370e348215a72a14c210b42d448d513aee015/msgpack-core/src/main/java/org/msgpack/core/MessageUnpacker.java#L1272-L1290
facebook/fresco
drawee/src/main/java/com/facebook/drawee/drawable/RoundedBitmapDrawable.java
RoundedBitmapDrawable.fromBitmapDrawable
public static RoundedBitmapDrawable fromBitmapDrawable( Resources res, BitmapDrawable bitmapDrawable) { """ Creates a new RoundedBitmapDrawable from the given BitmapDrawable. @param res resources to use for this drawable @param bitmapDrawable bitmap drawable containing the bitmap to be used for thi...
java
public static RoundedBitmapDrawable fromBitmapDrawable( Resources res, BitmapDrawable bitmapDrawable) { return new RoundedBitmapDrawable(res, bitmapDrawable.getBitmap(), bitmapDrawable.getPaint()); }
[ "public", "static", "RoundedBitmapDrawable", "fromBitmapDrawable", "(", "Resources", "res", ",", "BitmapDrawable", "bitmapDrawable", ")", "{", "return", "new", "RoundedBitmapDrawable", "(", "res", ",", "bitmapDrawable", ".", "getBitmap", "(", ")", ",", "bitmapDrawable...
Creates a new RoundedBitmapDrawable from the given BitmapDrawable. @param res resources to use for this drawable @param bitmapDrawable bitmap drawable containing the bitmap to be used for this drawable @return the RoundedBitmapDrawable that is created
[ "Creates", "a", "new", "RoundedBitmapDrawable", "from", "the", "given", "BitmapDrawable", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/drawee/src/main/java/com/facebook/drawee/drawable/RoundedBitmapDrawable.java#L93-L97
ThreeTen/threeten-extra
src/main/java/org/threeten/extra/scale/TaiInstant.java
TaiInstant.withNano
public TaiInstant withNano(int nanoOfSecond) { """ Returns a copy of this {@code TaiInstant} with the nano-of-second value changed. <p> The nanosecond-of-second value measures the total number of nanoseconds from the second returned by {@code getTaiSeconds()}. <p> This instance is immutable and unaffected by ...
java
public TaiInstant withNano(int nanoOfSecond) { if (nanoOfSecond < 0 || nanoOfSecond >= NANOS_PER_SECOND) { throw new IllegalArgumentException("NanoOfSecond must be from 0 to 999,999,999"); } return ofTaiSeconds(seconds, nanoOfSecond); }
[ "public", "TaiInstant", "withNano", "(", "int", "nanoOfSecond", ")", "{", "if", "(", "nanoOfSecond", "<", "0", "||", "nanoOfSecond", ">=", "NANOS_PER_SECOND", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"NanoOfSecond must be from 0 to 999,999,999\"", ...
Returns a copy of this {@code TaiInstant} with the nano-of-second value changed. <p> The nanosecond-of-second value measures the total number of nanoseconds from the second returned by {@code getTaiSeconds()}. <p> This instance is immutable and unaffected by this method call. @param nanoOfSecond the nano-of-second, f...
[ "Returns", "a", "copy", "of", "this", "{", "@code", "TaiInstant", "}", "with", "the", "nano", "-", "of", "-", "second", "value", "changed", ".", "<p", ">", "The", "nanosecond", "-", "of", "-", "second", "value", "measures", "the", "total", "number", "o...
train
https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/scale/TaiInstant.java#L286-L291
rhuss/jolokia
agent/core/src/main/java/org/jolokia/handler/JsonRequestHandler.java
JsonRequestHandler.doHandleRequest
public Object doHandleRequest(MBeanServerExecutor serverManager, R request) throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException, IOException, NotChangedException { """ Default implementation fo handling a request for multiple servers at once. A subclass...
java
public Object doHandleRequest(MBeanServerExecutor serverManager, R request) throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException, IOException, NotChangedException { return null; }
[ "public", "Object", "doHandleRequest", "(", "MBeanServerExecutor", "serverManager", ",", "R", "request", ")", "throws", "InstanceNotFoundException", ",", "AttributeNotFoundException", ",", "ReflectionException", ",", "MBeanException", ",", "IOException", ",", "NotChangedExc...
Default implementation fo handling a request for multiple servers at once. A subclass, which returns, <code>true</code> on {@link #handleAllServersAtOnce(JmxRequest)}, needs to override this method. @param serverManager all MBean servers found in this JVM @param request the original request @return the result of the ...
[ "Default", "implementation", "fo", "handling", "a", "request", "for", "multiple", "servers", "at", "once", ".", "A", "subclass", "which", "returns", "<code", ">", "true<", "/", "code", ">", "on", "{", "@link", "#handleAllServersAtOnce", "(", "JmxRequest", ")",...
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/handler/JsonRequestHandler.java#L178-L181
cloudant/sync-android
cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/sqlite/SQLDatabaseFactory.java
SQLDatabaseFactory.internalOpenSQLDatabase
private static SQLDatabase internalOpenSQLDatabase(File dbFile, KeyProvider provider) throws SQLException { """ Internal method for creating a SQLDatabase that allows a null filename to create an in-memory database which can be useful for performing checks, but creating in-memory databases is not permitted from ...
java
private static SQLDatabase internalOpenSQLDatabase(File dbFile, KeyProvider provider) throws SQLException { boolean runningOnAndroid = Misc.isRunningOnAndroid(); boolean useSqlCipher = (provider.getEncryptionKey() != null); try { if (runningOnAndroid) { if (useSql...
[ "private", "static", "SQLDatabase", "internalOpenSQLDatabase", "(", "File", "dbFile", ",", "KeyProvider", "provider", ")", "throws", "SQLException", "{", "boolean", "runningOnAndroid", "=", "Misc", ".", "isRunningOnAndroid", "(", ")", ";", "boolean", "useSqlCipher", ...
Internal method for creating a SQLDatabase that allows a null filename to create an in-memory database which can be useful for performing checks, but creating in-memory databases is not permitted from outside of this class hence the private visibility. @param dbFile full file path of the db file or {@code null} for an...
[ "Internal", "method", "for", "creating", "a", "SQLDatabase", "that", "allows", "a", "null", "filename", "to", "create", "an", "in", "-", "memory", "database", "which", "can", "be", "useful", "for", "performing", "checks", "but", "creating", "in", "-", "memor...
train
https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/sqlite/SQLDatabaseFactory.java#L113-L149
FedericoPecora/meta-csp-framework
src/main/java/org/metacsp/utility/UI/CurvedArrow.java
CurvedArrow.intersects
private boolean intersects(Point point, int fudge, QuadCurve2D.Float c) { """ Checks if something is on the line. If it appears to be, then it subdivides the curve into halves and tries again recursively until the flatness of the curve is less than the fudge. Frankly, I am a fucking genius. I am one of two peop...
java
private boolean intersects(Point point, int fudge, QuadCurve2D.Float c) { if (!c.intersects(point.x - fudge, point.y - fudge, fudge << 1, fudge << 1)) return false; if (c.getFlatness() < fudge) return true; QuadCurve2D.Float f1 = new QuadCurve2D.Float(), f2 = new QuadCurve2D.Float(); c.subdivide(f1, f...
[ "private", "boolean", "intersects", "(", "Point", "point", ",", "int", "fudge", ",", "QuadCurve2D", ".", "Float", "c", ")", "{", "if", "(", "!", "c", ".", "intersects", "(", "point", ".", "x", "-", "fudge", ",", "point", ".", "y", "-", "fudge", ","...
Checks if something is on the line. If it appears to be, then it subdivides the curve into halves and tries again recursively until the flatness of the curve is less than the fudge. Frankly, I am a fucking genius. I am one of two people in this department that could have possibly thought of this. @param point the poin...
[ "Checks", "if", "something", "is", "on", "the", "line", ".", "If", "it", "appears", "to", "be", "then", "it", "subdivides", "the", "curve", "into", "halves", "and", "tries", "again", "recursively", "until", "the", "flatness", "of", "the", "curve", "is", ...
train
https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/utility/UI/CurvedArrow.java#L363-L372
encoway/edu
edu/src/main/java/com/encoway/edu/Components.java
Components.getFullyQualifiedComponentId
static String getFullyQualifiedComponentId(FacesContext context, UIComponent component) { """ Returns the fully qualified (absolute) ID of {@code component}. @param context a {@link FacesContext} @param component {@link UIComponent} to return the ID for @return a fully qualified ID """ return getF...
java
static String getFullyQualifiedComponentId(FacesContext context, UIComponent component) { return getFullyQualifiedComponentId(context, component, true); }
[ "static", "String", "getFullyQualifiedComponentId", "(", "FacesContext", "context", ",", "UIComponent", "component", ")", "{", "return", "getFullyQualifiedComponentId", "(", "context", ",", "component", ",", "true", ")", ";", "}" ]
Returns the fully qualified (absolute) ID of {@code component}. @param context a {@link FacesContext} @param component {@link UIComponent} to return the ID for @return a fully qualified ID
[ "Returns", "the", "fully", "qualified", "(", "absolute", ")", "ID", "of", "{", "@code", "component", "}", "." ]
train
https://github.com/encoway/edu/blob/52ae92b2207f7d5668e212904359fbeb360f3f05/edu/src/main/java/com/encoway/edu/Components.java#L38-L40
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/InterfaceEndpointsInner.java
InterfaceEndpointsInner.getByResourceGroupAsync
public Observable<InterfaceEndpointInner> getByResourceGroupAsync(String resourceGroupName, String interfaceEndpointName, String expand) { """ Gets the specified interface endpoint by resource group. @param resourceGroupName The name of the resource group. @param interfaceEndpointName The name of the interface...
java
public Observable<InterfaceEndpointInner> getByResourceGroupAsync(String resourceGroupName, String interfaceEndpointName, String expand) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, interfaceEndpointName, expand).map(new Func1<ServiceResponse<InterfaceEndpointInner>, InterfaceEndpointI...
[ "public", "Observable", "<", "InterfaceEndpointInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "interfaceEndpointName", ",", "String", "expand", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupNam...
Gets the specified interface endpoint by resource group. @param resourceGroupName The name of the resource group. @param interfaceEndpointName The name of the interface endpoint. @param expand Expands referenced resources. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable...
[ "Gets", "the", "specified", "interface", "endpoint", "by", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/InterfaceEndpointsInner.java#L372-L379
googleads/googleads-java-lib
modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/Streams.java
Streams.wrapString
public static InputStream wrapString(String str, Charset charset) { """ Wraps the provided string into an InputStream. @param str String to wrap. @param charset the chareset encoding of the string @return InputStream containing the string argument. """ return new ByteArrayInputStream(str.getBytes(c...
java
public static InputStream wrapString(String str, Charset charset) { return new ByteArrayInputStream(str.getBytes(charset)); }
[ "public", "static", "InputStream", "wrapString", "(", "String", "str", ",", "Charset", "charset", ")", "{", "return", "new", "ByteArrayInputStream", "(", "str", ".", "getBytes", "(", "charset", ")", ")", ";", "}" ]
Wraps the provided string into an InputStream. @param str String to wrap. @param charset the chareset encoding of the string @return InputStream containing the string argument.
[ "Wraps", "the", "provided", "string", "into", "an", "InputStream", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/Streams.java#L57-L59
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.dateTimeTemplate
public static <T extends Comparable<?>> DateTimeTemplate<T> dateTimeTemplate(Class<? extends T> cl, String template, Object... args) { """ Create a new Template expression @param cl type of expression @param template template @pa...
java
public static <T extends Comparable<?>> DateTimeTemplate<T> dateTimeTemplate(Class<? extends T> cl, String template, Object... args) { return dateTimeTemplate(cl, createTemplate(template), ImmutableList.copyOf(args)); }
[ "public", "static", "<", "T", "extends", "Comparable", "<", "?", ">", ">", "DateTimeTemplate", "<", "T", ">", "dateTimeTemplate", "(", "Class", "<", "?", "extends", "T", ">", "cl", ",", "String", "template", ",", "Object", "...", "args", ")", "{", "ret...
Create a new Template expression @param cl type of expression @param template template @param args template parameters @return template expression
[ "Create", "a", "new", "Template", "expression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L562-L565
phax/ph-oton
ph-oton-security/src/main/java/com/helger/photon/security/object/StubObject.java
StubObject.createForCurrentUserAndID
@Nonnull public static StubObject createForCurrentUserAndID (@Nonnull @Nonempty final String sID) { """ Create a {@link StubObject} using the current user ID and the provided object ID @param sID Object ID @return Never <code>null</code>. """ return new StubObject (sID, LoggedInUserManager.getInsta...
java
@Nonnull public static StubObject createForCurrentUserAndID (@Nonnull @Nonempty final String sID) { return new StubObject (sID, LoggedInUserManager.getInstance ().getCurrentUserID (), null); }
[ "@", "Nonnull", "public", "static", "StubObject", "createForCurrentUserAndID", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sID", ")", "{", "return", "new", "StubObject", "(", "sID", ",", "LoggedInUserManager", ".", "getInstance", "(", ")", ".", "...
Create a {@link StubObject} using the current user ID and the provided object ID @param sID Object ID @return Never <code>null</code>.
[ "Create", "a", "{", "@link", "StubObject", "}", "using", "the", "current", "user", "ID", "and", "the", "provided", "object", "ID" ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-security/src/main/java/com/helger/photon/security/object/StubObject.java#L143-L147
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateLocation.java
KvStateLocation.registerKvState
public void registerKvState(KeyGroupRange keyGroupRange, KvStateID kvStateId, InetSocketAddress kvStateAddress) { """ Registers a KvState instance for the given key group index. @param keyGroupRange Key group range to register @param kvStateId ID of the KvState instance at the key group index. @param kv...
java
public void registerKvState(KeyGroupRange keyGroupRange, KvStateID kvStateId, InetSocketAddress kvStateAddress) { if (keyGroupRange.getStartKeyGroup() < 0 || keyGroupRange.getEndKeyGroup() >= numKeyGroups) { throw new IndexOutOfBoundsException("Key group index"); } for (int kgIdx = keyGroupRange.getStartKeyG...
[ "public", "void", "registerKvState", "(", "KeyGroupRange", "keyGroupRange", ",", "KvStateID", "kvStateId", ",", "InetSocketAddress", "kvStateAddress", ")", "{", "if", "(", "keyGroupRange", ".", "getStartKeyGroup", "(", ")", "<", "0", "||", "keyGroupRange", ".", "g...
Registers a KvState instance for the given key group index. @param keyGroupRange Key group range to register @param kvStateId ID of the KvState instance at the key group index. @param kvStateAddress Server address of the KvState instance at the key group index. @throws IndexOutOfBoundsException If key group rang...
[ "Registers", "a", "KvState", "instance", "for", "the", "given", "key", "group", "index", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateLocation.java#L171-L186
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/util/Maps2.java
Maps2.putIntoListMap
public static <K, V> void putIntoListMap(K key, V value, Map<? super K, List<V>> map) { """ Puts a value into a map that supports lists as values. The list is created on-demand. """ List<V> list = map.get(key); if (list == null) { list = Lists.newArrayListWithCapacity(2); map.put(key, list); } l...
java
public static <K, V> void putIntoListMap(K key, V value, Map<? super K, List<V>> map) { List<V> list = map.get(key); if (list == null) { list = Lists.newArrayListWithCapacity(2); map.put(key, list); } list.add(value); }
[ "public", "static", "<", "K", ",", "V", ">", "void", "putIntoListMap", "(", "K", "key", ",", "V", "value", ",", "Map", "<", "?", "super", "K", ",", "List", "<", "V", ">", ">", "map", ")", "{", "List", "<", "V", ">", "list", "=", "map", ".", ...
Puts a value into a map that supports lists as values. The list is created on-demand.
[ "Puts", "a", "value", "into", "a", "map", "that", "supports", "lists", "as", "values", ".", "The", "list", "is", "created", "on", "-", "demand", "." ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/util/Maps2.java#L58-L65
eclipse/xtext-core
org.eclipse.xtext.util/src/org/eclipse/xtext/util/Exceptions.java
Exceptions.addSuppressed
public static void addSuppressed(Throwable owner, Throwable add) { """ Invoke {@code Throwable#addSuppressed(Throwable)} reflectively if it is available. It is not available on JRE &lt; 1.7 @since 2.8 """ try { Method method = owner.getClass().getMethod("addSuppressed", Throwable.class); method.i...
java
public static void addSuppressed(Throwable owner, Throwable add) { try { Method method = owner.getClass().getMethod("addSuppressed", Throwable.class); method.invoke(owner, add); } catch (NoSuchMethodException e) { // ignore, will happen for JRE < 1.7 } catch (SecurityException e) { throwUncheckedExcep...
[ "public", "static", "void", "addSuppressed", "(", "Throwable", "owner", ",", "Throwable", "add", ")", "{", "try", "{", "Method", "method", "=", "owner", ".", "getClass", "(", ")", ".", "getMethod", "(", "\"addSuppressed\"", ",", "Throwable", ".", "class", ...
Invoke {@code Throwable#addSuppressed(Throwable)} reflectively if it is available. It is not available on JRE &lt; 1.7 @since 2.8
[ "Invoke", "{", "@code", "Throwable#addSuppressed", "(", "Throwable", ")", "}", "reflectively", "if", "it", "is", "available", "." ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.util/src/org/eclipse/xtext/util/Exceptions.java#L37-L52
hawkular/hawkular-agent
hawkular-agent-core/src/main/java/org/hawkular/agent/monitor/protocol/platform/OshiPlatformCache.java
OshiPlatformCache.getPowerSourceMetric
public Double getPowerSourceMetric(String powerSourceName, ID metricToCollect) { """ Returns the given metric's value, or null if there is no power source with the given name. @param powerSourceName name of power source @param metricToCollect the metric to collect @return the value of the metric, or null if t...
java
public Double getPowerSourceMetric(String powerSourceName, ID metricToCollect) { Map<String, PowerSource> cache = getPowerSources(); PowerSource powerSource = cache.get(powerSourceName); if (powerSource == null) { return null; } if (PlatformMetricType.POWER_SOURCE_R...
[ "public", "Double", "getPowerSourceMetric", "(", "String", "powerSourceName", ",", "ID", "metricToCollect", ")", "{", "Map", "<", "String", ",", "PowerSource", ">", "cache", "=", "getPowerSources", "(", ")", ";", "PowerSource", "powerSource", "=", "cache", ".", ...
Returns the given metric's value, or null if there is no power source with the given name. @param powerSourceName name of power source @param metricToCollect the metric to collect @return the value of the metric, or null if there is no power source with the given name
[ "Returns", "the", "given", "metric", "s", "value", "or", "null", "if", "there", "is", "no", "power", "source", "with", "the", "given", "name", "." ]
train
https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-agent-core/src/main/java/org/hawkular/agent/monitor/protocol/platform/OshiPlatformCache.java#L254-L269
apereo/cas
support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/flow/DelegatedClientAuthenticationAction.java
DelegatedClientAuthenticationAction.restoreAuthenticationRequestInContext
protected Service restoreAuthenticationRequestInContext(final RequestContext requestContext, final J2EContext webContext, final String clientName) { """ Restore authentication request in context ...
java
protected Service restoreAuthenticationRequestInContext(final RequestContext requestContext, final J2EContext webContext, final String clientName) { val logoutEndpoint = isLogoutRequest(webCon...
[ "protected", "Service", "restoreAuthenticationRequestInContext", "(", "final", "RequestContext", "requestContext", ",", "final", "J2EContext", "webContext", ",", "final", "String", "clientName", ")", "{", "val", "logoutEndpoint", "=", "isLogoutRequest", "(", "webContext",...
Restore authentication request in context service (return null for a logout call). @param requestContext the request context @param webContext the web context @param clientName the client name @return the service
[ "Restore", "authentication", "request", "in", "context", "service", "(", "return", "null", "for", "a", "logout", "call", ")", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/flow/DelegatedClientAuthenticationAction.java#L456-L471
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/fieldaccessor/FieldAccessor.java
FieldAccessor.setValue
public void setValue(final Object targetObj, final Object value) { """ オブジェクトのフィールドに値を設定する。 <p>setterが存在する場合は、setterメソッド経由で値を設定します。</p> @param targetObj オブジェクト(インスタンス) @param value フィールドの値。 @throws IllegalArgumentException {@literal targetObj == null.} @throws FieldAccessException {@literal 値の設定に失敗した場合。} ...
java
public void setValue(final Object targetObj, final Object value) { ArgUtils.notNull(targetObj, "targetObj"); if(targetSetter.isPresent()) { try { targetSetter.get().invoke(targetObj, value); } catch (IllegalAccessException | IllegalArgumentException...
[ "public", "void", "setValue", "(", "final", "Object", "targetObj", ",", "final", "Object", "value", ")", "{", "ArgUtils", ".", "notNull", "(", "targetObj", ",", "\"targetObj\"", ")", ";", "if", "(", "targetSetter", ".", "isPresent", "(", ")", ")", "{", "...
オブジェクトのフィールドに値を設定する。 <p>setterが存在する場合は、setterメソッド経由で値を設定します。</p> @param targetObj オブジェクト(インスタンス) @param value フィールドの値。 @throws IllegalArgumentException {@literal targetObj == null.} @throws FieldAccessException {@literal 値の設定に失敗した場合。}
[ "オブジェクトのフィールドに値を設定する。", "<p", ">", "setterが存在する場合は、setterメソッド経由で値を設定します。<", "/", "p", ">", "@param", "targetObj", "オブジェクト(インスタンス)", "@param", "value", "フィールドの値。", "@throws", "IllegalArgumentException", "{", "@literal", "targetObj", "==", "null", ".", "}", "@throws", "Fi...
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/fieldaccessor/FieldAccessor.java#L197-L218
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/ExceptionUtils.java
ExceptionUtils.createByKey
static InstallException createByKey(int rc, String msgKey, Object... args) { """ Create an install exception from a return code and message key @param rc @param msgKey @param args @return """ return create(Messages.INSTALL_KERNEL_MESSAGES.getLogMessage(msgKey, args), rc); }
java
static InstallException createByKey(int rc, String msgKey, Object... args) { return create(Messages.INSTALL_KERNEL_MESSAGES.getLogMessage(msgKey, args), rc); }
[ "static", "InstallException", "createByKey", "(", "int", "rc", ",", "String", "msgKey", ",", "Object", "...", "args", ")", "{", "return", "create", "(", "Messages", ".", "INSTALL_KERNEL_MESSAGES", ".", "getLogMessage", "(", "msgKey", ",", "args", ")", ",", "...
Create an install exception from a return code and message key @param rc @param msgKey @param args @return
[ "Create", "an", "install", "exception", "from", "a", "return", "code", "and", "message", "key" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/ExceptionUtils.java#L110-L112
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/GeneratorExtensions.java
GeneratorExtensions.newStaticArrayVariable
public static String newStaticArrayVariable(final String arrayName, final List<String> data) { """ Creates a String for a constant Stringarray to be inserted in java-file. For instance: List data = new ArrayList(); data.add("foo"); data.add("bar"); newcreateStaticArrayVariable("test", data); Resultstring: "publi...
java
public static String newStaticArrayVariable(final String arrayName, final List<String> data) { final StringBuffer sb = new StringBuffer(); sb.append("public static final String []"); sb.append(arrayName.trim().toUpperCase()); sb.append(" = {"); final int size = data.size(); for (int i = 0; i < size; i++) ...
[ "public", "static", "String", "newStaticArrayVariable", "(", "final", "String", "arrayName", ",", "final", "List", "<", "String", ">", "data", ")", "{", "final", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "sb", ".", "append", "(", "\"...
Creates a String for a constant Stringarray to be inserted in java-file. For instance: List data = new ArrayList(); data.add("foo"); data.add("bar"); newcreateStaticArrayVariable("test", data); Resultstring: "public static final String [] TEST = { "foo", "bar"};" @param arrayName The name from the array. @param data T...
[ "Creates", "a", "String", "for", "a", "constant", "Stringarray", "to", "be", "inserted", "in", "java", "-", "file", ".", "For", "instance", ":", "List", "data", "=", "new", "ArrayList", "()", ";", "data", ".", "add", "(", "foo", ")", ";", "data", "."...
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/GeneratorExtensions.java#L113-L134
alkacon/opencms-core
src/org/opencms/ui/components/CmsResourceTable.java
CmsResourceTable.fillTable
public void fillTable(CmsObject cms, List<CmsResource> resources, boolean clearFilter) { """ Fills the resource table.<p> @param cms the current CMS context @param resources the resources which should be displayed in the table @param clearFilter <code>true</code> to clear the search filter """ fi...
java
public void fillTable(CmsObject cms, List<CmsResource> resources, boolean clearFilter) { fillTable(cms, resources, clearFilter, true); }
[ "public", "void", "fillTable", "(", "CmsObject", "cms", ",", "List", "<", "CmsResource", ">", "resources", ",", "boolean", "clearFilter", ")", "{", "fillTable", "(", "cms", ",", "resources", ",", "clearFilter", ",", "true", ")", ";", "}" ]
Fills the resource table.<p> @param cms the current CMS context @param resources the resources which should be displayed in the table @param clearFilter <code>true</code> to clear the search filter
[ "Fills", "the", "resource", "table", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/CmsResourceTable.java#L583-L586
MTDdk/jawn
jawn-core-new/src/main/java/net/javapla/jawn/core/renderers/RendererEngineOrchestratorImpl.java
RendererEngineOrchestratorImpl.mapEngine
private void mapEngine(Map<MediaType, Provider<? extends RendererEngine>> map, Provider<? extends RendererEngine> engine) { """ Map the engine to all the content types it supports. If any kind of overlap exists, a race condition occurs @param map @param engine """ for (MediaType type : engine.get()....
java
private void mapEngine(Map<MediaType, Provider<? extends RendererEngine>> map, Provider<? extends RendererEngine> engine) { for (MediaType type : engine.get().getContentType()) { map.put(type, engine); } }
[ "private", "void", "mapEngine", "(", "Map", "<", "MediaType", ",", "Provider", "<", "?", "extends", "RendererEngine", ">", ">", "map", ",", "Provider", "<", "?", "extends", "RendererEngine", ">", "engine", ")", "{", "for", "(", "MediaType", "type", ":", ...
Map the engine to all the content types it supports. If any kind of overlap exists, a race condition occurs @param map @param engine
[ "Map", "the", "engine", "to", "all", "the", "content", "types", "it", "supports", ".", "If", "any", "kind", "of", "overlap", "exists", "a", "race", "condition", "occurs" ]
train
https://github.com/MTDdk/jawn/blob/4ec2d09b97d413efdead7487e6075e5bfd13b925/jawn-core-new/src/main/java/net/javapla/jawn/core/renderers/RendererEngineOrchestratorImpl.java#L105-L109
UrielCh/ovh-java-sdk
ovh-java-sdk-horizonView/src/main/java/net/minidev/ovh/api/ApiOvhHorizonView.java
ApiOvhHorizonView.serviceName_accessPoint_accessPointId_changeSessionTimeout_POST
public OvhTask serviceName_accessPoint_accessPointId_changeSessionTimeout_POST(String serviceName, Long accessPointId, Long expiration, OvhAccessPointTypeEnum onSingleAP) throws IOException { """ Manage your session Timeout on Unified Access Gateway REST: POST /horizonView/{serviceName}/accessPoint/{accessPoint...
java
public OvhTask serviceName_accessPoint_accessPointId_changeSessionTimeout_POST(String serviceName, Long accessPointId, Long expiration, OvhAccessPointTypeEnum onSingleAP) throws IOException { String qPath = "/horizonView/{serviceName}/accessPoint/{accessPointId}/changeSessionTimeout"; StringBuilder sb = path(qPath,...
[ "public", "OvhTask", "serviceName_accessPoint_accessPointId_changeSessionTimeout_POST", "(", "String", "serviceName", ",", "Long", "accessPointId", ",", "Long", "expiration", ",", "OvhAccessPointTypeEnum", "onSingleAP", ")", "throws", "IOException", "{", "String", "qPath", ...
Manage your session Timeout on Unified Access Gateway REST: POST /horizonView/{serviceName}/accessPoint/{accessPointId}/changeSessionTimeout @param onSingleAP [required] Update timeout session on a single Unified Access Gateway (only for hybrid Pool) @param expiration [required] Timeout (in hour) @param serviceName [r...
[ "Manage", "your", "session", "Timeout", "on", "Unified", "Access", "Gateway" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-horizonView/src/main/java/net/minidev/ovh/api/ApiOvhHorizonView.java#L57-L65
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/ClassDocImpl.java
ClassDocImpl.definesSerializableFields
public boolean definesSerializableFields() { """ Return true if Serializable fields are explicitly defined with the special class member <code>serialPersistentFields</code>. @see #serializableFields() @see SerialFieldTagImpl """ if (!isSerializable() || isExternalizable()) { return fal...
java
public boolean definesSerializableFields() { if (!isSerializable() || isExternalizable()) { return false; } else { if (serializedForm == null) { serializedForm = new SerializedForm(env, tsym, this); } //### Clone this? return se...
[ "public", "boolean", "definesSerializableFields", "(", ")", "{", "if", "(", "!", "isSerializable", "(", ")", "||", "isExternalizable", "(", ")", ")", "{", "return", "false", ";", "}", "else", "{", "if", "(", "serializedForm", "==", "null", ")", "{", "ser...
Return true if Serializable fields are explicitly defined with the special class member <code>serialPersistentFields</code>. @see #serializableFields() @see SerialFieldTagImpl
[ "Return", "true", "if", "Serializable", "fields", "are", "explicitly", "defined", "with", "the", "special", "class", "member", "<code", ">", "serialPersistentFields<", "/", "code", ">", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/ClassDocImpl.java#L1298-L1308
Impetus/Kundera
src/kundera-mongo/src/main/java/com/impetus/client/mongodb/query/MongoDBQuery.java
MongoDBQuery.getColumnName
private String getColumnName(EntityMetadata metadata, EntityType entityType, String property) { """ Gets the column name. @param metadata the metadata @param entityType the entity type @param property the property @return the column name """ String columnName = null; if (property.inde...
java
private String getColumnName(EntityMetadata metadata, EntityType entityType, String property) { String columnName = null; if (property.indexOf(".") > 0) { property = property.substring((kunderaQuery.getEntityAlias() + ".").length()); } try { c...
[ "private", "String", "getColumnName", "(", "EntityMetadata", "metadata", ",", "EntityType", "entityType", ",", "String", "property", ")", "{", "String", "columnName", "=", "null", ";", "if", "(", "property", ".", "indexOf", "(", "\".\"", ")", ">", "0", ")", ...
Gets the column name. @param metadata the metadata @param entityType the entity type @param property the property @return the column name
[ "Gets", "the", "column", "name", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-mongo/src/main/java/com/impetus/client/mongodb/query/MongoDBQuery.java#L1233-L1266
Virtlink/commons-configuration2-jackson
src/main/java/com/virtlink/commons/configuration2/jackson/JacksonConfiguration.java
JacksonConfiguration.toNode
private ImmutableNode toNode(final Builder builder, final Object obj) { """ Creates a node for the specified object. @param builder The node builder. @param obj The object. @return The created node. """ assert !(obj instanceof List); if (obj instanceof Map) { return mapToNode(...
java
private ImmutableNode toNode(final Builder builder, final Object obj) { assert !(obj instanceof List); if (obj instanceof Map) { return mapToNode(builder, (Map<String, Object>) obj); } else { return valueToNode(builder, obj); } }
[ "private", "ImmutableNode", "toNode", "(", "final", "Builder", "builder", ",", "final", "Object", "obj", ")", "{", "assert", "!", "(", "obj", "instanceof", "List", ")", ";", "if", "(", "obj", "instanceof", "Map", ")", "{", "return", "mapToNode", "(", "bu...
Creates a node for the specified object. @param builder The node builder. @param obj The object. @return The created node.
[ "Creates", "a", "node", "for", "the", "specified", "object", "." ]
train
https://github.com/Virtlink/commons-configuration2-jackson/blob/40474ab3c641fbbb4ccd9c97d4f7075c1644ef69/src/main/java/com/virtlink/commons/configuration2/jackson/JacksonConfiguration.java#L144-L152
citrusframework/citrus
modules/citrus-http/src/main/java/com/consol/citrus/http/interceptor/LoggingClientInterceptor.java
LoggingClientInterceptor.appendHeaders
private void appendHeaders(HttpHeaders headers, StringBuilder builder) { """ Append Http headers to string builder. @param headers @param builder """ for (Entry<String, List<String>> headerEntry : headers.entrySet()) { builder.append(headerEntry.getKey()); builder.append(":");...
java
private void appendHeaders(HttpHeaders headers, StringBuilder builder) { for (Entry<String, List<String>> headerEntry : headers.entrySet()) { builder.append(headerEntry.getKey()); builder.append(":"); builder.append(StringUtils.arrayToCommaDelimitedString(headerEntry.getValue...
[ "private", "void", "appendHeaders", "(", "HttpHeaders", "headers", ",", "StringBuilder", "builder", ")", "{", "for", "(", "Entry", "<", "String", ",", "List", "<", "String", ">", ">", "headerEntry", ":", "headers", ".", "entrySet", "(", ")", ")", "{", "b...
Append Http headers to string builder. @param headers @param builder
[ "Append", "Http", "headers", "to", "string", "builder", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-http/src/main/java/com/consol/citrus/http/interceptor/LoggingClientInterceptor.java#L147-L154
derari/cthul
objects/src/main/java/org/cthul/objects/reflection/Signatures.java
Signatures.fixVarArgs
public static Object[] fixVarArgs(Class<?>[] paramsWithVarArgs, Object[] arguments) { """ Fixes an arguments array to fit parameter types, where the last parameter is an varargs array. @param paramsWithVarArgs @param arguments @return fixed arguments array """ int n = paramsWithVarArgs.length; ...
java
public static Object[] fixVarArgs(Class<?>[] paramsWithVarArgs, Object[] arguments) { int n = paramsWithVarArgs.length; return fixVarArgs(n, paramsWithVarArgs[n-1], arguments); }
[ "public", "static", "Object", "[", "]", "fixVarArgs", "(", "Class", "<", "?", ">", "[", "]", "paramsWithVarArgs", ",", "Object", "[", "]", "arguments", ")", "{", "int", "n", "=", "paramsWithVarArgs", ".", "length", ";", "return", "fixVarArgs", "(", "n", ...
Fixes an arguments array to fit parameter types, where the last parameter is an varargs array. @param paramsWithVarArgs @param arguments @return fixed arguments array
[ "Fixes", "an", "arguments", "array", "to", "fit", "parameter", "types", "where", "the", "last", "parameter", "is", "an", "varargs", "array", "." ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/objects/src/main/java/org/cthul/objects/reflection/Signatures.java#L542-L545
eclipse/hawkbit
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/FilterByStatusLayout.java
FilterByStatusLayout.processCommonFilterStatus
private void processCommonFilterStatus(final TargetUpdateStatus status, final boolean buttonPressed) { """ Process - COMMON PROCESS. @param status as enum @param buttonReset as t|F """ if (buttonPressed) { buttonClicked.addStyleName(BTN_CLICKED); managementUIState.getTarge...
java
private void processCommonFilterStatus(final TargetUpdateStatus status, final boolean buttonPressed) { if (buttonPressed) { buttonClicked.addStyleName(BTN_CLICKED); managementUIState.getTargetTableFilters().getClickedStatusTargetTags().add(status); eventBus.publish(this, Targ...
[ "private", "void", "processCommonFilterStatus", "(", "final", "TargetUpdateStatus", "status", ",", "final", "boolean", "buttonPressed", ")", "{", "if", "(", "buttonPressed", ")", "{", "buttonClicked", ".", "addStyleName", "(", "BTN_CLICKED", ")", ";", "managementUIS...
Process - COMMON PROCESS. @param status as enum @param buttonReset as t|F
[ "Process", "-", "COMMON", "PROCESS", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettag/filter/FilterByStatusLayout.java#L286-L298
js-lib-com/template.xhtml
src/main/java/js/template/xhtml/Serializer.java
Serializer.writeAttribute
void writeAttribute(String name, String value) throws IOException { """ Format and send attribute name and value to underlying writer. Used by attribute operators to actually write formatted attribute to underlying writer. When attribute operators are executed templates engine was already sent to writer the elem...
java
void writeAttribute(String name, String value) throws IOException { writer.write(' '); writer.write(name); writer.write('='); writer.write('"'); writer.write(Strings.escapeXML(value)); writer.write('"'); }
[ "void", "writeAttribute", "(", "String", "name", ",", "String", "value", ")", "throws", "IOException", "{", "writer", ".", "write", "(", "'", "'", ")", ";", "writer", ".", "write", "(", "name", ")", ";", "writer", ".", "write", "(", "'", "'", ")", ...
Format and send attribute name and value to underlying writer. Used by attribute operators to actually write formatted attribute to underlying writer. When attribute operators are executed templates engine was already sent to writer the element opening tag mark and tag name, e.g. <em>&lt;div</em>. Formatted attribute i...
[ "Format", "and", "send", "attribute", "name", "and", "value", "to", "underlying", "writer", ".", "Used", "by", "attribute", "operators", "to", "actually", "write", "formatted", "attribute", "to", "underlying", "writer", ".", "When", "attribute", "operators", "ar...
train
https://github.com/js-lib-com/template.xhtml/blob/d50cec08aca9ab9680baebe2a26a341c096564fb/src/main/java/js/template/xhtml/Serializer.java#L154-L161