repository_name
stringlengths
7
54
func_path_in_repository
stringlengths
18
218
func_name
stringlengths
5
140
whole_func_string
stringlengths
79
3.99k
language
stringclasses
1 value
func_code_string
stringlengths
79
3.99k
func_code_tokens
listlengths
20
624
func_documentation_string
stringlengths
61
1.96k
func_documentation_tokens
listlengths
1
478
split_name
stringclasses
1 value
func_code_url
stringlengths
107
339
JOML-CI/JOML
src/org/joml/Intersectiond.java
Intersectiond.intersectRayLineSegment
public static double intersectRayLineSegment(Vector2dc origin, Vector2dc dir, Vector2dc a, Vector2dc b) { return intersectRayLineSegment(origin.x(), origin.y(), dir.x(), dir.y(), a.x(), a.y(), b.x(), b.y()); }
java
public static double intersectRayLineSegment(Vector2dc origin, Vector2dc dir, Vector2dc a, Vector2dc b) { return intersectRayLineSegment(origin.x(), origin.y(), dir.x(), dir.y(), a.x(), a.y(), b.x(), b.y()); }
[ "public", "static", "double", "intersectRayLineSegment", "(", "Vector2dc", "origin", ",", "Vector2dc", "dir", ",", "Vector2dc", "a", ",", "Vector2dc", "b", ")", "{", "return", "intersectRayLineSegment", "(", "origin", ".", "x", "(", ")", ",", "origin", ".", ...
Determine whether the ray with given <code>origin</code> and direction <code>dir</code> intersects the undirected line segment given by the two end points <code>a</code> and <code>b</code>, and return the value of the parameter <i>t</i> in the ray equation <i>p(t) = origin + t * dir</i> of the intersection point, if an...
[ "Determine", "whether", "the", "ray", "with", "given", "<code", ">", "origin<", "/", "code", ">", "and", "direction", "<code", ">", "dir<", "/", "code", ">", "intersects", "the", "undirected", "line", "segment", "given", "by", "the", "two", "end", "points"...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Intersectiond.java#L4015-L4017
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_easyHunting_serviceName_hunting_agent_agentId_PUT
public void billingAccount_easyHunting_serviceName_hunting_agent_agentId_PUT(String billingAccount, String serviceName, Long agentId, OvhOvhPabxHuntingAgent body) throws IOException { String qPath = "/telephony/{billingAccount}/easyHunting/{serviceName}/hunting/agent/{agentId}"; StringBuilder sb = path(qPath, billi...
java
public void billingAccount_easyHunting_serviceName_hunting_agent_agentId_PUT(String billingAccount, String serviceName, Long agentId, OvhOvhPabxHuntingAgent body) throws IOException { String qPath = "/telephony/{billingAccount}/easyHunting/{serviceName}/hunting/agent/{agentId}"; StringBuilder sb = path(qPath, billi...
[ "public", "void", "billingAccount_easyHunting_serviceName_hunting_agent_agentId_PUT", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "agentId", ",", "OvhOvhPabxHuntingAgent", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "...
Alter this object properties REST: PUT /telephony/{billingAccount}/easyHunting/{serviceName}/hunting/agent/{agentId} @param body [required] New object properties @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param agentId [required]
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L2374-L2378
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/UserResourcesImpl.java
UserResourcesImpl.addUser
public User addUser(User user, boolean sendEmail) throws SmartsheetException { return this.createResource("users?sendEmail=" + sendEmail, User.class, user); }
java
public User addUser(User user, boolean sendEmail) throws SmartsheetException { return this.createResource("users?sendEmail=" + sendEmail, User.class, user); }
[ "public", "User", "addUser", "(", "User", "user", ",", "boolean", "sendEmail", ")", "throws", "SmartsheetException", "{", "return", "this", ".", "createResource", "(", "\"users?sendEmail=\"", "+", "sendEmail", ",", "User", ".", "class", ",", "user", ")", ";", ...
Add a user to the organization, without sending email. It mirrors to the following Smartsheet REST API method: POST /users Exceptions: - IllegalArgumentException : if any argument is null - InvalidRequestException : if there is any problem with the REST API request - AuthorizationException : if there is any problem w...
[ "Add", "a", "user", "to", "the", "organization", "without", "sending", "email", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/UserResourcesImpl.java#L145-L147
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSRdbManagedConnectionImpl.java
WSRdbManagedConnectionImpl.setTransactionIsolation
public final void setTransactionIsolation(int isoLevel) throws SQLException { if (currentTransactionIsolation != isoLevel) { // Reject switching to an isolation level of TRANSACTION_NONE if (isoLevel == Connection.TRANSACTION_NONE) { throw new SQLExce...
java
public final void setTransactionIsolation(int isoLevel) throws SQLException { if (currentTransactionIsolation != isoLevel) { // Reject switching to an isolation level of TRANSACTION_NONE if (isoLevel == Connection.TRANSACTION_NONE) { throw new SQLExce...
[ "public", "final", "void", "setTransactionIsolation", "(", "int", "isoLevel", ")", "throws", "SQLException", "{", "if", "(", "currentTransactionIsolation", "!=", "isoLevel", ")", "{", "// Reject switching to an isolation level of TRANSACTION_NONE", "if", "(", "isoLevel", ...
Set the transactionIsolation level to the requested Isolation Level. If the requested and current are the same, then do not drive it to the database If they are different, drive it all the way to the database.
[ "Set", "the", "transactionIsolation", "level", "to", "the", "requested", "Isolation", "Level", ".", "If", "the", "requested", "and", "current", "are", "the", "same", "then", "do", "not", "drive", "it", "to", "the", "database", "If", "they", "are", "different...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSRdbManagedConnectionImpl.java#L3975-L3995
SQLDroid/SQLDroid
src/main/java/org/sqldroid/SQLDroidPreparedStatement.java
SQLDroidPreparedStatement.setBinaryStream
@Override public void setBinaryStream(int parameterIndex, InputStream inputStream, int length) throws SQLException { if (length <= 0) { throw new SQLException ("Invalid length " + length); } if (inputStream == null ) { throw new SQLException ("Input Stream cannot be null"); } final in...
java
@Override public void setBinaryStream(int parameterIndex, InputStream inputStream, int length) throws SQLException { if (length <= 0) { throw new SQLException ("Invalid length " + length); } if (inputStream == null ) { throw new SQLException ("Input Stream cannot be null"); } final in...
[ "@", "Override", "public", "void", "setBinaryStream", "(", "int", "parameterIndex", ",", "InputStream", "inputStream", ",", "int", "length", ")", "throws", "SQLException", "{", "if", "(", "length", "<=", "0", ")", "{", "throw", "new", "SQLException", "(", "\...
Set the parameter from the contents of a binary stream. @param parameterIndex the index of the parameter to set @param inputStream the input stream from which a byte array will be read and set as the value. If inputStream is null this method will throw a SQLException @param length a positive non-zero length values @ex...
[ "Set", "the", "parameter", "from", "the", "contents", "of", "a", "binary", "stream", "." ]
train
https://github.com/SQLDroid/SQLDroid/blob/4fb38ee40338673cb0205044571e4379573762c4/src/main/java/org/sqldroid/SQLDroidPreparedStatement.java#L514-L544
alibaba/canal
client-adapter/elasticsearch/src/main/java/com/alibaba/otter/canal/client/adapter/es/support/ESTemplate.java
ESTemplate.getEsType
@SuppressWarnings("unchecked") private String getEsType(ESMapping mapping, String fieldName) { String key = mapping.get_index() + "-" + mapping.get_type(); Map<String, String> fieldType = esFieldTypes.get(key); if (fieldType == null) { ImmutableOpenMap<String, MappingMetaData> ma...
java
@SuppressWarnings("unchecked") private String getEsType(ESMapping mapping, String fieldName) { String key = mapping.get_index() + "-" + mapping.get_type(); Map<String, String> fieldType = esFieldTypes.get(key); if (fieldType == null) { ImmutableOpenMap<String, MappingMetaData> ma...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "String", "getEsType", "(", "ESMapping", "mapping", ",", "String", "fieldName", ")", "{", "String", "key", "=", "mapping", ".", "get_index", "(", ")", "+", "\"-\"", "+", "mapping", ".", "get_type...
获取es mapping中的属性类型 @param mapping mapping配置 @param fieldName 属性名 @return 类型
[ "获取es", "mapping中的属性类型" ]
train
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/elasticsearch/src/main/java/com/alibaba/otter/canal/client/adapter/es/support/ESTemplate.java#L489-L530
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfPKCS7.java
PdfPKCS7.getAuthenticatedAttributeBytes
public byte[] getAuthenticatedAttributeBytes(byte secondDigest[], Calendar signingTime, byte[] ocsp) { try { return getAuthenticatedAttributeSet(secondDigest, signingTime, ocsp).getEncoded(ASN1Encoding.DER); } catch (Exception e) { throw new ExceptionConverter(e); ...
java
public byte[] getAuthenticatedAttributeBytes(byte secondDigest[], Calendar signingTime, byte[] ocsp) { try { return getAuthenticatedAttributeSet(secondDigest, signingTime, ocsp).getEncoded(ASN1Encoding.DER); } catch (Exception e) { throw new ExceptionConverter(e); ...
[ "public", "byte", "[", "]", "getAuthenticatedAttributeBytes", "(", "byte", "secondDigest", "[", "]", ",", "Calendar", "signingTime", ",", "byte", "[", "]", "ocsp", ")", "{", "try", "{", "return", "getAuthenticatedAttributeSet", "(", "secondDigest", ",", "signing...
When using authenticatedAttributes the authentication process is different. The document digest is generated and put inside the attribute. The signing is done over the DER encoded authenticatedAttributes. This method provides that encoding and the parameters must be exactly the same as in {@link #getEncodedPKCS7(byte[]...
[ "When", "using", "authenticatedAttributes", "the", "authentication", "process", "is", "different", ".", "The", "document", "digest", "is", "generated", "and", "put", "inside", "the", "attribute", ".", "The", "signing", "is", "done", "over", "the", "DER", "encode...
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfPKCS7.java#L1356-L1363
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java
DiSH.subspaceDimensionality
private int subspaceDimensionality(NumberVector v1, NumberVector v2, long[] pv1, long[] pv2, long[] commonPreferenceVector) { // number of zero values in commonPreferenceVector int subspaceDim = v1.getDimensionality() - BitsUtil.cardinality(commonPreferenceVector); // special case: v1 and v2 are in paralle...
java
private int subspaceDimensionality(NumberVector v1, NumberVector v2, long[] pv1, long[] pv2, long[] commonPreferenceVector) { // number of zero values in commonPreferenceVector int subspaceDim = v1.getDimensionality() - BitsUtil.cardinality(commonPreferenceVector); // special case: v1 and v2 are in paralle...
[ "private", "int", "subspaceDimensionality", "(", "NumberVector", "v1", ",", "NumberVector", "v2", ",", "long", "[", "]", "pv1", ",", "long", "[", "]", "pv2", ",", "long", "[", "]", "commonPreferenceVector", ")", "{", "// number of zero values in commonPreferenceVe...
Compute the common subspace dimensionality of two vectors. @param v1 First vector @param v2 Second vector @param pv1 First preference @param pv2 Second preference @param commonPreferenceVector Common preference @return Usually, v1.dim - commonPreference.cardinality, unless either pv1 and pv2 are a subset of the other.
[ "Compute", "the", "common", "subspace", "dimensionality", "of", "two", "vectors", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java#L577-L589
belaban/JGroups
src/org/jgroups/blocks/MessageDispatcher.java
MessageDispatcher.sendMessageWithFuture
public <T> CompletableFuture<T> sendMessageWithFuture(Address dest, Buffer data, RequestOptions opts) throws Exception { if(dest == null) throw new IllegalArgumentException("message destination is null, cannot send message"); if(opts == null) { log.warn("request options were nul...
java
public <T> CompletableFuture<T> sendMessageWithFuture(Address dest, Buffer data, RequestOptions opts) throws Exception { if(dest == null) throw new IllegalArgumentException("message destination is null, cannot send message"); if(opts == null) { log.warn("request options were nul...
[ "public", "<", "T", ">", "CompletableFuture", "<", "T", ">", "sendMessageWithFuture", "(", "Address", "dest", ",", "Buffer", "data", ",", "RequestOptions", "opts", ")", "throws", "Exception", "{", "if", "(", "dest", "==", "null", ")", "throw", "new", "Ille...
Sends a unicast message to the target defined by msg.getDest() and returns a future @param dest the target to which to send the unicast message. Must not be null. @param data the payload to send @param opts the options @return CompletableFuture<T> A future from which the result can be fetched, or null if the call was a...
[ "Sends", "a", "unicast", "message", "to", "the", "target", "defined", "by", "msg", ".", "getDest", "()", "and", "returns", "a", "future" ]
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/blocks/MessageDispatcher.java#L412-L431
mnlipp/jgrapes
org.jgrapes.io/src/org/jgrapes/net/SslCodec.java
SslCodec.onAccepted
@Handler(channels = EncryptedChannel.class) public void onAccepted(Accepted event, IOSubchannel encryptedChannel) { new PlainChannel(event, encryptedChannel); }
java
@Handler(channels = EncryptedChannel.class) public void onAccepted(Accepted event, IOSubchannel encryptedChannel) { new PlainChannel(event, encryptedChannel); }
[ "@", "Handler", "(", "channels", "=", "EncryptedChannel", ".", "class", ")", "public", "void", "onAccepted", "(", "Accepted", "event", ",", "IOSubchannel", "encryptedChannel", ")", "{", "new", "PlainChannel", "(", "event", ",", "encryptedChannel", ")", ";", "}...
Creates a new downstream connection as {@link LinkedIOSubchannel} of the network connection together with an {@link SSLEngine}. @param event the accepted event
[ "Creates", "a", "new", "downstream", "connection", "as", "{", "@link", "LinkedIOSubchannel", "}", "of", "the", "network", "connection", "together", "with", "an", "{", "@link", "SSLEngine", "}", "." ]
train
https://github.com/mnlipp/jgrapes/blob/8b5d874935d84c34a52d3e3d3745e869b5203fa0/org.jgrapes.io/src/org/jgrapes/net/SslCodec.java#L155-L158
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.purgeDeletedKeyAsync
public Observable<Void> purgeDeletedKeyAsync(String vaultBaseUrl, String keyName) { return purgeDeletedKeyWithServiceResponseAsync(vaultBaseUrl, keyName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return res...
java
public Observable<Void> purgeDeletedKeyAsync(String vaultBaseUrl, String keyName) { return purgeDeletedKeyWithServiceResponseAsync(vaultBaseUrl, keyName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return res...
[ "public", "Observable", "<", "Void", ">", "purgeDeletedKeyAsync", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ")", "{", "return", "purgeDeletedKeyWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "keyName", ")", ".", "map", "(", "new", "Func1", "<"...
Permanently deletes the specified key. The Purge Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/purge permission. @param vaultBaseUrl The vault n...
[ "Permanently", "deletes", "the", "specified", "key", ".", "The", "Purge", "Deleted", "Key", "operation", "is", "applicable", "for", "soft", "-", "delete", "enabled", "vaults", ".", "While", "the", "operation", "can", "be", "invoked", "on", "any", "vault", "i...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L3172-L3179
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/EnforceTrifocalGeometry.java
EnforceTrifocalGeometry.constructE
protected void constructE( Point3D_F64 e2 , Point3D_F64 e3 ) { E.zero(); for( int i = 0; i < 3; i++ ) { for( int j = 0; j < 3; j++ ) { for( int k = 0; k < 3; k++ ) { // which element in the trifocal tensor is being manipulated int row = 9*i + 3*j + k; // which unknowns are being multiplied by...
java
protected void constructE( Point3D_F64 e2 , Point3D_F64 e3 ) { E.zero(); for( int i = 0; i < 3; i++ ) { for( int j = 0; j < 3; j++ ) { for( int k = 0; k < 3; k++ ) { // which element in the trifocal tensor is being manipulated int row = 9*i + 3*j + k; // which unknowns are being multiplied by...
[ "protected", "void", "constructE", "(", "Point3D_F64", "e2", ",", "Point3D_F64", "e3", ")", "{", "E", ".", "zero", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "3", ";", "i", "++", ")", "{", "for", "(", "int", "j", "=", "0"...
The matrix E is a linear system for computing the trifocal tensor. The columns are the unknown square matrices from view 2 and 3. The right most column in both projection matrices are the provided epipoles, whose values are inserted into E
[ "The", "matrix", "E", "is", "a", "linear", "system", "for", "computing", "the", "trifocal", "tensor", ".", "The", "columns", "are", "the", "unknown", "square", "matrices", "from", "view", "2", "and", "3", ".", "The", "right", "most", "column", "in", "bot...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/EnforceTrifocalGeometry.java#L140-L157
mgormley/optimize
src/main/java/edu/jhu/hlt/optimize/LBFGS_port.java
LBFGS_port.CUBIC_MINIMIZER2
private static double CUBIC_MINIMIZER2(double cm, double u, double fu, double du, double v, double fv, double dv, double xmin, double xmax) { double a, d, gamma, theta, p, q, r, s; d = (v) - (u); theta = ((fu) - (fv)) * 3 / d + (du) + (dv); p = Math.abs(theta); q = Math.abs(du); ...
java
private static double CUBIC_MINIMIZER2(double cm, double u, double fu, double du, double v, double fv, double dv, double xmin, double xmax) { double a, d, gamma, theta, p, q, r, s; d = (v) - (u); theta = ((fu) - (fv)) * 3 / d + (du) + (dv); p = Math.abs(theta); q = Math.abs(du); ...
[ "private", "static", "double", "CUBIC_MINIMIZER2", "(", "double", "cm", ",", "double", "u", ",", "double", "fu", ",", "double", "du", ",", "double", "v", ",", "double", "fv", ",", "double", "dv", ",", "double", "xmin", ",", "double", "xmax", ")", "{", ...
Find a minimizer of an interpolated cubic function. @param cm The minimizer of the interpolated cubic. @param u The value of one point, u. @param fu The value of f(u). @param du The value of f'(u). @param v The value of another point, v. @param fv The value of f(v). @param du ...
[ "Find", "a", "minimizer", "of", "an", "interpolated", "cubic", "function", "." ]
train
https://github.com/mgormley/optimize/blob/3d1b93260b99febb8a5ecd9e8543c223e151a8d3/src/main/java/edu/jhu/hlt/optimize/LBFGS_port.java#L1817-L1840
xdcrafts/flower
flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapDotApi.java
MapDotApi.dotDissoc
public static Map dotDissoc(final Map map, final String pathString) { if (pathString == null || pathString.isEmpty()) { throw new IllegalArgumentException(PATH_MUST_BE_SPECIFIED); } if (!pathString.contains(SEPARATOR)) { map.remove(pathString); return map; ...
java
public static Map dotDissoc(final Map map, final String pathString) { if (pathString == null || pathString.isEmpty()) { throw new IllegalArgumentException(PATH_MUST_BE_SPECIFIED); } if (!pathString.contains(SEPARATOR)) { map.remove(pathString); return map; ...
[ "public", "static", "Map", "dotDissoc", "(", "final", "Map", "map", ",", "final", "String", "pathString", ")", "{", "if", "(", "pathString", "==", "null", "||", "pathString", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "...
Dissociates value by specified path. @param map subject original map @param pathString nodes to walk in map path of value @return original map
[ "Dissociates", "value", "by", "specified", "path", "." ]
train
https://github.com/xdcrafts/flower/blob/96a8e49102fea434bd383a3c7852f0ee9545f999/flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapDotApi.java#L342-L352
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.createPreset
public CreatePresetResponse createPreset(CreatePresetRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getName(), "The parameter name should NOT be null or empty string."); if (request.getAudio() != null) { ...
java
public CreatePresetResponse createPreset(CreatePresetRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getName(), "The parameter name should NOT be null or empty string."); if (request.getAudio() != null) { ...
[ "public", "CreatePresetResponse", "createPreset", "(", "CreatePresetRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "checkStringNotEmpty", "(", "request", ".", "getName", "(", ")", ",", "\"Th...
Create a live preset which contains parameters needed in the live stream service. @param request The request object containing all options for creating presets. @return the response
[ "Create", "a", "live", "preset", "which", "contains", "parameters", "needed", "in", "the", "live", "stream", "service", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L290-L327
google/error-prone
check_api/src/main/java/com/google/errorprone/matchers/Matchers.java
Matchers.anyOf
public static <T extends Tree> Matcher<T> anyOf( final Iterable<? extends Matcher<? super T>> matchers) { return new Matcher<T>() { @Override public boolean matches(T t, VisitorState state) { for (Matcher<? super T> matcher : matchers) { if (matcher.matches(t, state)) { ...
java
public static <T extends Tree> Matcher<T> anyOf( final Iterable<? extends Matcher<? super T>> matchers) { return new Matcher<T>() { @Override public boolean matches(T t, VisitorState state) { for (Matcher<? super T> matcher : matchers) { if (matcher.matches(t, state)) { ...
[ "public", "static", "<", "T", "extends", "Tree", ">", "Matcher", "<", "T", ">", "anyOf", "(", "final", "Iterable", "<", "?", "extends", "Matcher", "<", "?", "super", "T", ">", ">", "matchers", ")", "{", "return", "new", "Matcher", "<", "T", ">", "(...
Compose several matchers together, such that the composite matches an AST node if any of the given matchers do.
[ "Compose", "several", "matchers", "together", "such", "that", "the", "composite", "matches", "an", "AST", "node", "if", "any", "of", "the", "given", "matchers", "do", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/matchers/Matchers.java#L150-L163
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAAffiliation.java
HFCAAffiliation.read
public int read(User registrar) throws AffiliationException, InvalidArgumentException { if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); } String readAffURL = ""; try { readAffURL = HFCA_AFFILIATION + "/" + name; ...
java
public int read(User registrar) throws AffiliationException, InvalidArgumentException { if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); } String readAffURL = ""; try { readAffURL = HFCA_AFFILIATION + "/" + name; ...
[ "public", "int", "read", "(", "User", "registrar", ")", "throws", "AffiliationException", ",", "InvalidArgumentException", "{", "if", "(", "registrar", "==", "null", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Registrar should be a valid member\"", "...
gets a specific affiliation @param registrar The identity of the registrar @return Returns response @throws AffiliationException if getting an affiliation fails. @throws InvalidArgumentException
[ "gets", "a", "specific", "affiliation" ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAAffiliation.java#L194-L224
osiam/connector4java
src/main/java/org/osiam/client/OsiamConnector.java
OsiamConnector.getMe
public User getMe(AccessToken accessToken, String... attributes) { return getUserService().getMe(accessToken, attributes); }
java
public User getMe(AccessToken accessToken, String... attributes) { return getUserService().getMe(accessToken, attributes); }
[ "public", "User", "getMe", "(", "AccessToken", "accessToken", ",", "String", "...", "attributes", ")", "{", "return", "getUserService", "(", ")", ".", "getMe", "(", "accessToken", ",", "attributes", ")", ";", "}" ]
Retrieves the User holding the given access token. @param accessToken the OSIAM access token from for the current session @param attributes the attributes that should be returned in the response. If none are given, all are returned @return the actual logged in user @throws UnauthorizedException if the req...
[ "Retrieves", "the", "User", "holding", "the", "given", "access", "token", "." ]
train
https://github.com/osiam/connector4java/blob/a5e6ae1e706f4889d662a069fe2f3bf8e3848d12/src/main/java/org/osiam/client/OsiamConnector.java#L292-L294
Squarespace/cldr
runtime/src/main/java/com/squarespace/cldr/LanguageMatcher.java
LanguageMatcher.matchImpl
private Match matchImpl(List<Entry> desiredLocales, int threshold) { int bestDistance = MAX_DISTANCE; Entry bestMatch = null; for (Entry desired : desiredLocales) { List<String> exact = exactMatch.get(desired.locale); if (exact != null) { return new Match(exact.get(0), 0); } ...
java
private Match matchImpl(List<Entry> desiredLocales, int threshold) { int bestDistance = MAX_DISTANCE; Entry bestMatch = null; for (Entry desired : desiredLocales) { List<String> exact = exactMatch.get(desired.locale); if (exact != null) { return new Match(exact.get(0), 0); } ...
[ "private", "Match", "matchImpl", "(", "List", "<", "Entry", ">", "desiredLocales", ",", "int", "threshold", ")", "{", "int", "bestDistance", "=", "MAX_DISTANCE", ";", "Entry", "bestMatch", "=", "null", ";", "for", "(", "Entry", "desired", ":", "desiredLocale...
Return the best match that exceeds the threshold, or the default. If the default is returned its distance is set to MAX_DISTANCE. An exact match has distance of 0.
[ "Return", "the", "best", "match", "that", "exceeds", "the", "threshold", "or", "the", "default", ".", "If", "the", "default", "is", "returned", "its", "distance", "is", "set", "to", "MAX_DISTANCE", ".", "An", "exact", "match", "has", "distance", "of", "0",...
train
https://github.com/Squarespace/cldr/blob/54b752d4ec2457df56e98461618f9c0eec41e1e1/runtime/src/main/java/com/squarespace/cldr/LanguageMatcher.java#L158-L177
redkale/redkale
src/org/redkale/util/ByteArray.java
ByteArray.find
public int find(int offset, int limit, byte value) { byte[] bytes = this.content; int end = limit > 0 ? limit : count; for (int i = offset; i < end; i++) { if (bytes[i] == value) return i; } return -1; }
java
public int find(int offset, int limit, byte value) { byte[] bytes = this.content; int end = limit > 0 ? limit : count; for (int i = offset; i < end; i++) { if (bytes[i] == value) return i; } return -1; }
[ "public", "int", "find", "(", "int", "offset", ",", "int", "limit", ",", "byte", "value", ")", "{", "byte", "[", "]", "bytes", "=", "this", ".", "content", ";", "int", "end", "=", "limit", ">", "0", "?", "limit", ":", "count", ";", "for", "(", ...
从指定的起始位置和长度查询value值出现的位置,没有返回-1 @param offset 起始位置 @param limit 长度限制 @param value 查询值 @return 所在位置
[ "从指定的起始位置和长度查询value值出现的位置", "没有返回", "-", "1" ]
train
https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/util/ByteArray.java#L213-L220
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.getAttributeLongWithDefault
@Pure public static Long getAttributeLongWithDefault(Node document, Long defaultValue, String... path) { assert document != null : AssertMessages.notNullParameter(0); return getAttributeLongWithDefault(document, true, defaultValue, path); }
java
@Pure public static Long getAttributeLongWithDefault(Node document, Long defaultValue, String... path) { assert document != null : AssertMessages.notNullParameter(0); return getAttributeLongWithDefault(document, true, defaultValue, path); }
[ "@", "Pure", "public", "static", "Long", "getAttributeLongWithDefault", "(", "Node", "document", ",", "Long", "defaultValue", ",", "String", "...", "path", ")", "{", "assert", "document", "!=", "null", ":", "AssertMessages", ".", "notNullParameter", "(", "0", ...
Replies the long value that corresponds to the specified attribute's path. <p>The path is an ordered list of tag's names and ended by the name of the attribute. Be careful about the fact that the names are case sensitives. @param document is the XML document to explore. @param defaultValue is the default value to rep...
[ "Replies", "the", "long", "value", "that", "corresponds", "to", "the", "specified", "attribute", "s", "path", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L945-L949
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/quickfix/SARLQuickfixProvider.java
SARLQuickfixProvider.fixDiscouragedBooleanExpression
@Fix(io.sarl.lang.validation.IssueCodes.DISCOURAGED_BOOLEAN_EXPRESSION) public void fixDiscouragedBooleanExpression(final Issue issue, IssueResolutionAcceptor acceptor) { BehaviorUnitGuardRemoveModification.accept(this, issue, acceptor); }
java
@Fix(io.sarl.lang.validation.IssueCodes.DISCOURAGED_BOOLEAN_EXPRESSION) public void fixDiscouragedBooleanExpression(final Issue issue, IssueResolutionAcceptor acceptor) { BehaviorUnitGuardRemoveModification.accept(this, issue, acceptor); }
[ "@", "Fix", "(", "io", ".", "sarl", ".", "lang", ".", "validation", ".", "IssueCodes", ".", "DISCOURAGED_BOOLEAN_EXPRESSION", ")", "public", "void", "fixDiscouragedBooleanExpression", "(", "final", "Issue", "issue", ",", "IssueResolutionAcceptor", "acceptor", ")", ...
Quick fix for "Discouraged boolean expression". @param issue the issue. @param acceptor the quick fix acceptor.
[ "Quick", "fix", "for", "Discouraged", "boolean", "expression", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/quickfix/SARLQuickfixProvider.java#L765-L768
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/TableFactoryService.java
TableFactoryService.findInternal
public static <T> T findInternal(Class<T> factoryClass, Map<String, String> properties, Optional<ClassLoader> classLoader) { Preconditions.checkNotNull(factoryClass); Preconditions.checkNotNull(properties); List<TableFactory> foundFactories = discoverFactories(classLoader); List<TableFactory> classFactories ...
java
public static <T> T findInternal(Class<T> factoryClass, Map<String, String> properties, Optional<ClassLoader> classLoader) { Preconditions.checkNotNull(factoryClass); Preconditions.checkNotNull(properties); List<TableFactory> foundFactories = discoverFactories(classLoader); List<TableFactory> classFactories ...
[ "public", "static", "<", "T", ">", "T", "findInternal", "(", "Class", "<", "T", ">", "factoryClass", ",", "Map", "<", "String", ",", "String", ">", "properties", ",", "Optional", "<", "ClassLoader", ">", "classLoader", ")", "{", "Preconditions", ".", "ch...
Finds a table factory of the given class, property map, and classloader. @param factoryClass desired factory class @param properties properties that describe the factory configuration @param classLoader classloader for service loading @param <T> factory class type @return the matching factory
[ "Finds", "a", "table", "factory", "of", "the", "given", "class", "property", "map", "and", "classloader", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/TableFactoryService.java#L120-L143
Red5/red5-io
src/main/java/org/red5/io/matroska/VINT.java
VINT.fromBinary
public static VINT fromBinary(long binary) { BitSet bs = BitSet.valueOf(new long[] { binary }); long mask = MASK_BYTE_1; byte length = 1; if (bs.length() > 3 * BIT_IN_BYTE) { mask = MASK_BYTE_4; length = 4; } else if (bs.length() > 2 * BIT_IN_BYTE) { ...
java
public static VINT fromBinary(long binary) { BitSet bs = BitSet.valueOf(new long[] { binary }); long mask = MASK_BYTE_1; byte length = 1; if (bs.length() > 3 * BIT_IN_BYTE) { mask = MASK_BYTE_4; length = 4; } else if (bs.length() > 2 * BIT_IN_BYTE) { ...
[ "public", "static", "VINT", "fromBinary", "(", "long", "binary", ")", "{", "BitSet", "bs", "=", "BitSet", ".", "valueOf", "(", "new", "long", "[", "]", "{", "binary", "}", ")", ";", "long", "mask", "=", "MASK_BYTE_1", ";", "byte", "length", "=", "1",...
method to construct {@link VINT} based on its binary representation @param binary - binary value of {@link VINT} @return {@link VINT} corresponding to this binary
[ "method", "to", "construct", "{", "@link", "VINT", "}", "based", "on", "its", "binary", "representation" ]
train
https://github.com/Red5/red5-io/blob/9bbbc506423c5a8f18169d46d400df56c0072a33/src/main/java/org/red5/io/matroska/VINT.java#L119-L135
netty/netty
handler/src/main/java/io/netty/handler/ssl/SslContextBuilder.java
SslContextBuilder.forServer
public static SslContextBuilder forServer(File keyCertChainFile, File keyFile) { return new SslContextBuilder(true).keyManager(keyCertChainFile, keyFile); }
java
public static SslContextBuilder forServer(File keyCertChainFile, File keyFile) { return new SslContextBuilder(true).keyManager(keyCertChainFile, keyFile); }
[ "public", "static", "SslContextBuilder", "forServer", "(", "File", "keyCertChainFile", ",", "File", "keyFile", ")", "{", "return", "new", "SslContextBuilder", "(", "true", ")", ".", "keyManager", "(", "keyCertChainFile", ",", "keyFile", ")", ";", "}" ]
Creates a builder for new server-side {@link SslContext}. @param keyCertChainFile an X.509 certificate chain file in PEM format @param keyFile a PKCS#8 private key file in PEM format @see #keyManager(File, File)
[ "Creates", "a", "builder", "for", "new", "server", "-", "side", "{", "@link", "SslContext", "}", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslContextBuilder.java#L53-L55
UrielCh/ovh-java-sdk
ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java
ApiOvhIp.loadBalancing_serviceName_backend_backend_setWeight_POST
public OvhLoadBalancingTask loadBalancing_serviceName_backend_backend_setWeight_POST(String serviceName, String backend, Long weight) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/backend/{backend}/setWeight"; StringBuilder sb = path(qPath, serviceName, backend); HashMap<String, Object>o = ...
java
public OvhLoadBalancingTask loadBalancing_serviceName_backend_backend_setWeight_POST(String serviceName, String backend, Long weight) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/backend/{backend}/setWeight"; StringBuilder sb = path(qPath, serviceName, backend); HashMap<String, Object>o = ...
[ "public", "OvhLoadBalancingTask", "loadBalancing_serviceName_backend_backend_setWeight_POST", "(", "String", "serviceName", ",", "String", "backend", ",", "Long", "weight", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ip/loadBalancing/{serviceName}/backend/{ba...
Set the weight of a backend. For instance, if backend A has a weight of 8 and backup B was a weight of 16, backend B will receive twice more connections as backend A. Backends must be on the same POP for the weight parameter to take effect between them. REST: POST /ip/loadBalancing/{serviceName}/backend/{backend}/setW...
[ "Set", "the", "weight", "of", "a", "backend", ".", "For", "instance", "if", "backend", "A", "has", "a", "weight", "of", "8", "and", "backup", "B", "was", "a", "weight", "of", "16", "backend", "B", "will", "receive", "twice", "more", "connections", "as"...
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L1363-L1370
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/ChannelFrameworkImpl.java
ChannelFrameworkImpl.retryChainStart
protected void retryChainStart(ChainData chainData, Exception e) { // Do nothing in the core implementation. This method is overloaded in the // service. // 7/16/04 CAL - this prevents a dependency on the Alarm Manager and // channelfw.service FFDCFilter.processException(e, getCl...
java
protected void retryChainStart(ChainData chainData, Exception e) { // Do nothing in the core implementation. This method is overloaded in the // service. // 7/16/04 CAL - this prevents a dependency on the Alarm Manager and // channelfw.service FFDCFilter.processException(e, getCl...
[ "protected", "void", "retryChainStart", "(", "ChainData", "chainData", ",", "Exception", "e", ")", "{", "// Do nothing in the core implementation. This method is overloaded in the", "// service.", "// 7/16/04 CAL - this prevents a dependency on the Alarm Manager and", "// channelfw.servi...
This method is called when an initial attempt to start a chain has failed due to a particular type of exception, RetryableChannelException, indicating that a retry may enable the chain to be started. This could result from something like a device side channel having bind problems since a socket from a previous chain st...
[ "This", "method", "is", "called", "when", "an", "initial", "attempt", "to", "start", "a", "chain", "has", "failed", "due", "to", "a", "particular", "type", "of", "exception", "RetryableChannelException", "indicating", "that", "a", "retry", "may", "enable", "th...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/ChannelFrameworkImpl.java#L3762-L3770
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/CustomVisionTrainingManager.java
CustomVisionTrainingManager.authenticate
public static TrainingApi authenticate(RestClient restClient, final String apiKey) { return new TrainingApiImpl(restClient).withApiKey(apiKey); }
java
public static TrainingApi authenticate(RestClient restClient, final String apiKey) { return new TrainingApiImpl(restClient).withApiKey(apiKey); }
[ "public", "static", "TrainingApi", "authenticate", "(", "RestClient", "restClient", ",", "final", "String", "apiKey", ")", "{", "return", "new", "TrainingApiImpl", "(", "restClient", ")", ".", "withApiKey", "(", "apiKey", ")", ";", "}" ]
Initializes an instance of Custom Vision Training API client. @param restClient the REST client to connect to Azure. @param apiKey the Custom Vision Training API key @return the Custom Vision Training API client
[ "Initializes", "an", "instance", "of", "Custom", "Vision", "Training", "API", "client", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/CustomVisionTrainingManager.java#L74-L76
puniverse/capsule
capsule-util/src/main/java/co/paralleluniverse/capsule/Jar.java
Jar.setListAttribute
public Jar setListAttribute(String name, Collection<?> values) { return setAttribute(name, join(values)); }
java
public Jar setListAttribute(String name, Collection<?> values) { return setAttribute(name, join(values)); }
[ "public", "Jar", "setListAttribute", "(", "String", "name", ",", "Collection", "<", "?", ">", "values", ")", "{", "return", "setAttribute", "(", "name", ",", "join", "(", "values", ")", ")", ";", "}" ]
Sets an attribute in the main section of the manifest to a list. The list elements will be joined with a single whitespace character. @param name the attribute's name @param values the attribute's value @return {@code this} @throws IllegalStateException if entries have been added or the JAR has been written prior to...
[ "Sets", "an", "attribute", "in", "the", "main", "section", "of", "the", "manifest", "to", "a", "list", ".", "The", "list", "elements", "will", "be", "joined", "with", "a", "single", "whitespace", "character", "." ]
train
https://github.com/puniverse/capsule/blob/291a54e501a32aaf0284707b8c1fbff6a566822b/capsule-util/src/main/java/co/paralleluniverse/capsule/Jar.java#L174-L176
real-logic/agrona
agrona/src/main/java/org/agrona/PrintBufferUtil.java
PrintBufferUtil.hexDump
public static String hexDump(final byte[] array, final int fromIndex, final int length) { return HexUtil.hexDump(array, fromIndex, length); }
java
public static String hexDump(final byte[] array, final int fromIndex, final int length) { return HexUtil.hexDump(array, fromIndex, length); }
[ "public", "static", "String", "hexDump", "(", "final", "byte", "[", "]", "array", ",", "final", "int", "fromIndex", ",", "final", "int", "length", ")", "{", "return", "HexUtil", ".", "hexDump", "(", "array", ",", "fromIndex", ",", "length", ")", ";", "...
Returns a <a href="http://en.wikipedia.org/wiki/Hex_dump">hex dump</a> of the specified byte array's sub-region. @param array dumped array @param fromIndex where should we start to print @param length how much should we print @return hex dump in a string representation
[ "Returns", "a", "<a", "href", "=", "http", ":", "//", "en", ".", "wikipedia", ".", "org", "/", "wiki", "/", "Hex_dump", ">", "hex", "dump<", "/", "a", ">", "of", "the", "specified", "byte", "array", "s", "sub", "-", "region", "." ]
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/PrintBufferUtil.java#L98-L101
btaz/data-util
src/main/java/com/btaz/util/unit/ResourceUtil.java
ResourceUtil.createRandomData
public static String createRandomData(int rows, int rowLength, boolean skipTrailingNewline) { Random random = new Random(System.currentTimeMillis()); StringBuilder strb = new StringBuilder(); for(int i=0; i<rows; i++) { for(int j=0; j<rowLength; j++) { strb.append((ch...
java
public static String createRandomData(int rows, int rowLength, boolean skipTrailingNewline) { Random random = new Random(System.currentTimeMillis()); StringBuilder strb = new StringBuilder(); for(int i=0; i<rows; i++) { for(int j=0; j<rowLength; j++) { strb.append((ch...
[ "public", "static", "String", "createRandomData", "(", "int", "rows", ",", "int", "rowLength", ",", "boolean", "skipTrailingNewline", ")", "{", "Random", "random", "=", "new", "Random", "(", "System", ".", "currentTimeMillis", "(", ")", ")", ";", "StringBuilde...
This method creates test data containing letters between a-z @param rows how many rows of data to create @param rowLength how many characters per row @param skipTrailingNewline if true then a trailing newline is always added @return <code>String</code> contain all random data
[ "This", "method", "creates", "test", "data", "containing", "letters", "between", "a", "-", "z" ]
train
https://github.com/btaz/data-util/blob/f01de64854c456a88a31ffbe8bac6d605151b496/src/main/java/com/btaz/util/unit/ResourceUtil.java#L112-L124
tipsy/javalin
src/main/java/io/javalin/Javalin.java
Javalin.addWsHandler
private Javalin addWsHandler(@NotNull WsHandlerType handlerType, @NotNull String path, @NotNull Consumer<WsHandler> wsHandler, @NotNull Set<Role> roles) { wsServlet.addHandler(handlerType, path, wsHandler, roles); eventManager.fireWsHandlerAddedEvent(new WsHandlerMetaInfo(handlerType, Util.prefixContext...
java
private Javalin addWsHandler(@NotNull WsHandlerType handlerType, @NotNull String path, @NotNull Consumer<WsHandler> wsHandler, @NotNull Set<Role> roles) { wsServlet.addHandler(handlerType, path, wsHandler, roles); eventManager.fireWsHandlerAddedEvent(new WsHandlerMetaInfo(handlerType, Util.prefixContext...
[ "private", "Javalin", "addWsHandler", "(", "@", "NotNull", "WsHandlerType", "handlerType", ",", "@", "NotNull", "String", "path", ",", "@", "NotNull", "Consumer", "<", "WsHandler", ">", "wsHandler", ",", "@", "NotNull", "Set", "<", "Role", ">", "roles", ")",...
Adds a specific WebSocket handler for the given path to the instance. Requires an access manager to be set on the instance.
[ "Adds", "a", "specific", "WebSocket", "handler", "for", "the", "given", "path", "to", "the", "instance", ".", "Requires", "an", "access", "manager", "to", "be", "set", "on", "the", "instance", "." ]
train
https://github.com/tipsy/javalin/blob/68b2f7592f237db1c2b597e645697eb75fdaee53/src/main/java/io/javalin/Javalin.java#L505-L509
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/Criteria.java
Criteria.addEqualToColumn
public void addEqualToColumn(String attribute, String colName) { // FieldCriteria c = FieldCriteria.buildEqualToCriteria(attribute, colName, getAlias()); FieldCriteria c = FieldCriteria.buildEqualToCriteria(attribute, colName, getUserAlias(attribute)); c.setTranslateField(false); addSelecti...
java
public void addEqualToColumn(String attribute, String colName) { // FieldCriteria c = FieldCriteria.buildEqualToCriteria(attribute, colName, getAlias()); FieldCriteria c = FieldCriteria.buildEqualToCriteria(attribute, colName, getUserAlias(attribute)); c.setTranslateField(false); addSelecti...
[ "public", "void", "addEqualToColumn", "(", "String", "attribute", ",", "String", "colName", ")", "{", "// FieldCriteria c = FieldCriteria.buildEqualToCriteria(attribute, colName, getAlias());\r", "FieldCriteria", "c", "=", "FieldCriteria", ".", "buildEqualToCriteria", "(", "att...
Adds and equals (=) criteria for column comparison. The column Name will NOT be translated. <br> name = T_BOSS.LASTNMAE @param attribute The field name to be used @param colName The name of the column to compare with
[ "Adds", "and", "equals", "(", "=", ")", "criteria", "for", "column", "comparison", ".", "The", "column", "Name", "will", "NOT", "be", "translated", ".", "<br", ">", "name", "=", "T_BOSS", ".", "LASTNMAE" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/Criteria.java#L392-L398
MKLab-ITI/multimedia-indexing
src/main/java/gr/iti/mklab/visual/datastructures/Linear.java
Linear.computeNearestNeighborsInternal
protected BoundedPriorityQueue<Result> computeNearestNeighborsInternal(int k, double[] queryVector) throws Exception { BoundedPriorityQueue<Result> nn = new BoundedPriorityQueue<Result>(new Result(), k); double lowest = Double.MAX_VALUE; for (int i = 0; i < (vectorsList.size() / vectorLength); i++) { ...
java
protected BoundedPriorityQueue<Result> computeNearestNeighborsInternal(int k, double[] queryVector) throws Exception { BoundedPriorityQueue<Result> nn = new BoundedPriorityQueue<Result>(new Result(), k); double lowest = Double.MAX_VALUE; for (int i = 0; i < (vectorsList.size() / vectorLength); i++) { ...
[ "protected", "BoundedPriorityQueue", "<", "Result", ">", "computeNearestNeighborsInternal", "(", "int", "k", ",", "double", "[", "]", "queryVector", ")", "throws", "Exception", "{", "BoundedPriorityQueue", "<", "Result", ">", "nn", "=", "new", "BoundedPriorityQueue"...
Computes the k-nearest neighbors of the given query vector. The search is exhaustive but includes some optimizations that make it faster, especially for high dimensional vectors. @param k The number of nearest neighbors to be returned @param queryVector The query vector @return A bounded priority queue of Result obje...
[ "Computes", "the", "k", "-", "nearest", "neighbors", "of", "the", "given", "query", "vector", ".", "The", "search", "is", "exhaustive", "but", "includes", "some", "optimizations", "that", "make", "it", "faster", "especially", "for", "high", "dimensional", "vec...
train
https://github.com/MKLab-ITI/multimedia-indexing/blob/f82e8e517da706651f4b7a719805401f3102e135/src/main/java/gr/iti/mklab/visual/datastructures/Linear.java#L138-L163
xmlunit/xmlunit
xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java
DOMDifferenceEngine.splitAttributes
private Attributes splitAttributes(final NamedNodeMap map) { Attr sLoc = (Attr) map.getNamedItemNS(XMLConstants .W3C_XML_SCHEMA_INSTANCE_NS_URI, "schemaLocation"); Attr nNsLoc = (Attr) map.getNamedItemNS(XMLConst...
java
private Attributes splitAttributes(final NamedNodeMap map) { Attr sLoc = (Attr) map.getNamedItemNS(XMLConstants .W3C_XML_SCHEMA_INSTANCE_NS_URI, "schemaLocation"); Attr nNsLoc = (Attr) map.getNamedItemNS(XMLConst...
[ "private", "Attributes", "splitAttributes", "(", "final", "NamedNodeMap", "map", ")", "{", "Attr", "sLoc", "=", "(", "Attr", ")", "map", ".", "getNamedItemNS", "(", "XMLConstants", ".", "W3C_XML_SCHEMA_INSTANCE_NS_URI", ",", "\"schemaLocation\"", ")", ";", "Attr",...
Separates XML namespace related attributes from "normal" attributes.xb
[ "Separates", "XML", "namespace", "related", "attributes", "from", "normal", "attributes", ".", "xb" ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L747-L768
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java
IoUtil.copy
public static long copy(InputStream in, OutputStream out) throws IORuntimeException { return copy(in, out, DEFAULT_BUFFER_SIZE); }
java
public static long copy(InputStream in, OutputStream out) throws IORuntimeException { return copy(in, out, DEFAULT_BUFFER_SIZE); }
[ "public", "static", "long", "copy", "(", "InputStream", "in", ",", "OutputStream", "out", ")", "throws", "IORuntimeException", "{", "return", "copy", "(", "in", ",", "out", ",", "DEFAULT_BUFFER_SIZE", ")", ";", "}" ]
拷贝流,使用默认Buffer大小 @param in 输入流 @param out 输出流 @return 传输的byte数 @throws IORuntimeException IO异常
[ "拷贝流,使用默认Buffer大小" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java#L133-L135
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/base64/Base64.java
Base64.safeDecodeAsString
@Nullable public static String safeDecodeAsString (@Nullable final byte [] aEncodedBytes, @Nonnull final Charset aCharset) { ValueEnforcer.notNull (aCharset, "Charset"); return aEncodedBytes == null ? null : safeDecodeAsString (aEncodedBytes, 0, aEncodedBytes.length, aCharset); }
java
@Nullable public static String safeDecodeAsString (@Nullable final byte [] aEncodedBytes, @Nonnull final Charset aCharset) { ValueEnforcer.notNull (aCharset, "Charset"); return aEncodedBytes == null ? null : safeDecodeAsString (aEncodedBytes, 0, aEncodedBytes.length, aCharset); }
[ "@", "Nullable", "public", "static", "String", "safeDecodeAsString", "(", "@", "Nullable", "final", "byte", "[", "]", "aEncodedBytes", ",", "@", "Nonnull", "final", "Charset", "aCharset", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aCharset", ",", "\"Char...
Decode the byte array and convert it to a string. @param aEncodedBytes The encoded byte array. @param aCharset The character set to be used. @return <code>null</code> if decoding failed.
[ "Decode", "the", "byte", "array", "and", "convert", "it", "to", "a", "string", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/base64/Base64.java#L2690-L2696
Omertron/api-omdb
src/main/java/com/omertron/omdbapi/tools/OmdbBuilder.java
OmdbBuilder.setImdbId
public OmdbBuilder setImdbId(final String imdbId) throws OMDBException { if (StringUtils.isBlank(imdbId)) { throw new OMDBException(ApiExceptionType.UNKNOWN_CAUSE, "Must provide an IMDB ID!"); } params.add(Param.IMDB, imdbId); return this; }
java
public OmdbBuilder setImdbId(final String imdbId) throws OMDBException { if (StringUtils.isBlank(imdbId)) { throw new OMDBException(ApiExceptionType.UNKNOWN_CAUSE, "Must provide an IMDB ID!"); } params.add(Param.IMDB, imdbId); return this; }
[ "public", "OmdbBuilder", "setImdbId", "(", "final", "String", "imdbId", ")", "throws", "OMDBException", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "imdbId", ")", ")", "{", "throw", "new", "OMDBException", "(", "ApiExceptionType", ".", "UNKNOWN_CAUSE", ...
A valid IMDb ID @param imdbId The IMDB ID @return @throws OMDBException
[ "A", "valid", "IMDb", "ID" ]
train
https://github.com/Omertron/api-omdb/blob/acb506ded2d7b8a4159b48161ffab8cb5b7bad44/src/main/java/com/omertron/omdbapi/tools/OmdbBuilder.java#L74-L80
pierre/serialization
hadoop/src/main/java/com/ning/metrics/serialization/hadoop/SmileRecordReader.java
SmileRecordReader.initialize
@Override public void initialize(InputSplit genericSplit, TaskAttemptContext context) throws IOException, InterruptedException { FileSplit split = (FileSplit) genericSplit; Configuration job = context.getConfiguration(); start = split.getStart(); end = start + split.getLength(); ...
java
@Override public void initialize(InputSplit genericSplit, TaskAttemptContext context) throws IOException, InterruptedException { FileSplit split = (FileSplit) genericSplit; Configuration job = context.getConfiguration(); start = split.getStart(); end = start + split.getLength(); ...
[ "@", "Override", "public", "void", "initialize", "(", "InputSplit", "genericSplit", ",", "TaskAttemptContext", "context", ")", "throws", "IOException", ",", "InterruptedException", "{", "FileSplit", "split", "=", "(", "FileSplit", ")", "genericSplit", ";", "Configur...
Called once at initialization. @param genericSplit the split that defines the range of records to read @param context the information about the task @throws java.io.IOException @throws InterruptedException
[ "Called", "once", "at", "initialization", "." ]
train
https://github.com/pierre/serialization/blob/b15b7c749ba78bfe94dce8fc22f31b30b2e6830b/hadoop/src/main/java/com/ning/metrics/serialization/hadoop/SmileRecordReader.java#L55-L74
cchantep/acolyte
jdbc-driver/src/main/java/acolyte/jdbc/ParameterMetaData.java
ParameterMetaData.Scaled
public static ParameterDef Scaled(final int sqlType, final int scale) { return new ParameterDef(jdbcTypeMappings.get(sqlType), parameterModeIn, sqlType, jdbcTypeNames.get(sqlType), jdb...
java
public static ParameterDef Scaled(final int sqlType, final int scale) { return new ParameterDef(jdbcTypeMappings.get(sqlType), parameterModeIn, sqlType, jdbcTypeNames.get(sqlType), jdb...
[ "public", "static", "ParameterDef", "Scaled", "(", "final", "int", "sqlType", ",", "final", "int", "scale", ")", "{", "return", "new", "ParameterDef", "(", "jdbcTypeMappings", ".", "get", "(", "sqlType", ")", ",", "parameterModeIn", ",", "sqlType", ",", "jdb...
Decimal parameter. @param sqlType the SQL type for the parameter definition @param scale the scale of the numeric parameter @return the parameter definition for a number with specified scale
[ "Decimal", "parameter", "." ]
train
https://github.com/cchantep/acolyte/blob/a383dff20fadc08ec9306f2f1f24b2a7e0047449/jdbc-driver/src/main/java/acolyte/jdbc/ParameterMetaData.java#L203-L213
javamelody/javamelody
javamelody-core/src/main/java/net/bull/javamelody/PayloadNameRequestWrapper.java
PayloadNameRequestWrapper.parseGwtRpcMethodName
@SuppressWarnings("resource") private static String parseGwtRpcMethodName(InputStream stream, String charEncoding) { //commented out code uses GWT-user library for a more 'proper' approach. //GWT-user library approach is more future-proof, but requires more dependency management. // RPCRequest decodeReque...
java
@SuppressWarnings("resource") private static String parseGwtRpcMethodName(InputStream stream, String charEncoding) { //commented out code uses GWT-user library for a more 'proper' approach. //GWT-user library approach is more future-proof, but requires more dependency management. // RPCRequest decodeReque...
[ "@", "SuppressWarnings", "(", "\"resource\"", ")", "private", "static", "String", "parseGwtRpcMethodName", "(", "InputStream", "stream", ",", "String", "charEncoding", ")", "{", "//commented out code uses GWT-user library for a more 'proper' approach.\r", "//GWT-user library appr...
Try to parse GWT-RPC method name from request body stream. Does not close the stream. @param stream GWT-RPC request body stream @nonnull @param charEncoding character encoding of stream, or null for platform default @null @return GWT-RPC method name, or null if unable to parse @null
[ "Try", "to", "parse", "GWT", "-", "RPC", "method", "name", "from", "request", "body", "stream", ".", "Does", "not", "close", "the", "stream", "." ]
train
https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-core/src/main/java/net/bull/javamelody/PayloadNameRequestWrapper.java#L152-L191
aws/aws-sdk-java
src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java
AbstractAmazonKinesisFirehoseDelivery.readResource
private static String readResource(String name) { try { return IOUtils.toString(AmazonKinesisFirehoseToRedshiftSample.class.getResourceAsStream(name)); } catch (IOException e) { throw new RuntimeException("Failed to read document resource: " + name, e); } }
java
private static String readResource(String name) { try { return IOUtils.toString(AmazonKinesisFirehoseToRedshiftSample.class.getResourceAsStream(name)); } catch (IOException e) { throw new RuntimeException("Failed to read document resource: " + name, e); } }
[ "private", "static", "String", "readResource", "(", "String", "name", ")", "{", "try", "{", "return", "IOUtils", ".", "toString", "(", "AmazonKinesisFirehoseToRedshiftSample", ".", "class", ".", "getResourceAsStream", "(", "name", ")", ")", ";", "}", "catch", ...
Method to read the resource for the given filename. @param name the file name @return the input stream as string
[ "Method", "to", "read", "the", "resource", "for", "the", "given", "filename", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonKinesisFirehose/AbstractAmazonKinesisFirehoseDelivery.java#L462-L468
drewwills/cernunnos
cernunnos-core/src/main/java/org/danann/cernunnos/runtime/ScriptRunner.java
ScriptRunner.compileTask
public Task compileTask(String location) { // Assertions. if (location == null) { String msg = "Argument 'location' cannot be null."; throw new IllegalArgumentException(msg); } Document doc = null; URL origin = null; try { origin = ne...
java
public Task compileTask(String location) { // Assertions. if (location == null) { String msg = "Argument 'location' cannot be null."; throw new IllegalArgumentException(msg); } Document doc = null; URL origin = null; try { origin = ne...
[ "public", "Task", "compileTask", "(", "String", "location", ")", "{", "// Assertions.", "if", "(", "location", "==", "null", ")", "{", "String", "msg", "=", "\"Argument 'location' cannot be null.\"", ";", "throw", "new", "IllegalArgumentException", "(", "msg", ")"...
Prepares a <code>Task</code> for (subsequent) execution. @param location Absolute or relative location of a Cernunnos script file.
[ "Prepares", "a", "<code", ">", "Task<", "/", "code", ">", "for", "(", "subsequent", ")", "execution", "." ]
train
https://github.com/drewwills/cernunnos/blob/dc6848e0253775e22b6c869fd06506d4ddb6d728/cernunnos-core/src/main/java/org/danann/cernunnos/runtime/ScriptRunner.java#L91-L112
kstateome/canvas-api
src/main/java/edu/ksu/canvas/model/BaseCanvasModel.java
BaseCanvasModel.toPostMap
public Map<String, List<String>> toPostMap(boolean includeNulls) { Class<? extends BaseCanvasModel> clazz = this.getClass(); Map<String, List<String>> postMap = new HashMap<>(); for (Method method : clazz.getMethods()) { CanvasField canvasFieldAnnotation = method.getAnnotation(Canvas...
java
public Map<String, List<String>> toPostMap(boolean includeNulls) { Class<? extends BaseCanvasModel> clazz = this.getClass(); Map<String, List<String>> postMap = new HashMap<>(); for (Method method : clazz.getMethods()) { CanvasField canvasFieldAnnotation = method.getAnnotation(Canvas...
[ "public", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "toPostMap", "(", "boolean", "includeNulls", ")", "{", "Class", "<", "?", "extends", "BaseCanvasModel", ">", "clazz", "=", "this", ".", "getClass", "(", ")", ";", "Map", "<", "String...
/* Canvas has post parameter keys in non consistent formats. Occasionally they are 'class[field]' and other times they are just 'field'. This method will create a map with the correct post keys and values based on the @CanvasField and @CanvasObject annotations.
[ "/", "*", "Canvas", "has", "post", "parameter", "keys", "in", "non", "consistent", "formats", ".", "Occasionally", "they", "are", "class", "[", "field", "]", "and", "other", "times", "they", "are", "just", "field", ".", "This", "method", "will", "create", ...
train
https://github.com/kstateome/canvas-api/blob/426bf403a8fd7aca3f170348005feda25b374e5a/src/main/java/edu/ksu/canvas/model/BaseCanvasModel.java#L26-L50
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/CertificatesInner.java
CertificatesInner.createOrUpdate
public CertificateInner createOrUpdate(String resourceGroupName, String automationAccountName, String certificateName, CertificateCreateOrUpdateParameters parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, automationAccountName, certificateName, parameters).toBlocking().single().body...
java
public CertificateInner createOrUpdate(String resourceGroupName, String automationAccountName, String certificateName, CertificateCreateOrUpdateParameters parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, automationAccountName, certificateName, parameters).toBlocking().single().body...
[ "public", "CertificateInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "certificateName", ",", "CertificateCreateOrUpdateParameters", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", ...
Create a certificate. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param certificateName The parameters supplied to the create or update certificate operation. @param parameters The parameters supplied to the create or update certificate op...
[ "Create", "a", "certificate", "." ]
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/CertificatesInner.java#L286-L288
MKLab-ITI/multimedia-indexing
src/main/java/gr/iti/mklab/visual/datastructures/AbstractSearchStructure.java
AbstractSearchStructure.getGeolocation
public LatLng getGeolocation(int iid) { if (iid < 0 || iid > loadCounter) { System.out.println("Internal id " + iid + " is out of range!"); return null; } DatabaseEntry key = new DatabaseEntry(); IntegerBinding.intToEntry(iid, key); DatabaseEntry data = new DatabaseEntry(); if ((iidToGeolocati...
java
public LatLng getGeolocation(int iid) { if (iid < 0 || iid > loadCounter) { System.out.println("Internal id " + iid + " is out of range!"); return null; } DatabaseEntry key = new DatabaseEntry(); IntegerBinding.intToEntry(iid, key); DatabaseEntry data = new DatabaseEntry(); if ((iidToGeolocati...
[ "public", "LatLng", "getGeolocation", "(", "int", "iid", ")", "{", "if", "(", "iid", "<", "0", "||", "iid", ">", "loadCounter", ")", "{", "System", ".", "out", ".", "println", "(", "\"Internal id \"", "+", "iid", "+", "\" is out of range!\"", ")", ";", ...
Returns a {@link LatLng} object with the geolocation of the vector with the given internal id or null if the internal id does not exist. Accesses the BDB store! @param iid The internal id of the vector @return The geolocation mapped to the given internal id or null if the internal id does not exist
[ "Returns", "a", "{", "@link", "LatLng", "}", "object", "with", "the", "geolocation", "of", "the", "vector", "with", "the", "given", "internal", "id", "or", "null", "if", "the", "internal", "id", "does", "not", "exist", ".", "Accesses", "the", "BDB", "sto...
train
https://github.com/MKLab-ITI/multimedia-indexing/blob/f82e8e517da706651f4b7a719805401f3102e135/src/main/java/gr/iti/mklab/visual/datastructures/AbstractSearchStructure.java#L429-L447
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/Async.java
Async.toAsync
public static <R> Func0<Observable<R>> toAsync(Func0<? extends R> func) { return toAsync(func, Schedulers.computation()); }
java
public static <R> Func0<Observable<R>> toAsync(Func0<? extends R> func) { return toAsync(func, Schedulers.computation()); }
[ "public", "static", "<", "R", ">", "Func0", "<", "Observable", "<", "R", ">", ">", "toAsync", "(", "Func0", "<", "?", "extends", "R", ">", "func", ")", "{", "return", "toAsync", "(", "func", ",", "Schedulers", ".", "computation", "(", ")", ")", ";"...
Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toAsync.png" alt=""> @param <R> the result value type @param func the function to convert @return a function that returns an Observabl...
[ "Convert", "a", "synchronous", "function", "call", "into", "an", "asynchronous", "function", "call", "through", "an", "Observable", ".", "<p", ">", "<img", "width", "=", "640", "src", "=", "https", ":", "//", "raw", ".", "github", ".", "com", "/", "wiki"...
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L161-L163
twilio/twilio-java
src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableReader.java
VariableReader.previousPage
@Override public Page<Variable> previousPage(final Page<Variable> page, final TwilioRestClient client) { Request request = new Request( HttpMethod.GET, page.getPreviousPageUrl( Domains.SERVERLESS.toString(), clie...
java
@Override public Page<Variable> previousPage(final Page<Variable> page, final TwilioRestClient client) { Request request = new Request( HttpMethod.GET, page.getPreviousPageUrl( Domains.SERVERLESS.toString(), clie...
[ "@", "Override", "public", "Page", "<", "Variable", ">", "previousPage", "(", "final", "Page", "<", "Variable", ">", "page", ",", "final", "TwilioRestClient", "client", ")", "{", "Request", "request", "=", "new", "Request", "(", "HttpMethod", ".", "GET", "...
Retrieve the previous page from the Twilio API. @param page current page @param client TwilioRestClient with which to make the request @return Previous Page
[ "Retrieve", "the", "previous", "page", "from", "the", "Twilio", "API", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableReader.java#L119-L130
mfornos/humanize
humanize-slim/src/main/java/humanize/Humanize.java
Humanize.naturalDay
public static String naturalDay(final int style, final Date then, final Locale locale) { return withinLocale(new Callable<String>() { public String call() throws Exception { return naturalDay(style, then); } }, locale); }
java
public static String naturalDay(final int style, final Date then, final Locale locale) { return withinLocale(new Callable<String>() { public String call() throws Exception { return naturalDay(style, then); } }, locale); }
[ "public", "static", "String", "naturalDay", "(", "final", "int", "style", ",", "final", "Date", "then", ",", "final", "Locale", "locale", ")", "{", "return", "withinLocale", "(", "new", "Callable", "<", "String", ">", "(", ")", "{", "public", "String", "...
Same as {@link #naturalDay(int, Date)} with the given locale. @param style The style of the Date @param then The date (GMT) @param locale Target locale @return String with 'today', 'tomorrow' or 'yesterday' compared to current day. Otherwise, returns a string formatted according to a locale sensitive DateFormat.
[ "Same", "as", "{", "@link", "#naturalDay", "(", "int", "Date", ")", "}", "with", "the", "given", "locale", "." ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-slim/src/main/java/humanize/Humanize.java#L1521-L1530
eurekaclinical/eurekaclinical-common
src/main/java/org/eurekaclinical/common/comm/clients/EurekaClinicalClient.java
EurekaClinicalClient.doPut
protected void doPut(String path, Object o) throws ClientException { doPut(path, o, null); }
java
protected void doPut(String path, Object o) throws ClientException { doPut(path, o, null); }
[ "protected", "void", "doPut", "(", "String", "path", ",", "Object", "o", ")", "throws", "ClientException", "{", "doPut", "(", "path", ",", "o", ",", "null", ")", ";", "}" ]
Updates the resource specified by the path. Sends to the server a Content Type header for JSON. @param o the updated object, will be transmitted as JSON. It must be a Java bean or an object that the object mapper that is in use knows about. @param path the path to the resource. Cannot be <code>null</code>. @throws Cl...
[ "Updates", "the", "resource", "specified", "by", "the", "path", ".", "Sends", "to", "the", "server", "a", "Content", "Type", "header", "for", "JSON", "." ]
train
https://github.com/eurekaclinical/eurekaclinical-common/blob/1867102ff43fe94e519f76a074d5f5923e9be61c/src/main/java/org/eurekaclinical/common/comm/clients/EurekaClinicalClient.java#L179-L181
Azure/azure-sdk-for-java
common/azure-common-mgmt/src/main/java/com/azure/common/mgmt/AzureProxy.java
AzureProxy.createDefaultPipeline
public static HttpPipeline createDefaultPipeline(Class<?> swaggerInterface, ServiceClientCredentials credentials) { return createDefaultPipeline(swaggerInterface, new CredentialsPolicy(credentials)); }
java
public static HttpPipeline createDefaultPipeline(Class<?> swaggerInterface, ServiceClientCredentials credentials) { return createDefaultPipeline(swaggerInterface, new CredentialsPolicy(credentials)); }
[ "public", "static", "HttpPipeline", "createDefaultPipeline", "(", "Class", "<", "?", ">", "swaggerInterface", ",", "ServiceClientCredentials", "credentials", ")", "{", "return", "createDefaultPipeline", "(", "swaggerInterface", ",", "new", "CredentialsPolicy", "(", "cre...
Create the default HttpPipeline. @param swaggerInterface The interface that the pipeline will use to generate a user-agent string. @param credentials The credentials to use to apply authentication to the pipeline. @return the default HttpPipeline.
[ "Create", "the", "default", "HttpPipeline", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common-mgmt/src/main/java/com/azure/common/mgmt/AzureProxy.java#L169-L171
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseThreatDetectionPoliciesInner.java
DatabaseThreatDetectionPoliciesInner.getAsync
public Observable<DatabaseSecurityAlertPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) { return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<DatabaseSecurityAlertPolicyInner>, DatabaseSecurityAlertPolicyInner>() { ...
java
public Observable<DatabaseSecurityAlertPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) { return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<DatabaseSecurityAlertPolicyInner>, DatabaseSecurityAlertPolicyInner>() { ...
[ "public", "Observable", "<", "DatabaseSecurityAlertPolicyInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName"...
Gets a database's threat detection policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database for which database Threat De...
[ "Gets", "a", "database", "s", "threat", "detection", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseThreatDetectionPoliciesInner.java#L105-L112
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java
ComputeNodesImpl.enableScheduling
public void enableScheduling(String poolId, String nodeId, ComputeNodeEnableSchedulingOptions computeNodeEnableSchedulingOptions) { enableSchedulingWithServiceResponseAsync(poolId, nodeId, computeNodeEnableSchedulingOptions).toBlocking().single().body(); }
java
public void enableScheduling(String poolId, String nodeId, ComputeNodeEnableSchedulingOptions computeNodeEnableSchedulingOptions) { enableSchedulingWithServiceResponseAsync(poolId, nodeId, computeNodeEnableSchedulingOptions).toBlocking().single().body(); }
[ "public", "void", "enableScheduling", "(", "String", "poolId", ",", "String", "nodeId", ",", "ComputeNodeEnableSchedulingOptions", "computeNodeEnableSchedulingOptions", ")", "{", "enableSchedulingWithServiceResponseAsync", "(", "poolId", ",", "nodeId", ",", "computeNodeEnable...
Enables task scheduling on the specified compute node. You can enable task scheduling on a node only if its current scheduling state is disabled. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node on which you want to enable task scheduling. @param computeNodeEnab...
[ "Enables", "task", "scheduling", "on", "the", "specified", "compute", "node", ".", "You", "can", "enable", "task", "scheduling", "on", "a", "node", "only", "if", "its", "current", "scheduling", "state", "is", "disabled", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java#L1814-L1816
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/function/Actions.java
Actions.toFunc
public static <T1, T2, T3, R> Func3<T1, T2, T3, R> toFunc(final Action3<T1, T2, T3> action, final R result) { return new Func3<T1, T2, T3, R>() { @Override public R call(T1 t1, T2 t2, T3 t3) { action.call(t1, t2, t3); return result; } }...
java
public static <T1, T2, T3, R> Func3<T1, T2, T3, R> toFunc(final Action3<T1, T2, T3> action, final R result) { return new Func3<T1, T2, T3, R>() { @Override public R call(T1 t1, T2 t2, T3 t3) { action.call(t1, t2, t3); return result; } }...
[ "public", "static", "<", "T1", ",", "T2", ",", "T3", ",", "R", ">", "Func3", "<", "T1", ",", "T2", ",", "T3", ",", "R", ">", "toFunc", "(", "final", "Action3", "<", "T1", ",", "T2", ",", "T3", ">", "action", ",", "final", "R", "result", ")", ...
Converts an {@link Action3} to a function that calls the action and returns a specified value. @param action the {@link Action3} to convert @param result the value to return from the function call @return a {@link Func3} that calls {@code action} and returns {@code result}
[ "Converts", "an", "{", "@link", "Action3", "}", "to", "a", "function", "that", "calls", "the", "action", "and", "returns", "a", "specified", "value", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/function/Actions.java#L253-L261
undera/jmeter-plugins
infra/common/src/main/java/kg/apc/jmeter/JMeterPluginsUtils.java
JMeterPluginsUtils.addHelpLinkToPanel
public static Component addHelpLinkToPanel(Container panel, String helpPage) { if (!java.awt.Desktop.isDesktopSupported()) { return panel; } JLabel icon = new JLabel(); icon.setIcon(new javax.swing.ImageIcon(JMeterPluginsUtils.class.getResource("vizualizers/information.png"))...
java
public static Component addHelpLinkToPanel(Container panel, String helpPage) { if (!java.awt.Desktop.isDesktopSupported()) { return panel; } JLabel icon = new JLabel(); icon.setIcon(new javax.swing.ImageIcon(JMeterPluginsUtils.class.getResource("vizualizers/information.png"))...
[ "public", "static", "Component", "addHelpLinkToPanel", "(", "Container", "panel", ",", "String", "helpPage", ")", "{", "if", "(", "!", "java", ".", "awt", ".", "Desktop", ".", "isDesktopSupported", "(", ")", ")", "{", "return", "panel", ";", "}", "JLabel",...
Find in panel appropriate place and put hyperlink there. I know that it is stupid way. But the result is so good! @param panel - supposed to be result of makeTitlePanel() @param helpPage wiki page name, or full URL in case of external wiki @return original panel @see AbstractJMeterGuiComponent
[ "Find", "in", "panel", "appropriate", "place", "and", "put", "hyperlink", "there", ".", "I", "know", "that", "it", "is", "stupid", "way", ".", "But", "the", "result", "is", "so", "good!" ]
train
https://github.com/undera/jmeter-plugins/blob/416d2a77249ab921c7e4134c3e6a9639901ef7e8/infra/common/src/main/java/kg/apc/jmeter/JMeterPluginsUtils.java#L200-L251
VoltDB/voltdb
src/frontend/org/voltdb/planner/AbstractParsedStmt.java
AbstractParsedStmt.addSubqueryToStmtCache
protected StmtSubqueryScan addSubqueryToStmtCache( AbstractParsedStmt subquery, String tableAlias) { assert(subquery != null); // If there is no usable alias because the subquery is inside an expression, // generate a unique one for internal use. if (tableAlias == null) { ...
java
protected StmtSubqueryScan addSubqueryToStmtCache( AbstractParsedStmt subquery, String tableAlias) { assert(subquery != null); // If there is no usable alias because the subquery is inside an expression, // generate a unique one for internal use. if (tableAlias == null) { ...
[ "protected", "StmtSubqueryScan", "addSubqueryToStmtCache", "(", "AbstractParsedStmt", "subquery", ",", "String", "tableAlias", ")", "{", "assert", "(", "subquery", "!=", "null", ")", ";", "// If there is no usable alias because the subquery is inside an expression,", "// genera...
Add a sub-query to the statement cache. @param subquery @param tableAlias @return the cache entry
[ "Add", "a", "sub", "-", "query", "to", "the", "statement", "cache", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/AbstractParsedStmt.java#L820-L833
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwxmlcontenttype.java
appfwxmlcontenttype.get
public static appfwxmlcontenttype get(nitro_service service, String xmlcontenttypevalue) throws Exception{ appfwxmlcontenttype obj = new appfwxmlcontenttype(); obj.set_xmlcontenttypevalue(xmlcontenttypevalue); appfwxmlcontenttype response = (appfwxmlcontenttype) obj.get_resource(service); return response; }
java
public static appfwxmlcontenttype get(nitro_service service, String xmlcontenttypevalue) throws Exception{ appfwxmlcontenttype obj = new appfwxmlcontenttype(); obj.set_xmlcontenttypevalue(xmlcontenttypevalue); appfwxmlcontenttype response = (appfwxmlcontenttype) obj.get_resource(service); return response; }
[ "public", "static", "appfwxmlcontenttype", "get", "(", "nitro_service", "service", ",", "String", "xmlcontenttypevalue", ")", "throws", "Exception", "{", "appfwxmlcontenttype", "obj", "=", "new", "appfwxmlcontenttype", "(", ")", ";", "obj", ".", "set_xmlcontenttypeval...
Use this API to fetch appfwxmlcontenttype resource of given name .
[ "Use", "this", "API", "to", "fetch", "appfwxmlcontenttype", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwxmlcontenttype.java#L218-L223
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java
Frame.getStackLocation
public int getStackLocation(int loc) throws DataflowAnalysisException { int stackDepth = getStackDepth(); if (loc >= stackDepth) { throw new DataflowAnalysisException("not enough values on stack: access=" + loc + ", avail=" + stackDepth); } return slotList.size() - (loc + 1);...
java
public int getStackLocation(int loc) throws DataflowAnalysisException { int stackDepth = getStackDepth(); if (loc >= stackDepth) { throw new DataflowAnalysisException("not enough values on stack: access=" + loc + ", avail=" + stackDepth); } return slotList.size() - (loc + 1);...
[ "public", "int", "getStackLocation", "(", "int", "loc", ")", "throws", "DataflowAnalysisException", "{", "int", "stackDepth", "=", "getStackDepth", "(", ")", ";", "if", "(", "loc", ">=", "stackDepth", ")", "{", "throw", "new", "DataflowAnalysisException", "(", ...
Get a the location in the frame of a value on the operand stack. @param loc the stack location, counting downwards from the top (location 0)
[ "Get", "a", "the", "location", "in", "the", "frame", "of", "a", "value", "on", "the", "operand", "stack", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java#L263-L269
apache/spark
sql/catalyst/src/main/java/org/apache/spark/sql/util/CaseInsensitiveStringMap.java
CaseInsensitiveStringMap.getBoolean
public boolean getBoolean(String key, boolean defaultValue) { String value = get(key); // We can't use `Boolean.parseBoolean` here, as it returns false for invalid strings. if (value == null) { return defaultValue; } else if (value.equalsIgnoreCase("true")) { return true; } else if (valu...
java
public boolean getBoolean(String key, boolean defaultValue) { String value = get(key); // We can't use `Boolean.parseBoolean` here, as it returns false for invalid strings. if (value == null) { return defaultValue; } else if (value.equalsIgnoreCase("true")) { return true; } else if (valu...
[ "public", "boolean", "getBoolean", "(", "String", "key", ",", "boolean", "defaultValue", ")", "{", "String", "value", "=", "get", "(", "key", ")", ";", "// We can't use `Boolean.parseBoolean` here, as it returns false for invalid strings.", "if", "(", "value", "==", "...
Returns the boolean value to which the specified key is mapped, or defaultValue if there is no mapping for the key. The key match is case-insensitive.
[ "Returns", "the", "boolean", "value", "to", "which", "the", "specified", "key", "is", "mapped", "or", "defaultValue", "if", "there", "is", "no", "mapping", "for", "the", "key", ".", "The", "key", "match", "is", "case", "-", "insensitive", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/catalyst/src/main/java/org/apache/spark/sql/util/CaseInsensitiveStringMap.java#L134-L146
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java
CassandraSchemaManager.onSetGcGrace
private void onSetGcGrace(CfDef cfDef, Properties cfProperties, StringBuilder builder) { String gcGraceSeconds = cfProperties.getProperty(CassandraConstants.GC_GRACE_SECONDS); if (gcGraceSeconds != null) { try { if (builder != null) { ...
java
private void onSetGcGrace(CfDef cfDef, Properties cfProperties, StringBuilder builder) { String gcGraceSeconds = cfProperties.getProperty(CassandraConstants.GC_GRACE_SECONDS); if (gcGraceSeconds != null) { try { if (builder != null) { ...
[ "private", "void", "onSetGcGrace", "(", "CfDef", "cfDef", ",", "Properties", "cfProperties", ",", "StringBuilder", "builder", ")", "{", "String", "gcGraceSeconds", "=", "cfProperties", ".", "getProperty", "(", "CassandraConstants", ".", "GC_GRACE_SECONDS", ")", ";",...
On set gc grace. @param cfDef the cf def @param cfProperties the cf properties @param builder the builder
[ "On", "set", "gc", "grace", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java#L2496-L2518
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/Session.java
Session.sortGrantsByStartTime
private void sortGrantsByStartTime(List<ResourceGrant> grants) { Collections.sort(grants, new Comparator<ResourceGrant>() { @Override public int compare(ResourceGrant g1, ResourceGrant g2) { if (g1.grantedTime < g2.grantedTime) { return 1; } if (g1.grantedTime > g2.gran...
java
private void sortGrantsByStartTime(List<ResourceGrant> grants) { Collections.sort(grants, new Comparator<ResourceGrant>() { @Override public int compare(ResourceGrant g1, ResourceGrant g2) { if (g1.grantedTime < g2.grantedTime) { return 1; } if (g1.grantedTime > g2.gran...
[ "private", "void", "sortGrantsByStartTime", "(", "List", "<", "ResourceGrant", ">", "grants", ")", "{", "Collections", ".", "sort", "(", "grants", ",", "new", "Comparator", "<", "ResourceGrant", ">", "(", ")", "{", "@", "Override", "public", "int", "compare"...
Sort grants on granted time in descending order @param grants the list of grants to sort
[ "Sort", "grants", "on", "granted", "time", "in", "descending", "order" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/Session.java#L1253-L1266
wcm-io/wcm-io-tooling
commons/content-package-builder/src/main/java/io/wcm/tooling/commons/contentpackagebuilder/ContentPackage.java
ContentPackage.addFile
public void addFile(String path, InputStream inputStream, String contentType) throws IOException { String fullPath = buildJcrPathForZip(path); writeBinaryFile(fullPath, inputStream); if (StringUtils.isNotEmpty(contentType)) { String mimeType = StringUtils.substringBefore(contentType, CONTENT_TYPE_CHA...
java
public void addFile(String path, InputStream inputStream, String contentType) throws IOException { String fullPath = buildJcrPathForZip(path); writeBinaryFile(fullPath, inputStream); if (StringUtils.isNotEmpty(contentType)) { String mimeType = StringUtils.substringBefore(contentType, CONTENT_TYPE_CHA...
[ "public", "void", "addFile", "(", "String", "path", ",", "InputStream", "inputStream", ",", "String", "contentType", ")", "throws", "IOException", "{", "String", "fullPath", "=", "buildJcrPathForZip", "(", "path", ")", ";", "writeBinaryFile", "(", "fullPath", ",...
Adds a binary file with explicit mime type. @param path Full content path and file name of file @param inputStream Input stream with binary data @param contentType Mime type, optionally with ";charset=XYZ" extension @throws IOException I/O exception
[ "Adds", "a", "binary", "file", "with", "explicit", "mime", "type", "." ]
train
https://github.com/wcm-io/wcm-io-tooling/blob/1abcd01dd3ad4cc248f03b431f929573d84fa9b4/commons/content-package-builder/src/main/java/io/wcm/tooling/commons/contentpackagebuilder/ContentPackage.java#L188-L200
aws/aws-sdk-java
aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/CreateCoreDefinitionRequest.java
CreateCoreDefinitionRequest.withTags
public CreateCoreDefinitionRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
java
public CreateCoreDefinitionRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "CreateCoreDefinitionRequest", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
Tag(s) to add to the new resource @param tags Tag(s) to add to the new resource @return Returns a reference to this object so that method calls can be chained together.
[ "Tag", "(", "s", ")", "to", "add", "to", "the", "new", "resource" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/CreateCoreDefinitionRequest.java#L169-L172
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/passivator/EJBObjectInfo.java
EJBObjectInfo.addFieldInfo
void addFieldInfo(String className, List<FieldInfo> fieldInfoList) { if (ivFieldInfoMap == null) { ivFieldInfoMap = new HashMap<String, List<FieldInfo>>(); } ivFieldInfoMap.put(className, fieldInfoList); }
java
void addFieldInfo(String className, List<FieldInfo> fieldInfoList) { if (ivFieldInfoMap == null) { ivFieldInfoMap = new HashMap<String, List<FieldInfo>>(); } ivFieldInfoMap.put(className, fieldInfoList); }
[ "void", "addFieldInfo", "(", "String", "className", ",", "List", "<", "FieldInfo", ">", "fieldInfoList", ")", "{", "if", "(", "ivFieldInfoMap", "==", "null", ")", "{", "ivFieldInfoMap", "=", "new", "HashMap", "<", "String", ",", "List", "<", "FieldInfo", "...
Adds the className and fieldInfoList to the ivFieldInfoMap. @param className @param fieldInfoList
[ "Adds", "the", "className", "and", "fieldInfoList", "to", "the", "ivFieldInfoMap", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/passivator/EJBObjectInfo.java#L76-L81
keenon/loglinear
src/main/java/com/github/keenon/loglinear/learning/AbstractBatchOptimizer.java
AbstractBatchOptimizer.addSparseConstraint
public void addSparseConstraint(int component, int index, double value) { constraints.add(new Constraint(component, index, value)); }
java
public void addSparseConstraint(int component, int index, double value) { constraints.add(new Constraint(component, index, value)); }
[ "public", "void", "addSparseConstraint", "(", "int", "component", ",", "int", "index", ",", "double", "value", ")", "{", "constraints", ".", "add", "(", "new", "Constraint", "(", "component", ",", "index", ",", "value", ")", ")", ";", "}" ]
This adds a constraint on the weight vector, that a certain component must be set to a sparse index=value @param component the component to fix @param index the index of the fixed sparse component @param value the value to fix at
[ "This", "adds", "a", "constraint", "on", "the", "weight", "vector", "that", "a", "certain", "component", "must", "be", "set", "to", "a", "sparse", "index", "=", "value" ]
train
https://github.com/keenon/loglinear/blob/fa0c370ab6782015412f676ef2ab11c97be58e29/src/main/java/com/github/keenon/loglinear/learning/AbstractBatchOptimizer.java#L106-L108
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/util/pool/Pool.java
Pool.addConnection
private void addConnection() throws SQLException { //create new connection Protocol protocol = Utils.retrieveProxy(urlParser, globalInfo); MariaDbConnection connection = new MariaDbConnection(protocol); MariaDbPooledConnection pooledConnection = createPoolConnection(connection); if (options.static...
java
private void addConnection() throws SQLException { //create new connection Protocol protocol = Utils.retrieveProxy(urlParser, globalInfo); MariaDbConnection connection = new MariaDbConnection(protocol); MariaDbPooledConnection pooledConnection = createPoolConnection(connection); if (options.static...
[ "private", "void", "addConnection", "(", ")", "throws", "SQLException", "{", "//create new connection", "Protocol", "protocol", "=", "Utils", ".", "retrieveProxy", "(", "urlParser", ",", "globalInfo", ")", ";", "MariaDbConnection", "connection", "=", "new", "MariaDb...
Create new connection. @throws SQLException if connection creation failed
[ "Create", "new", "connection", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/util/pool/Pool.java#L215-L246
Azure/azure-sdk-for-java
storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java
BlobContainersInner.createOrUpdateImmutabilityPolicy
public ImmutabilityPolicyInner createOrUpdateImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, String ifMatch) { return createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, immutabi...
java
public ImmutabilityPolicyInner createOrUpdateImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, int immutabilityPeriodSinceCreationInDays, String ifMatch) { return createOrUpdateImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, immutabi...
[ "public", "ImmutabilityPolicyInner", "createOrUpdateImmutabilityPolicy", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "containerName", ",", "int", "immutabilityPeriodSinceCreationInDays", ",", "String", "ifMatch", ")", "{", "return", "cre...
Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. @param accountName The name of the storage account within the specified res...
[ "Creates", "or", "updates", "an", "unlocked", "immutability", "policy", ".", "ETag", "in", "If", "-", "Match", "is", "honored", "if", "given", "but", "not", "required", "for", "this", "operation", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java#L1096-L1098
netty/netty
handler/src/main/java/io/netty/handler/ssl/SslContext.java
SslContext.newClientContext
@Deprecated public static SslContext newClientContext( File certChainFile, TrustManagerFactory trustManagerFactory) throws SSLException { return newClientContext(null, certChainFile, trustManagerFactory); }
java
@Deprecated public static SslContext newClientContext( File certChainFile, TrustManagerFactory trustManagerFactory) throws SSLException { return newClientContext(null, certChainFile, trustManagerFactory); }
[ "@", "Deprecated", "public", "static", "SslContext", "newClientContext", "(", "File", "certChainFile", ",", "TrustManagerFactory", "trustManagerFactory", ")", "throws", "SSLException", "{", "return", "newClientContext", "(", "null", ",", "certChainFile", ",", "trustMana...
Creates a new client-side {@link SslContext}. @param certChainFile an X.509 certificate chain file in PEM format. {@code null} to use the system default @param trustManagerFactory the {@link TrustManagerFactory} that provides the {@link TrustManager}s that verifies the certificates sent from servers. {@code null} to u...
[ "Creates", "a", "new", "client", "-", "side", "{", "@link", "SslContext", "}", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslContext.java#L495-L499
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java
SearchIndex.createDocument
protected Document createDocument(NodeDataIndexing node, NamespaceMappings nsMappings, IndexFormatVersion indexFormatVersion, boolean loadAllProperties, VolatileIndex volatileIndex) throws RepositoryException { NodeIndexer indexer = new NodeIndexer(node, getContext().getItemStateManager(), nsMap...
java
protected Document createDocument(NodeDataIndexing node, NamespaceMappings nsMappings, IndexFormatVersion indexFormatVersion, boolean loadAllProperties, VolatileIndex volatileIndex) throws RepositoryException { NodeIndexer indexer = new NodeIndexer(node, getContext().getItemStateManager(), nsMap...
[ "protected", "Document", "createDocument", "(", "NodeDataIndexing", "node", ",", "NamespaceMappings", "nsMappings", ",", "IndexFormatVersion", "indexFormatVersion", ",", "boolean", "loadAllProperties", ",", "VolatileIndex", "volatileIndex", ")", "throws", "RepositoryException...
Creates a lucene <code>Document</code> for a node state using the namespace mappings <code>nsMappings</code>. @param node the node state to index. @param nsMappings the namespace mappings of the search index. @param indexFormatVersion the index format version that should be used to index the passed node state. @param ...
[ "Creates", "a", "lucene", "<code", ">", "Document<", "/", "code", ">", "for", "a", "node", "state", "using", "the", "namespace", "mappings", "<code", ">", "nsMappings<", "/", "code", ">", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java#L1841-L1855
vincentk/joptimizer
src/main/java/com/joptimizer/util/ColtUtils.java
ColtUtils.add
public static final DoubleMatrix2D add(DoubleMatrix2D A, DoubleMatrix2D B){ if(A.rows()!=B.rows() || A.columns()!=B.columns()){ throw new IllegalArgumentException("wrong matrices dimensions"); } DoubleMatrix2D ret = DoubleFactory2D.dense.make(A.rows(), A.columns()); for(int i=0; i<ret.rows(); i++){ ...
java
public static final DoubleMatrix2D add(DoubleMatrix2D A, DoubleMatrix2D B){ if(A.rows()!=B.rows() || A.columns()!=B.columns()){ throw new IllegalArgumentException("wrong matrices dimensions"); } DoubleMatrix2D ret = DoubleFactory2D.dense.make(A.rows(), A.columns()); for(int i=0; i<ret.rows(); i++){ ...
[ "public", "static", "final", "DoubleMatrix2D", "add", "(", "DoubleMatrix2D", "A", ",", "DoubleMatrix2D", "B", ")", "{", "if", "(", "A", ".", "rows", "(", ")", "!=", "B", ".", "rows", "(", ")", "||", "A", ".", "columns", "(", ")", "!=", "B", ".", ...
Returns C = A + B. Useful in avoiding the need of the copy() in the colt api.
[ "Returns", "C", "=", "A", "+", "B", ".", "Useful", "in", "avoiding", "the", "need", "of", "the", "copy", "()", "in", "the", "colt", "api", "." ]
train
https://github.com/vincentk/joptimizer/blob/65064c1bb0b26c7261358021e4c93d06dd43564f/src/main/java/com/joptimizer/util/ColtUtils.java#L313-L325
phax/ph-css
ph-css/src/main/java/com/helger/css/utils/CSSColorHelper.java
CSSColorHelper.getRGBAColorValue
@Nonnull @Nonempty public static String getRGBAColorValue (final int nRed, final int nGreen, final int nBlue, final float fOpacity) { return new StringBuilder (24).append (CCSSValue.PREFIX_RGBA_OPEN) .append (getRGBValue (nRed)) .append (',') ...
java
@Nonnull @Nonempty public static String getRGBAColorValue (final int nRed, final int nGreen, final int nBlue, final float fOpacity) { return new StringBuilder (24).append (CCSSValue.PREFIX_RGBA_OPEN) .append (getRGBValue (nRed)) .append (',') ...
[ "@", "Nonnull", "@", "Nonempty", "public", "static", "String", "getRGBAColorValue", "(", "final", "int", "nRed", ",", "final", "int", "nGreen", ",", "final", "int", "nBlue", ",", "final", "float", "fOpacity", ")", "{", "return", "new", "StringBuilder", "(", ...
Get the passed values as CSS RGBA color value @param nRed Red - is scaled to 0-255 @param nGreen Green - is scaled to 0-255 @param nBlue Blue - is scaled to 0-255 @param fOpacity Opacity to use - is scaled to 0-1. @return The CSS string to use
[ "Get", "the", "passed", "values", "as", "CSS", "RGBA", "color", "value" ]
train
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/utils/CSSColorHelper.java#L392-L406
hankcs/HanLP
src/main/java/com/hankcs/hanlp/dependency/nnparser/Matrix.java
Matrix.setMatrix
public void setMatrix(int i0, int i1, int[] c, Matrix X) { try { for (int i = i0; i <= i1; i++) { for (int j = 0; j < c.length; j++) { A[i][c[j]] = X.get(i - i0, j); } } } catch (A...
java
public void setMatrix(int i0, int i1, int[] c, Matrix X) { try { for (int i = i0; i <= i1; i++) { for (int j = 0; j < c.length; j++) { A[i][c[j]] = X.get(i - i0, j); } } } catch (A...
[ "public", "void", "setMatrix", "(", "int", "i0", ",", "int", "i1", ",", "int", "[", "]", "c", ",", "Matrix", "X", ")", "{", "try", "{", "for", "(", "int", "i", "=", "i0", ";", "i", "<=", "i1", ";", "i", "++", ")", "{", "for", "(", "int", ...
Set a submatrix. @param i0 Initial row index @param i1 Final row index @param c Array of column indices. @param X A(i0:i1,c(:)) @throws ArrayIndexOutOfBoundsException Submatrix indices
[ "Set", "a", "submatrix", "." ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dependency/nnparser/Matrix.java#L583-L599
haraldk/TwelveMonkeys
imageio/imageio-pict/src/main/java/com/twelvemonkeys/imageio/plugins/pict/PICTUtil.java
PICTUtil.readPascalString
public static String readPascalString(final DataInput pStream) throws IOException { // Get as many bytes as indicated by byte count int length = pStream.readUnsignedByte(); byte[] bytes = new byte[length]; pStream.readFully(bytes, 0, length); return new String(bytes, ENCODING);...
java
public static String readPascalString(final DataInput pStream) throws IOException { // Get as many bytes as indicated by byte count int length = pStream.readUnsignedByte(); byte[] bytes = new byte[length]; pStream.readFully(bytes, 0, length); return new String(bytes, ENCODING);...
[ "public", "static", "String", "readPascalString", "(", "final", "DataInput", "pStream", ")", "throws", "IOException", "{", "// Get as many bytes as indicated by byte count", "int", "length", "=", "pStream", ".", "readUnsignedByte", "(", ")", ";", "byte", "[", "]", "...
Reads a Pascal String from the given stream. The input stream must be positioned at the length byte of the text, which can thus be a maximum of 255 characters long. @param pStream the input stream @return the text read @throws IOException if an I/O exception occurs during reading
[ "Reads", "a", "Pascal", "String", "from", "the", "given", "stream", ".", "The", "input", "stream", "must", "be", "positioned", "at", "the", "length", "byte", "of", "the", "text", "which", "can", "thus", "be", "a", "maximum", "of", "255", "characters", "l...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/imageio/imageio-pict/src/main/java/com/twelvemonkeys/imageio/plugins/pict/PICTUtil.java#L126-L134
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_tcp_route_routeId_DELETE
public void serviceName_tcp_route_routeId_DELETE(String serviceName, Long routeId) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/tcp/route/{routeId}"; StringBuilder sb = path(qPath, serviceName, routeId); exec(qPath, "DELETE", sb.toString(), null); }
java
public void serviceName_tcp_route_routeId_DELETE(String serviceName, Long routeId) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/tcp/route/{routeId}"; StringBuilder sb = path(qPath, serviceName, routeId); exec(qPath, "DELETE", sb.toString(), null); }
[ "public", "void", "serviceName_tcp_route_routeId_DELETE", "(", "String", "serviceName", ",", "Long", "routeId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ipLoadbalancing/{serviceName}/tcp/route/{routeId}\"", ";", "StringBuilder", "sb", "=", "path", "(...
Delete this TCP route REST: DELETE /ipLoadbalancing/{serviceName}/tcp/route/{routeId} @param serviceName [required] The internal name of your IP load balancing @param routeId [required] Id of your route
[ "Delete", "this", "TCP", "route" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L1334-L1338
structr/structr
structr-ui/src/main/java/org/structr/web/common/FileHelper.java
FileHelper.createFileBase64
public static <T extends File> T createFileBase64(final SecurityContext securityContext, final String rawData, final Class<T> t) throws FrameworkException, IOException { Base64URIData uriData = new Base64URIData(rawData); return createFile(securityContext, uriData.getBinaryData(), uriData.getContentType(), t); ...
java
public static <T extends File> T createFileBase64(final SecurityContext securityContext, final String rawData, final Class<T> t) throws FrameworkException, IOException { Base64URIData uriData = new Base64URIData(rawData); return createFile(securityContext, uriData.getBinaryData(), uriData.getContentType(), t); ...
[ "public", "static", "<", "T", "extends", "File", ">", "T", "createFileBase64", "(", "final", "SecurityContext", "securityContext", ",", "final", "String", "rawData", ",", "final", "Class", "<", "T", ">", "t", ")", "throws", "FrameworkException", ",", "IOExcept...
Create a new image node from image data encoded in base64 format. If the given string is an uuid of an existing file, transform it into the target class. @param <T> @param securityContext @param rawData @param t defaults to File.class if null @return file @throws FrameworkException @throws IOException
[ "Create", "a", "new", "image", "node", "from", "image", "data", "encoded", "in", "base64", "format", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-ui/src/main/java/org/structr/web/common/FileHelper.java#L110-L116
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/XmlHttpResponse.java
XmlHttpResponse.checkXPaths
public XPathCheckResult checkXPaths(Map<String, Object> values, Map<String, String> expressionsToCheck) { XPathCheckResult result; String content = getResponse(); if (content == null) { result = new XPathCheckResult(); result.setMismatchDetail("NOK: no response available....
java
public XPathCheckResult checkXPaths(Map<String, Object> values, Map<String, String> expressionsToCheck) { XPathCheckResult result; String content = getResponse(); if (content == null) { result = new XPathCheckResult(); result.setMismatchDetail("NOK: no response available....
[ "public", "XPathCheckResult", "checkXPaths", "(", "Map", "<", "String", ",", "Object", ">", "values", ",", "Map", "<", "String", ",", "String", ">", "expressionsToCheck", ")", "{", "XPathCheckResult", "result", ";", "String", "content", "=", "getResponse", "("...
Checks whether input values are present at correct locations in the response. @param values keyName -> value, input parameters supplied to get request. @param expressionsToCheck xpath -> keyName, each xpath in this map is expected to evaluate to the value present in values for that key (i.e. values[keyName]) @return OK...
[ "Checks", "whether", "input", "values", "are", "present", "at", "correct", "locations", "in", "the", "response", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/XmlHttpResponse.java#L143-L155
yidongnan/grpc-spring-boot-starter
grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/serverfactory/AbstractGrpcServerFactory.java
AbstractGrpcServerFactory.toCheckedFile
protected File toCheckedFile(final String context, final String path) { if (path == null || path.trim().isEmpty()) { throw new IllegalArgumentException(context + " path cannot be null or blank"); } final File file = new File(path); if (!file.isFile()) { String mes...
java
protected File toCheckedFile(final String context, final String path) { if (path == null || path.trim().isEmpty()) { throw new IllegalArgumentException(context + " path cannot be null or blank"); } final File file = new File(path); if (!file.isFile()) { String mes...
[ "protected", "File", "toCheckedFile", "(", "final", "String", "context", ",", "final", "String", "path", ")", "{", "if", "(", "path", "==", "null", "||", "path", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalArgumen...
Converts the given path to a file. This method checks that the file exists and refers to a file. @param context The context for what the file is used. This value will be used in case of exceptions. @param path The path of the file to use. @return The file instance created with the given path.
[ "Converts", "the", "given", "path", "to", "a", "file", ".", "This", "method", "checks", "that", "the", "file", "exists", "and", "refers", "to", "a", "file", "." ]
train
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/serverfactory/AbstractGrpcServerFactory.java#L151-L165
jenkinsci/java-client-api
jenkins-client/src/main/java/com/offbytwo/jenkins/model/BuildWithDetails.java
BuildWithDetails.streamConsoleOutput
public void streamConsoleOutput(final BuildConsoleStreamListener listener, final int poolingInterval, final int poolingTimeout, boolean crumbFlag) throws InterruptedException, IOException { // Calculate start and timeout final long startTime = System.currentTimeMillis(); final long timeoutTime =...
java
public void streamConsoleOutput(final BuildConsoleStreamListener listener, final int poolingInterval, final int poolingTimeout, boolean crumbFlag) throws InterruptedException, IOException { // Calculate start and timeout final long startTime = System.currentTimeMillis(); final long timeoutTime =...
[ "public", "void", "streamConsoleOutput", "(", "final", "BuildConsoleStreamListener", "listener", ",", "final", "int", "poolingInterval", ",", "final", "int", "poolingTimeout", ",", "boolean", "crumbFlag", ")", "throws", "InterruptedException", ",", "IOException", "{", ...
Stream build console output log as text using BuildConsoleStreamListener Method can be used to asynchronously obtain logs for running build. @param listener interface used to asynchronously obtain logs @param poolingInterval interval (seconds) used to pool jenkins for logs @param poolingTimeout pooling timeout (second...
[ "Stream", "build", "console", "output", "log", "as", "text", "using", "BuildConsoleStreamListener", "Method", "can", "be", "used", "to", "asynchronously", "obtain", "logs", "for", "running", "build", "." ]
train
https://github.com/jenkinsci/java-client-api/blob/c4f5953d3d4dda92cd946ad3bf2b811524c32da9/jenkins-client/src/main/java/com/offbytwo/jenkins/model/BuildWithDetails.java#L395-L424
alkacon/opencms-core
src-modules/org/opencms/workplace/CmsWidgetDialogParameter.java
CmsWidgetDialogParameter.createId
public static String createId(String name, int index) { StringBuffer result = new StringBuffer(); result.append(name); result.append('.'); result.append(index); return result.toString(); }
java
public static String createId(String name, int index) { StringBuffer result = new StringBuffer(); result.append(name); result.append('.'); result.append(index); return result.toString(); }
[ "public", "static", "String", "createId", "(", "String", "name", ",", "int", "index", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", ")", ";", "result", ".", "append", "(", "name", ")", ";", "result", ".", "append", "(", "'", "'",...
Returns a from id representation for the given widget name and id.<p> @param name the widget parameter name @param index the widget parameter index @return a from id representation for the given widget name and id
[ "Returns", "a", "from", "id", "representation", "for", "the", "given", "widget", "name", "and", "id", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/CmsWidgetDialogParameter.java#L393-L401
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java
UnicodeSet.containsAll
public boolean containsAll(String s) { int cp; for (int i = 0; i < s.length(); i += UTF16.getCharCount(cp)) { cp = UTF16.charAt(s, i); if (!contains(cp)) { if (strings.size() == 0) { return false; } return conta...
java
public boolean containsAll(String s) { int cp; for (int i = 0; i < s.length(); i += UTF16.getCharCount(cp)) { cp = UTF16.charAt(s, i); if (!contains(cp)) { if (strings.size() == 0) { return false; } return conta...
[ "public", "boolean", "containsAll", "(", "String", "s", ")", "{", "int", "cp", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "s", ".", "length", "(", ")", ";", "i", "+=", "UTF16", ".", "getCharCount", "(", "cp", ")", ")", "{", "cp", "...
Returns true if there is a partition of the string such that this set contains each of the partitioned strings. For example, for the Unicode set [a{bc}{cd}]<br> containsAll is true for each of: "a", "bc", ""cdbca"<br> containsAll is false for each of: "acb", "bcda", "bcx"<br> @param s string containing characters to be...
[ "Returns", "true", "if", "there", "is", "a", "partition", "of", "the", "string", "such", "that", "this", "set", "contains", "each", "of", "the", "partitioned", "strings", ".", "For", "example", "for", "the", "Unicode", "set", "[", "a", "{", "bc", "}", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L1928-L1940
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ApplicationsInner.java
ApplicationsInner.createAsync
public Observable<ApplicationInner> createAsync(String resourceGroupName, String clusterName, String applicationName, ApplicationInner parameters) { return createWithServiceResponseAsync(resourceGroupName, clusterName, applicationName, parameters).map(new Func1<ServiceResponse<ApplicationInner>, ApplicationInne...
java
public Observable<ApplicationInner> createAsync(String resourceGroupName, String clusterName, String applicationName, ApplicationInner parameters) { return createWithServiceResponseAsync(resourceGroupName, clusterName, applicationName, parameters).map(new Func1<ServiceResponse<ApplicationInner>, ApplicationInne...
[ "public", "Observable", "<", "ApplicationInner", ">", "createAsync", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "applicationName", ",", "ApplicationInner", "parameters", ")", "{", "return", "createWithServiceResponseAsync", "(", "re...
Creates applications for the HDInsight cluster. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @param applicationName The constant value for the application name. @param parameters The application create request. @throws IllegalArgumentException thrown if parameter...
[ "Creates", "applications", "for", "the", "HDInsight", "cluster", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ApplicationsInner.java#L351-L358
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/CassandraClientBase.java
CassandraClientBase.persistJoinTableByCql
protected void persistJoinTableByCql(JoinTableData joinTableData, Cassandra.Client conn) { String joinTableName = joinTableData.getJoinTableName(); String invJoinColumnName = joinTableData.getInverseJoinColumnName(); Map<Object, Set<Object>> joinTableRecords = joinTableData.getJoinTableRecords()...
java
protected void persistJoinTableByCql(JoinTableData joinTableData, Cassandra.Client conn) { String joinTableName = joinTableData.getJoinTableName(); String invJoinColumnName = joinTableData.getInverseJoinColumnName(); Map<Object, Set<Object>> joinTableRecords = joinTableData.getJoinTableRecords()...
[ "protected", "void", "persistJoinTableByCql", "(", "JoinTableData", "joinTableData", ",", "Cassandra", ".", "Client", "conn", ")", "{", "String", "joinTableName", "=", "joinTableData", ".", "getJoinTableName", "(", ")", ";", "String", "invJoinColumnName", "=", "join...
Persist join table by cql. @param joinTableData the join table data @param conn the conn
[ "Persist", "join", "table", "by", "cql", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/CassandraClientBase.java#L2357-L2425
netty/netty
resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java
DnsNameResolver.resolveAll
public final Future<List<InetAddress>> resolveAll(String inetHost, Iterable<DnsRecord> additionals) { return resolveAll(inetHost, additionals, executor().<List<InetAddress>>newPromise()); }
java
public final Future<List<InetAddress>> resolveAll(String inetHost, Iterable<DnsRecord> additionals) { return resolveAll(inetHost, additionals, executor().<List<InetAddress>>newPromise()); }
[ "public", "final", "Future", "<", "List", "<", "InetAddress", ">", ">", "resolveAll", "(", "String", "inetHost", ",", "Iterable", "<", "DnsRecord", ">", "additionals", ")", "{", "return", "resolveAll", "(", "inetHost", ",", "additionals", ",", "executor", "(...
Resolves the specified host name and port into a list of address. @param inetHost the name to resolve @param additionals additional records ({@code OPT}) @return the list of the address as the result of the resolution
[ "Resolves", "the", "specified", "host", "name", "and", "port", "into", "a", "list", "of", "address", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java#L670-L672
unic/neba
core/src/main/java/io/neba/core/resourcemodels/metadata/ResourceModelMetaDataRegistrar.java
ResourceModelMetaDataRegistrar.register
public synchronized void register(OsgiModelSource<?> modelSource) { if (modelSource == null) { throw new IllegalArgumentException("method parameter modelSource must not be null"); } Class<?> modelType = modelSource.getModelType(); ResourceModelMetaData modelMetaData = new Re...
java
public synchronized void register(OsgiModelSource<?> modelSource) { if (modelSource == null) { throw new IllegalArgumentException("method parameter modelSource must not be null"); } Class<?> modelType = modelSource.getModelType(); ResourceModelMetaData modelMetaData = new Re...
[ "public", "synchronized", "void", "register", "(", "OsgiModelSource", "<", "?", ">", "modelSource", ")", "{", "if", "(", "modelSource", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"method parameter modelSource must not be null\"", ")", ...
Creates a new {@link ResourceModelMetaData} for the model represented by the provided model source. @param modelSource must not be <code>null</code>.
[ "Creates", "a", "new", "{", "@link", "ResourceModelMetaData", "}", "for", "the", "model", "represented", "by", "the", "provided", "model", "source", "." ]
train
https://github.com/unic/neba/blob/4d762e60112a1fcb850926a56a9843d5aa424c4b/core/src/main/java/io/neba/core/resourcemodels/metadata/ResourceModelMetaDataRegistrar.java#L99-L112
Azure/azure-sdk-for-java
iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java
IotHubResourcesInner.importDevices
public JobResponseInner importDevices(String resourceGroupName, String resourceName, ImportDevicesRequest importDevicesParameters) { return importDevicesWithServiceResponseAsync(resourceGroupName, resourceName, importDevicesParameters).toBlocking().single().body(); }
java
public JobResponseInner importDevices(String resourceGroupName, String resourceName, ImportDevicesRequest importDevicesParameters) { return importDevicesWithServiceResponseAsync(resourceGroupName, resourceName, importDevicesParameters).toBlocking().single().body(); }
[ "public", "JobResponseInner", "importDevices", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "ImportDevicesRequest", "importDevicesParameters", ")", "{", "return", "importDevicesWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ...
Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. Import, update, or delete device identities in the IoT hub identity registry from a blob. ...
[ "Import", "update", "or", "delete", "device", "identities", "in", "the", "IoT", "hub", "identity", "registry", "from", "a", "blob", ".", "For", "more", "information", "see", ":", "https", ":", "//", "docs", ".", "microsoft", ".", "com", "/", "azure", "/"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java#L3165-L3167
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/MapTransitionExtractor.java
MapTransitionExtractor.getTransitionType
private static TransitionType getTransitionType(String groupIn, Collection<String> neighborGroups) { final boolean[] bits = new boolean[TransitionType.BITS]; int i = 0; for (final String neighborGroup : neighborGroups) { bits[i] = !groupIn.equals(neighborGroup); ...
java
private static TransitionType getTransitionType(String groupIn, Collection<String> neighborGroups) { final boolean[] bits = new boolean[TransitionType.BITS]; int i = 0; for (final String neighborGroup : neighborGroups) { bits[i] = !groupIn.equals(neighborGroup); ...
[ "private", "static", "TransitionType", "getTransitionType", "(", "String", "groupIn", ",", "Collection", "<", "String", ">", "neighborGroups", ")", "{", "final", "boolean", "[", "]", "bits", "=", "new", "boolean", "[", "TransitionType", ".", "BITS", "]", ";", ...
Get the transition type from one group to another. @param groupIn The group in. @param neighborGroups The neighbor groups. @return The tile transition.
[ "Get", "the", "transition", "type", "from", "one", "group", "to", "another", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/MapTransitionExtractor.java#L73-L83
tvbarthel/Cheerleader
library/src/main/java/fr/tvbarthel/cheerleader/library/player/PlaybackService.java
PlaybackService.unregisterListener
public static void unregisterListener(Context context, PlaybackListener listener) { LocalBroadcastManager.getInstance(context.getApplicationContext()) .unregisterReceiver(listener); }
java
public static void unregisterListener(Context context, PlaybackListener listener) { LocalBroadcastManager.getInstance(context.getApplicationContext()) .unregisterReceiver(listener); }
[ "public", "static", "void", "unregisterListener", "(", "Context", "context", ",", "PlaybackListener", "listener", ")", "{", "LocalBroadcastManager", ".", "getInstance", "(", "context", ".", "getApplicationContext", "(", ")", ")", ".", "unregisterReceiver", "(", "lis...
Unregister a registered listener. @param context context used to unregister the listener. @param listener listener to unregister.
[ "Unregister", "a", "registered", "listener", "." ]
train
https://github.com/tvbarthel/Cheerleader/blob/f61527e4cc44fcd0ed2e1e98aca285f8c236f24e/library/src/main/java/fr/tvbarthel/cheerleader/library/player/PlaybackService.java#L388-L391
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.email_exchange_organizationName_service_exchangeService_account_duration_POST
public OvhOrder email_exchange_organizationName_service_exchangeService_account_duration_POST(String organizationName, String exchangeService, String duration, OvhOvhLicenceEnum licence, Long number, OvhAccountQuotaEnum storageQuota) throws IOException { String qPath = "/order/email/exchange/{organizationName}/servic...
java
public OvhOrder email_exchange_organizationName_service_exchangeService_account_duration_POST(String organizationName, String exchangeService, String duration, OvhOvhLicenceEnum licence, Long number, OvhAccountQuotaEnum storageQuota) throws IOException { String qPath = "/order/email/exchange/{organizationName}/servic...
[ "public", "OvhOrder", "email_exchange_organizationName_service_exchangeService_account_duration_POST", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "String", "duration", ",", "OvhOvhLicenceEnum", "licence", ",", "Long", "number", ",", "OvhAccountQuo...
Create order REST: POST /order/email/exchange/{organizationName}/service/{exchangeService}/account/{duration} @param storageQuota [required] The storage quota for the account(s) in GB (default = 50) @param number [required] Number of Accounts to order @param licence [required] Licence type for the account @param organ...
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L3945-L3954
phax/ph-commons
ph-cli/src/main/java/com/helger/cli/HelpFormatter.java
HelpFormatter.printHelp
public void printHelp (@Nonnull final PrintWriter aPW, final int nWidth, @Nonnull @Nonempty final String sCmdLineSyntax, @Nullable final String sHeader, @Nonnull final Options aOptions, final int...
java
public void printHelp (@Nonnull final PrintWriter aPW, final int nWidth, @Nonnull @Nonempty final String sCmdLineSyntax, @Nullable final String sHeader, @Nonnull final Options aOptions, final int...
[ "public", "void", "printHelp", "(", "@", "Nonnull", "final", "PrintWriter", "aPW", ",", "final", "int", "nWidth", ",", "@", "Nonnull", "@", "Nonempty", "final", "String", "sCmdLineSyntax", ",", "@", "Nullable", "final", "String", "sHeader", ",", "@", "Nonnul...
Print the help for <code>options</code> with the specified command line syntax. @param aPW the writer to which the help will be written @param nWidth the number of characters to be displayed on each line @param sCmdLineSyntax the syntax for this application @param sHeader the banner to display at the beginning of the ...
[ "Print", "the", "help", "for", "<code", ">", "options<", "/", "code", ">", "with", "the", "specified", "command", "line", "syntax", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-cli/src/main/java/com/helger/cli/HelpFormatter.java#L588-L612
vladmihalcea/flexy-pool
flexy-pool-core/src/main/java/com/vladmihalcea/flexypool/util/ReflectionUtils.java
ReflectionUtils.handleException
private static ReflectionException handleException(String memberName, IllegalAccessException e) { LOGGER.error("Couldn't access member " + memberName, e); return new ReflectionException(e); }
java
private static ReflectionException handleException(String memberName, IllegalAccessException e) { LOGGER.error("Couldn't access member " + memberName, e); return new ReflectionException(e); }
[ "private", "static", "ReflectionException", "handleException", "(", "String", "memberName", ",", "IllegalAccessException", "e", ")", "{", "LOGGER", ".", "error", "(", "\"Couldn't access member \"", "+", "memberName", ",", "e", ")", ";", "return", "new", "ReflectionE...
Handle {@link IllegalAccessException} by logging it and rethrown it as a {@link ReflectionException} @param memberName member name @param e exception @return wrapped exception
[ "Handle", "{", "@link", "IllegalAccessException", "}", "by", "logging", "it", "and", "rethrown", "it", "as", "a", "{", "@link", "ReflectionException", "}" ]
train
https://github.com/vladmihalcea/flexy-pool/blob/d763d359e68299c2b4e28e4b67770581ae083431/flexy-pool-core/src/main/java/com/vladmihalcea/flexypool/util/ReflectionUtils.java#L184-L187
tzaeschke/zoodb
src/org/zoodb/internal/util/FormattedStringBuilder.java
FormattedStringBuilder.fillOrCutBuffer
public FormattedStringBuilder fillOrCutBuffer(int newLength, char c) { if (newLength < _delegate.length()) { _delegate = new StringBuilder(_delegate.substring(0, newLength)); return this; } for (int i = _delegate.length(); i < newLength; i++ ) { _delegat...
java
public FormattedStringBuilder fillOrCutBuffer(int newLength, char c) { if (newLength < _delegate.length()) { _delegate = new StringBuilder(_delegate.substring(0, newLength)); return this; } for (int i = _delegate.length(); i < newLength; i++ ) { _delegat...
[ "public", "FormattedStringBuilder", "fillOrCutBuffer", "(", "int", "newLength", ",", "char", "c", ")", "{", "if", "(", "newLength", "<", "_delegate", ".", "length", "(", ")", ")", "{", "_delegate", "=", "new", "StringBuilder", "(", "_delegate", ".", "substri...
Attempts to append <tt>c</tt> until the buffer gets the length <tt> newLength</tt>. If the buffer is already longer than <tt>newLength</tt>, then the internal strings is cut to <tt>newLength</tt>. @param newLength New length of the returned buffer. @param c Character to append. @return The updated instance of Formatted...
[ "Attempts", "to", "append", "<tt", ">", "c<", "/", "tt", ">", "until", "the", "buffer", "gets", "the", "length", "<tt", ">", "newLength<", "/", "tt", ">", ".", "If", "the", "buffer", "is", "already", "longer", "than", "<tt", ">", "newLength<", "/", "...
train
https://github.com/tzaeschke/zoodb/blob/058d0ff161a8ee9d53244c433aca97ee9c654410/src/org/zoodb/internal/util/FormattedStringBuilder.java#L247-L256
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Shape.java
Shape.drawWithoutTransforms
@Override protected void drawWithoutTransforms(final Context2D context, double alpha, final BoundingBox bounds) { final Attributes attr = getAttributes(); alpha = alpha * attr.getAlpha(); if (alpha <= 0) { return; } if (context.isSelection()) ...
java
@Override protected void drawWithoutTransforms(final Context2D context, double alpha, final BoundingBox bounds) { final Attributes attr = getAttributes(); alpha = alpha * attr.getAlpha(); if (alpha <= 0) { return; } if (context.isSelection()) ...
[ "@", "Override", "protected", "void", "drawWithoutTransforms", "(", "final", "Context2D", "context", ",", "double", "alpha", ",", "final", "BoundingBox", "bounds", ")", "{", "final", "Attributes", "attr", "=", "getAttributes", "(", ")", ";", "alpha", "=", "alp...
Used internally. Draws the node in the current Context2D without applying the transformation-related attributes (e.g. X, Y, ROTATION, SCALE, SHEAR, OFFSET and TRANSFORM.) <p> Shapes should apply the non-Transform related attributes (such a colors, strokeWidth etc.) and draw the Shape's details (such as the the actual l...
[ "Used", "internally", ".", "Draws", "the", "node", "in", "the", "current", "Context2D", "without", "applying", "the", "transformation", "-", "related", "attributes", "(", "e", ".", "g", ".", "X", "Y", "ROTATION", "SCALE", "SHEAR", "OFFSET", "and", "TRANSFORM...
train
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Shape.java#L232-L260
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.resetPassword
public void resetPassword(CmsRequestContext context, String username, String oldPassword, String newPassword) throws CmsException, CmsSecurityException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { m_driverManager.resetPassword( dbc, ...
java
public void resetPassword(CmsRequestContext context, String username, String oldPassword, String newPassword) throws CmsException, CmsSecurityException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { m_driverManager.resetPassword( dbc, ...
[ "public", "void", "resetPassword", "(", "CmsRequestContext", "context", ",", "String", "username", ",", "String", "oldPassword", ",", "String", "newPassword", ")", "throws", "CmsException", ",", "CmsSecurityException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFact...
Resets the password for a specified user.<p> @param context the current request context @param username the name of the user @param oldPassword the old password @param newPassword the new password @throws CmsException if the user data could not be read from the database @throws CmsSecurityException if the specified u...
[ "Resets", "the", "password", "for", "a", "specified", "user", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L5751-L5766
google/closure-templates
java/src/com/google/template/soy/internal/i18n/BidiGlobalDir.java
BidiGlobalDir.forIsRtlCodeSnippet
public static BidiGlobalDir forIsRtlCodeSnippet( String isRtlCodeSnippet, @Nullable String namespace, SoyBackendKind backend) { Preconditions.checkArgument( isRtlCodeSnippet != null && isRtlCodeSnippet.length() > 0, "Bidi global direction source code snippet must be non-empty."); Precondit...
java
public static BidiGlobalDir forIsRtlCodeSnippet( String isRtlCodeSnippet, @Nullable String namespace, SoyBackendKind backend) { Preconditions.checkArgument( isRtlCodeSnippet != null && isRtlCodeSnippet.length() > 0, "Bidi global direction source code snippet must be non-empty."); Precondit...
[ "public", "static", "BidiGlobalDir", "forIsRtlCodeSnippet", "(", "String", "isRtlCodeSnippet", ",", "@", "Nullable", "String", "namespace", ",", "SoyBackendKind", "backend", ")", "{", "Preconditions", ".", "checkArgument", "(", "isRtlCodeSnippet", "!=", "null", "&&", ...
Creates a bidi global direction that can only be determined at template runtime, by evaluating a given source code snippet that yields a boolean value where true indicates rtl. @param isRtlCodeSnippet A code snippet that will evaluate at template runtime to a boolean value indicating whether the bidi global direction ...
[ "Creates", "a", "bidi", "global", "direction", "that", "can", "only", "be", "determined", "at", "template", "runtime", "by", "evaluating", "a", "given", "source", "code", "snippet", "that", "yields", "a", "boolean", "value", "where", "true", "indicates", "rtl"...
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/internal/i18n/BidiGlobalDir.java#L112-L125
calimero-project/calimero-core
src/tuwien/auto/calimero/mgmt/PropertyClient.java
PropertyClient.addDefinitions
public void addDefinitions(final Collection<Property> definitions) { for (final Iterator<Property> i = definitions.iterator(); i.hasNext();) { final Property p = i.next(); properties.put(new PropertyKey(p.objType, p.id), p); } }
java
public void addDefinitions(final Collection<Property> definitions) { for (final Iterator<Property> i = definitions.iterator(); i.hasNext();) { final Property p = i.next(); properties.put(new PropertyKey(p.objType, p.id), p); } }
[ "public", "void", "addDefinitions", "(", "final", "Collection", "<", "Property", ">", "definitions", ")", "{", "for", "(", "final", "Iterator", "<", "Property", ">", "i", "=", "definitions", ".", "iterator", "(", ")", ";", "i", ".", "hasNext", "(", ")", ...
Adds the property definitions contained in the collection argument to the property definitions of the property client. <p> Any definitions already existing in the client are not removed before adding new ones. To remove definitions, use {@link #getDefinitions()} and remove entries manually.<br> An added property defini...
[ "Adds", "the", "property", "definitions", "contained", "in", "the", "collection", "argument", "to", "the", "property", "definitions", "of", "the", "property", "client", ".", "<p", ">", "Any", "definitions", "already", "existing", "in", "the", "client", "are", ...
train
https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/mgmt/PropertyClient.java#L514-L520
offbynull/coroutines
instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/OperandStackStateGenerators.java
OperandStackStateGenerators.computeSizes
public static StorageSizes computeSizes(Frame<BasicValue> frame, int offset, int length) { Validate.notNull(frame); Validate.isTrue(offset >= 0); Validate.isTrue(length >= 0); Validate.isTrue(offset < frame.getStackSize()); Validate.isTrue(offset + length <= frame.getStackSize())...
java
public static StorageSizes computeSizes(Frame<BasicValue> frame, int offset, int length) { Validate.notNull(frame); Validate.isTrue(offset >= 0); Validate.isTrue(length >= 0); Validate.isTrue(offset < frame.getStackSize()); Validate.isTrue(offset + length <= frame.getStackSize())...
[ "public", "static", "StorageSizes", "computeSizes", "(", "Frame", "<", "BasicValue", ">", "frame", ",", "int", "offset", ",", "int", "length", ")", "{", "Validate", ".", "notNull", "(", "frame", ")", ";", "Validate", ".", "isTrue", "(", "offset", ">=", "...
Compute sizes required for the storage arrays that will contain the operand stack at this frame. @param frame frame to compute for @param offset the position within the operand stack to start calculating @param length the number of stack items to include in calculation @return size required by each storage array @throw...
[ "Compute", "sizes", "required", "for", "the", "storage", "arrays", "that", "will", "contain", "the", "operand", "stack", "at", "this", "frame", "." ]
train
https://github.com/offbynull/coroutines/blob/b1b83c293945f53a2f63fca8f15a53e88b796bf5/instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/OperandStackStateGenerators.java#L458-L512
PistoiaHELM/HELM2NotationToolkit
src/main/java/org/helm/notation2/tools/Validation.java
Validation.checkPolymerIDSConnection
private static void checkPolymerIDSConnection(ConnectionNotation not, List<String> listPolymerIDs) throws PolymerIDsException { /* the polymer ids have to be there */ checkExistenceOfPolymerID(not.getSourceId().getId(), listPolymerIDs); checkExistenceOfPolymerID(not.getTargetId().getId(), listPolymerIDs); ...
java
private static void checkPolymerIDSConnection(ConnectionNotation not, List<String> listPolymerIDs) throws PolymerIDsException { /* the polymer ids have to be there */ checkExistenceOfPolymerID(not.getSourceId().getId(), listPolymerIDs); checkExistenceOfPolymerID(not.getTargetId().getId(), listPolymerIDs); ...
[ "private", "static", "void", "checkPolymerIDSConnection", "(", "ConnectionNotation", "not", ",", "List", "<", "String", ">", "listPolymerIDs", ")", "throws", "PolymerIDsException", "{", "/* the polymer ids have to be there */", "checkExistenceOfPolymerID", "(", "not", ".", ...
method to check for one connection if the two polymer ids exist @param not ConnectionNotation @param listPolymerIDs List of polymer ids @throws PolymerIDsException if the polymer ids do not exist
[ "method", "to", "check", "for", "one", "connection", "if", "the", "two", "polymer", "ids", "exist" ]
train
https://github.com/PistoiaHELM/HELM2NotationToolkit/blob/ac5bb01fd5b4082134a8ef226bbe2ff0f60fcd38/src/main/java/org/helm/notation2/tools/Validation.java#L521-L526
stevespringett/Alpine
alpine/src/main/java/alpine/auth/JsonWebToken.java
JsonWebToken.createToken
public String createToken(final Principal principal, final List<Permission> permissions) { final Date today = new Date(); final JwtBuilder jwtBuilder = Jwts.builder(); jwtBuilder.setSubject(principal.getName()); jwtBuilder.setIssuer(ISSUER); jwtBuilder.setIssuedAt(today); ...
java
public String createToken(final Principal principal, final List<Permission> permissions) { final Date today = new Date(); final JwtBuilder jwtBuilder = Jwts.builder(); jwtBuilder.setSubject(principal.getName()); jwtBuilder.setIssuer(ISSUER); jwtBuilder.setIssuedAt(today); ...
[ "public", "String", "createToken", "(", "final", "Principal", "principal", ",", "final", "List", "<", "Permission", ">", "permissions", ")", "{", "final", "Date", "today", "=", "new", "Date", "(", ")", ";", "final", "JwtBuilder", "jwtBuilder", "=", "Jwts", ...
Creates a new JWT for the specified principal. Token is signed using the SecretKey with an HMAC 256 algorithm. @param principal the Principal to create the token for @param permissions the effective list of permissions for the principal @return a String representation of the generated token @since 1.1.0
[ "Creates", "a", "new", "JWT", "for", "the", "specified", "principal", ".", "Token", "is", "signed", "using", "the", "SecretKey", "with", "an", "HMAC", "256", "algorithm", "." ]
train
https://github.com/stevespringett/Alpine/blob/6c5ef5e1ba4f38922096f1307d3950c09edb3093/alpine/src/main/java/alpine/auth/JsonWebToken.java#L111-L125
OpenLiberty/open-liberty
dev/com.ibm.ws.jsp.2.3/src/org/apache/jasper/runtime/BodyContentImpl.java
BodyContentImpl.getReader
public Reader getReader() { // PK33136 char[] charBuffer = new char[strBuffer.length()] ; strBuffer.getChars(0, strBuffer.length(), charBuffer, 0); //PK33136 return (writer == null) ? new CharArrayReader (charBuffer, 0, strBuffer.length()) : null; }
java
public Reader getReader() { // PK33136 char[] charBuffer = new char[strBuffer.length()] ; strBuffer.getChars(0, strBuffer.length(), charBuffer, 0); //PK33136 return (writer == null) ? new CharArrayReader (charBuffer, 0, strBuffer.length()) : null; }
[ "public", "Reader", "getReader", "(", ")", "{", "// PK33136", "char", "[", "]", "charBuffer", "=", "new", "char", "[", "strBuffer", ".", "length", "(", ")", "]", ";", "strBuffer", ".", "getChars", "(", "0", ",", "strBuffer", ".", "length", "(", ")", ...
Return the value of this BodyJspWriter as a Reader. Note: this is after evaluation!! There are no scriptlets, etc in this stream. @return the value of this BodyJspWriter as a Reader
[ "Return", "the", "value", "of", "this", "BodyJspWriter", "as", "a", "Reader", ".", "Note", ":", "this", "is", "after", "evaluation!!", "There", "are", "no", "scriptlets", "etc", "in", "this", "stream", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsp.2.3/src/org/apache/jasper/runtime/BodyContentImpl.java#L603-L609
Sefford/fraggle
fraggle/src/main/java/com/sefford/fraggle/FraggleManager.java
FraggleManager.configureAdditionMode
protected void configureAdditionMode(Fragment frag, int flags, FragmentTransaction ft, int containerId) { if ((flags & DO_NOT_REPLACE_FRAGMENT) != DO_NOT_REPLACE_FRAGMENT) { ft.replace(containerId, frag, ((FraggleFragment) frag).getFragmentTag()); } else { ft.add(containerId, fra...
java
protected void configureAdditionMode(Fragment frag, int flags, FragmentTransaction ft, int containerId) { if ((flags & DO_NOT_REPLACE_FRAGMENT) != DO_NOT_REPLACE_FRAGMENT) { ft.replace(containerId, frag, ((FraggleFragment) frag).getFragmentTag()); } else { ft.add(containerId, fra...
[ "protected", "void", "configureAdditionMode", "(", "Fragment", "frag", ",", "int", "flags", ",", "FragmentTransaction", "ft", ",", "int", "containerId", ")", "{", "if", "(", "(", "flags", "&", "DO_NOT_REPLACE_FRAGMENT", ")", "!=", "DO_NOT_REPLACE_FRAGMENT", ")", ...
Configures the way to add the Fragment into the transaction. It can vary from adding a new fragment, to using a previous instance and refresh it, or replacing the last one. @param frag Fragment to add @param flags Added flags to the Fragment configuration @param ft Transaction to add the fragment...
[ "Configures", "the", "way", "to", "add", "the", "Fragment", "into", "the", "transaction", ".", "It", "can", "vary", "from", "adding", "a", "new", "fragment", "to", "using", "a", "previous", "instance", "and", "refresh", "it", "or", "replacing", "the", "las...
train
https://github.com/Sefford/fraggle/blob/d1b65a99ecc3c3faeef8f288ca6225bbf475c3a3/fraggle/src/main/java/com/sefford/fraggle/FraggleManager.java#L253-L260