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
authlete/authlete-java-common
src/main/java/com/authlete/common/util/TypedProperties.java
TypedProperties.setFloat
public void setFloat(Enum<?> key, float value) { if (key == null) { return; } setFloat(key.name(), value); }
java
public void setFloat(Enum<?> key, float value) { if (key == null) { return; } setFloat(key.name(), value); }
[ "public", "void", "setFloat", "(", "Enum", "<", "?", ">", "key", ",", "float", "value", ")", "{", "if", "(", "key", "==", "null", ")", "{", "return", ";", "}", "setFloat", "(", "key", ".", "name", "(", ")", ",", "value", ")", ";", "}" ]
Equivalent to {@link #setFloat(String, float) setFloat}{@code (key.name(), value)}. If {@code key} is null, nothing is done.
[ "Equivalent", "to", "{" ]
train
https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/util/TypedProperties.java#L640-L648
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/tracker/circulant/CirculantTracker.java
CirculantTracker.dense_gauss_kernel
public void dense_gauss_kernel(double sigma , GrayF64 x , GrayF64 y , GrayF64 k ) { InterleavedF64 xf=tmpFourier0,yf,xyf=tmpFourier2; GrayF64 xy = tmpReal0; double yy; // find x in Fourier domain fft.forward(x, xf); double xx = imageDotProduct(x); if( x != y ) { // general case, x and y are differen...
java
public void dense_gauss_kernel(double sigma , GrayF64 x , GrayF64 y , GrayF64 k ) { InterleavedF64 xf=tmpFourier0,yf,xyf=tmpFourier2; GrayF64 xy = tmpReal0; double yy; // find x in Fourier domain fft.forward(x, xf); double xx = imageDotProduct(x); if( x != y ) { // general case, x and y are differen...
[ "public", "void", "dense_gauss_kernel", "(", "double", "sigma", ",", "GrayF64", "x", ",", "GrayF64", "y", ",", "GrayF64", "k", ")", "{", "InterleavedF64", "xf", "=", "tmpFourier0", ",", "yf", ",", "xyf", "=", "tmpFourier2", ";", "GrayF64", "xy", "=", "tm...
Gaussian Kernel with dense sampling. Evaluates a gaussian kernel with bandwidth SIGMA for all displacements between input images X and Y, which must both be MxN. They must also be periodic (ie., pre-processed with a cosine window). The result is an MxN map of responses. @param sigma Gaussian kernel bandwidth @param x ...
[ "Gaussian", "Kernel", "with", "dense", "sampling", ".", "Evaluates", "a", "gaussian", "kernel", "with", "bandwidth", "SIGMA", "for", "all", "displacements", "between", "input", "images", "X", "and", "Y", "which", "must", "both", "be", "MxN", ".", "They", "mu...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/circulant/CirculantTracker.java#L437-L467
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Signature.java
Signature.getInstance
public static Signature getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException { if (algorithm.equalsIgnoreCase(RSA_SIGNATURE)) { // exception compatibility with existing code if (provider == null) { throw new IllegalArgumentException...
java
public static Signature getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException { if (algorithm.equalsIgnoreCase(RSA_SIGNATURE)) { // exception compatibility with existing code if (provider == null) { throw new IllegalArgumentException...
[ "public", "static", "Signature", "getInstance", "(", "String", "algorithm", ",", "Provider", "provider", ")", "throws", "NoSuchAlgorithmException", "{", "if", "(", "algorithm", ".", "equalsIgnoreCase", "(", "RSA_SIGNATURE", ")", ")", "{", "// exception compatibility w...
Returns a Signature object that implements the specified signature algorithm. <p> A new Signature object encapsulating the SignatureSpi implementation from the specified Provider object is returned. Note that the specified Provider object does not have to be registered in the provider list. @param algorithm the name...
[ "Returns", "a", "Signature", "object", "that", "implements", "the", "specified", "signature", "algorithm", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Signature.java#L534-L546
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/LegacyBehavior.java
LegacyBehavior.cancelConcurrentScope
public static void cancelConcurrentScope(PvmExecutionImpl execution, PvmActivity cancelledScopeActivity) { ensureConcurrentScope(execution); LOG.debugCancelConcurrentScopeExecution(execution); execution.interrupt("Scope "+cancelledScopeActivity+" cancelled."); // <!> HACK set to event scope activity an...
java
public static void cancelConcurrentScope(PvmExecutionImpl execution, PvmActivity cancelledScopeActivity) { ensureConcurrentScope(execution); LOG.debugCancelConcurrentScopeExecution(execution); execution.interrupt("Scope "+cancelledScopeActivity+" cancelled."); // <!> HACK set to event scope activity an...
[ "public", "static", "void", "cancelConcurrentScope", "(", "PvmExecutionImpl", "execution", ",", "PvmActivity", "cancelledScopeActivity", ")", "{", "ensureConcurrentScope", "(", "execution", ")", ";", "LOG", ".", "debugCancelConcurrentScopeExecution", "(", "execution", ")"...
Cancels an execution which is both concurrent and scope. This can only happen if (a) the process instance has been migrated from a previous version to a new version of the process engine See: javadoc of this class for note about concurrent scopes. @param execution the concurrent scope execution to destroy @param canc...
[ "Cancels", "an", "execution", "which", "is", "both", "concurrent", "and", "scope", ".", "This", "can", "only", "happen", "if", "(", "a", ")", "the", "process", "instance", "has", "been", "migrated", "from", "a", "previous", "version", "to", "a", "new", "...
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/LegacyBehavior.java#L115-L125
liferay/com-liferay-commerce
commerce-product-type-virtual-order-service/src/main/java/com/liferay/commerce/product/type/virtual/order/service/persistence/impl/CommerceVirtualOrderItemPersistenceImpl.java
CommerceVirtualOrderItemPersistenceImpl.removeByUUID_G
@Override public CommerceVirtualOrderItem removeByUUID_G(String uuid, long groupId) throws NoSuchVirtualOrderItemException { CommerceVirtualOrderItem commerceVirtualOrderItem = findByUUID_G(uuid, groupId); return remove(commerceVirtualOrderItem); }
java
@Override public CommerceVirtualOrderItem removeByUUID_G(String uuid, long groupId) throws NoSuchVirtualOrderItemException { CommerceVirtualOrderItem commerceVirtualOrderItem = findByUUID_G(uuid, groupId); return remove(commerceVirtualOrderItem); }
[ "@", "Override", "public", "CommerceVirtualOrderItem", "removeByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "NoSuchVirtualOrderItemException", "{", "CommerceVirtualOrderItem", "commerceVirtualOrderItem", "=", "findByUUID_G", "(", "uuid", ",", "g...
Removes the commerce virtual order item where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the commerce virtual order item that was removed
[ "Removes", "the", "commerce", "virtual", "order", "item", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-type-virtual-order-service/src/main/java/com/liferay/commerce/product/type/virtual/order/service/persistence/impl/CommerceVirtualOrderItemPersistenceImpl.java#L817-L824
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/JobScheduleOperations.java
JobScheduleOperations.existsJobSchedule
public boolean existsJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { JobScheduleExistsOptions options = new JobScheduleExistsOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors);...
java
public boolean existsJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { JobScheduleExistsOptions options = new JobScheduleExistsOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors);...
[ "public", "boolean", "existsJobSchedule", "(", "String", "jobScheduleId", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "JobScheduleExistsOptions", "options", "=", "new", "JobSchedul...
Checks whether the specified job schedule exists. @param jobScheduleId The ID of the job schedule which you want to check. @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request. @return True if the specified job schedule exists; otherwise, false....
[ "Checks", "whether", "the", "specified", "job", "schedule", "exists", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/JobScheduleOperations.java#L89-L95
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/SheetRowResourcesImpl.java
SheetRowResourcesImpl.moveRows
public CopyOrMoveRowResult moveRows(Long sheetId, EnumSet<RowMoveInclusion> includes, Boolean ignoreRowsNotFound, CopyOrMoveRowDirective moveParameters) throws SmartsheetException { String path = "sheets/" + sheetId +"/rows/move"; HashMap<String, Object> parameters = new HashMap<String, Object>(); ...
java
public CopyOrMoveRowResult moveRows(Long sheetId, EnumSet<RowMoveInclusion> includes, Boolean ignoreRowsNotFound, CopyOrMoveRowDirective moveParameters) throws SmartsheetException { String path = "sheets/" + sheetId +"/rows/move"; HashMap<String, Object> parameters = new HashMap<String, Object>(); ...
[ "public", "CopyOrMoveRowResult", "moveRows", "(", "Long", "sheetId", ",", "EnumSet", "<", "RowMoveInclusion", ">", "includes", ",", "Boolean", "ignoreRowsNotFound", ",", "CopyOrMoveRowDirective", "moveParameters", ")", "throws", "SmartsheetException", "{", "String", "pa...
Moves Row(s) from the Sheet specified in the URL to (the bottom of) another sheet. It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/move Exceptions: IllegalArgumentException : if any argument is null, or path is empty string InvalidRequestException : if there is any problem with the...
[ "Moves", "Row", "(", "s", ")", "from", "the", "Sheet", "specified", "in", "the", "URL", "to", "(", "the", "bottom", "of", ")", "another", "sheet", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/SheetRowResourcesImpl.java#L323-L334
Alluxio/alluxio
core/server/worker/src/main/java/alluxio/worker/block/meta/StorageDir.java
StorageDir.removeBlockMeta
public void removeBlockMeta(BlockMeta blockMeta) throws BlockDoesNotExistException { Preconditions.checkNotNull(blockMeta, "blockMeta"); long blockId = blockMeta.getBlockId(); BlockMeta deletedBlockMeta = mBlockIdToBlockMap.remove(blockId); if (deletedBlockMeta == null) { throw new BlockDoesNotExi...
java
public void removeBlockMeta(BlockMeta blockMeta) throws BlockDoesNotExistException { Preconditions.checkNotNull(blockMeta, "blockMeta"); long blockId = blockMeta.getBlockId(); BlockMeta deletedBlockMeta = mBlockIdToBlockMap.remove(blockId); if (deletedBlockMeta == null) { throw new BlockDoesNotExi...
[ "public", "void", "removeBlockMeta", "(", "BlockMeta", "blockMeta", ")", "throws", "BlockDoesNotExistException", "{", "Preconditions", ".", "checkNotNull", "(", "blockMeta", ",", "\"blockMeta\"", ")", ";", "long", "blockId", "=", "blockMeta", ".", "getBlockId", "(",...
Removes a block from this storage dir. @param blockMeta the metadata of the block @throws BlockDoesNotExistException if no block is found
[ "Removes", "a", "block", "from", "this", "storage", "dir", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/worker/src/main/java/alluxio/worker/block/meta/StorageDir.java#L329-L337
craftercms/commons
utilities/src/main/java/org/craftercms/commons/i10n/I10nUtils.java
I10nUtils.getLocalizedMessage
public static String getLocalizedMessage(String bundleName, String key, Object... args) { return getLocalizedMessage(ResourceBundle.getBundle(bundleName), key, args); }
java
public static String getLocalizedMessage(String bundleName, String key, Object... args) { return getLocalizedMessage(ResourceBundle.getBundle(bundleName), key, args); }
[ "public", "static", "String", "getLocalizedMessage", "(", "String", "bundleName", ",", "String", "key", ",", "Object", "...", "args", ")", "{", "return", "getLocalizedMessage", "(", "ResourceBundle", ".", "getBundle", "(", "bundleName", ")", ",", "key", ",", "...
Returns a formatted, localized message according to the specified resource bundle and key. @param bundleName the name of the resource bundle where the message format should be @param key the key of the message format @param args the args of the message format @return the formatted, localized mess...
[ "Returns", "a", "formatted", "localized", "message", "according", "to", "the", "specified", "resource", "bundle", "and", "key", "." ]
train
https://github.com/craftercms/commons/blob/3074fe49e56c2a4aae0832f40b17ae563335dc83/utilities/src/main/java/org/craftercms/commons/i10n/I10nUtils.java#L46-L48
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceCountryPersistenceImpl.java
CommerceCountryPersistenceImpl.removeByG_N
@Override public CommerceCountry removeByG_N(long groupId, int numericISOCode) throws NoSuchCountryException { CommerceCountry commerceCountry = findByG_N(groupId, numericISOCode); return remove(commerceCountry); }
java
@Override public CommerceCountry removeByG_N(long groupId, int numericISOCode) throws NoSuchCountryException { CommerceCountry commerceCountry = findByG_N(groupId, numericISOCode); return remove(commerceCountry); }
[ "@", "Override", "public", "CommerceCountry", "removeByG_N", "(", "long", "groupId", ",", "int", "numericISOCode", ")", "throws", "NoSuchCountryException", "{", "CommerceCountry", "commerceCountry", "=", "findByG_N", "(", "groupId", ",", "numericISOCode", ")", ";", ...
Removes the commerce country where groupId = &#63; and numericISOCode = &#63; from the database. @param groupId the group ID @param numericISOCode the numeric iso code @return the commerce country that was removed
[ "Removes", "the", "commerce", "country", "where", "groupId", "=", "&#63", ";", "and", "numericISOCode", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceCountryPersistenceImpl.java#L2389-L2395
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/extension/Extension.java
Extension.getClassPathResources
private Map<String, Resource> getClassPathResources(String mimetype, Collection<String> paths) { // If no paths are provided, just return an empty map if (paths == null) return Collections.<String, Resource>emptyMap(); // Add classpath resource for each path provided Map<S...
java
private Map<String, Resource> getClassPathResources(String mimetype, Collection<String> paths) { // If no paths are provided, just return an empty map if (paths == null) return Collections.<String, Resource>emptyMap(); // Add classpath resource for each path provided Map<S...
[ "private", "Map", "<", "String", ",", "Resource", ">", "getClassPathResources", "(", "String", "mimetype", ",", "Collection", "<", "String", ">", "paths", ")", "{", "// If no paths are provided, just return an empty map ", "if", "(", "paths", "==", "null", ")", "r...
Returns a new map of all resources corresponding to the collection of paths provided. Each resource will be associated with the given mimetype, and stored in the map using its path as the key. @param mimetype The mimetype to associate with each resource. @param paths The paths corresponding to the resources desired. ...
[ "Returns", "a", "new", "map", "of", "all", "resources", "corresponding", "to", "the", "collection", "of", "paths", "provided", ".", "Each", "resource", "will", "be", "associated", "with", "the", "given", "mimetype", "and", "stored", "in", "the", "map", "usin...
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/Extension.java#L140-L154
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/Path3f.java
Path3f.getClosestPointTo
public static Point3D getClosestPointTo(PathIterator3f pathIterator, double x, double y, double z) { Point3D closest = null; double bestDist = Double.POSITIVE_INFINITY; Point3D candidate; AbstractPathElement3F pe = pathIterator.next(); Path3f subPath; if (pe.type != PathElementType.MOVE_TO) { throw new ...
java
public static Point3D getClosestPointTo(PathIterator3f pathIterator, double x, double y, double z) { Point3D closest = null; double bestDist = Double.POSITIVE_INFINITY; Point3D candidate; AbstractPathElement3F pe = pathIterator.next(); Path3f subPath; if (pe.type != PathElementType.MOVE_TO) { throw new ...
[ "public", "static", "Point3D", "getClosestPointTo", "(", "PathIterator3f", "pathIterator", ",", "double", "x", ",", "double", "y", ",", "double", "z", ")", "{", "Point3D", "closest", "=", "null", ";", "double", "bestDist", "=", "Double", ".", "POSITIVE_INFINIT...
Replies the point on the path that is closest to the given point. <p> <strong>CAUTION:</strong> This function works only on path iterators that are replying polyline primitives, ie. if the {@link PathIterator3f#isPolyline()} of <var>pi</var> is replying <code>true</code>. {@link #getClosestPointTo(Point3D)} avoids this...
[ "Replies", "the", "point", "on", "the", "path", "that", "is", "closest", "to", "the", "given", "point", ".", "<p", ">", "<strong", ">", "CAUTION", ":", "<", "/", "strong", ">", "This", "function", "works", "only", "on", "path", "iterators", "that", "ar...
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/Path3f.java#L76-L142
johnkil/Print
print/src/main/java/com/github/johnkil/print/PrintViewUtils.java
PrintViewUtils.initIcon
static PrintDrawable initIcon(Context context, AttributeSet attrs, boolean inEditMode) { PrintDrawable.Builder iconBuilder = new PrintDrawable.Builder(context); if (attrs != null) { TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.PrintView); if (a.hasValue(R.st...
java
static PrintDrawable initIcon(Context context, AttributeSet attrs, boolean inEditMode) { PrintDrawable.Builder iconBuilder = new PrintDrawable.Builder(context); if (attrs != null) { TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.PrintView); if (a.hasValue(R.st...
[ "static", "PrintDrawable", "initIcon", "(", "Context", "context", ",", "AttributeSet", "attrs", ",", "boolean", "inEditMode", ")", "{", "PrintDrawable", ".", "Builder", "iconBuilder", "=", "new", "PrintDrawable", ".", "Builder", "(", "context", ")", ";", "if", ...
Initialization of icon for print views. @param context The Context the view is running in, through which it can access the current theme, resources, etc. @param attrs The attributes of the XML tag that is inflating the view. @param inEditMode Indicates whether this View is currently in edit mode. @return The i...
[ "Initialization", "of", "icon", "for", "print", "views", "." ]
train
https://github.com/johnkil/Print/blob/535f3ca466289c491b8c29f41c32e72f0bb95127/print/src/main/java/com/github/johnkil/print/PrintViewUtils.java#L36-L71
Stratio/stratio-cassandra
src/java/org/apache/cassandra/repair/StreamingRepairTask.java
StreamingRepairTask.onFailure
public void onFailure(Throwable t) { MessagingService.instance().sendOneWay(new SyncComplete(desc, request.src, request.dst, false).createMessage(), request.initiator); }
java
public void onFailure(Throwable t) { MessagingService.instance().sendOneWay(new SyncComplete(desc, request.src, request.dst, false).createMessage(), request.initiator); }
[ "public", "void", "onFailure", "(", "Throwable", "t", ")", "{", "MessagingService", ".", "instance", "(", ")", ".", "sendOneWay", "(", "new", "SyncComplete", "(", "desc", ",", "request", ".", "src", ",", "request", ".", "dst", ",", "false", ")", ".", "...
If we failed on either stream in or out, reply fail to the initiator.
[ "If", "we", "failed", "on", "either", "stream", "in", "or", "out", "reply", "fail", "to", "the", "initiator", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/repair/StreamingRepairTask.java#L103-L106
io7m/jaffirm
com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Postconditions.java
Postconditions.checkPostcondition
public static <T> T checkPostcondition( final T value, final Predicate<T> predicate, final Function<T, String> describer) { final boolean ok; try { ok = predicate.test(value); } catch (final Throwable e) { throw failed(e, value, singleViolation(failedPredicate(e))); } retu...
java
public static <T> T checkPostcondition( final T value, final Predicate<T> predicate, final Function<T, String> describer) { final boolean ok; try { ok = predicate.test(value); } catch (final Throwable e) { throw failed(e, value, singleViolation(failedPredicate(e))); } retu...
[ "public", "static", "<", "T", ">", "T", "checkPostcondition", "(", "final", "T", "value", ",", "final", "Predicate", "<", "T", ">", "predicate", ",", "final", "Function", "<", "T", ",", "String", ">", "describer", ")", "{", "final", "boolean", "ok", ";...
<p>Evaluate the given {@code predicate} using {@code value} as input.</p> <p>The function throws {@link PostconditionViolationException} if the predicate is false.</p> @param value The value @param predicate The predicate @param describer A describer for the predicate @param <T> The type of values @return ...
[ "<p", ">", "Evaluate", "the", "given", "{", "@code", "predicate", "}", "using", "{", "@code", "value", "}", "as", "input", ".", "<", "/", "p", ">" ]
train
https://github.com/io7m/jaffirm/blob/c97d246242d381e48832838737418cfe4cb57b4d/com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Postconditions.java#L198-L211
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.subPath
public static String subPath(String dirPath, String filePath) { if (StrUtil.isNotEmpty(dirPath) && StrUtil.isNotEmpty(filePath)) { dirPath = StrUtil.removeSuffix(normalize(dirPath), "/"); filePath = normalize(filePath); final String result = StrUtil.removePrefixIgnoreCase(filePath, dirPath); retu...
java
public static String subPath(String dirPath, String filePath) { if (StrUtil.isNotEmpty(dirPath) && StrUtil.isNotEmpty(filePath)) { dirPath = StrUtil.removeSuffix(normalize(dirPath), "/"); filePath = normalize(filePath); final String result = StrUtil.removePrefixIgnoreCase(filePath, dirPath); retu...
[ "public", "static", "String", "subPath", "(", "String", "dirPath", ",", "String", "filePath", ")", "{", "if", "(", "StrUtil", ".", "isNotEmpty", "(", "dirPath", ")", "&&", "StrUtil", ".", "isNotEmpty", "(", "filePath", ")", ")", "{", "dirPath", "=", "Str...
获得相对子路径,忽略大小写 栗子: <pre> dirPath: d:/aaa/bbb filePath: d:/aaa/bbb/ccc =》 ccc dirPath: d:/Aaa/bbb filePath: d:/aaa/bbb/ccc.txt =》 ccc.txt dirPath: d:/Aaa/bbb filePath: d:/aaa/bbb/ =》 "" </pre> @param dirPath 父路径 @param filePath 文件路径 @return 相对子路径
[ "获得相对子路径,忽略大小写" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L1622-L1632
dbracewell/mango
src/main/java/com/davidbracewell/json/JsonReader.java
JsonReader.nextKeyValue
public Tuple2<String, Val> nextKeyValue() throws IOException { if (currentValue.getKey() != NAME) { throw new IOException("Expecting NAME, but found " + jsonTokenToStructuredElement(null)); } String name = currentValue.getValue().asString(); consume(); return Tuple2.of(name, nextV...
java
public Tuple2<String, Val> nextKeyValue() throws IOException { if (currentValue.getKey() != NAME) { throw new IOException("Expecting NAME, but found " + jsonTokenToStructuredElement(null)); } String name = currentValue.getValue().asString(); consume(); return Tuple2.of(name, nextV...
[ "public", "Tuple2", "<", "String", ",", "Val", ">", "nextKeyValue", "(", ")", "throws", "IOException", "{", "if", "(", "currentValue", ".", "getKey", "(", ")", "!=", "NAME", ")", "{", "throw", "new", "IOException", "(", "\"Expecting NAME, but found \"", "+",...
Reads the next key-value pair @return The next key value pair @throws IOException Something went wrong reading
[ "Reads", "the", "next", "key", "-", "value", "pair" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/json/JsonReader.java#L458-L465
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/core/layout/CrossTabColorShema.java
CrossTabColorShema.setTotalColorForColumn
public void setTotalColorForColumn(int column, Color color){ int map = (colors.length-1) - column; colors[map][colors[0].length-1]=color; }
java
public void setTotalColorForColumn(int column, Color color){ int map = (colors.length-1) - column; colors[map][colors[0].length-1]=color; }
[ "public", "void", "setTotalColorForColumn", "(", "int", "column", ",", "Color", "color", ")", "{", "int", "map", "=", "(", "colors", ".", "length", "-", "1", ")", "-", "column", ";", "colors", "[", "map", "]", "[", "colors", "[", "0", "]", ".", "le...
Set the color for each total for the column @param column the number of the column (starting from 1) @param color
[ "Set", "the", "color", "for", "each", "total", "for", "the", "column" ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/CrossTabColorShema.java#L82-L85
google/error-prone
check_api/src/main/java/com/google/errorprone/matchers/Matchers.java
Matchers.variableType
public static Matcher<VariableTree> variableType(final Matcher<Tree> treeMatcher) { return new Matcher<VariableTree>() { @Override public boolean matches(VariableTree variableTree, VisitorState state) { return treeMatcher.matches(variableTree.getType(), state); } }; }
java
public static Matcher<VariableTree> variableType(final Matcher<Tree> treeMatcher) { return new Matcher<VariableTree>() { @Override public boolean matches(VariableTree variableTree, VisitorState state) { return treeMatcher.matches(variableTree.getType(), state); } }; }
[ "public", "static", "Matcher", "<", "VariableTree", ">", "variableType", "(", "final", "Matcher", "<", "Tree", ">", "treeMatcher", ")", "{", "return", "new", "Matcher", "<", "VariableTree", ">", "(", ")", "{", "@", "Override", "public", "boolean", "matches",...
Matches on the type of a VariableTree AST node. @param treeMatcher A matcher on the type of the variable.
[ "Matches", "on", "the", "type", "of", "a", "VariableTree", "AST", "node", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/matchers/Matchers.java#L1070-L1077
sdaschner/jaxrs-analyzer
src/main/java/com/sebastian_daschner/jaxrs_analyzer/analysis/bytecode/simulation/InjectableArgumentMethodSimulator.java
InjectableArgumentMethodSimulator.injectArguments
private void injectArguments(final List<Element> arguments, final MethodIdentifier identifier) { final boolean staticMethod = identifier.isStaticMethod(); final int startIndex = staticMethod ? 0 : 1; final int endIndex = staticMethod ? arguments.size() - 1 : arguments.size(); IntStream....
java
private void injectArguments(final List<Element> arguments, final MethodIdentifier identifier) { final boolean staticMethod = identifier.isStaticMethod(); final int startIndex = staticMethod ? 0 : 1; final int endIndex = staticMethod ? arguments.size() - 1 : arguments.size(); IntStream....
[ "private", "void", "injectArguments", "(", "final", "List", "<", "Element", ">", "arguments", ",", "final", "MethodIdentifier", "identifier", ")", "{", "final", "boolean", "staticMethod", "=", "identifier", ".", "isStaticMethod", "(", ")", ";", "final", "int", ...
Injects the arguments of the method invocation to the local variables. @param arguments The argument values
[ "Injects", "the", "arguments", "of", "the", "method", "invocation", "to", "the", "local", "variables", "." ]
train
https://github.com/sdaschner/jaxrs-analyzer/blob/4ac62942202d05632977d6c14d3cd7e2d27e2b9b/src/main/java/com/sebastian_daschner/jaxrs_analyzer/analysis/bytecode/simulation/InjectableArgumentMethodSimulator.java#L75-L81
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java
PoolOperations.removeNodesFromPool
public void removeNodesFromPool(String poolId, Collection<ComputeNode> computeNodes) throws BatchErrorException, IOException { removeNodesFromPool(poolId, computeNodes, null, null, null); }
java
public void removeNodesFromPool(String poolId, Collection<ComputeNode> computeNodes) throws BatchErrorException, IOException { removeNodesFromPool(poolId, computeNodes, null, null, null); }
[ "public", "void", "removeNodesFromPool", "(", "String", "poolId", ",", "Collection", "<", "ComputeNode", ">", "computeNodes", ")", "throws", "BatchErrorException", ",", "IOException", "{", "removeNodesFromPool", "(", "poolId", ",", "computeNodes", ",", "null", ",", ...
Removes the specified compute nodes from the specified pool. @param poolId The ID of the pool. @param computeNodes The compute nodes to remove from the pool. @throws BatchErrorException Exception thrown when an error response is received from the Batch service. @throws IOException Exception thrown when there is an err...
[ "Removes", "the", "specified", "compute", "nodes", "from", "the", "specified", "pool", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java#L930-L933
jmeetsma/Iglu-Util
src/main/java/org/ijsberg/iglu/util/misc/StringSupport.java
StringSupport.writeToOutputStream
public static void writeToOutputStream(String s, OutputStream output) throws IOException { writeToOutputStream(s, output, null); }
java
public static void writeToOutputStream(String s, OutputStream output) throws IOException { writeToOutputStream(s, output, null); }
[ "public", "static", "void", "writeToOutputStream", "(", "String", "s", ",", "OutputStream", "output", ")", "throws", "IOException", "{", "writeToOutputStream", "(", "s", ",", "output", ",", "null", ")", ";", "}" ]
Writes the contents of a string to an output stream. @param s @param output @throws IOException
[ "Writes", "the", "contents", "of", "a", "string", "to", "an", "output", "stream", "." ]
train
https://github.com/jmeetsma/Iglu-Util/blob/971eb022115247b1e34dc26dd02e7e621e29e910/src/main/java/org/ijsberg/iglu/util/misc/StringSupport.java#L471-L473
alibaba/vlayout
vlayout/src/main/java/com/alibaba/android/vlayout/SortedList.java
SortedList.updateItemAt
public void updateItemAt(int index, T item) { final T existing = get(index); // assume changed if the same object is given back boolean contentsChanged = existing == item || !mCallback.areContentsTheSame(existing, item); if (existing != item) { // different items, we can use ...
java
public void updateItemAt(int index, T item) { final T existing = get(index); // assume changed if the same object is given back boolean contentsChanged = existing == item || !mCallback.areContentsTheSame(existing, item); if (existing != item) { // different items, we can use ...
[ "public", "void", "updateItemAt", "(", "int", "index", ",", "T", "item", ")", "{", "final", "T", "existing", "=", "get", "(", "index", ")", ";", "// assume changed if the same object is given back", "boolean", "contentsChanged", "=", "existing", "==", "item", "|...
Updates the item at the given index and calls {@link Callback#onChanged(int, int)} and/or {@link Callback#onMoved(int, int)} if necessary. <p> You can use this method if you need to change an existing Item such that its position in the list may change. <p> If the new object is a different object (<code>get(index) != it...
[ "Updates", "the", "item", "at", "the", "given", "index", "and", "calls", "{", "@link", "Callback#onChanged", "(", "int", "int", ")", "}", "and", "/", "or", "{", "@link", "Callback#onMoved", "(", "int", "int", ")", "}", "if", "necessary", ".", "<p", ">"...
train
https://github.com/alibaba/vlayout/blob/8a5a51d9d2eeb91fed2ee331a4cf3496282452ce/vlayout/src/main/java/com/alibaba/android/vlayout/SortedList.java#L268-L292
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java
CmsSitemapController.makeNewEntry
protected void makeNewEntry( final CmsClientSitemapEntry parent, final I_CmsSimpleCallback<CmsClientSitemapEntry> callback) { ensureUniqueName(parent, NEW_ENTRY_NAME, new I_CmsSimpleCallback<String>() { public void execute(String urlName) { CmsClientSitemapEntry ne...
java
protected void makeNewEntry( final CmsClientSitemapEntry parent, final I_CmsSimpleCallback<CmsClientSitemapEntry> callback) { ensureUniqueName(parent, NEW_ENTRY_NAME, new I_CmsSimpleCallback<String>() { public void execute(String urlName) { CmsClientSitemapEntry ne...
[ "protected", "void", "makeNewEntry", "(", "final", "CmsClientSitemapEntry", "parent", ",", "final", "I_CmsSimpleCallback", "<", "CmsClientSitemapEntry", ">", "callback", ")", "{", "ensureUniqueName", "(", "parent", ",", "NEW_ENTRY_NAME", ",", "new", "I_CmsSimpleCallback...
Creates a new client sitemap entry bean to use for the RPC call which actually creates the entry on the server side.<p> @param parent the parent entry @param callback the callback to execute
[ "Creates", "a", "new", "client", "sitemap", "entry", "bean", "to", "use", "for", "the", "RPC", "call", "which", "actually", "creates", "the", "entry", "on", "the", "server", "side", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java#L2266-L2291
liferay/com-liferay-commerce
commerce-product-type-grouped-service/src/main/java/com/liferay/commerce/product/type/grouped/service/persistence/impl/CPDefinitionGroupedEntryPersistenceImpl.java
CPDefinitionGroupedEntryPersistenceImpl.findByUUID_G
@Override public CPDefinitionGroupedEntry findByUUID_G(String uuid, long groupId) throws NoSuchCPDefinitionGroupedEntryException { CPDefinitionGroupedEntry cpDefinitionGroupedEntry = fetchByUUID_G(uuid, groupId); if (cpDefinitionGroupedEntry == null) { StringBundler msg = new StringBundler(6); msg.ap...
java
@Override public CPDefinitionGroupedEntry findByUUID_G(String uuid, long groupId) throws NoSuchCPDefinitionGroupedEntryException { CPDefinitionGroupedEntry cpDefinitionGroupedEntry = fetchByUUID_G(uuid, groupId); if (cpDefinitionGroupedEntry == null) { StringBundler msg = new StringBundler(6); msg.ap...
[ "@", "Override", "public", "CPDefinitionGroupedEntry", "findByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "NoSuchCPDefinitionGroupedEntryException", "{", "CPDefinitionGroupedEntry", "cpDefinitionGroupedEntry", "=", "fetchByUUID_G", "(", "uuid", ",...
Returns the cp definition grouped entry where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchCPDefinitionGroupedEntryException} if it could not be found. @param uuid the uuid @param groupId the group ID @return the matching cp definition grouped entry @throws NoSuchCPDefinitionGroupedEntryException if a mat...
[ "Returns", "the", "cp", "definition", "grouped", "entry", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchCPDefinitionGroupedEntryException", "}", "if", "it", "could", "not", "be", "found", "."...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-type-grouped-service/src/main/java/com/liferay/commerce/product/type/grouped/service/persistence/impl/CPDefinitionGroupedEntryPersistenceImpl.java#L670-L697
Wadpam/guja
guja-contact/src/main/java/com/wadpam/guja/dao/GeneratedDContactDaoImpl.java
GeneratedDContactDaoImpl.queryByHomePhone
public Iterable<DContact> queryByHomePhone(Object parent, java.lang.String homePhone) { return queryByField(parent, DContactMapper.Field.HOMEPHONE.getFieldName(), homePhone); }
java
public Iterable<DContact> queryByHomePhone(Object parent, java.lang.String homePhone) { return queryByField(parent, DContactMapper.Field.HOMEPHONE.getFieldName(), homePhone); }
[ "public", "Iterable", "<", "DContact", ">", "queryByHomePhone", "(", "Object", "parent", ",", "java", ".", "lang", ".", "String", "homePhone", ")", "{", "return", "queryByField", "(", "parent", ",", "DContactMapper", ".", "Field", ".", "HOMEPHONE", ".", "get...
query-by method for field homePhone @param homePhone the specified attribute @return an Iterable of DContacts for the specified homePhone
[ "query", "-", "by", "method", "for", "field", "homePhone" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-contact/src/main/java/com/wadpam/guja/dao/GeneratedDContactDaoImpl.java#L178-L180
buschmais/jqa-maven3-plugin
src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenProjectScannerPlugin.java
MavenProjectScannerPlugin.addProjectDetails
private void addProjectDetails(MavenProject project, MavenProjectDirectoryDescriptor projectDescriptor, Scanner scanner) { ScannerContext scannerContext = scanner.getContext(); addParent(project, projectDescriptor, scannerContext); addModules(project, projectDescriptor, scannerContext); ...
java
private void addProjectDetails(MavenProject project, MavenProjectDirectoryDescriptor projectDescriptor, Scanner scanner) { ScannerContext scannerContext = scanner.getContext(); addParent(project, projectDescriptor, scannerContext); addModules(project, projectDescriptor, scannerContext); ...
[ "private", "void", "addProjectDetails", "(", "MavenProject", "project", ",", "MavenProjectDirectoryDescriptor", "projectDescriptor", ",", "Scanner", "scanner", ")", "{", "ScannerContext", "scannerContext", "=", "scanner", ".", "getContext", "(", ")", ";", "addParent", ...
Add project specific information. @param project The project. @param projectDescriptor The project descriptor.
[ "Add", "project", "specific", "information", "." ]
train
https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenProjectScannerPlugin.java#L199-L204
amzn/ion-java
src/com/amazon/ion/util/IonTextUtils.java
IonTextUtils.printSymbol
public static void printSymbol(Appendable out, CharSequence text) throws IOException { if (text == null) { out.append("null.symbol"); } else if (symbolNeedsQuoting(text, true)) { printQuotedSymbol(out, text); } else { ...
java
public static void printSymbol(Appendable out, CharSequence text) throws IOException { if (text == null) { out.append("null.symbol"); } else if (symbolNeedsQuoting(text, true)) { printQuotedSymbol(out, text); } else { ...
[ "public", "static", "void", "printSymbol", "(", "Appendable", "out", ",", "CharSequence", "text", ")", "throws", "IOException", "{", "if", "(", "text", "==", "null", ")", "{", "out", ".", "append", "(", "\"null.symbol\"", ")", ";", "}", "else", "if", "("...
Prints the text as an Ion symbol, including surrounding single-quotes if they are necessary. Operator symbols such as {@code '+'} are quoted. If the {@code text} is null, this prints {@code null.symbol}. @param out the stream to receive the Ion data. @param text the symbol text; may be {@code null}. @throws IOExcept...
[ "Prints", "the", "text", "as", "an", "Ion", "symbol", "including", "surrounding", "single", "-", "quotes", "if", "they", "are", "necessary", ".", "Operator", "symbols", "such", "as", "{", "@code", "+", "}", "are", "quoted", ".", "If", "the", "{", "@code"...
train
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/util/IonTextUtils.java#L577-L592
netheosgithub/pcs_api
java/src/main/java/net/netheos/pcsapi/utils/URIUtil.java
URIUtil.getQueryParameter
public static String getQueryParameter( URI uri, String name ) { Map<String, String> params = parseQueryParameters( uri.getRawQuery() ); return params.get( name ); }
java
public static String getQueryParameter( URI uri, String name ) { Map<String, String> params = parseQueryParameters( uri.getRawQuery() ); return params.get( name ); }
[ "public", "static", "String", "getQueryParameter", "(", "URI", "uri", ",", "String", "name", ")", "{", "Map", "<", "String", ",", "String", ">", "params", "=", "parseQueryParameters", "(", "uri", ".", "getRawQuery", "(", ")", ")", ";", "return", "params", ...
Retrieves a query param in a URL according to a key. If several parameters are to be retrieved from the same URI, better use <code>parseQueryString( uri.getRawQuery() )</code>. @param uri @param name @return parameter value (if found) ; null if not found or no = after name.
[ "Retrieves", "a", "query", "param", "in", "a", "URL", "according", "to", "a", "key", "." ]
train
https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/utils/URIUtil.java#L121-L125
google/closure-templates
java/src/com/google/template/soy/jbcsrc/JbcSrcValueFactory.java
JbcSrcValueFactory.isOrContains
private boolean isOrContains(SoyType type, SoyType.Kind kind) { if (type.getKind() == kind) { return true; } if (type.getKind() == SoyType.Kind.UNION) { for (SoyType member : ((UnionType) type).getMembers()) { if (member.getKind() == kind) { return true; } } }...
java
private boolean isOrContains(SoyType type, SoyType.Kind kind) { if (type.getKind() == kind) { return true; } if (type.getKind() == SoyType.Kind.UNION) { for (SoyType member : ((UnionType) type).getMembers()) { if (member.getKind() == kind) { return true; } } }...
[ "private", "boolean", "isOrContains", "(", "SoyType", "type", ",", "SoyType", ".", "Kind", "kind", ")", "{", "if", "(", "type", ".", "getKind", "(", ")", "==", "kind", ")", "{", "return", "true", ";", "}", "if", "(", "type", ".", "getKind", "(", ")...
Returns true if the type is the given kind or contains the given kind.
[ "Returns", "true", "if", "the", "type", "is", "the", "given", "kind", "or", "contains", "the", "given", "kind", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/JbcSrcValueFactory.java#L740-L752
ksclarke/freelib-utils
src/main/java/info/freelibrary/util/FileUtils.java
FileUtils.dirIsUseable
public static boolean dirIsUseable(final String aDirName, final String aPermString) { final File dir = new File(aDirName); if (!dir.exists() && !dir.mkdirs()) { return false; } else if ("r".contains(aPermString)) { return dir.canRead(); } else if ("w".contains(aP...
java
public static boolean dirIsUseable(final String aDirName, final String aPermString) { final File dir = new File(aDirName); if (!dir.exists() && !dir.mkdirs()) { return false; } else if ("r".contains(aPermString)) { return dir.canRead(); } else if ("w".contains(aP...
[ "public", "static", "boolean", "dirIsUseable", "(", "final", "String", "aDirName", ",", "final", "String", "aPermString", ")", "{", "final", "File", "dir", "=", "new", "File", "(", "aDirName", ")", ";", "if", "(", "!", "dir", ".", "exists", "(", ")", "...
Tests that the supplied directory exists and can be used according to the supplied permissions string (e.g., 'rwx'). @param aDirName A name of a directory on the file system @param aPermString A string representing the desired permissions of the directory @return True if the directory is okay to be used; else, false
[ "Tests", "that", "the", "supplied", "directory", "exists", "and", "can", "be", "used", "according", "to", "the", "supplied", "permissions", "string", "(", "e", ".", "g", ".", "rwx", ")", "." ]
train
https://github.com/ksclarke/freelib-utils/blob/54e822ae4c11b3d74793fd82a1a535ffafffaf45/src/main/java/info/freelibrary/util/FileUtils.java#L621-L635
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/MariaDbStatement.java
MariaDbStatement.executeLargeUpdate
@Override public long executeLargeUpdate(String sql, String[] columnNames) throws SQLException { return executeLargeUpdate(sql, Statement.RETURN_GENERATED_KEYS); }
java
@Override public long executeLargeUpdate(String sql, String[] columnNames) throws SQLException { return executeLargeUpdate(sql, Statement.RETURN_GENERATED_KEYS); }
[ "@", "Override", "public", "long", "executeLargeUpdate", "(", "String", "sql", ",", "String", "[", "]", "columnNames", ")", "throws", "SQLException", "{", "return", "executeLargeUpdate", "(", "sql", ",", "Statement", ".", "RETURN_GENERATED_KEYS", ")", ";", "}" ]
Identical to executeLargeUpdate(String sql, int autoGeneratedKeys) with autoGeneratedKeys = Statement.RETURN_GENERATED_KEYS set. @param sql sql command @param columnNames columns names @return update counts @throws SQLException if any error occur during execution
[ "Identical", "to", "executeLargeUpdate", "(", "String", "sql", "int", "autoGeneratedKeys", ")", "with", "autoGeneratedKeys", "=", "Statement", ".", "RETURN_GENERATED_KEYS", "set", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/MariaDbStatement.java#L670-L673
andriusvelykis/reflow-maven-skin
reflow-velocity-tools/src/main/java/lt/velykis/maven/skins/reflow/HtmlTool.java
HtmlTool.anchorToId
private static void anchorToId(Element heading, Element anchor) { if ("a".equals(anchor.tagName()) && heading.id().isEmpty()) { String aName = anchor.attr("name"); if (!aName.isEmpty()) { // set the anchor name as heading ID heading.attr("id", aName); // remove the anchor anchor.remove()...
java
private static void anchorToId(Element heading, Element anchor) { if ("a".equals(anchor.tagName()) && heading.id().isEmpty()) { String aName = anchor.attr("name"); if (!aName.isEmpty()) { // set the anchor name as heading ID heading.attr("id", aName); // remove the anchor anchor.remove()...
[ "private", "static", "void", "anchorToId", "(", "Element", "heading", ",", "Element", "anchor", ")", "{", "if", "(", "\"a\"", ".", "equals", "(", "anchor", ".", "tagName", "(", ")", ")", "&&", "heading", ".", "id", "(", ")", ".", "isEmpty", "(", ")",...
Moves anchor name to heading id, if one does not exist. Removes the anchor. @param heading @param anchor
[ "Moves", "anchor", "name", "to", "heading", "id", "if", "one", "does", "not", "exist", ".", "Removes", "the", "anchor", "." ]
train
https://github.com/andriusvelykis/reflow-maven-skin/blob/01170ae1426a1adfe7cc9c199e77aaa2ecb37ef2/reflow-velocity-tools/src/main/java/lt/velykis/maven/skins/reflow/HtmlTool.java#L954-L966
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/editor/DocumentAutoFormatter.java
DocumentAutoFormatter.formatRegion
protected void formatRegion(IXtextDocument document, int offset, int length) { try { final int startLineIndex = document.getLineOfOffset(previousSiblingChar(document, offset)); final int endLineIndex = document.getLineOfOffset(offset + length); int regionLength = 0; for (int i = startLineIndex; i <= endLi...
java
protected void formatRegion(IXtextDocument document, int offset, int length) { try { final int startLineIndex = document.getLineOfOffset(previousSiblingChar(document, offset)); final int endLineIndex = document.getLineOfOffset(offset + length); int regionLength = 0; for (int i = startLineIndex; i <= endLi...
[ "protected", "void", "formatRegion", "(", "IXtextDocument", "document", ",", "int", "offset", ",", "int", "length", ")", "{", "try", "{", "final", "int", "startLineIndex", "=", "document", ".", "getLineOfOffset", "(", "previousSiblingChar", "(", "document", ",",...
Called for formatting a region. @param document the document to format. @param offset the offset of the text to format. @param length the length of the text.
[ "Called", "for", "formatting", "a", "region", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/editor/DocumentAutoFormatter.java#L113-L130
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/parser/VCProjectHolder.java
VCProjectHolder.getVCProjectHolder
public static VCProjectHolder getVCProjectHolder( File inputFile, boolean isSolution, Map<String, String> envVariables ) { VCProjectHolder vcProjectHolder = VCPROJECT_HOLDERS.get( inputFile ); if ( vcProjectHolder == null ) { vcProjectHolder = new VCProjectH...
java
public static VCProjectHolder getVCProjectHolder( File inputFile, boolean isSolution, Map<String, String> envVariables ) { VCProjectHolder vcProjectHolder = VCPROJECT_HOLDERS.get( inputFile ); if ( vcProjectHolder == null ) { vcProjectHolder = new VCProjectH...
[ "public", "static", "VCProjectHolder", "getVCProjectHolder", "(", "File", "inputFile", ",", "boolean", "isSolution", ",", "Map", "<", "String", ",", "String", ">", "envVariables", ")", "{", "VCProjectHolder", "vcProjectHolder", "=", "VCPROJECT_HOLDERS", ".", "get", ...
Find or create a container for parsed Visual C++ projects. If a container has already been created for the given {@code inputFile} that container is returned; otherwise a new container is created. @param inputFile the file to parse, it can be a Visual Studio solution (containing Visual C++ projects) or a standalone Vis...
[ "Find", "or", "create", "a", "container", "for", "parsed", "Visual", "C", "++", "projects", ".", "If", "a", "container", "has", "already", "been", "created", "for", "the", "given", "{" ]
train
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/parser/VCProjectHolder.java#L71-L83
Erudika/para
para-core/src/main/java/com/erudika/para/rest/GenericExceptionMapper.java
GenericExceptionMapper.getExceptionResponse
public static Response getExceptionResponse(final int status, final String msg) { return Response.status(status).entity(new LinkedHashMap<String, Object>() { private static final long serialVersionUID = 1L; { put("code", status); put("message", msg); } }).type(MediaType.APPLICATION_JSON).build(); ...
java
public static Response getExceptionResponse(final int status, final String msg) { return Response.status(status).entity(new LinkedHashMap<String, Object>() { private static final long serialVersionUID = 1L; { put("code", status); put("message", msg); } }).type(MediaType.APPLICATION_JSON).build(); ...
[ "public", "static", "Response", "getExceptionResponse", "(", "final", "int", "status", ",", "final", "String", "msg", ")", "{", "return", "Response", ".", "status", "(", "status", ")", ".", "entity", "(", "new", "LinkedHashMap", "<", "String", ",", "Object",...
Returns an exception/error response as a JSON object. @param status HTTP status code @param msg message @return a JSON object
[ "Returns", "an", "exception", "/", "error", "response", "as", "a", "JSON", "object", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-core/src/main/java/com/erudika/para/rest/GenericExceptionMapper.java#L68-L76
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/JobScheduleOperations.java
JobScheduleOperations.listJobSchedules
public PagedList<CloudJobSchedule> listJobSchedules(DetailLevel detailLevel) throws BatchErrorException, IOException { return listJobSchedules(detailLevel, null); }
java
public PagedList<CloudJobSchedule> listJobSchedules(DetailLevel detailLevel) throws BatchErrorException, IOException { return listJobSchedules(detailLevel, null); }
[ "public", "PagedList", "<", "CloudJobSchedule", ">", "listJobSchedules", "(", "DetailLevel", "detailLevel", ")", "throws", "BatchErrorException", ",", "IOException", "{", "return", "listJobSchedules", "(", "detailLevel", ",", "null", ")", ";", "}" ]
Lists the {@link CloudJobSchedule job schedules} in the Batch account. @param detailLevel A {@link DetailLevel} used for filtering the list and for controlling which properties are retrieved from the service. @return A list of {@link CloudJobSchedule} objects. @throws BatchErrorException Exception thrown when an error...
[ "Lists", "the", "{", "@link", "CloudJobSchedule", "job", "schedules", "}", "in", "the", "Batch", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/JobScheduleOperations.java#L432-L434
apereo/cas
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/configurer/AbstractCasWebflowConfigurer.java
AbstractCasWebflowConfigurer.getState
public TransitionableState getState(final Flow flow, final String stateId) { return getState(flow, stateId, TransitionableState.class); }
java
public TransitionableState getState(final Flow flow, final String stateId) { return getState(flow, stateId, TransitionableState.class); }
[ "public", "TransitionableState", "getState", "(", "final", "Flow", "flow", ",", "final", "String", "stateId", ")", "{", "return", "getState", "(", "flow", ",", "stateId", ",", "TransitionableState", ".", "class", ")", ";", "}" ]
Gets state. @param flow the flow @param stateId the state id @return the state
[ "Gets", "state", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/configurer/AbstractCasWebflowConfigurer.java#L741-L743
chennaione/sugar
library/src/main/java/com/orm/helper/MultiDexHelper.java
MultiDexHelper.getSourcePaths
public static List<String> getSourcePaths() throws PackageManager.NameNotFoundException, IOException { ApplicationInfo applicationInfo = getPackageManager().getApplicationInfo(getPackageName(), 0); File sourceApk = new File(applicationInfo.sourceDir); File dexDir = new File(applicationInfo.dataD...
java
public static List<String> getSourcePaths() throws PackageManager.NameNotFoundException, IOException { ApplicationInfo applicationInfo = getPackageManager().getApplicationInfo(getPackageName(), 0); File sourceApk = new File(applicationInfo.sourceDir); File dexDir = new File(applicationInfo.dataD...
[ "public", "static", "List", "<", "String", ">", "getSourcePaths", "(", ")", "throws", "PackageManager", ".", "NameNotFoundException", ",", "IOException", "{", "ApplicationInfo", "applicationInfo", "=", "getPackageManager", "(", ")", ".", "getApplicationInfo", "(", "...
get all the dex path @return all the dex path, including the ones in the newly added instant-run folder @throws PackageManager.NameNotFoundException @throws IOException
[ "get", "all", "the", "dex", "path" ]
train
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/helper/MultiDexHelper.java#L52-L83
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfAction.java
PdfAction.gotoEmbedded
public static PdfAction gotoEmbedded(String filename, PdfTargetDictionary target, PdfObject dest, boolean newWindow) { PdfAction action = new PdfAction(); action.put(PdfName.S, PdfName.GOTOE); action.put(PdfName.T, target); action.put(PdfName.D, dest); action.put(PdfName.NEWWINDOW, new PdfBoole...
java
public static PdfAction gotoEmbedded(String filename, PdfTargetDictionary target, PdfObject dest, boolean newWindow) { PdfAction action = new PdfAction(); action.put(PdfName.S, PdfName.GOTOE); action.put(PdfName.T, target); action.put(PdfName.D, dest); action.put(PdfName.NEWWINDOW, new PdfBoole...
[ "public", "static", "PdfAction", "gotoEmbedded", "(", "String", "filename", ",", "PdfTargetDictionary", "target", ",", "PdfObject", "dest", ",", "boolean", "newWindow", ")", "{", "PdfAction", "action", "=", "new", "PdfAction", "(", ")", ";", "action", ".", "pu...
Creates a GoToE action to an embedded file. @param filename the root document of the target (null if the target is in the same document) @param target a path to the target document of this action @param dest the destination inside the target document, can be of type PdfDestination, PdfName, or PdfString @param newWind...
[ "Creates", "a", "GoToE", "action", "to", "an", "embedded", "file", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfAction.java#L523-L533
liferay/com-liferay-commerce
commerce-product-api/src/main/java/com/liferay/commerce/product/model/CPOptionCategoryWrapper.java
CPOptionCategoryWrapper.getDescription
@Override public String getDescription(String languageId, boolean useDefault) { return _cpOptionCategory.getDescription(languageId, useDefault); }
java
@Override public String getDescription(String languageId, boolean useDefault) { return _cpOptionCategory.getDescription(languageId, useDefault); }
[ "@", "Override", "public", "String", "getDescription", "(", "String", "languageId", ",", "boolean", "useDefault", ")", "{", "return", "_cpOptionCategory", ".", "getDescription", "(", "languageId", ",", "useDefault", ")", ";", "}" ]
Returns the localized description of this cp option category in the language, optionally using the default language if no localization exists for the requested language. @param languageId the ID of the language @param useDefault whether to use the default language if no localization exists for the requested language @...
[ "Returns", "the", "localized", "description", "of", "this", "cp", "option", "category", "in", "the", "language", "optionally", "using", "the", "default", "language", "if", "no", "localization", "exists", "for", "the", "requested", "language", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/model/CPOptionCategoryWrapper.java#L262-L265
deeplearning4j/deeplearning4j
datavec/datavec-api/src/main/java/org/datavec/api/io/WritableUtils.java
WritableUtils.writeString
public static void writeString(DataOutput out, String s) throws IOException { if (s != null) { byte[] buffer = s.getBytes("UTF-8"); int len = buffer.length; out.writeInt(len); out.write(buffer, 0, len); } else { out.writeInt(-1); } ...
java
public static void writeString(DataOutput out, String s) throws IOException { if (s != null) { byte[] buffer = s.getBytes("UTF-8"); int len = buffer.length; out.writeInt(len); out.write(buffer, 0, len); } else { out.writeInt(-1); } ...
[ "public", "static", "void", "writeString", "(", "DataOutput", "out", ",", "String", "s", ")", "throws", "IOException", "{", "if", "(", "s", "!=", "null", ")", "{", "byte", "[", "]", "buffer", "=", "s", ".", "getBytes", "(", "\"UTF-8\"", ")", ";", "in...
/* Write a String as a Network Int n, followed by n Bytes Alternative to 16 bit read/writeUTF. Encoding standard is... ?
[ "/", "*" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-api/src/main/java/org/datavec/api/io/WritableUtils.java#L97-L106
alibaba/jstorm
jstorm-core/src/main/java/backtype/storm/utils/disruptor/RingBuffer.java
RingBuffer.tryPublishEvents
public <A, B> boolean tryPublishEvents(EventTranslatorTwoArg<E, A, B> translator, A[] arg0, B[] arg1) { return tryPublishEvents(translator, 0, arg0.length, arg0, arg1); }
java
public <A, B> boolean tryPublishEvents(EventTranslatorTwoArg<E, A, B> translator, A[] arg0, B[] arg1) { return tryPublishEvents(translator, 0, arg0.length, arg0, arg1); }
[ "public", "<", "A", ",", "B", ">", "boolean", "tryPublishEvents", "(", "EventTranslatorTwoArg", "<", "E", ",", "A", ",", "B", ">", "translator", ",", "A", "[", "]", "arg0", ",", "B", "[", "]", "arg1", ")", "{", "return", "tryPublishEvents", "(", "tra...
Allows two user supplied arguments per event. @param translator The user specified translation for the event @param arg0 An array of user supplied arguments, one element per event. @param arg1 An array of user supplied arguments, one element per event. @return true if the value was published, false if there was insuff...
[ "Allows", "two", "user", "supplied", "arguments", "per", "event", "." ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/backtype/storm/utils/disruptor/RingBuffer.java#L660-L662
landawn/AbacusUtil
src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java
PoolablePreparedStatement.setURL
@Override public void setURL(int parameterIndex, URL x) throws SQLException { internalStmt.setURL(parameterIndex, x); }
java
@Override public void setURL(int parameterIndex, URL x) throws SQLException { internalStmt.setURL(parameterIndex, x); }
[ "@", "Override", "public", "void", "setURL", "(", "int", "parameterIndex", ",", "URL", "x", ")", "throws", "SQLException", "{", "internalStmt", ".", "setURL", "(", "parameterIndex", ",", "x", ")", ";", "}" ]
Method setURL. @param parameterIndex @param x @throws SQLException @see java.sql.PreparedStatement#setURL(int, URL)
[ "Method", "setURL", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java#L1058-L1061
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/string/Strs.java
Strs.indexAny
public static int indexAny(String target, Integer fromIndex, List<String> indexWith) { if (isNull(target)) { return INDEX_NONE_EXISTS; } return matcher(target).indexs(fromIndex, checkNotNull(indexWith).toArray(new String[indexWith.size()])); }
java
public static int indexAny(String target, Integer fromIndex, List<String> indexWith) { if (isNull(target)) { return INDEX_NONE_EXISTS; } return matcher(target).indexs(fromIndex, checkNotNull(indexWith).toArray(new String[indexWith.size()])); }
[ "public", "static", "int", "indexAny", "(", "String", "target", ",", "Integer", "fromIndex", ",", "List", "<", "String", ">", "indexWith", ")", "{", "if", "(", "isNull", "(", "target", ")", ")", "{", "return", "INDEX_NONE_EXISTS", ";", "}", "return", "ma...
Search target string to find the first index of any string in the given string list, starting at the specified index @param target @param fromIndex @param indexWith @return
[ "Search", "target", "string", "to", "find", "the", "first", "index", "of", "any", "string", "in", "the", "given", "string", "list", "starting", "at", "the", "specified", "index" ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/string/Strs.java#L288-L294
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/dynamic/support/ReflectionUtils.java
ReflectionUtils.getField
public static Object getField(Field field, Object target) { try { return field.get(target); } catch (IllegalAccessException ex) { handleReflectionException(ex); throw new IllegalStateException( "Unexpected reflection exception - " + ex.getClass().g...
java
public static Object getField(Field field, Object target) { try { return field.get(target); } catch (IllegalAccessException ex) { handleReflectionException(ex); throw new IllegalStateException( "Unexpected reflection exception - " + ex.getClass().g...
[ "public", "static", "Object", "getField", "(", "Field", "field", ",", "Object", "target", ")", "{", "try", "{", "return", "field", ".", "get", "(", "target", ")", ";", "}", "catch", "(", "IllegalAccessException", "ex", ")", "{", "handleReflectionException", ...
Get the field represented by the supplied {@link Field field object} on the specified {@link Object target object}. In accordance with {@link Field#get(Object)} semantics, the returned value is automatically wrapped if the underlying field has a primitive type. <p> Thrown exceptions are handled via a call to {@link #ha...
[ "Get", "the", "field", "represented", "by", "the", "supplied", "{", "@link", "Field", "field", "object", "}", "on", "the", "specified", "{", "@link", "Object", "target", "object", "}", ".", "In", "accordance", "with", "{", "@link", "Field#get", "(", "Objec...
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/dynamic/support/ReflectionUtils.java#L44-L52
alkacon/opencms-core
src/org/opencms/publish/CmsPublishManager.java
CmsPublishManager.getPublishListAll
public CmsPublishList getPublishListAll( CmsObject cms, List<CmsResource> directPublishResources, boolean directPublishSiblings, boolean isUserPublishList) throws CmsException { CmsPublishList pubList = new CmsPublishList(true, directPublishResources, directPublishSiblings); ...
java
public CmsPublishList getPublishListAll( CmsObject cms, List<CmsResource> directPublishResources, boolean directPublishSiblings, boolean isUserPublishList) throws CmsException { CmsPublishList pubList = new CmsPublishList(true, directPublishResources, directPublishSiblings); ...
[ "public", "CmsPublishList", "getPublishListAll", "(", "CmsObject", "cms", ",", "List", "<", "CmsResource", ">", "directPublishResources", ",", "boolean", "directPublishSiblings", ",", "boolean", "isUserPublishList", ")", "throws", "CmsException", "{", "CmsPublishList", ...
Returns a publish list with all the given resources, filtered only by state.<p> @param cms the cms request context @param directPublishResources the {@link CmsResource} objects which will be directly published @param directPublishSiblings <code>true</code>, if all eventual siblings of the direct published resources sh...
[ "Returns", "a", "publish", "list", "with", "all", "the", "given", "resources", "filtered", "only", "by", "state", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/publish/CmsPublishManager.java#L374-L384
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/beans/transform/AbstractWrappedAnalysisJobTransformer.java
AbstractWrappedAnalysisJobTransformer.reInitialize
protected boolean reInitialize(AnalysisJob wrappedAnalysisJob, List<InputColumn<?>> outputColumns) { if (wrappedAnalysisJob != null && outputColumns != null && !outputColumns.isEmpty()) { return false; } return true; }
java
protected boolean reInitialize(AnalysisJob wrappedAnalysisJob, List<InputColumn<?>> outputColumns) { if (wrappedAnalysisJob != null && outputColumns != null && !outputColumns.isEmpty()) { return false; } return true; }
[ "protected", "boolean", "reInitialize", "(", "AnalysisJob", "wrappedAnalysisJob", ",", "List", "<", "InputColumn", "<", "?", ">", ">", "outputColumns", ")", "{", "if", "(", "wrappedAnalysisJob", "!=", "null", "&&", "outputColumns", "!=", "null", "&&", "!", "ou...
Determines if the transformer should reinitialize it's {@link ConsumeRowHandler}, output columns etc. based on a set of existing values. The default implementation returns false when non-null values are available @param wrappedAnalysisJob @param outputColumns @return
[ "Determines", "if", "the", "transformer", "should", "reinitialize", "it", "s", "{", "@link", "ConsumeRowHandler", "}", "output", "columns", "etc", ".", "based", "on", "a", "set", "of", "existing", "values", "." ]
train
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/beans/transform/AbstractWrappedAnalysisJobTransformer.java#L114-L119
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/ArrayFunctions.java
ArrayFunctions.arrayConcat
public static Expression arrayConcat(JsonArray array1, JsonArray array2) { return arrayConcat(x(array1), x(array2)); }
java
public static Expression arrayConcat(JsonArray array1, JsonArray array2) { return arrayConcat(x(array1), x(array2)); }
[ "public", "static", "Expression", "arrayConcat", "(", "JsonArray", "array1", ",", "JsonArray", "array2", ")", "{", "return", "arrayConcat", "(", "x", "(", "array1", ")", ",", "x", "(", "array2", ")", ")", ";", "}" ]
Returned expression results in new array with the concatenation of the input arrays.
[ "Returned", "expression", "results", "in", "new", "array", "with", "the", "concatenation", "of", "the", "input", "arrays", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/ArrayFunctions.java#L104-L106
zackpollard/JavaTelegramBot-API
core/src/main/java/pro/zackpollard/telegrambot/api/utils/Utils.java
Utils.processReplyContent
public static void processReplyContent(MultipartBody multipartBody, ReplyingOptions replyingOptions) { if (replyingOptions.getReplyTo() != 0) multipartBody.field("reply_to_message_id", String.valueOf(replyingOptions.getReplyTo()), "application/json; charset=utf8;"); if (replyingOptions.getR...
java
public static void processReplyContent(MultipartBody multipartBody, ReplyingOptions replyingOptions) { if (replyingOptions.getReplyTo() != 0) multipartBody.field("reply_to_message_id", String.valueOf(replyingOptions.getReplyTo()), "application/json; charset=utf8;"); if (replyingOptions.getR...
[ "public", "static", "void", "processReplyContent", "(", "MultipartBody", "multipartBody", ",", "ReplyingOptions", "replyingOptions", ")", "{", "if", "(", "replyingOptions", ".", "getReplyTo", "(", ")", "!=", "0", ")", "multipartBody", ".", "field", "(", "\"reply_t...
This does generic processing of ReplyingOptions objects when sending a request to the API @param multipartBody The MultipartBody that the ReplyingOptions content should be appended to @param replyingOptions The ReplyingOptions that were used in this request
[ "This", "does", "generic", "processing", "of", "ReplyingOptions", "objects", "when", "sending", "a", "request", "to", "the", "API" ]
train
https://github.com/zackpollard/JavaTelegramBot-API/blob/9d100f351824042ca5fc0ea735d1fa376a13e81d/core/src/main/java/pro/zackpollard/telegrambot/api/utils/Utils.java#L95-L120
mnlipp/jgrapes
org.jgrapes.io/src/org/jgrapes/io/FileStorage.java
FileStorage.onSaveInput
@Handler @SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops") public void onSaveInput(SaveInput event) throws InterruptedException { if (!Arrays.asList(event.options()) .contains(StandardOpenOption.WRITE)) { throw new IllegalArgumentException( "File must be o...
java
@Handler @SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops") public void onSaveInput(SaveInput event) throws InterruptedException { if (!Arrays.asList(event.options()) .contains(StandardOpenOption.WRITE)) { throw new IllegalArgumentException( "File must be o...
[ "@", "Handler", "@", "SuppressWarnings", "(", "\"PMD.AvoidInstantiatingObjectsInLoops\"", ")", "public", "void", "onSaveInput", "(", "SaveInput", "event", ")", "throws", "InterruptedException", "{", "if", "(", "!", "Arrays", ".", "asList", "(", "event", ".", "opti...
Opens a file for writing using the properties of the event. All data from subsequent {@link Input} events is written to the file. The end of record flag is ignored. @param event the event @throws InterruptedException if the execution was interrupted
[ "Opens", "a", "file", "for", "writing", "using", "the", "properties", "of", "the", "event", ".", "All", "data", "from", "subsequent", "{", "@link", "Input", "}", "events", "is", "written", "to", "the", "file", ".", "The", "end", "of", "record", "flag", ...
train
https://github.com/mnlipp/jgrapes/blob/8b5d874935d84c34a52d3e3d3745e869b5203fa0/org.jgrapes.io/src/org/jgrapes/io/FileStorage.java#L303-L319
ebean-orm/ebean-querybean
src/main/java/io/ebean/typequery/TQRootBean.java
TQRootBean.multiMatch
public R multiMatch(String query, String... properties) { peekExprList().multiMatch(query, properties); return root; }
java
public R multiMatch(String query, String... properties) { peekExprList().multiMatch(query, properties); return root; }
[ "public", "R", "multiMatch", "(", "String", "query", ",", "String", "...", "properties", ")", "{", "peekExprList", "(", ")", ".", "multiMatch", "(", "query", ",", "properties", ")", ";", "return", "root", ";", "}" ]
Add a Text Multi-match expression (document store only). <p> This automatically makes the query a document store query. </p>
[ "Add", "a", "Text", "Multi", "-", "match", "expression", "(", "document", "store", "only", ")", ".", "<p", ">", "This", "automatically", "makes", "the", "query", "a", "document", "store", "query", ".", "<", "/", "p", ">" ]
train
https://github.com/ebean-orm/ebean-querybean/blob/821650cb817c9c0fdcc97f93408dc79170b12423/src/main/java/io/ebean/typequery/TQRootBean.java#L1388-L1391
Azure/azure-sdk-for-java
postgresql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/postgresql/v2017_12_01/implementation/FirewallRulesInner.java
FirewallRulesInner.beginCreateOrUpdateAsync
public Observable<FirewallRuleInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, firewallRuleName, parameters).map(new Func1<ServiceResponse<Firewa...
java
public Observable<FirewallRuleInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, firewallRuleName, parameters).map(new Func1<ServiceResponse<Firewa...
[ "public", "Observable", "<", "FirewallRuleInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "firewallRuleName", ",", "FirewallRuleInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithService...
Creates a new firewall rule or updates an existing firewall rule. @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 firewallRuleName The name of the server fir...
[ "Creates", "a", "new", "firewall", "rule", "or", "updates", "an", "existing", "firewall", "rule", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/postgresql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/postgresql/v2017_12_01/implementation/FirewallRulesInner.java#L210-L217
samskivert/samskivert
src/main/java/com/samskivert/servlet/util/ParameterUtil.java
ParameterUtil.getDateParameter
public static Date getDateParameter ( HttpServletRequest req, String name, String invalidDataMessage) throws DataValidationException { String value = getParameter(req, name, false); if (StringUtil.isBlank(value) || DATE_TEMPLATE.equalsIgnoreCase(value)) { retu...
java
public static Date getDateParameter ( HttpServletRequest req, String name, String invalidDataMessage) throws DataValidationException { String value = getParameter(req, name, false); if (StringUtil.isBlank(value) || DATE_TEMPLATE.equalsIgnoreCase(value)) { retu...
[ "public", "static", "Date", "getDateParameter", "(", "HttpServletRequest", "req", ",", "String", "name", ",", "String", "invalidDataMessage", ")", "throws", "DataValidationException", "{", "String", "value", "=", "getParameter", "(", "req", ",", "name", ",", "fals...
Fetches the supplied parameter from the request and converts it to a date. The value of the parameter should be a date formatted like so: 2001-12-25. If the parameter does not exist, null is returned. If the parameter is not a well-formed date, a data validation exception is thrown with the supplied message.
[ "Fetches", "the", "supplied", "parameter", "from", "the", "request", "and", "converts", "it", "to", "a", "date", ".", "The", "value", "of", "the", "parameter", "should", "be", "a", "date", "formatted", "like", "so", ":", "2001", "-", "12", "-", "25", "...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/servlet/util/ParameterUtil.java#L260-L270
samskivert/samskivert
src/main/java/com/samskivert/servlet/util/ExceptionMap.java
ExceptionMap.init
public static synchronized void init () { // only initialize ourselves once if (_keys != null) { return; } else { _keys = new ArrayList<Class<?>>(); _values = new ArrayList<String>(); } // first try loading the properties file without a le...
java
public static synchronized void init () { // only initialize ourselves once if (_keys != null) { return; } else { _keys = new ArrayList<Class<?>>(); _values = new ArrayList<String>(); } // first try loading the properties file without a le...
[ "public", "static", "synchronized", "void", "init", "(", ")", "{", "// only initialize ourselves once", "if", "(", "_keys", "!=", "null", ")", "{", "return", ";", "}", "else", "{", "_keys", "=", "new", "ArrayList", "<", "Class", "<", "?", ">", ">", "(", ...
Searches for the <code>exceptionmap.properties</code> file in the classpath and loads it. If the file could not be found, an error is reported and a default set of mappings is used.
[ "Searches", "for", "the", "<code", ">", "exceptionmap", ".", "properties<", "/", "code", ">", "file", "in", "the", "classpath", "and", "loads", "it", ".", "If", "the", "file", "could", "not", "be", "found", "an", "error", "is", "reported", "and", "a", ...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/servlet/util/ExceptionMap.java#L62-L115
Jasig/uPortal
uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/LPAChangeParameter.java
LPAChangeParameter.perform
@Override public void perform() throws PortalException { // push the change into the PLF if (nodeId.startsWith(Constants.FRAGMENT_ID_USER_PREFIX)) { // we are dealing with an incorporated node, adding will replace // an existing one for the same target node id and name ...
java
@Override public void perform() throws PortalException { // push the change into the PLF if (nodeId.startsWith(Constants.FRAGMENT_ID_USER_PREFIX)) { // we are dealing with an incorporated node, adding will replace // an existing one for the same target node id and name ...
[ "@", "Override", "public", "void", "perform", "(", ")", "throws", "PortalException", "{", "// push the change into the PLF", "if", "(", "nodeId", ".", "startsWith", "(", "Constants", ".", "FRAGMENT_ID_USER_PREFIX", ")", ")", "{", "// we are dealing with an incorporated ...
Change the parameter for a channel in both the ILF and PLF using the appropriate mechanisms for incorporated nodes versus owned nodes.
[ "Change", "the", "parameter", "for", "a", "channel", "in", "both", "the", "ILF", "and", "PLF", "using", "the", "appropriate", "mechanisms", "for", "incorporated", "nodes", "versus", "owned", "nodes", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/LPAChangeParameter.java#L43-L58
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java
Bbox.createFittingBox
public Bbox createFittingBox(double ratioWidth, double ratioHeight) { if (ratioWidth > 0 && ratioHeight > 0) { double newRatio = ratioWidth / ratioHeight; double oldRatio = width / height; double newWidth = width; double newHeight = height; if (newRatio > oldRatio) { newHeight = width / newRatio; ...
java
public Bbox createFittingBox(double ratioWidth, double ratioHeight) { if (ratioWidth > 0 && ratioHeight > 0) { double newRatio = ratioWidth / ratioHeight; double oldRatio = width / height; double newWidth = width; double newHeight = height; if (newRatio > oldRatio) { newHeight = width / newRatio; ...
[ "public", "Bbox", "createFittingBox", "(", "double", "ratioWidth", ",", "double", "ratioHeight", ")", "{", "if", "(", "ratioWidth", ">", "0", "&&", "ratioHeight", ">", "0", ")", "{", "double", "newRatio", "=", "ratioWidth", "/", "ratioHeight", ";", "double",...
Creates a bbox that fits exactly in this box but has a different width/height ratio. @param ratioWidth width dor ratio @param ratioHeight height for ratio @return bbox
[ "Creates", "a", "bbox", "that", "fits", "exactly", "in", "this", "box", "but", "has", "a", "different", "width", "/", "height", "ratio", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java#L326-L343
beangle/beangle3
orm/hibernate/src/main/java/org/beangle/orm/hibernate/RailsNamingStrategy.java
RailsNamingStrategy.logicalCollectionColumnName
public String logicalCollectionColumnName(String columnName, String propertyName, String referencedColumn) { return Strings.isNotEmpty(columnName) ? columnName : unqualify(propertyName) + "_" + referencedColumn; }
java
public String logicalCollectionColumnName(String columnName, String propertyName, String referencedColumn) { return Strings.isNotEmpty(columnName) ? columnName : unqualify(propertyName) + "_" + referencedColumn; }
[ "public", "String", "logicalCollectionColumnName", "(", "String", "columnName", ",", "String", "propertyName", ",", "String", "referencedColumn", ")", "{", "return", "Strings", ".", "isNotEmpty", "(", "columnName", ")", "?", "columnName", ":", "unqualify", "(", "p...
Return the column name if explicit or the concatenation of the property name and the referenced column
[ "Return", "the", "column", "name", "if", "explicit", "or", "the", "concatenation", "of", "the", "property", "name", "and", "the", "referenced", "column" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/orm/hibernate/src/main/java/org/beangle/orm/hibernate/RailsNamingStrategy.java#L166-L168
aerogear/aerogear-android-core
library/src/main/java/org/jboss/aerogear/android/core/reflection/Property.java
Property.getValue
public Object getValue(Object instance) { try { return getMethod.invoke(instance); } catch (Exception e) { throw new PropertyNotFoundException(klass, getType(), fieldName); } }
java
public Object getValue(Object instance) { try { return getMethod.invoke(instance); } catch (Exception e) { throw new PropertyNotFoundException(klass, getType(), fieldName); } }
[ "public", "Object", "getValue", "(", "Object", "instance", ")", "{", "try", "{", "return", "getMethod", ".", "invoke", "(", "instance", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "PropertyNotFoundException", "(", "klass", ",",...
Get value @param instance Instance to get value @return Value
[ "Get", "value" ]
train
https://github.com/aerogear/aerogear-android-core/blob/3be24a79dd3d2792804935572bb672ff8714e6aa/library/src/main/java/org/jboss/aerogear/android/core/reflection/Property.java#L124-L131
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxws.clientcontainer/src/com/ibm/ws/jaxws/metadata/builder/WebServiceRefInfoBuilder.java
WebServiceRefInfoBuilder.buildPartialInfoFromWebServiceClient
private static WebServiceRefPartialInfo buildPartialInfoFromWebServiceClient(Class<?> serviceInterfaceClass) { WebServiceClient webServiceClient = serviceInterfaceClass.getAnnotation(WebServiceClient.class); if (webServiceClient == null) { return null; } String className = s...
java
private static WebServiceRefPartialInfo buildPartialInfoFromWebServiceClient(Class<?> serviceInterfaceClass) { WebServiceClient webServiceClient = serviceInterfaceClass.getAnnotation(WebServiceClient.class); if (webServiceClient == null) { return null; } String className = s...
[ "private", "static", "WebServiceRefPartialInfo", "buildPartialInfoFromWebServiceClient", "(", "Class", "<", "?", ">", "serviceInterfaceClass", ")", "{", "WebServiceClient", "webServiceClient", "=", "serviceInterfaceClass", ".", "getAnnotation", "(", "WebServiceClient", ".", ...
This method will build a ServiceRefPartialInfo object from a class with an @WebServiceClient annotation.
[ "This", "method", "will", "build", "a", "ServiceRefPartialInfo", "object", "from", "a", "class", "with", "an" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxws.clientcontainer/src/com/ibm/ws/jaxws/metadata/builder/WebServiceRefInfoBuilder.java#L238-L258
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/TextRowProtocol.java
TextRowProtocol.getInternalBoolean
public boolean getInternalBoolean(ColumnInformation columnInfo) { if (lastValueWasNull()) { return false; } if (columnInfo.getColumnType() == ColumnType.BIT) { return parseBit() != 0; } final String rawVal = new String(buf, pos, length, StandardCharsets.UTF_8); return !("false".equa...
java
public boolean getInternalBoolean(ColumnInformation columnInfo) { if (lastValueWasNull()) { return false; } if (columnInfo.getColumnType() == ColumnType.BIT) { return parseBit() != 0; } final String rawVal = new String(buf, pos, length, StandardCharsets.UTF_8); return !("false".equa...
[ "public", "boolean", "getInternalBoolean", "(", "ColumnInformation", "columnInfo", ")", "{", "if", "(", "lastValueWasNull", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "columnInfo", ".", "getColumnType", "(", ")", "==", "ColumnType", ".", "BI...
Get boolean from raw text format. @param columnInfo column information @return boolean value
[ "Get", "boolean", "from", "raw", "text", "format", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/TextRowProtocol.java#L797-L807
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/FtpFileUtil.java
FtpFileUtil.disconnectAndLogoutFromFTPServer
public static void disconnectAndLogoutFromFTPServer(FTPClient ftpClient, String hostName) { try { // logout and disconnect if (ftpClient != null && ftpClient.isConnected()) { ftpClient.logout(); ftpClient.disconnect(); } } catch (IOExce...
java
public static void disconnectAndLogoutFromFTPServer(FTPClient ftpClient, String hostName) { try { // logout and disconnect if (ftpClient != null && ftpClient.isConnected()) { ftpClient.logout(); ftpClient.disconnect(); } } catch (IOExce...
[ "public", "static", "void", "disconnectAndLogoutFromFTPServer", "(", "FTPClient", "ftpClient", ",", "String", "hostName", ")", "{", "try", "{", "// logout and disconnect", "if", "(", "ftpClient", "!=", "null", "&&", "ftpClient", ".", "isConnected", "(", ")", ")", ...
Disconnect and logout given FTP client. @param hostName the FTP server host name
[ "Disconnect", "and", "logout", "given", "FTP", "client", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/FtpFileUtil.java#L231-L242
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java
Shape.getOffset
public static long getOffset(IntBuffer shapeInformation, int row, int col) { int rank = rank(shapeInformation); if (rank != 2) throw new IllegalArgumentException( "Cannot use this getOffset method on arrays of rank != 2 (rank is: " + rank + ")"); long offset = 0; ...
java
public static long getOffset(IntBuffer shapeInformation, int row, int col) { int rank = rank(shapeInformation); if (rank != 2) throw new IllegalArgumentException( "Cannot use this getOffset method on arrays of rank != 2 (rank is: " + rank + ")"); long offset = 0; ...
[ "public", "static", "long", "getOffset", "(", "IntBuffer", "shapeInformation", ",", "int", "row", ",", "int", "col", ")", "{", "int", "rank", "=", "rank", "(", "shapeInformation", ")", ";", "if", "(", "rank", "!=", "2", ")", "throw", "new", "IllegalArgum...
Get the offset of the specified [row,col] for the 2d array @param shapeInformation Shape information @param row Row index to get the offset for @param col Column index to get the offset for @return Buffer offset
[ "Get", "the", "offset", "of", "the", "specified", "[", "row", "col", "]", "for", "the", "2d", "array" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java#L1058-L1076
knightliao/disconf
disconf-core/src/main/java/com/baidu/disconf/core/common/zookeeper/inner/ResilientActiveKeyValueStore.java
ResilientActiveKeyValueStore.read
public String read(String path, Watcher watcher, Stat stat) throws InterruptedException, KeeperException { byte[] data = zk.getData(path, watcher, stat); return new String(data, CHARSET); }
java
public String read(String path, Watcher watcher, Stat stat) throws InterruptedException, KeeperException { byte[] data = zk.getData(path, watcher, stat); return new String(data, CHARSET); }
[ "public", "String", "read", "(", "String", "path", ",", "Watcher", "watcher", ",", "Stat", "stat", ")", "throws", "InterruptedException", ",", "KeeperException", "{", "byte", "[", "]", "data", "=", "zk", ".", "getData", "(", "path", ",", "watcher", ",", ...
@param path @param watcher @return String @throws InterruptedException @throws KeeperException @Description: 读数据 @author liaoqiqi @date 2013-6-14
[ "@param", "path", "@param", "watcher" ]
train
https://github.com/knightliao/disconf/blob/d413cbce9334fe38a5a24982ce4db3a6ed8e98ea/disconf-core/src/main/java/com/baidu/disconf/core/common/zookeeper/inner/ResilientActiveKeyValueStore.java#L207-L211
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunckPyramid.java
HornSchunckPyramid.process
@Override public void process( ImagePyramid<GrayF32> image1 , ImagePyramid<GrayF32> image2 ) { // Process the pyramid from low resolution to high resolution boolean first = true; for( int i = image1.getNumLayers()-1; i >= 0; i-- ) { GrayF32 layer1 = image1.getLayer(i); GrayF32 layer2 = image2.getL...
java
@Override public void process( ImagePyramid<GrayF32> image1 , ImagePyramid<GrayF32> image2 ) { // Process the pyramid from low resolution to high resolution boolean first = true; for( int i = image1.getNumLayers()-1; i >= 0; i-- ) { GrayF32 layer1 = image1.getLayer(i); GrayF32 layer2 = image2.getL...
[ "@", "Override", "public", "void", "process", "(", "ImagePyramid", "<", "GrayF32", ">", "image1", ",", "ImagePyramid", "<", "GrayF32", ">", "image2", ")", "{", "// Process the pyramid from low resolution to high resolution", "boolean", "first", "=", "true", ";", "fo...
Computes dense optical flow from the provided image pyramid. Image gradient for each layer should be computed directly from the layer images. @param image1 Pyramid of first image @param image2 Pyramid of second image
[ "Computes", "dense", "optical", "flow", "from", "the", "provided", "image", "pyramid", ".", "Image", "gradient", "for", "each", "layer", "should", "be", "computed", "directly", "from", "the", "layer", "images", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunckPyramid.java#L108-L150
GCRC/nunaliit
nunaliit2-search/src/main/java/ca/carleton/gcrc/search/Searches.java
Searches.getAudioMediaFromPlaceId
public JSONObject getAudioMediaFromPlaceId(String place_id) throws Exception { List<SelectedColumn> selectFields = new Vector<SelectedColumn>(); selectFields.add( new SelectedColumn(SelectedColumn.Type.INTEGER, "id") ); selectFields.add( new SelectedColumn(SelectedColumn.Type.INTEGER, "place_id") ); selectFiel...
java
public JSONObject getAudioMediaFromPlaceId(String place_id) throws Exception { List<SelectedColumn> selectFields = new Vector<SelectedColumn>(); selectFields.add( new SelectedColumn(SelectedColumn.Type.INTEGER, "id") ); selectFields.add( new SelectedColumn(SelectedColumn.Type.INTEGER, "place_id") ); selectFiel...
[ "public", "JSONObject", "getAudioMediaFromPlaceId", "(", "String", "place_id", ")", "throws", "Exception", "{", "List", "<", "SelectedColumn", ">", "selectFields", "=", "new", "Vector", "<", "SelectedColumn", ">", "(", ")", ";", "selectFields", ".", "add", "(", ...
Finds and returns all audio media associated with a place id. @param place_id Id of associated place @return A JSON object containing all audio media @throws Exception
[ "Finds", "and", "returns", "all", "audio", "media", "associated", "with", "a", "place", "id", "." ]
train
https://github.com/GCRC/nunaliit/blob/0b4abfc64eef2eb8b94f852ce697de2e851d8e67/nunaliit2-search/src/main/java/ca/carleton/gcrc/search/Searches.java#L663-L685
phax/ph-web
ph-http/src/main/java/com/helger/http/csp/CSP2SourceList.java
CSP2SourceList.addHash
@Nonnull public CSP2SourceList addHash (@Nonnull final EMessageDigestAlgorithm eMDAlgo, @Nonnull @Nonempty final byte [] aHashValue) { ValueEnforcer.notEmpty (aHashValue, "HashValue"); return addHash (eMDAlgo, Base64.safeEncodeBytes (aHashValue)); }
java
@Nonnull public CSP2SourceList addHash (@Nonnull final EMessageDigestAlgorithm eMDAlgo, @Nonnull @Nonempty final byte [] aHashValue) { ValueEnforcer.notEmpty (aHashValue, "HashValue"); return addHash (eMDAlgo, Base64.safeEncodeBytes (aHashValue)); }
[ "@", "Nonnull", "public", "CSP2SourceList", "addHash", "(", "@", "Nonnull", "final", "EMessageDigestAlgorithm", "eMDAlgo", ",", "@", "Nonnull", "@", "Nonempty", "final", "byte", "[", "]", "aHashValue", ")", "{", "ValueEnforcer", ".", "notEmpty", "(", "aHashValue...
Add the provided nonce value. The {@value #HASH_PREFIX} and {@link #HASH_SUFFIX} are added automatically. The byte array is automatically Bas64 encoded! @param eMDAlgo The message digest algorithm used. May only {@link EMessageDigestAlgorithm#SHA_256}, {@link EMessageDigestAlgorithm#SHA_384} or {@link EMessageDigestAl...
[ "Add", "the", "provided", "nonce", "value", ".", "The", "{", "@value", "#HASH_PREFIX", "}", "and", "{", "@link", "#HASH_SUFFIX", "}", "are", "added", "automatically", ".", "The", "byte", "array", "is", "automatically", "Bas64", "encoded!" ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-http/src/main/java/com/helger/http/csp/CSP2SourceList.java#L219-L225
unbescape/unbescape
src/main/java/org/unbescape/properties/PropertiesEscape.java
PropertiesEscape.escapePropertiesValue
public static void escapePropertiesValue(final Reader reader, final Writer writer) throws IOException { escapePropertiesValue(reader, writer, PropertiesValueEscapeLevel.LEVEL_2_ALL_NON_ASCII_PLUS_BASIC_ESCAPE_SET); }
java
public static void escapePropertiesValue(final Reader reader, final Writer writer) throws IOException { escapePropertiesValue(reader, writer, PropertiesValueEscapeLevel.LEVEL_2_ALL_NON_ASCII_PLUS_BASIC_ESCAPE_SET); }
[ "public", "static", "void", "escapePropertiesValue", "(", "final", "Reader", "reader", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapePropertiesValue", "(", "reader", ",", "writer", ",", "PropertiesValueEscapeLevel", ".", "LEVEL_2_ALL_NON_...
<p> Perform a Java Properties Value level 2 (basic set and all non-ASCII chars) <strong>escape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> <em>Level 2</em> means this method will escape: </p> <ul> <li>The Java Properties basic escape set: <ul> <li>The <em>Single Escape ...
[ "<p", ">", "Perform", "a", "Java", "Properties", "Value", "level", "2", "(", "basic", "set", "and", "all", "non", "-", "ASCII", "chars", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "Reader<", "/", "tt", ">"...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/properties/PropertiesEscape.java#L540-L543
tumblr/jumblr
src/main/java/com/tumblr/jumblr/JumblrClient.java
JumblrClient.postEdit
public void postEdit(String blogName, Long id, Map<String, ?> detail) throws IOException { Map<String, Object> sdetail = JumblrClient.safeOptionMap(detail); sdetail.put("id", id); requestBuilder.postMultipart(JumblrClient.blogPath(blogName, "/post/edit"), sdetail); }
java
public void postEdit(String blogName, Long id, Map<String, ?> detail) throws IOException { Map<String, Object> sdetail = JumblrClient.safeOptionMap(detail); sdetail.put("id", id); requestBuilder.postMultipart(JumblrClient.blogPath(blogName, "/post/edit"), sdetail); }
[ "public", "void", "postEdit", "(", "String", "blogName", ",", "Long", "id", ",", "Map", "<", "String", ",", "?", ">", "detail", ")", "throws", "IOException", "{", "Map", "<", "String", ",", "Object", ">", "sdetail", "=", "JumblrClient", ".", "safeOptionM...
Save edits for a given post @param blogName The blog name of the post @param id the Post id @param detail The detail to save @throws IOException if any file specified in detail cannot be read
[ "Save", "edits", "for", "a", "given", "post" ]
train
https://github.com/tumblr/jumblr/blob/373629fd545defb016e227ea758f092507fbd624/src/main/java/com/tumblr/jumblr/JumblrClient.java#L371-L375
alkacon/opencms-core
src/org/opencms/mail/CmsMailUtil.java
CmsMailUtil.configureMail
public static void configureMail(CmsMailHost host, Email mail) { // set the host to the default mail host mail.setHostName(host.getHostname()); mail.setSmtpPort(host.getPort()); // check if username and password are provided String userName = host.getUsername(); if (Cms...
java
public static void configureMail(CmsMailHost host, Email mail) { // set the host to the default mail host mail.setHostName(host.getHostname()); mail.setSmtpPort(host.getPort()); // check if username and password are provided String userName = host.getUsername(); if (Cms...
[ "public", "static", "void", "configureMail", "(", "CmsMailHost", "host", ",", "Email", "mail", ")", "{", "// set the host to the default mail host", "mail", ".", "setHostName", "(", "host", ".", "getHostname", "(", ")", ")", ";", "mail", ".", "setSmtpPort", "(",...
Configures the mail from the given mail host configuration data.<p> @param host the mail host configuration @param mail the email instance
[ "Configures", "the", "mail", "from", "the", "given", "mail", "host", "configuration", "data", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/mail/CmsMailUtil.java#L65-L92
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/GroupOf.java
GroupOf.setScale
@Override public C setScale(final double x, final double y) { getAttributes().setScale(x, y); return cast(); }
java
@Override public C setScale(final double x, final double y) { getAttributes().setScale(x, y); return cast(); }
[ "@", "Override", "public", "C", "setScale", "(", "final", "double", "x", ",", "final", "double", "y", ")", "{", "getAttributes", "(", ")", ".", "setScale", "(", "x", ",", "y", ")", ";", "return", "cast", "(", ")", ";", "}" ]
Sets this gruop's scale, starting at the given x and y @param x @param y @return Group this Group
[ "Sets", "this", "gruop", "s", "scale", "starting", "at", "the", "given", "x", "and", "y" ]
train
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/GroupOf.java#L401-L407
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/metadata/ejb/AutomaticTimerBean.java
AutomaticTimerBean.getBeanId
public BeanId getBeanId() { if (ivBeanId == null) { ivBeanId = new BeanId(ivBMD.j2eeName, null, false); } return ivBeanId; }
java
public BeanId getBeanId() { if (ivBeanId == null) { ivBeanId = new BeanId(ivBMD.j2eeName, null, false); } return ivBeanId; }
[ "public", "BeanId", "getBeanId", "(", ")", "{", "if", "(", "ivBeanId", "==", "null", ")", "{", "ivBeanId", "=", "new", "BeanId", "(", "ivBMD", ".", "j2eeName", ",", "null", ",", "false", ")", ";", "}", "return", "ivBeanId", ";", "}" ]
Gets the partially formed BeanId for this bean. The resulting BeanId will not have a home reference. @return the partially formed BeanId
[ "Gets", "the", "partially", "formed", "BeanId", "for", "this", "bean", ".", "The", "resulting", "BeanId", "will", "not", "have", "a", "home", "reference", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/metadata/ejb/AutomaticTimerBean.java#L127-L132
jbundle/jbundle
app/program/screen/src/main/java/org/jbundle/app/program/screen/ClassInfoGridScreen.java
ClassInfoGridScreen.doCommand
public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions) { if ((MenuConstants.FORM.equalsIgnoreCase(strCommand)) || (MenuConstants.FORMLINK.equalsIgnoreCase(strCommand))) if (this.getMainRecord().getEditMode() == DBConstants.EDIT_ADD) if (!this.g...
java
public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions) { if ((MenuConstants.FORM.equalsIgnoreCase(strCommand)) || (MenuConstants.FORMLINK.equalsIgnoreCase(strCommand))) if (this.getMainRecord().getEditMode() == DBConstants.EDIT_ADD) if (!this.g...
[ "public", "boolean", "doCommand", "(", "String", "strCommand", ",", "ScreenField", "sourceSField", ",", "int", "iCommandOptions", ")", "{", "if", "(", "(", "MenuConstants", ".", "FORM", ".", "equalsIgnoreCase", "(", "strCommand", ")", ")", "||", "(", "MenuCons...
Process the command. <br />Step 1 - Process the command if possible and return true if processed. <br />Step 2 - If I can't process, pass to all children (with me as the source). <br />Step 3 - If children didn't process, pass to parent (with me as the source). <br />Note: Never pass to a parent or child that matches t...
[ "Process", "the", "command", ".", "<br", "/", ">", "Step", "1", "-", "Process", "the", "command", "if", "possible", "and", "return", "true", "if", "processed", ".", "<br", "/", ">", "Step", "2", "-", "If", "I", "can", "t", "process", "pass", "to", ...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/screen/src/main/java/org/jbundle/app/program/screen/ClassInfoGridScreen.java#L169-L180
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/IntStream.java
IntStream.takeWhile
@NotNull public IntStream takeWhile(@NotNull final IntPredicate predicate) { return new IntStream(params, new IntTakeWhile(iterator, predicate)); }
java
@NotNull public IntStream takeWhile(@NotNull final IntPredicate predicate) { return new IntStream(params, new IntTakeWhile(iterator, predicate)); }
[ "@", "NotNull", "public", "IntStream", "takeWhile", "(", "@", "NotNull", "final", "IntPredicate", "predicate", ")", "{", "return", "new", "IntStream", "(", "params", ",", "new", "IntTakeWhile", "(", "iterator", ",", "predicate", ")", ")", ";", "}" ]
Takes elements while the predicate returns {@code true}. <p>This is an intermediate operation. <p>Example: <pre> predicate: (a) -&gt; a &lt; 3 stream: [1, 2, 3, 4, 1, 2, 3, 4] result: [1, 2] </pre> @param predicate the predicate used to take elements @return the new {@code IntStream}
[ "Takes", "elements", "while", "the", "predicate", "returns", "{", "@code", "true", "}", "." ]
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/IntStream.java#L755-L758
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_trunk_serviceName_externalDisplayedNumber_POST
public OvhTrunkExternalDisplayedNumber billingAccount_trunk_serviceName_externalDisplayedNumber_POST(String billingAccount, String serviceName, Boolean autoValidation, String number) throws IOException { String qPath = "/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber"; StringBuilder sb = pat...
java
public OvhTrunkExternalDisplayedNumber billingAccount_trunk_serviceName_externalDisplayedNumber_POST(String billingAccount, String serviceName, Boolean autoValidation, String number) throws IOException { String qPath = "/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber"; StringBuilder sb = pat...
[ "public", "OvhTrunkExternalDisplayedNumber", "billingAccount_trunk_serviceName_externalDisplayedNumber_POST", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Boolean", "autoValidation", ",", "String", "number", ")", "throws", "IOException", "{", "String", ...
External displayed number creation for a given trunk REST: POST /telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber @param number [required] External displayed number to create, in international format @param autoValidation [required] External displayed number auto-validation. Only available for pa...
[ "External", "displayed", "number", "creation", "for", "a", "given", "trunk" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L8117-L8125
netplex/json-smart-v2
json-smart/src/main/java/net/minidev/json/JSONObject.java
JSONObject.writeJSON
public static void writeJSON(Map<String, ? extends Object> map, Appendable out, JSONStyle compression) throws IOException { if (map == null) { out.append("null"); return; } JsonWriter.JSONMapWriter.writeJSONString(map, out, compression); }
java
public static void writeJSON(Map<String, ? extends Object> map, Appendable out, JSONStyle compression) throws IOException { if (map == null) { out.append("null"); return; } JsonWriter.JSONMapWriter.writeJSONString(map, out, compression); }
[ "public", "static", "void", "writeJSON", "(", "Map", "<", "String", ",", "?", "extends", "Object", ">", "map", ",", "Appendable", "out", ",", "JSONStyle", "compression", ")", "throws", "IOException", "{", "if", "(", "map", "==", "null", ")", "{", "out", ...
Encode a map into JSON text and write it to out. If this map is also a JSONAware or JSONStreamAware, JSONAware or JSONStreamAware specific behaviours will be ignored at this top level. @see JSONValue#writeJSONString(Object, Appendable)
[ "Encode", "a", "map", "into", "JSON", "text", "and", "write", "it", "to", "out", ".", "If", "this", "map", "is", "also", "a", "JSONAware", "or", "JSONStreamAware", "JSONAware", "or", "JSONStreamAware", "specific", "behaviours", "will", "be", "ignored", "at",...
train
https://github.com/netplex/json-smart-v2/blob/bfb3daef039e22a7bbff5f76bf14ea23330cd70e/json-smart/src/main/java/net/minidev/json/JSONObject.java#L180-L187
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/workspace/VoiceApi.java
VoiceApi.initiateTransfer
public void initiateTransfer( String connId, String destination, String location, String outboundCallerId, KeyValueCollection userData, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException...
java
public void initiateTransfer( String connId, String destination, String location, String outboundCallerId, KeyValueCollection userData, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException...
[ "public", "void", "initiateTransfer", "(", "String", "connId", ",", "String", "destination", ",", "String", "location", ",", "String", "outboundCallerId", ",", "KeyValueCollection", "userData", ",", "KeyValueCollection", "reasons", ",", "KeyValueCollection", "extensions...
Initiate a two-step transfer by placing the first call on hold and dialing the destination number (step 1). After initiating the transfer, you can use `completeTransfer()` to complete the transfer (step 2). @param connId The connection ID of the call to be transferred. This call will be placed on hold. @param destinati...
[ "Initiate", "a", "two", "-", "step", "transfer", "by", "placing", "the", "first", "call", "on", "hold", "and", "dialing", "the", "destination", "number", "(", "step", "1", ")", ".", "After", "initiating", "the", "transfer", "you", "can", "use", "completeTr...
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/workspace/VoiceApi.java#L798-L823
m-m-m/util
version/src/main/java/net/sf/mmm/util/version/base/AbstractVersionIdentifier.java
AbstractVersionIdentifier.compareToTimestamp
private int compareToTimestamp(int currentResult, VersionIdentifier otherVersion) { return compareToLinear(currentResult, getTimestamp(), otherVersion.getTimestamp(), otherVersion); }
java
private int compareToTimestamp(int currentResult, VersionIdentifier otherVersion) { return compareToLinear(currentResult, getTimestamp(), otherVersion.getTimestamp(), otherVersion); }
[ "private", "int", "compareToTimestamp", "(", "int", "currentResult", ",", "VersionIdentifier", "otherVersion", ")", "{", "return", "compareToLinear", "(", "currentResult", ",", "getTimestamp", "(", ")", ",", "otherVersion", ".", "getTimestamp", "(", ")", ",", "oth...
This method performs the part of {@link #compareTo(VersionIdentifier)} for the {@link #getTimestamp() timestamp}. @param currentResult is the current result so far. @param otherVersion is the {@link VersionIdentifier} to compare to. @return the result of comparison.
[ "This", "method", "performs", "the", "part", "of", "{", "@link", "#compareTo", "(", "VersionIdentifier", ")", "}", "for", "the", "{", "@link", "#getTimestamp", "()", "timestamp", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/version/src/main/java/net/sf/mmm/util/version/base/AbstractVersionIdentifier.java#L207-L210
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java
ClassUseWriter.generate
public static void generate(ConfigurationImpl configuration, ClassTree classtree) throws DocFileIOException { ClassUseMapper mapper = new ClassUseMapper(configuration, classtree); for (TypeElement aClass : configuration.getIncludedTypeElements()) { // If -nodeprecated option is set and the ...
java
public static void generate(ConfigurationImpl configuration, ClassTree classtree) throws DocFileIOException { ClassUseMapper mapper = new ClassUseMapper(configuration, classtree); for (TypeElement aClass : configuration.getIncludedTypeElements()) { // If -nodeprecated option is set and the ...
[ "public", "static", "void", "generate", "(", "ConfigurationImpl", "configuration", ",", "ClassTree", "classtree", ")", "throws", "DocFileIOException", "{", "ClassUseMapper", "mapper", "=", "new", "ClassUseMapper", "(", "configuration", ",", "classtree", ")", ";", "f...
Write out class use pages. @param configuration the configuration for this doclet @param classtree the class tree hierarchy @throws DocFileIOException if there is an error while generating the documentation
[ "Write", "out", "class", "use", "pages", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java#L180-L197
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java
Instance.setMachineType
public Operation setMachineType(MachineTypeId machineType, OperationOption... options) { return compute.setMachineType(getInstanceId(), machineType, options); }
java
public Operation setMachineType(MachineTypeId machineType, OperationOption... options) { return compute.setMachineType(getInstanceId(), machineType, options); }
[ "public", "Operation", "setMachineType", "(", "MachineTypeId", "machineType", ",", "OperationOption", "...", "options", ")", "{", "return", "compute", ".", "setMachineType", "(", "getInstanceId", "(", ")", ",", "machineType", ",", "options", ")", ";", "}" ]
Sets the machine type for this instance. The instance must be in {@link InstanceInfo.Status#TERMINATED} state to be able to set its machine type. @return a zone operation if the set request was issued correctly, {@code null} if the instance was not found @throws ComputeException upon failure
[ "Sets", "the", "machine", "type", "for", "this", "instance", ".", "The", "instance", "must", "be", "in", "{", "@link", "InstanceInfo", ".", "Status#TERMINATED", "}", "state", "to", "be", "able", "to", "set", "its", "machine", "type", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java#L348-L350
looly/hutool
hutool-system/src/main/java/cn/hutool/system/SystemUtil.java
SystemUtil.get
public static String get(String name, String defaultValue) { return StrUtil.nullToDefault(get(name, false), defaultValue); }
java
public static String get(String name, String defaultValue) { return StrUtil.nullToDefault(get(name, false), defaultValue); }
[ "public", "static", "String", "get", "(", "String", "name", ",", "String", "defaultValue", ")", "{", "return", "StrUtil", ".", "nullToDefault", "(", "get", "(", "name", ",", "false", ")", ",", "defaultValue", ")", ";", "}" ]
取得系统属性,如果因为Java安全的限制而失败,则将错误打在Log中,然后返回 <code>null</code>。 @param name 属性名 @param defaultValue 默认值 @return 属性值或<code>null</code>
[ "取得系统属性,如果因为Java安全的限制而失败,则将错误打在Log中,然后返回", "<code", ">", "null<", "/", "code", ">", "。" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-system/src/main/java/cn/hutool/system/SystemUtil.java#L106-L108
rythmengine/rythmengine
src/main/java/org/rythmengine/internal/parser/build_in/ExpressionParser.java
ExpressionParser.assertBasic
public static String assertBasic(String symbol, IContext context) { if (symbol.contains("_utils.sep(\"")) return symbol;// Rythm builtin expression TODO: generalize //String s = Token.stripJavaExtension(symbol, context); //s = S.stripBrace(s); String s = symbol; boolean isSimple ...
java
public static String assertBasic(String symbol, IContext context) { if (symbol.contains("_utils.sep(\"")) return symbol;// Rythm builtin expression TODO: generalize //String s = Token.stripJavaExtension(symbol, context); //s = S.stripBrace(s); String s = symbol; boolean isSimple ...
[ "public", "static", "String", "assertBasic", "(", "String", "symbol", ",", "IContext", "context", ")", "{", "if", "(", "symbol", ".", "contains", "(", "\"_utils.sep(\\\"\"", ")", ")", "return", "symbol", ";", "// Rythm builtin expression TODO: generalize", "//String...
Return symbol with transformer extension stripped off @param symbol @param context @return the symbol
[ "Return", "symbol", "with", "transformer", "extension", "stripped", "off" ]
train
https://github.com/rythmengine/rythmengine/blob/064b565f08d9da07378bf77a9dd856ea5831cc92/src/main/java/org/rythmengine/internal/parser/build_in/ExpressionParser.java#L33-L44
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.trimStartAndEnd
@Nullable @CheckReturnValue public static String trimStartAndEnd (@Nullable final String sSrc, @Nullable final String sLead, @Nullable final String sTail) { final String sInbetween = trimStart (sSrc, sLead); return trimEnd (sI...
java
@Nullable @CheckReturnValue public static String trimStartAndEnd (@Nullable final String sSrc, @Nullable final String sLead, @Nullable final String sTail) { final String sInbetween = trimStart (sSrc, sLead); return trimEnd (sI...
[ "@", "Nullable", "@", "CheckReturnValue", "public", "static", "String", "trimStartAndEnd", "(", "@", "Nullable", "final", "String", "sSrc", ",", "@", "Nullable", "final", "String", "sLead", ",", "@", "Nullable", "final", "String", "sTail", ")", "{", "final", ...
Trim the passed lead and tail from the source value. If the source value does not start with the passed lead and does not end with the passed tail, nothing happens. @param sSrc The input source string @param sLead The string to be trimmed of the beginning @param sTail The string to be trimmed of the end @return The tr...
[ "Trim", "the", "passed", "lead", "and", "tail", "from", "the", "source", "value", ".", "If", "the", "source", "value", "does", "not", "start", "with", "the", "passed", "lead", "and", "does", "not", "end", "with", "the", "passed", "tail", "nothing", "happ...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L3492-L3500
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/Utils.java
Utils.getMD5
public static byte[] getMD5(byte[] src) { assert src != null; try { return MessageDigest.getInstance("MD5").digest(src); } catch (NoSuchAlgorithmException ex) { throw new IllegalArgumentException("Missing 'MD5' algorithm", ex); } }
java
public static byte[] getMD5(byte[] src) { assert src != null; try { return MessageDigest.getInstance("MD5").digest(src); } catch (NoSuchAlgorithmException ex) { throw new IllegalArgumentException("Missing 'MD5' algorithm", ex); } }
[ "public", "static", "byte", "[", "]", "getMD5", "(", "byte", "[", "]", "src", ")", "{", "assert", "src", "!=", "null", ";", "try", "{", "return", "MessageDigest", ".", "getInstance", "(", "\"MD5\"", ")", ".", "digest", "(", "src", ")", ";", "}", "c...
Compute the MD5 of the given byte[] array. If the MD5 algorithm is not available from the MessageDigest registry, an IllegalArgumentException will be thrown. @param src Binary value to compute the MD5 digest for. Can be empty but not null. @return 16-byte MD5 digest value.
[ "Compute", "the", "MD5", "of", "the", "given", "byte", "[]", "array", ".", "If", "the", "MD5", "algorithm", "is", "not", "available", "from", "the", "MessageDigest", "registry", "an", "IllegalArgumentException", "will", "be", "thrown", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/Utils.java#L968-L975
Alluxio/alluxio
core/common/src/main/java/alluxio/util/UnderFileSystemUtils.java
UnderFileSystemUtils.approximateContentHash
public static String approximateContentHash(long length, long modTime) { // approximating the content hash with the file length and modtime. StringBuilder sb = new StringBuilder(); sb.append('('); sb.append("len:"); sb.append(length); sb.append(", "); sb.append("modtime:"); sb.append(mod...
java
public static String approximateContentHash(long length, long modTime) { // approximating the content hash with the file length and modtime. StringBuilder sb = new StringBuilder(); sb.append('('); sb.append("len:"); sb.append(length); sb.append(", "); sb.append("modtime:"); sb.append(mod...
[ "public", "static", "String", "approximateContentHash", "(", "long", "length", ",", "long", "modTime", ")", "{", "// approximating the content hash with the file length and modtime.", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append"...
Returns an approximate content hash, using the length and modification time. @param length the content length @param modTime the content last modification time @return the content hash
[ "Returns", "an", "approximate", "content", "hash", "using", "the", "length", "and", "modification", "time", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/util/UnderFileSystemUtils.java#L147-L158
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/stream/StreamHelper.java
StreamHelper.skipFully
public static void skipFully (@Nonnull final InputStream aIS, @Nonnegative final long nBytesToSkip) throws IOException { ValueEnforcer.notNull (aIS, "InputStream"); ValueEnforcer.isGE0 (nBytesToSkip, "BytesToSkip"); long nRemaining = nBytesToSkip; while (nRemaining > 0) { // May only return...
java
public static void skipFully (@Nonnull final InputStream aIS, @Nonnegative final long nBytesToSkip) throws IOException { ValueEnforcer.notNull (aIS, "InputStream"); ValueEnforcer.isGE0 (nBytesToSkip, "BytesToSkip"); long nRemaining = nBytesToSkip; while (nRemaining > 0) { // May only return...
[ "public", "static", "void", "skipFully", "(", "@", "Nonnull", "final", "InputStream", "aIS", ",", "@", "Nonnegative", "final", "long", "nBytesToSkip", ")", "throws", "IOException", "{", "ValueEnforcer", ".", "notNull", "(", "aIS", ",", "\"InputStream\"", ")", ...
Fully skip the passed amounts in the input stream. Only forward skipping is possible! @param aIS The input stream to skip in. @param nBytesToSkip The number of bytes to skip. Must be &ge; 0. @throws IOException In case something goes wrong internally
[ "Fully", "skip", "the", "passed", "amounts", "in", "the", "input", "stream", ".", "Only", "forward", "skipping", "is", "possible!" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/stream/StreamHelper.java#L1369-L1399
ThreeTen/threetenbp
src/main/java/org/threeten/bp/ZonedDateTime.java
ZonedDateTime.ofInstant
public static ZonedDateTime ofInstant(Instant instant, ZoneId zone) { Jdk8Methods.requireNonNull(instant, "instant"); Jdk8Methods.requireNonNull(zone, "zone"); return create(instant.getEpochSecond(), instant.getNano(), zone); }
java
public static ZonedDateTime ofInstant(Instant instant, ZoneId zone) { Jdk8Methods.requireNonNull(instant, "instant"); Jdk8Methods.requireNonNull(zone, "zone"); return create(instant.getEpochSecond(), instant.getNano(), zone); }
[ "public", "static", "ZonedDateTime", "ofInstant", "(", "Instant", "instant", ",", "ZoneId", "zone", ")", "{", "Jdk8Methods", ".", "requireNonNull", "(", "instant", ",", "\"instant\"", ")", ";", "Jdk8Methods", ".", "requireNonNull", "(", "zone", ",", "\"zone\"", ...
Obtains an instance of {@code ZonedDateTime} from an {@code Instant}. <p> This creates a zoned date-time with the same instant as that specified. Calling {@link #toInstant()} will return an instant equal to the one used here. <p> Converting an instant to a zoned date-time is simple as there is only one valid offset for...
[ "Obtains", "an", "instance", "of", "{", "@code", "ZonedDateTime", "}", "from", "an", "{", "@code", "Instant", "}", ".", "<p", ">", "This", "creates", "a", "zoned", "date", "-", "time", "with", "the", "same", "instant", "as", "that", "specified", ".", "...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/ZonedDateTime.java#L375-L379
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.deleteShippingAddress
public void deleteShippingAddress(final String accountCode, final long shippingAddressId) { doDELETE(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + ShippingAddresses.SHIPPING_ADDRESSES_RESOURCE + "/" + shippingAddressId); }
java
public void deleteShippingAddress(final String accountCode, final long shippingAddressId) { doDELETE(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + ShippingAddresses.SHIPPING_ADDRESSES_RESOURCE + "/" + shippingAddressId); }
[ "public", "void", "deleteShippingAddress", "(", "final", "String", "accountCode", ",", "final", "long", "shippingAddressId", ")", "{", "doDELETE", "(", "Accounts", ".", "ACCOUNTS_RESOURCE", "+", "\"/\"", "+", "accountCode", "+", "ShippingAddresses", ".", "SHIPPING_A...
Delete an existing shipping address <p> @param accountCode recurly account id @param shippingAddressId the shipping address id to delete
[ "Delete", "an", "existing", "shipping", "address", "<p", ">" ]
train
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1231-L1233
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_trunk_serviceName_externalDisplayedNumber_number_DELETE
public void billingAccount_trunk_serviceName_externalDisplayedNumber_number_DELETE(String billingAccount, String serviceName, String number) throws IOException { String qPath = "/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber/{number}"; StringBuilder sb = path(qPath, billingAccount, serviceN...
java
public void billingAccount_trunk_serviceName_externalDisplayedNumber_number_DELETE(String billingAccount, String serviceName, String number) throws IOException { String qPath = "/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber/{number}"; StringBuilder sb = path(qPath, billingAccount, serviceN...
[ "public", "void", "billingAccount_trunk_serviceName_externalDisplayedNumber_number_DELETE", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "String", "number", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/trunk/{s...
Delete an external displayed number for a given trunk REST: DELETE /telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber/{number} @param billingAccount [required] The name of your billingAccount @param serviceName [required] Name of the service @param number [required] External displayed number linke...
[ "Delete", "an", "external", "displayed", "number", "for", "a", "given", "trunk" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L8150-L8154
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.releaseMessage
public void releaseMessage(Message message, int delay) throws IOException { releaseMessage(message.getId(), message.getReservationId(), new Long(delay)); }
java
public void releaseMessage(Message message, int delay) throws IOException { releaseMessage(message.getId(), message.getReservationId(), new Long(delay)); }
[ "public", "void", "releaseMessage", "(", "Message", "message", ",", "int", "delay", ")", "throws", "IOException", "{", "releaseMessage", "(", "message", ".", "getId", "(", ")", ",", "message", ".", "getReservationId", "(", ")", ",", "new", "Long", "(", "de...
Release reserved message after specified time. If there is no message with such id on the queue, an EmptyQueueException is thrown. @param message The message to release. @param delay The time after which the message will be released. @throws io.iron.ironmq.HTTPException If the IronMQ service returns a status other th...
[ "Release", "reserved", "message", "after", "specified", "time", ".", "If", "there", "is", "no", "message", "with", "such", "id", "on", "the", "queue", "an", "EmptyQueueException", "is", "thrown", "." ]
train
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L503-L505
line/armeria
core/src/main/java/com/linecorp/armeria/common/MediaType.java
MediaType.withParameters
public MediaType withParameters(Map<String, ? extends Iterable<String>> parameters) { final ImmutableListMultimap.Builder<String, String> builder = ImmutableListMultimap.builder(); for (Map.Entry<String, ? extends Iterable<String>> e : parameters.entrySet()) { final String k = e.getKey(); ...
java
public MediaType withParameters(Map<String, ? extends Iterable<String>> parameters) { final ImmutableListMultimap.Builder<String, String> builder = ImmutableListMultimap.builder(); for (Map.Entry<String, ? extends Iterable<String>> e : parameters.entrySet()) { final String k = e.getKey(); ...
[ "public", "MediaType", "withParameters", "(", "Map", "<", "String", ",", "?", "extends", "Iterable", "<", "String", ">", ">", "parameters", ")", "{", "final", "ImmutableListMultimap", ".", "Builder", "<", "String", ",", "String", ">", "builder", "=", "Immuta...
<em>Replaces</em> all parameters with the given parameters. @throws IllegalArgumentException if any parameter or value is invalid
[ "<em", ">", "Replaces<", "/", "em", ">", "all", "parameters", "with", "the", "given", "parameters", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/common/MediaType.java#L685-L694
codeprimate-software/cp-elements
src/main/java/org/cp/elements/beans/AbstractBean.java
AbstractBean.compareTo
@SuppressWarnings("all") public int compareTo(Bean<ID, USER, PROCESS> obj) { Assert.isInstanceOf(obj, getClass(), new ClassCastException(String.format( "The Bean being compared with this Bean must be an instance of %1$s!", getClass().getName()))); return ComparatorUtils.compareIgnoreNull(getId(), obj.ge...
java
@SuppressWarnings("all") public int compareTo(Bean<ID, USER, PROCESS> obj) { Assert.isInstanceOf(obj, getClass(), new ClassCastException(String.format( "The Bean being compared with this Bean must be an instance of %1$s!", getClass().getName()))); return ComparatorUtils.compareIgnoreNull(getId(), obj.ge...
[ "@", "SuppressWarnings", "(", "\"all\"", ")", "public", "int", "compareTo", "(", "Bean", "<", "ID", ",", "USER", ",", "PROCESS", ">", "obj", ")", "{", "Assert", ".", "isInstanceOf", "(", "obj", ",", "getClass", "(", ")", ",", "new", "ClassCastException",...
Compares the specified Bean with this Bean to determine order. The default implementation is to order by identifier, where null identifiers are ordered before non-null identifiers. @param obj the Bean being compared with this Bean. @return an integer value indicating the relative ordering of the specified Bean with t...
[ "Compares", "the", "specified", "Bean", "with", "this", "Bean", "to", "determine", "order", ".", "The", "default", "implementation", "is", "to", "order", "by", "identifier", "where", "null", "identifiers", "are", "ordered", "before", "non", "-", "null", "ident...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/beans/AbstractBean.java#L467-L472
ben-manes/caffeine
simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/linked/SegmentedLruPolicy.java
SegmentedLruPolicy.policies
public static Set<Policy> policies(Config config) { BasicSettings settings = new BasicSettings(config); return settings.admission().stream().map(admission -> new SegmentedLruPolicy(admission, config) ).collect(toSet()); }
java
public static Set<Policy> policies(Config config) { BasicSettings settings = new BasicSettings(config); return settings.admission().stream().map(admission -> new SegmentedLruPolicy(admission, config) ).collect(toSet()); }
[ "public", "static", "Set", "<", "Policy", ">", "policies", "(", "Config", "config", ")", "{", "BasicSettings", "settings", "=", "new", "BasicSettings", "(", "config", ")", ";", "return", "settings", ".", "admission", "(", ")", ".", "stream", "(", ")", "....
Returns all variations of this policy based on the configuration parameters.
[ "Returns", "all", "variations", "of", "this", "policy", "based", "on", "the", "configuration", "parameters", "." ]
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/linked/SegmentedLruPolicy.java#L78-L83
webjars/webjars-locator
src/main/java/org/webjars/RequireJS.java
RequireJS.getNpmWebJarRequireJsConfig
public static ObjectNode getNpmWebJarRequireJsConfig(Map.Entry<String, String> webJar, List<Map.Entry<String, Boolean>> prefixes) { String packageJsonPath = WebJarAssetLocator.WEBJARS_PATH_PREFIX + "/" + webJar.getKey() + "/" + webJar.getValue() + "/" + "package.json"; return getWebJarRequireJsConfigF...
java
public static ObjectNode getNpmWebJarRequireJsConfig(Map.Entry<String, String> webJar, List<Map.Entry<String, Boolean>> prefixes) { String packageJsonPath = WebJarAssetLocator.WEBJARS_PATH_PREFIX + "/" + webJar.getKey() + "/" + webJar.getValue() + "/" + "package.json"; return getWebJarRequireJsConfigF...
[ "public", "static", "ObjectNode", "getNpmWebJarRequireJsConfig", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "webJar", ",", "List", "<", "Map", ".", "Entry", "<", "String", ",", "Boolean", ">", ">", "prefixes", ")", "{", "String", "package...
Returns the JSON RequireJS config for a given Bower WebJar @param webJar A tuple (artifactId -&gt; version) representing the WebJar. @param prefixes A list of the prefixes to use in the `paths` part of the RequireJS config. @return The JSON RequireJS config for the WebJar based on the meta-data in the WebJar's pom.x...
[ "Returns", "the", "JSON", "RequireJS", "config", "for", "a", "given", "Bower", "WebJar" ]
train
https://github.com/webjars/webjars-locator/blob/8796fb3ff1b9ad5c0d433ecf63a60520c715e3a0/src/main/java/org/webjars/RequireJS.java#L389-L394
line/armeria
grpc/src/main/java/com/linecorp/armeria/internal/grpc/GrpcJsonUtil.java
GrpcJsonUtil.jsonMarshaller
public static MessageMarshaller jsonMarshaller(List<MethodDescriptor<?, ?>> methods) { final MessageMarshaller.Builder builder = MessageMarshaller.builder() .omittingInsignificantWhitespace(true) ...
java
public static MessageMarshaller jsonMarshaller(List<MethodDescriptor<?, ?>> methods) { final MessageMarshaller.Builder builder = MessageMarshaller.builder() .omittingInsignificantWhitespace(true) ...
[ "public", "static", "MessageMarshaller", "jsonMarshaller", "(", "List", "<", "MethodDescriptor", "<", "?", ",", "?", ">", ">", "methods", ")", "{", "final", "MessageMarshaller", ".", "Builder", "builder", "=", "MessageMarshaller", ".", "builder", "(", ")", "."...
Returns a {@link MessageMarshaller} with the request/response {@link Message}s of all the {@code methods} registered.
[ "Returns", "a", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/grpc/src/main/java/com/linecorp/armeria/internal/grpc/GrpcJsonUtil.java#L39-L48
ibm-bluemix-mobile-services/bms-clientsdk-android-core
lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationProcessManager.java
AuthorizationProcessManager.createTokenRequestHeaders
private HashMap<String, String> createTokenRequestHeaders(String grantCode) { JSONObject payload = new JSONObject(); HashMap<String, String> headers; try { payload.put("code", grantCode); KeyPair keyPair = certificateStore.getStoredKeyPair(); String jws = jso...
java
private HashMap<String, String> createTokenRequestHeaders(String grantCode) { JSONObject payload = new JSONObject(); HashMap<String, String> headers; try { payload.put("code", grantCode); KeyPair keyPair = certificateStore.getStoredKeyPair(); String jws = jso...
[ "private", "HashMap", "<", "String", ",", "String", ">", "createTokenRequestHeaders", "(", "String", "grantCode", ")", "{", "JSONObject", "payload", "=", "new", "JSONObject", "(", ")", ";", "HashMap", "<", "String", ",", "String", ">", "headers", ";", "try",...
Generate the headers that will be used during the token request phase @param grantCode from the authorization phase @return Map with all the headers
[ "Generate", "the", "headers", "that", "will", "be", "used", "during", "the", "token", "request", "phase" ]
train
https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-android-core/blob/8db4f00d0d564792397bfc0e5bd57d52a238b858/lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationProcessManager.java#L361-L378
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementQuery.java
StatementQuery.voltGetStatementXML
@Override VoltXMLElement voltGetStatementXML(Session session) throws org.hsqldb_voltpatches.HSQLInterface.HSQLParseException { return voltGetXMLExpression(queryExpression, parameters, session); }
java
@Override VoltXMLElement voltGetStatementXML(Session session) throws org.hsqldb_voltpatches.HSQLInterface.HSQLParseException { return voltGetXMLExpression(queryExpression, parameters, session); }
[ "@", "Override", "VoltXMLElement", "voltGetStatementXML", "(", "Session", "session", ")", "throws", "org", ".", "hsqldb_voltpatches", ".", "HSQLInterface", ".", "HSQLParseException", "{", "return", "voltGetXMLExpression", "(", "queryExpression", ",", "parameters", ",", ...
VoltDB added method to get a non-catalog-dependent representation of this HSQLDB object. @param session The current Session object may be needed to resolve some names. @return XML, correctly indented, representing this object. @throws org.hsqldb_voltpatches.HSQLInterface.HSQLParseException
[ "VoltDB", "added", "method", "to", "get", "a", "non", "-", "catalog", "-", "dependent", "representation", "of", "this", "HSQLDB", "object", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementQuery.java#L127-L132
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/com/sshtools/sftp/SftpClient.java
SftpClient.get
public SftpFileAttributes get(String remote, OutputStream local, FileTransferProgress progress) throws SftpStatusException, SshException, TransferCancelledException { return get(remote, local, progress, 0); }
java
public SftpFileAttributes get(String remote, OutputStream local, FileTransferProgress progress) throws SftpStatusException, SshException, TransferCancelledException { return get(remote, local, progress, 0); }
[ "public", "SftpFileAttributes", "get", "(", "String", "remote", ",", "OutputStream", "local", ",", "FileTransferProgress", "progress", ")", "throws", "SftpStatusException", ",", "SshException", ",", "TransferCancelledException", "{", "return", "get", "(", "remote", ",...
<p> Download the remote file writing it to the specified <code>OutputStream</code>. The OutputStream is closed by this method even if the operation fails. </p> @param remote the path/name of the remote file @param local the OutputStream to write @param progress @return the downloaded file's attributes @throws SftpSt...
[ "<p", ">", "Download", "the", "remote", "file", "writing", "it", "to", "the", "specified", "<code", ">", "OutputStream<", "/", "code", ">", ".", "The", "OutputStream", "is", "closed", "by", "this", "method", "even", "if", "the", "operation", "fails", ".", ...
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/sftp/SftpClient.java#L1151-L1155
paypal/SeLion
dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/YamlDataProviderImpl.java
YamlDataProviderImpl.getDataByFilter
@Override public Iterator<Object[]> getDataByFilter(DataProviderFilter dataFilter) throws IOException { logger.entering(dataFilter); InputStream inputStream = resource.getInputStream(); Yaml yaml = constructYaml(resource.getCls()); Object yamlObject; // Mark the...
java
@Override public Iterator<Object[]> getDataByFilter(DataProviderFilter dataFilter) throws IOException { logger.entering(dataFilter); InputStream inputStream = resource.getInputStream(); Yaml yaml = constructYaml(resource.getCls()); Object yamlObject; // Mark the...
[ "@", "Override", "public", "Iterator", "<", "Object", "[", "]", ">", "getDataByFilter", "(", "DataProviderFilter", "dataFilter", ")", "throws", "IOException", "{", "logger", ".", "entering", "(", "dataFilter", ")", ";", "InputStream", "inputStream", "=", "resour...
Gets yaml data by applying the given filter. Throws {@link DataProviderException} when unexpected error occurs during processing of YAML file data by filter @param dataFilter an implementation class of {@link DataProviderFilter} @return An iterator over a collection of Object Array to be used with TestNG DataProvider ...
[ "Gets", "yaml", "data", "by", "applying", "the", "given", "filter", ".", "Throws", "{", "@link", "DataProviderException", "}", "when", "unexpected", "error", "occurs", "during", "processing", "of", "YAML", "file", "data", "by", "filter" ]
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/YamlDataProviderImpl.java#L287-L313
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/processor/ProcessorExecutionContext.java
ProcessorExecutionContext.allAreFinished
public boolean allAreFinished(final Set<ProcessorGraphNode<?, ?>> processorNodes) { this.processorLock.lock(); try { for (ProcessorGraphNode<?, ?> node: processorNodes) { if (!isFinished(node)) { return false; } } re...
java
public boolean allAreFinished(final Set<ProcessorGraphNode<?, ?>> processorNodes) { this.processorLock.lock(); try { for (ProcessorGraphNode<?, ?> node: processorNodes) { if (!isFinished(node)) { return false; } } re...
[ "public", "boolean", "allAreFinished", "(", "final", "Set", "<", "ProcessorGraphNode", "<", "?", ",", "?", ">", ">", "processorNodes", ")", "{", "this", ".", "processorLock", ".", "lock", "(", ")", ";", "try", "{", "for", "(", "ProcessorGraphNode", "<", ...
Verify that all processors have finished executing atomically (within the same lock as {@link #finished(ProcessorGraphNode)} and {@link #isFinished(ProcessorGraphNode)} is within. @param processorNodes the node to check for completion.
[ "Verify", "that", "all", "processors", "have", "finished", "executing", "atomically", "(", "within", "the", "same", "lock", "as", "{", "@link", "#finished", "(", "ProcessorGraphNode", ")", "}", "and", "{", "@link", "#isFinished", "(", "ProcessorGraphNode", ")", ...
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/ProcessorExecutionContext.java#L129-L142