repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
192
func_name
stringlengths
5
108
whole_func_string
stringlengths
75
3.91k
language
stringclasses
1 value
func_code_string
stringlengths
75
3.91k
func_code_tokens
listlengths
21
629
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
111
306
voldemort/voldemort
src/java/voldemort/store/stats/ClientSocketStats.java
ClientSocketStats.recordCheckoutTimeUs
public void recordCheckoutTimeUs(SocketDestination dest, long checkoutTimeUs) { if(dest != null) { getOrCreateNodeStats(dest).recordCheckoutTimeUs(null, checkoutTimeUs); recordCheckoutTimeUs(null, checkoutTimeUs); } else { this.checkoutTimeRequestCounter.addRequest(ch...
java
public void recordCheckoutTimeUs(SocketDestination dest, long checkoutTimeUs) { if(dest != null) { getOrCreateNodeStats(dest).recordCheckoutTimeUs(null, checkoutTimeUs); recordCheckoutTimeUs(null, checkoutTimeUs); } else { this.checkoutTimeRequestCounter.addRequest(ch...
[ "public", "void", "recordCheckoutTimeUs", "(", "SocketDestination", "dest", ",", "long", "checkoutTimeUs", ")", "{", "if", "(", "dest", "!=", "null", ")", "{", "getOrCreateNodeStats", "(", "dest", ")", ".", "recordCheckoutTimeUs", "(", "null", ",", "checkoutTime...
Record the checkout wait time in us @param dest Destination of the socket to checkout. Will actually record if null. Otherwise will call this on self and corresponding child with this param null. @param checkoutTimeUs The number of us to wait before getting a socket
[ "Record", "the", "checkout", "wait", "time", "in", "us" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/store/stats/ClientSocketStats.java#L265-L272
JOML-CI/JOML
src/org/joml/Matrix4x3f.java
Matrix4x3f.rotateAround
public Matrix4x3f rotateAround(Quaternionfc quat, float ox, float oy, float oz, Matrix4x3f dest) { if ((properties & PROPERTY_IDENTITY) != 0) return rotationAround(quat, ox, oy, oz); return rotateAroundAffine(quat, ox, oy, oz, dest); }
java
public Matrix4x3f rotateAround(Quaternionfc quat, float ox, float oy, float oz, Matrix4x3f dest) { if ((properties & PROPERTY_IDENTITY) != 0) return rotationAround(quat, ox, oy, oz); return rotateAroundAffine(quat, ox, oy, oz, dest); }
[ "public", "Matrix4x3f", "rotateAround", "(", "Quaternionfc", "quat", ",", "float", "ox", ",", "float", "oy", ",", "float", "oz", ",", "Matrix4x3f", "dest", ")", "{", "if", "(", "(", "properties", "&", "PROPERTY_IDENTITY", ")", "!=", "0", ")", "return", "...
/* (non-Javadoc) @see org.joml.Matrix4x3fc#rotateAround(org.joml.Quaternionfc, float, float, float, org.joml.Matrix4x3f)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3f.java#L4055-L4059
FedericoPecora/meta-csp-framework
src/main/java/org/metacsp/multi/spatioTemporal/paths/PoseSteering.java
PoseSteering.interpolate
public PoseSteering interpolate(PoseSteering p2, double ratio) { Pose interp = this.getPose().interpolate(p2.getPose(), ratio); return new PoseSteering(interp, Pose.lerpDegrees(getSteering(),p2.getSteering(),ratio)); }
java
public PoseSteering interpolate(PoseSteering p2, double ratio) { Pose interp = this.getPose().interpolate(p2.getPose(), ratio); return new PoseSteering(interp, Pose.lerpDegrees(getSteering(),p2.getSteering(),ratio)); }
[ "public", "PoseSteering", "interpolate", "(", "PoseSteering", "p2", ",", "double", "ratio", ")", "{", "Pose", "interp", "=", "this", ".", "getPose", "(", ")", ".", "interpolate", "(", "p2", ".", "getPose", "(", ")", ",", "ratio", ")", ";", "return", "n...
Computes the {@link PoseSteering} between this {@link PoseSteering} and a given {@link PoseSteering} via bilinear interpolation. @param p2 The second {@link PoseSteering} used for interpolation. @param ratio Parameter in [0,1] used for bilinear interpolation. @return The {@link PoseSteering} between this {@link PoseSte...
[ "Computes", "the", "{" ]
train
https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/multi/spatioTemporal/paths/PoseSteering.java#L135-L138
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPersistenceImpl.java
CommerceOrderPersistenceImpl.findByUserId
@Override public List<CommerceOrder> findByUserId(long userId) { return findByUserId(userId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceOrder> findByUserId(long userId) { return findByUserId(userId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceOrder", ">", "findByUserId", "(", "long", "userId", ")", "{", "return", "findByUserId", "(", "userId", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce orders where userId = &#63;. @param userId the user ID @return the matching commerce orders
[ "Returns", "all", "the", "commerce", "orders", "where", "userId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPersistenceImpl.java#L2015-L2018
petergeneric/stdlib
guice/common/src/main/java/com/peterphi/std/guice/common/ClassScanner.java
ClassScanner.getClasses
public List<Class<?>> getClasses(final String pkg, boolean recursive) { return getClasses(pkg, recursive, null); }
java
public List<Class<?>> getClasses(final String pkg, boolean recursive) { return getClasses(pkg, recursive, null); }
[ "public", "List", "<", "Class", "<", "?", ">", ">", "getClasses", "(", "final", "String", "pkg", ",", "boolean", "recursive", ")", "{", "return", "getClasses", "(", "pkg", ",", "recursive", ",", "null", ")", ";", "}" ]
Find all the classes in a package @param pkg @param recursive @return
[ "Find", "all", "the", "classes", "in", "a", "package" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/guice/common/src/main/java/com/peterphi/std/guice/common/ClassScanner.java#L95-L98
mongodb/stitch-android-sdk
core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/sync/internal/ChangeEvents.java
ChangeEvents.changeEventForLocalReplace
static ChangeEvent<BsonDocument> changeEventForLocalReplace( final MongoNamespace namespace, final BsonValue documentId, final BsonDocument document, final boolean writePending ) { return new ChangeEvent<>( new BsonDocument(), OperationType.REPLACE, document, ...
java
static ChangeEvent<BsonDocument> changeEventForLocalReplace( final MongoNamespace namespace, final BsonValue documentId, final BsonDocument document, final boolean writePending ) { return new ChangeEvent<>( new BsonDocument(), OperationType.REPLACE, document, ...
[ "static", "ChangeEvent", "<", "BsonDocument", ">", "changeEventForLocalReplace", "(", "final", "MongoNamespace", "namespace", ",", "final", "BsonValue", "documentId", ",", "final", "BsonDocument", "document", ",", "final", "boolean", "writePending", ")", "{", "return"...
Generates a change event for a local replacement of a document in the given namespace referring to the given document _id. @param namespace the namespace where the document was inserted. @param documentId the _id of the document that was updated. @param document the replacement document. @return a change event for a l...
[ "Generates", "a", "change", "event", "for", "a", "local", "replacement", "of", "a", "document", "in", "the", "given", "namespace", "referring", "to", "the", "given", "document", "_id", "." ]
train
https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/sync/internal/ChangeEvents.java#L93-L107
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/file/PathHelper.java
PathHelper.getOutputStream
@Nullable public static OutputStream getOutputStream (@Nonnull final Path aFile) { return getOutputStream (aFile, EAppend.DEFAULT); }
java
@Nullable public static OutputStream getOutputStream (@Nonnull final Path aFile) { return getOutputStream (aFile, EAppend.DEFAULT); }
[ "@", "Nullable", "public", "static", "OutputStream", "getOutputStream", "(", "@", "Nonnull", "final", "Path", "aFile", ")", "{", "return", "getOutputStream", "(", "aFile", ",", "EAppend", ".", "DEFAULT", ")", ";", "}" ]
Get an output stream for writing to a file. @param aFile The file to write to. May not be <code>null</code>. @return <code>null</code> if the file could not be opened
[ "Get", "an", "output", "stream", "for", "writing", "to", "a", "file", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/file/PathHelper.java#L330-L334
santhosh-tekuri/jlibs
core/src/main/java/jlibs/core/lang/BeanUtil.java
BeanUtil.getGetterMethod
public static Method getGetterMethod(Class<?> beanClass, String property, Class propertyType){ try{ try{ if(propertyType==boolean.class) return beanClass.getMethod(IS+getMethodSuffix(property)); }catch(NoSuchMethodException ignore){ // ...
java
public static Method getGetterMethod(Class<?> beanClass, String property, Class propertyType){ try{ try{ if(propertyType==boolean.class) return beanClass.getMethod(IS+getMethodSuffix(property)); }catch(NoSuchMethodException ignore){ // ...
[ "public", "static", "Method", "getGetterMethod", "(", "Class", "<", "?", ">", "beanClass", ",", "String", "property", ",", "Class", "propertyType", ")", "{", "try", "{", "try", "{", "if", "(", "propertyType", "==", "boolean", ".", "class", ")", "return", ...
Returns getter method for <code>property</code> in specified <code>beanClass</code> @param beanClass bean class @param property name of the property @param propertyType type of the property. This is used to compute getter method name. @return getter method. null if <code>property</code> is not found @see #getGetter...
[ "Returns", "getter", "method", "for", "<code", ">", "property<", "/", "code", ">", "in", "specified", "<code", ">", "beanClass<", "/", "code", ">" ]
train
https://github.com/santhosh-tekuri/jlibs/blob/59c28719f054123cf778278154e1b92e943ad232/core/src/main/java/jlibs/core/lang/BeanUtil.java#L120-L132
apache/flink
flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java
Utils.deleteApplicationFiles
public static void deleteApplicationFiles(final Map<String, String> env) { final String applicationFilesDir = env.get(YarnConfigKeys.FLINK_YARN_FILES); if (!StringUtils.isNullOrWhitespaceOnly(applicationFilesDir)) { final org.apache.flink.core.fs.Path path = new org.apache.flink.core.fs.Path(applicationFilesDir)...
java
public static void deleteApplicationFiles(final Map<String, String> env) { final String applicationFilesDir = env.get(YarnConfigKeys.FLINK_YARN_FILES); if (!StringUtils.isNullOrWhitespaceOnly(applicationFilesDir)) { final org.apache.flink.core.fs.Path path = new org.apache.flink.core.fs.Path(applicationFilesDir)...
[ "public", "static", "void", "deleteApplicationFiles", "(", "final", "Map", "<", "String", ",", "String", ">", "env", ")", "{", "final", "String", "applicationFilesDir", "=", "env", ".", "get", "(", "YarnConfigKeys", ".", "FLINK_YARN_FILES", ")", ";", "if", "...
Deletes the YARN application files, e.g., Flink binaries, libraries, etc., from the remote filesystem. @param env The environment variables.
[ "Deletes", "the", "YARN", "application", "files", "e", ".", "g", ".", "Flink", "binaries", "libraries", "etc", ".", "from", "the", "remote", "filesystem", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java#L182-L197
hageldave/ImagingKit
ImagingKit_Core/src/main/java/hageldave/imagingkit/core/scientific/ColorPixel.java
ColorPixel.convertRange
public ColorPixel convertRange(double lowerLimitNow, double upperLimitNow, double lowerLimitAfter, double upperLimitAfter){ // double currentRange = upperLimitNow-lowerLimitNow; // double newRange = upperLimitAfter-lowerLimitAfter; // double scaling = newRange/currentRange; double scaling = (upperLimitAfter-...
java
public ColorPixel convertRange(double lowerLimitNow, double upperLimitNow, double lowerLimitAfter, double upperLimitAfter){ // double currentRange = upperLimitNow-lowerLimitNow; // double newRange = upperLimitAfter-lowerLimitAfter; // double scaling = newRange/currentRange; double scaling = (upperLimitAfter-...
[ "public", "ColorPixel", "convertRange", "(", "double", "lowerLimitNow", ",", "double", "upperLimitNow", ",", "double", "lowerLimitAfter", ",", "double", "upperLimitAfter", ")", "{", "//\t\tdouble currentRange = upperLimitNow-lowerLimitNow;", "//\t\tdouble newRange = upperLimitAft...
Converts the pixels RGB channel values from one value range to another. Alpha is preserved. <p> Suppose we know the pixels value range is currently from -10 to 10, and we want to change that value range to 0.0 to 1.0, then the call would look like this:<br> {@code convertRange(-10,10, 0,1)}.<br> A channel value of -10 ...
[ "Converts", "the", "pixels", "RGB", "channel", "values", "from", "one", "value", "range", "to", "another", ".", "Alpha", "is", "preserved", ".", "<p", ">", "Suppose", "we", "know", "the", "pixels", "value", "range", "is", "currently", "from", "-", "10", ...
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/scientific/ColorPixel.java#L277-L287
box/box-java-sdk
src/main/java/com/box/sdk/BoxTransactionalAPIConnection.java
BoxTransactionalAPIConnection.getTransactionConnection
public static BoxAPIConnection getTransactionConnection(String accessToken, String scope, String resource) { BoxAPIConnection apiConnection = new BoxAPIConnection(accessToken); URL url; try { url = new URL(apiConnection.getTokenURL()); } catch (MalformedURLException e) { ...
java
public static BoxAPIConnection getTransactionConnection(String accessToken, String scope, String resource) { BoxAPIConnection apiConnection = new BoxAPIConnection(accessToken); URL url; try { url = new URL(apiConnection.getTokenURL()); } catch (MalformedURLException e) { ...
[ "public", "static", "BoxAPIConnection", "getTransactionConnection", "(", "String", "accessToken", ",", "String", "scope", ",", "String", "resource", ")", "{", "BoxAPIConnection", "apiConnection", "=", "new", "BoxAPIConnection", "(", "accessToken", ")", ";", "URL", "...
Request a scoped transactional token for a particular resource. @param accessToken application access token. @param scope scope of transactional token. @param resource resource transactional token has access to. @return a BoxAPIConnection which can be used to perform transactional requests.
[ "Request", "a", "scoped", "transactional", "token", "for", "a", "particular", "resource", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTransactionalAPIConnection.java#L46-L83
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/TaskClient.java
TaskClient.removeTaskFromQueue
public void removeTaskFromQueue(String taskType, String taskId) { Preconditions.checkArgument(StringUtils.isNotBlank(taskType), "Task type cannot be blank"); Preconditions.checkArgument(StringUtils.isNotBlank(taskId), "Task id cannot be blank"); delete("tasks/queue/{taskType}/{taskId}", taskTyp...
java
public void removeTaskFromQueue(String taskType, String taskId) { Preconditions.checkArgument(StringUtils.isNotBlank(taskType), "Task type cannot be blank"); Preconditions.checkArgument(StringUtils.isNotBlank(taskId), "Task id cannot be blank"); delete("tasks/queue/{taskType}/{taskId}", taskTyp...
[ "public", "void", "removeTaskFromQueue", "(", "String", "taskType", ",", "String", "taskId", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "taskType", ")", ",", "\"Task type cannot be blank\"", ")", ";", "Preconditions"...
Removes a task from a taskType queue @param taskType the taskType to identify the queue @param taskId the id of the task to be removed
[ "Removes", "a", "task", "from", "a", "taskType", "queue" ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/TaskClient.java#L320-L325
motown-io/motown
operator-api/view-model/src/main/java/io/motown/operatorapi/viewmodel/ChargingStationEventListener.java
ChargingStationEventListener.updateChargingStationOpeningTimes
private boolean updateChargingStationOpeningTimes(ChargingStationOpeningTimesChangedEvent event, boolean clear) { ChargingStation chargingStation = repository.findOne(event.getChargingStationId().getId()); if (chargingStation != null) { if (!event.getOpeningTimes().isEmpty()) { ...
java
private boolean updateChargingStationOpeningTimes(ChargingStationOpeningTimesChangedEvent event, boolean clear) { ChargingStation chargingStation = repository.findOne(event.getChargingStationId().getId()); if (chargingStation != null) { if (!event.getOpeningTimes().isEmpty()) { ...
[ "private", "boolean", "updateChargingStationOpeningTimes", "(", "ChargingStationOpeningTimesChangedEvent", "event", ",", "boolean", "clear", ")", "{", "ChargingStation", "chargingStation", "=", "repository", ".", "findOne", "(", "event", ".", "getChargingStationId", "(", ...
Updates the opening times of the charging station. @param event The event which contains the opening times. @param clear Whether to clear the opening times or not. @return {@code true} if the update has been performed, {@code false} if the charging station can't be found.
[ "Updates", "the", "opening", "times", "of", "the", "charging", "station", "." ]
train
https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/operator-api/view-model/src/main/java/io/motown/operatorapi/viewmodel/ChargingStationEventListener.java#L408-L434
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.addCorrectReturnInstruction
public static void addCorrectReturnInstruction(MethodVisitor mv, ReturnType returnType, boolean createCast) { if (returnType.isPrimitive()) { char ch = returnType.descriptor.charAt(0); switch (ch) { case 'V': // void is treated as a special primitive mv.visitInsn(RETURN); break; case 'I': ...
java
public static void addCorrectReturnInstruction(MethodVisitor mv, ReturnType returnType, boolean createCast) { if (returnType.isPrimitive()) { char ch = returnType.descriptor.charAt(0); switch (ch) { case 'V': // void is treated as a special primitive mv.visitInsn(RETURN); break; case 'I': ...
[ "public", "static", "void", "addCorrectReturnInstruction", "(", "MethodVisitor", "mv", ",", "ReturnType", "returnType", ",", "boolean", "createCast", ")", "{", "if", "(", "returnType", ".", "isPrimitive", "(", ")", ")", "{", "char", "ch", "=", "returnType", "....
Depending on the signature of the return type, add the appropriate instructions to the method visitor. @param mv where to visit to append the instructions @param returnType return type descriptor @param createCast whether to include CHECKCAST instructions for return type values
[ "Depending", "on", "the", "signature", "of", "the", "return", "type", "add", "the", "appropriate", "instructions", "to", "the", "method", "visitor", "." ]
train
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L113-L153
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/InstallKernelMap.java
InstallKernelMap.populateFeatureNameFromManifest
private static void populateFeatureNameFromManifest(File esa, Map<String, String> shortNameMap) throws IOException { String esaLocation = esa.getCanonicalPath(); ZipFile zip = null; try { zip = new ZipFile(esaLocation); Enumeration<? extends ZipEntry> zipEntries = zip.ent...
java
private static void populateFeatureNameFromManifest(File esa, Map<String, String> shortNameMap) throws IOException { String esaLocation = esa.getCanonicalPath(); ZipFile zip = null; try { zip = new ZipFile(esaLocation); Enumeration<? extends ZipEntry> zipEntries = zip.ent...
[ "private", "static", "void", "populateFeatureNameFromManifest", "(", "File", "esa", ",", "Map", "<", "String", ",", "String", ">", "shortNameMap", ")", "throws", "IOException", "{", "String", "esaLocation", "=", "esa", ".", "getCanonicalPath", "(", ")", ";", "...
Populate the feature name (short name if available, otherwise symbolic name) from the ESA's manifest into the shortNameMap. @param esa ESA file @param shortNameMap Map to populate with keys being ESA canonical paths and values being feature names (short name or symbolic name) @throws IOException If the ESA's canonical...
[ "Populate", "the", "feature", "name", "(", "short", "name", "if", "available", "otherwise", "symbolic", "name", ")", "from", "the", "ESA", "s", "manifest", "into", "the", "shortNameMap", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/InstallKernelMap.java#L804-L833
taskadapter/redmine-java-api
src/main/java/com/taskadapter/redmineapi/AttachmentManager.java
AttachmentManager.uploadAttachment
public Attachment uploadAttachment(String fileName, String contentType, byte[] content) throws RedmineException, IOException { final InputStream is = new ByteArrayInputStream(content); try { return uploadAttachment(fileName, contentType, is, content.len...
java
public Attachment uploadAttachment(String fileName, String contentType, byte[] content) throws RedmineException, IOException { final InputStream is = new ByteArrayInputStream(content); try { return uploadAttachment(fileName, contentType, is, content.len...
[ "public", "Attachment", "uploadAttachment", "(", "String", "fileName", ",", "String", "contentType", ",", "byte", "[", "]", "content", ")", "throws", "RedmineException", ",", "IOException", "{", "final", "InputStream", "is", "=", "new", "ByteArrayInputStream", "("...
Uploads an attachment. @param fileName file name of the attachment. @param contentType content type of the attachment. @param content attachment content stream. @return attachment content. @throws RedmineException if something goes wrong. @throws java.io.IOException if input cannot be read.
[ "Uploads", "an", "attachment", "." ]
train
https://github.com/taskadapter/redmine-java-api/blob/0bb65f27ee806ec3bd4007e1641f3e996261a04e/src/main/java/com/taskadapter/redmineapi/AttachmentManager.java#L75-L87
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/CmsTabbedPanel.java
CmsTabbedPanel.addNamed
public void addNamed(E tabContent, String tabName, String tabId) { add(tabContent, tabName); m_tabsById.put(tabId, tabContent); }
java
public void addNamed(E tabContent, String tabName, String tabId) { add(tabContent, tabName); m_tabsById.put(tabId, tabContent); }
[ "public", "void", "addNamed", "(", "E", "tabContent", ",", "String", "tabName", ",", "String", "tabId", ")", "{", "add", "(", "tabContent", ",", "tabName", ")", ";", "m_tabsById", ".", "put", "(", "tabId", ",", "tabContent", ")", ";", "}" ]
Adds a tab with a user-defined id.<p> @param tabContent the tab content @param tabName the tab name @param tabId the tab id
[ "Adds", "a", "tab", "with", "a", "user", "-", "defined", "id", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsTabbedPanel.java#L327-L331
google/closure-compiler
src/com/google/javascript/jscomp/AmbiguateProperties.java
AmbiguateProperties.addRelatedInstance
private void addRelatedInstance(FunctionType constructor, JSTypeBitSet related) { checkArgument(constructor.hasInstanceType(), "Constructor %s without instance type.", constructor); ObjectType instanceType = constructor.getInstanceType(); addRelatedType(instanceType, related); }
java
private void addRelatedInstance(FunctionType constructor, JSTypeBitSet related) { checkArgument(constructor.hasInstanceType(), "Constructor %s without instance type.", constructor); ObjectType instanceType = constructor.getInstanceType(); addRelatedType(instanceType, related); }
[ "private", "void", "addRelatedInstance", "(", "FunctionType", "constructor", ",", "JSTypeBitSet", "related", ")", "{", "checkArgument", "(", "constructor", ".", "hasInstanceType", "(", ")", ",", "\"Constructor %s without instance type.\"", ",", "constructor", ")", ";", ...
Adds the instance of the given constructor, its implicit prototype and all its related types to the given bit set.
[ "Adds", "the", "instance", "of", "the", "given", "constructor", "its", "implicit", "prototype", "and", "all", "its", "related", "types", "to", "the", "given", "bit", "set", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/AmbiguateProperties.java#L334-L339
classgraph/classgraph
src/main/java/nonapi/io/github/classgraph/concurrency/SingletonMap.java
SingletonMap.get
public V get(final K key, final LogNode log) throws E, InterruptedException, NullSingletonException { final SingletonHolder<V> singletonHolder = map.get(key); V instance = null; if (singletonHolder != null) { // There is already a SingletonHolder in the map for this key -- get the va...
java
public V get(final K key, final LogNode log) throws E, InterruptedException, NullSingletonException { final SingletonHolder<V> singletonHolder = map.get(key); V instance = null; if (singletonHolder != null) { // There is already a SingletonHolder in the map for this key -- get the va...
[ "public", "V", "get", "(", "final", "K", "key", ",", "final", "LogNode", "log", ")", "throws", "E", ",", "InterruptedException", ",", "NullSingletonException", "{", "final", "SingletonHolder", "<", "V", ">", "singletonHolder", "=", "map", ".", "get", "(", ...
Check if the given key is in the map, and if so, return the value of {@link #newInstance(Object, LogNode)} for that key, or block on the result of {@link #newInstance(Object, LogNode)} if another thread is currently creating the new instance. If the given key is not currently in the map, store a placeholder in the map...
[ "Check", "if", "the", "given", "key", "is", "in", "the", "map", "and", "if", "so", "return", "the", "value", "of", "{", "@link", "#newInstance", "(", "Object", "LogNode", ")", "}", "for", "that", "key", "or", "block", "on", "the", "result", "of", "{"...
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/concurrency/SingletonMap.java#L168-L202
looly/hutool
hutool-setting/src/main/java/cn/hutool/setting/GroupedMap.java
GroupedMap.put
public String put(String group, String key, String value) { group = StrUtil.nullToEmpty(group).trim(); writeLock.lock(); try { LinkedHashMap<String, String> valueMap = this.get(group); if (null == valueMap) { valueMap = new LinkedHashMap<>(); this.put(group, valueMap); } this.size = -...
java
public String put(String group, String key, String value) { group = StrUtil.nullToEmpty(group).trim(); writeLock.lock(); try { LinkedHashMap<String, String> valueMap = this.get(group); if (null == valueMap) { valueMap = new LinkedHashMap<>(); this.put(group, valueMap); } this.size = -...
[ "public", "String", "put", "(", "String", "group", ",", "String", "key", ",", "String", "value", ")", "{", "group", "=", "StrUtil", ".", "nullToEmpty", "(", "group", ")", ".", "trim", "(", ")", ";", "writeLock", ".", "lock", "(", ")", ";", "try", "...
将键值对加入到对应分组中 @param group 分组 @param key 键 @param value 值 @return 此key之前存在的值,如果没有返回null
[ "将键值对加入到对应分组中" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/GroupedMap.java#L89-L103
autermann/yaml
src/main/java/com/github/autermann/yaml/Yaml.java
Yaml.dumpAll
public void dumpAll(Iterator<? extends YamlNode> data, OutputStream output) { getDelegate().dumpAll(data, new OutputStreamWriter(output, Charset .forName("UTF-8"))); }
java
public void dumpAll(Iterator<? extends YamlNode> data, OutputStream output) { getDelegate().dumpAll(data, new OutputStreamWriter(output, Charset .forName("UTF-8"))); }
[ "public", "void", "dumpAll", "(", "Iterator", "<", "?", "extends", "YamlNode", ">", "data", ",", "OutputStream", "output", ")", "{", "getDelegate", "(", ")", ".", "dumpAll", "(", "data", ",", "new", "OutputStreamWriter", "(", "output", ",", "Charset", ".",...
Dumps {@code data} into a {@code OutputStream} using a {@code UTF-8} encoding. @param data the data @param output the output stream
[ "Dumps", "{", "@code", "data", "}", "into", "a", "{", "@code", "OutputStream", "}", "using", "a", "{", "@code", "UTF", "-", "8", "}", "encoding", "." ]
train
https://github.com/autermann/yaml/blob/5f8ab03e4fec3a2abe72c03561cdaa3a3936634d/src/main/java/com/github/autermann/yaml/Yaml.java#L160-L163
aspectran/aspectran
core/src/main/java/com/aspectran/core/context/rule/ItemRule.java
ItemRule.setValue
public void setValue(Set<Token[]> tokensSet) { if (tokensSet == null) { throw new IllegalArgumentException("tokensSet must not be null"); } if (type == null) { type = ItemType.SET; } if (!isListableType()) { throw new IllegalArgumentException("...
java
public void setValue(Set<Token[]> tokensSet) { if (tokensSet == null) { throw new IllegalArgumentException("tokensSet must not be null"); } if (type == null) { type = ItemType.SET; } if (!isListableType()) { throw new IllegalArgumentException("...
[ "public", "void", "setValue", "(", "Set", "<", "Token", "[", "]", ">", "tokensSet", ")", "{", "if", "(", "tokensSet", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"tokensSet must not be null\"", ")", ";", "}", "if", "(", "type...
Sets a value to this Set type item. @param tokensSet the tokens set
[ "Sets", "a", "value", "to", "this", "Set", "type", "item", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/context/rule/ItemRule.java#L357-L368
apache/groovy
src/main/java/org/codehaus/groovy/classgen/asm/InvocationWriter.java
InvocationWriter.castToNonPrimitiveIfNecessary
public void castToNonPrimitiveIfNecessary(final ClassNode sourceType, final ClassNode targetType) { OperandStack os = controller.getOperandStack(); ClassNode boxedType = os.box(); if (WideningCategories.implementsInterfaceOrSubclassOf(boxedType, targetType)) return; MethodVisitor mv = co...
java
public void castToNonPrimitiveIfNecessary(final ClassNode sourceType, final ClassNode targetType) { OperandStack os = controller.getOperandStack(); ClassNode boxedType = os.box(); if (WideningCategories.implementsInterfaceOrSubclassOf(boxedType, targetType)) return; MethodVisitor mv = co...
[ "public", "void", "castToNonPrimitiveIfNecessary", "(", "final", "ClassNode", "sourceType", ",", "final", "ClassNode", "targetType", ")", "{", "OperandStack", "os", "=", "controller", ".", "getOperandStack", "(", ")", ";", "ClassNode", "boxedType", "=", "os", ".",...
This converts sourceType to a non primitive by using Groovy casting. sourceType might be a primitive This might be done using SBA#castToType
[ "This", "converts", "sourceType", "to", "a", "non", "primitive", "by", "using", "Groovy", "casting", ".", "sourceType", "might", "be", "a", "primitive", "This", "might", "be", "done", "using", "SBA#castToType" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/classgen/asm/InvocationWriter.java#L932-L951
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PhotosApi.java
PhotosApi.setMeta
public Response setMeta(String photoId, String title, String description) throws JinxException { JinxUtils.validateParams(photoId, title, description); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.photos.setMeta"); params.put("photo_id", photoId); params.put("title", ti...
java
public Response setMeta(String photoId, String title, String description) throws JinxException { JinxUtils.validateParams(photoId, title, description); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.photos.setMeta"); params.put("photo_id", photoId); params.put("title", ti...
[ "public", "Response", "setMeta", "(", "String", "photoId", ",", "String", "title", ",", "String", "description", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "photoId", ",", "title", ",", "description", ")", ";", "Map", "<", ...
Set the meta information for a photo. <br> This method requires authentication with 'write' permission. @param photoId Required. The id of the photo to set metadata for. @param title Required. Title for the photo. @param description Required. Description for the photo. @return response object with the result...
[ "Set", "the", "meta", "information", "for", "a", "photo", ".", "<br", ">", "This", "method", "requires", "authentication", "with", "write", "permission", "." ]
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PhotosApi.java#L948-L956
jclawson/hazeltask
hazeltask-core/src/main/java/com/hazeltask/executor/HazelcastExecutorTopologyService.java
HazelcastExecutorTopologyService.addPendingTask
public boolean addPendingTask(HazeltaskTask<GROUP> task, boolean replaceIfExists) { if(!replaceIfExists) return pendingTask.putIfAbsent(task.getId(), task) == null; pendingTask.put(task.getId(), task); return true; }
java
public boolean addPendingTask(HazeltaskTask<GROUP> task, boolean replaceIfExists) { if(!replaceIfExists) return pendingTask.putIfAbsent(task.getId(), task) == null; pendingTask.put(task.getId(), task); return true; }
[ "public", "boolean", "addPendingTask", "(", "HazeltaskTask", "<", "GROUP", ">", "task", ",", "boolean", "replaceIfExists", ")", "{", "if", "(", "!", "replaceIfExists", ")", "return", "pendingTask", ".", "putIfAbsent", "(", "task", ".", "getId", "(", ")", ","...
Add to the write ahead log (hazelcast IMap) that tracks all the outstanding tasks
[ "Add", "to", "the", "write", "ahead", "log", "(", "hazelcast", "IMap", ")", "that", "tracks", "all", "the", "outstanding", "tasks" ]
train
https://github.com/jclawson/hazeltask/blob/801162bc54c5f1d5744a28a2844b24289d9495d7/hazeltask-core/src/main/java/com/hazeltask/executor/HazelcastExecutorTopologyService.java#L140-L146
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/manager/ChallengeInfo.java
ChallengeInfo.applyParams
public void applyParams(AbstractHBCIJob task, AbstractHBCIJob hktan, HBCITwoStepMechanism hbciTwoStepMechanism) { String code = task.getHBCICode(); // Code des Geschaeftsvorfalls // Job-Parameter holen Job job = this.getData(code); // Den Geschaeftsvorfall kennen wir nicht. Dann brauch...
java
public void applyParams(AbstractHBCIJob task, AbstractHBCIJob hktan, HBCITwoStepMechanism hbciTwoStepMechanism) { String code = task.getHBCICode(); // Code des Geschaeftsvorfalls // Job-Parameter holen Job job = this.getData(code); // Den Geschaeftsvorfall kennen wir nicht. Dann brauch...
[ "public", "void", "applyParams", "(", "AbstractHBCIJob", "task", ",", "AbstractHBCIJob", "hktan", ",", "HBCITwoStepMechanism", "hbciTwoStepMechanism", ")", "{", "String", "code", "=", "task", ".", "getHBCICode", "(", ")", ";", "// Code des Geschaeftsvorfalls", "// Job...
Uebernimmt die Challenge-Parameter in den HKTAN-Geschaeftsvorfall. @param task der Job, zu dem die Challenge-Parameter ermittelt werden sollen. @param hktan der HKTAN-Geschaeftsvorfall, in dem die Parameter gesetzt werden sollen. @param hbciTwoStepMechanism die BPD-Informationen zum TAN-...
[ "Uebernimmt", "die", "Challenge", "-", "Parameter", "in", "den", "HKTAN", "-", "Geschaeftsvorfall", "." ]
train
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/manager/ChallengeInfo.java#L131-L185
grails/grails-core
grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java
GrailsASTUtils.isSubclassOf
public static boolean isSubclassOf(ClassNode classNode, String parentClassName) { ClassNode currentSuper = classNode.getSuperClass(); while (currentSuper != null && !currentSuper.getName().equals(OBJECT_CLASS)) { if (currentSuper.getName().equals(parentClassName)) return true; cu...
java
public static boolean isSubclassOf(ClassNode classNode, String parentClassName) { ClassNode currentSuper = classNode.getSuperClass(); while (currentSuper != null && !currentSuper.getName().equals(OBJECT_CLASS)) { if (currentSuper.getName().equals(parentClassName)) return true; cu...
[ "public", "static", "boolean", "isSubclassOf", "(", "ClassNode", "classNode", ",", "String", "parentClassName", ")", "{", "ClassNode", "currentSuper", "=", "classNode", ".", "getSuperClass", "(", ")", ";", "while", "(", "currentSuper", "!=", "null", "&&", "!", ...
Returns true if the given class name is a parent class of the given class @param classNode The class node @param parentClassName the parent class name @return True if it is a subclass
[ "Returns", "true", "if", "the", "given", "class", "name", "is", "a", "parent", "class", "of", "the", "given", "class" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java#L1148-L1155
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.updateKeyAsync
public Observable<KeyBundle> updateKeyAsync(String vaultBaseUrl, String keyName, String keyVersion) { return updateKeyWithServiceResponseAsync(vaultBaseUrl, keyName, keyVersion).map(new Func1<ServiceResponse<KeyBundle>, KeyBundle>() { @Override public KeyBundle call(ServiceResponse<KeyBu...
java
public Observable<KeyBundle> updateKeyAsync(String vaultBaseUrl, String keyName, String keyVersion) { return updateKeyWithServiceResponseAsync(vaultBaseUrl, keyName, keyVersion).map(new Func1<ServiceResponse<KeyBundle>, KeyBundle>() { @Override public KeyBundle call(ServiceResponse<KeyBu...
[ "public", "Observable", "<", "KeyBundle", ">", "updateKeyAsync", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ",", "String", "keyVersion", ")", "{", "return", "updateKeyWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "keyName", ",", "keyVersion", ")...
The update key operation changes specified attributes of a stored key and can be applied to any key type and key version stored in Azure Key Vault. In order to perform this operation, the key must already exist in the Key Vault. Note: The cryptographic material of a key itself cannot be changed. This operation requires...
[ "The", "update", "key", "operation", "changes", "specified", "attributes", "of", "a", "stored", "key", "and", "can", "be", "applied", "to", "any", "key", "type", "and", "key", "version", "stored", "in", "Azure", "Key", "Vault", ".", "In", "order", "to", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L1205-L1212
avast/syringe
src/main/java/com/avast/syringe/aop/AroundInterceptor.java
AroundInterceptor.handleException
public Throwable handleException(T proxy, Method method, Object[] args, Throwable cause, Map<String, Object> context) { //Just return the cause return cause; }
java
public Throwable handleException(T proxy, Method method, Object[] args, Throwable cause, Map<String, Object> context) { //Just return the cause return cause; }
[ "public", "Throwable", "handleException", "(", "T", "proxy", ",", "Method", "method", ",", "Object", "[", "]", "args", ",", "Throwable", "cause", ",", "Map", "<", "String", ",", "Object", ">", "context", ")", "{", "//Just return the cause", "return", "cause"...
Handle exception caused by: <ul> <li>Target method code itself.</li> <li>Invocation of the original method. These exceptions won't be wrapped into {@link java.lang.reflect.InvocationTargetException}.</li> </ul> <p> The implementation is not allowed to throw a checked exception. Exceptional behavior should be expressed ...
[ "Handle", "exception", "caused", "by", ":", "<ul", ">", "<li", ">", "Target", "method", "code", "itself", ".", "<", "/", "li", ">", "<li", ">", "Invocation", "of", "the", "original", "method", ".", "These", "exceptions", "won", "t", "be", "wrapped", "i...
train
https://github.com/avast/syringe/blob/762da5e50776f2bc028e0cf17eac9bd09b5b6aab/src/main/java/com/avast/syringe/aop/AroundInterceptor.java#L93-L96
awslabs/jsii
packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiObjectRef.java
JsiiObjectRef.fromObjId
public static JsiiObjectRef fromObjId(final String objId) { ObjectNode node = JsonNodeFactory.instance.objectNode(); node.put(TOKEN_REF, objId); return new JsiiObjectRef(objId, node); }
java
public static JsiiObjectRef fromObjId(final String objId) { ObjectNode node = JsonNodeFactory.instance.objectNode(); node.put(TOKEN_REF, objId); return new JsiiObjectRef(objId, node); }
[ "public", "static", "JsiiObjectRef", "fromObjId", "(", "final", "String", "objId", ")", "{", "ObjectNode", "node", "=", "JsonNodeFactory", ".", "instance", ".", "objectNode", "(", ")", ";", "node", ".", "put", "(", "TOKEN_REF", ",", "objId", ")", ";", "ret...
Creates an object ref from an object ID. @param objId Object ID. @return The new object ref.
[ "Creates", "an", "object", "ref", "from", "an", "object", "ID", "." ]
train
https://github.com/awslabs/jsii/blob/6bbf743f5f65e98e5199ad31c93961533ffc40e5/packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiObjectRef.java#L63-L67
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.deleteLdapGroupLink
public void deleteLdapGroupLink(Object groupIdOrPath, String cn) throws GitLabApiException { if (cn == null || cn.trim().isEmpty()) { throw new RuntimeException("cn cannot be null or empty"); } delete(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "ldap_group_...
java
public void deleteLdapGroupLink(Object groupIdOrPath, String cn) throws GitLabApiException { if (cn == null || cn.trim().isEmpty()) { throw new RuntimeException("cn cannot be null or empty"); } delete(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "ldap_group_...
[ "public", "void", "deleteLdapGroupLink", "(", "Object", "groupIdOrPath", ",", "String", "cn", ")", "throws", "GitLabApiException", "{", "if", "(", "cn", "==", "null", "||", "cn", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", ...
Deletes an LDAP group link. <pre><code>GitLab Endpoint: DELETE /groups/:id/ldap_group_links/:cn</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param cn the CN of the LDAP group link to delete @throws GitLabApiException if any exception occurs
[ "Deletes", "an", "LDAP", "group", "link", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L961-L968
asciidoctor/asciidoctorj
asciidoctorj-core/src/main/java/org/asciidoctor/jruby/extension/processorproxies/ProcessorProxyUtil.java
ProcessorProxyUtil.getExtensionBaseClass
public static RubyClass getExtensionBaseClass(Ruby rubyRuntime, String processorClassName) { RubyModule extensionsModule = getExtensionsModule(rubyRuntime); return extensionsModule.getClass(processorClassName); }
java
public static RubyClass getExtensionBaseClass(Ruby rubyRuntime, String processorClassName) { RubyModule extensionsModule = getExtensionsModule(rubyRuntime); return extensionsModule.getClass(processorClassName); }
[ "public", "static", "RubyClass", "getExtensionBaseClass", "(", "Ruby", "rubyRuntime", ",", "String", "processorClassName", ")", "{", "RubyModule", "extensionsModule", "=", "getExtensionsModule", "(", "rubyRuntime", ")", ";", "return", "extensionsModule", ".", "getClass"...
For a simple Ruby class name like "Treeprocessor" it returns the associated RubyClass from Asciidoctor::Extensions, e.g. Asciidoctor::Extensions::Treeprocessor @param rubyRuntime @param processorClassName @return The Ruby class object for the given extension class name, e.g. Asciidoctor::Extensions::TreeProcessor
[ "For", "a", "simple", "Ruby", "class", "name", "like", "Treeprocessor", "it", "returns", "the", "associated", "RubyClass", "from", "Asciidoctor", "::", "Extensions", "e", ".", "g", ".", "Asciidoctor", "::", "Extensions", "::", "Treeprocessor" ]
train
https://github.com/asciidoctor/asciidoctorj/blob/e348c9a12b54c33fea7b05d70224c007e2ee75a9/asciidoctorj-core/src/main/java/org/asciidoctor/jruby/extension/processorproxies/ProcessorProxyUtil.java#L23-L26
rey5137/material
material/src/main/java/com/rey/material/widget/EditText.java
EditText.setCompoundDrawablesRelative
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1) public void setCompoundDrawablesRelative (Drawable start, Drawable top, Drawable end, Drawable bottom){ if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) mInputView.setCompoundDrawablesRelative(start, top, end, bottom); else mInputView.setCompoundD...
java
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1) public void setCompoundDrawablesRelative (Drawable start, Drawable top, Drawable end, Drawable bottom){ if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) mInputView.setCompoundDrawablesRelative(start, top, end, bottom); else mInputView.setCompoundD...
[ "@", "TargetApi", "(", "Build", ".", "VERSION_CODES", ".", "JELLY_BEAN_MR1", ")", "public", "void", "setCompoundDrawablesRelative", "(", "Drawable", "start", ",", "Drawable", "top", ",", "Drawable", "end", ",", "Drawable", "bottom", ")", "{", "if", "(", "Build...
Sets the Drawables (if any) to appear to the start of, above, to the end of, and below the text. Use {@code null} if you do not want a Drawable there. The Drawables must already have had {@link Drawable#setBounds} called. <p> Calling this method will overwrite any Drawables previously set using {@link #setCompoundDrawa...
[ "Sets", "the", "Drawables", "(", "if", "any", ")", "to", "appear", "to", "the", "start", "of", "above", "to", "the", "end", "of", "and", "below", "the", "text", ".", "Use", "{", "@code", "null", "}", "if", "you", "do", "not", "want", "a", "Drawable...
train
https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/widget/EditText.java#L2718-L2724
google/closure-templates
java/src/com/google/template/soy/soyparse/ParseErrors.java
ParseErrors.validateSelectCaseLabel
static String validateSelectCaseLabel(ExprNode caseValue, ErrorReporter reporter) { boolean isNumeric; boolean isError; String value; if (caseValue instanceof StringNode) { value = ((StringNode) caseValue).getValue(); // Validate that our select cases are argument names as required by the IC...
java
static String validateSelectCaseLabel(ExprNode caseValue, ErrorReporter reporter) { boolean isNumeric; boolean isError; String value; if (caseValue instanceof StringNode) { value = ((StringNode) caseValue).getValue(); // Validate that our select cases are argument names as required by the IC...
[ "static", "String", "validateSelectCaseLabel", "(", "ExprNode", "caseValue", ",", "ErrorReporter", "reporter", ")", "{", "boolean", "isNumeric", ";", "boolean", "isError", ";", "String", "value", ";", "if", "(", "caseValue", "instanceof", "StringNode", ")", "{", ...
Validates an expression being used as a {@code case} label in a {@code select}.
[ "Validates", "an", "expression", "being", "used", "as", "a", "{" ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/soyparse/ParseErrors.java#L342-L380
google/closure-templates
java/src/com/google/template/soy/soytree/MsgNode.java
MsgNode.genSubstUnitInfo
private static SubstUnitInfo genSubstUnitInfo(MsgNode msgNode, ErrorReporter errorReporter) { return genFinalSubstUnitInfoMapsHelper( RepresentativeNodes.createFromNode(msgNode, errorReporter)); }
java
private static SubstUnitInfo genSubstUnitInfo(MsgNode msgNode, ErrorReporter errorReporter) { return genFinalSubstUnitInfoMapsHelper( RepresentativeNodes.createFromNode(msgNode, errorReporter)); }
[ "private", "static", "SubstUnitInfo", "genSubstUnitInfo", "(", "MsgNode", "msgNode", ",", "ErrorReporter", "errorReporter", ")", "{", "return", "genFinalSubstUnitInfoMapsHelper", "(", "RepresentativeNodes", ".", "createFromNode", "(", "msgNode", ",", "errorReporter", ")",...
Helper function to generate SubstUnitInfo, which contains mappings from/to substitution unit nodes (placeholders and plural/select nodes) to/from generated var names. <p>It is guaranteed that the same var name will never be shared by multiple nodes of different types (types are placeholder, plural, and select). @para...
[ "Helper", "function", "to", "generate", "SubstUnitInfo", "which", "contains", "mappings", "from", "/", "to", "substitution", "unit", "nodes", "(", "placeholders", "and", "plural", "/", "select", "nodes", ")", "to", "/", "from", "generated", "var", "names", "."...
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/soytree/MsgNode.java#L460-L463
wcm-io-caravan/caravan-hal
resource/src/main/java/io/wcm/caravan/hal/resource/HalResourceFactory.java
HalResourceFactory.getStateAsObject
@Deprecated public static <T> T getStateAsObject(HalResource halResource, Class<T> type) { return halResource.adaptTo(type); }
java
@Deprecated public static <T> T getStateAsObject(HalResource halResource, Class<T> type) { return halResource.adaptTo(type); }
[ "@", "Deprecated", "public", "static", "<", "T", ">", "T", "getStateAsObject", "(", "HalResource", "halResource", ",", "Class", "<", "T", ">", "type", ")", "{", "return", "halResource", ".", "adaptTo", "(", "type", ")", ";", "}" ]
Converts the JSON model to an object of the given type. @param halResource HAL resource with model to convert @param type Type of the requested object @param <T> Output type @return State as object @deprecated use {@link HalResource#adaptTo(Class)}
[ "Converts", "the", "JSON", "model", "to", "an", "object", "of", "the", "given", "type", "." ]
train
https://github.com/wcm-io-caravan/caravan-hal/blob/25d58756b58c70c8c48a17fe781e673dd93d5085/resource/src/main/java/io/wcm/caravan/hal/resource/HalResourceFactory.java#L104-L107
alkacon/opencms-core
src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageUtil.java
CmsContainerpageUtil.createElement
public CmsContainerPageElementPanel createElement( CmsContainerElementData containerElement, I_CmsDropContainer container, boolean isNew) throws Exception { if (containerElement.isGroupContainer() || containerElement.isInheritContainer()) { List<CmsContainerElementData> ...
java
public CmsContainerPageElementPanel createElement( CmsContainerElementData containerElement, I_CmsDropContainer container, boolean isNew) throws Exception { if (containerElement.isGroupContainer() || containerElement.isInheritContainer()) { List<CmsContainerElementData> ...
[ "public", "CmsContainerPageElementPanel", "createElement", "(", "CmsContainerElementData", "containerElement", ",", "I_CmsDropContainer", "container", ",", "boolean", "isNew", ")", "throws", "Exception", "{", "if", "(", "containerElement", ".", "isGroupContainer", "(", ")...
Creates an drag container element.<p> @param containerElement the container element data @param container the container parent @param isNew in case of a newly created element @return the draggable element @throws Exception if something goes wrong
[ "Creates", "an", "drag", "container", "element", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageUtil.java#L334-L368
febit/wit
wit-core/src/main/java/org/febit/wit/global/GlobalManager.java
GlobalManager.forEachGlobal
public void forEachGlobal(BiConsumer<String, Object> action) { Objects.requireNonNull(action); this.globalVars.forEach(action); }
java
public void forEachGlobal(BiConsumer<String, Object> action) { Objects.requireNonNull(action); this.globalVars.forEach(action); }
[ "public", "void", "forEachGlobal", "(", "BiConsumer", "<", "String", ",", "Object", ">", "action", ")", "{", "Objects", ".", "requireNonNull", "(", "action", ")", ";", "this", ".", "globalVars", ".", "forEach", "(", "action", ")", ";", "}" ]
Performs the given action for each global vars until all have been processed or the action throws an exception. @param action @since 2.5.0
[ "Performs", "the", "given", "action", "for", "each", "global", "vars", "until", "all", "have", "been", "processed", "or", "the", "action", "throws", "an", "exception", "." ]
train
https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/global/GlobalManager.java#L61-L64
leancloud/java-sdk-all
realtime/src/main/java/cn/leancloud/im/v2/AVIMConversation.java
AVIMConversation.queryBlockedMembers
public void queryBlockedMembers(int offset, int limit, final AVIMConversationSimpleResultCallback callback) { if (null == callback) { return; } else if (offset < 0 || limit > 100) { callback.internalDone(null, new AVIMException(new IllegalArgumentException("offset/limit is illegal."))); return...
java
public void queryBlockedMembers(int offset, int limit, final AVIMConversationSimpleResultCallback callback) { if (null == callback) { return; } else if (offset < 0 || limit > 100) { callback.internalDone(null, new AVIMException(new IllegalArgumentException("offset/limit is illegal."))); return...
[ "public", "void", "queryBlockedMembers", "(", "int", "offset", ",", "int", "limit", ",", "final", "AVIMConversationSimpleResultCallback", "callback", ")", "{", "if", "(", "null", "==", "callback", ")", "{", "return", ";", "}", "else", "if", "(", "offset", "<...
查询黑名单的成员列表 @param offset 查询结果的起始点 @param limit 查询结果集上限 @param callback 结果回调函数
[ "查询黑名单的成员列表" ]
train
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/realtime/src/main/java/cn/leancloud/im/v2/AVIMConversation.java#L1337-L1353
canoo/dolphin-platform
platform/dolphin-platform-remoting-server/src/main/java/com/canoo/dp/impl/server/gc/GarbageCollector.java
GarbageCollector.onPropertyValueChanged
public synchronized void onPropertyValueChanged(Property property, Object oldValue, Object newValue) { if (!configuration.isUseGc()) { return; } removeReferenceAndCheckForGC(property, oldValue); if (newValue != null && DolphinUtils.isDolphinBean(newValue.getClass())) { ...
java
public synchronized void onPropertyValueChanged(Property property, Object oldValue, Object newValue) { if (!configuration.isUseGc()) { return; } removeReferenceAndCheckForGC(property, oldValue); if (newValue != null && DolphinUtils.isDolphinBean(newValue.getClass())) { ...
[ "public", "synchronized", "void", "onPropertyValueChanged", "(", "Property", "property", ",", "Object", "oldValue", ",", "Object", "newValue", ")", "{", "if", "(", "!", "configuration", ".", "isUseGc", "(", ")", ")", "{", "return", ";", "}", "removeReferenceAn...
This method must be called for each value change of a {@link Property} @param property the property @param oldValue the old value @param newValue the new value
[ "This", "method", "must", "be", "called", "for", "each", "value", "change", "of", "a", "{", "@link", "Property", "}" ]
train
https://github.com/canoo/dolphin-platform/blob/fb99c1fab24df80d2fa094d8688b546140146874/platform/dolphin-platform-remoting-server/src/main/java/com/canoo/dp/impl/server/gc/GarbageCollector.java#L149-L164
jenkinsci/jenkins
core/src/main/java/hudson/tasks/BuildWrapper.java
BuildWrapper.decorateLauncher
public Launcher decorateLauncher(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException, RunnerAbortedException { return launcher; }
java
public Launcher decorateLauncher(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException, RunnerAbortedException { return launcher; }
[ "public", "Launcher", "decorateLauncher", "(", "AbstractBuild", "build", ",", "Launcher", "launcher", ",", "BuildListener", "listener", ")", "throws", "IOException", ",", "InterruptedException", ",", "RunnerAbortedException", "{", "return", "launcher", ";", "}" ]
Provides an opportunity for a {@link BuildWrapper} to decorate a {@link Launcher} to be used in the build. <p> This hook is called very early on in the build (even before {@link #setUp(AbstractBuild, Launcher, BuildListener)} is invoked.) The typical use of {@link Launcher} decoration involves in modifying the environ...
[ "Provides", "an", "opportunity", "for", "a", "{", "@link", "BuildWrapper", "}", "to", "decorate", "a", "{", "@link", "Launcher", "}", "to", "be", "used", "in", "the", "build", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/tasks/BuildWrapper.java#L187-L189
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
PersistenceBrokerImpl.storeReferences
private void storeReferences(Object obj, ClassDescriptor cld, boolean insert, boolean ignoreReferences) { // get all members of obj that are references and store them Collection listRds = cld.getObjectReferenceDescriptors(); // return if nothing to do if(listRds == null || listRds.si...
java
private void storeReferences(Object obj, ClassDescriptor cld, boolean insert, boolean ignoreReferences) { // get all members of obj that are references and store them Collection listRds = cld.getObjectReferenceDescriptors(); // return if nothing to do if(listRds == null || listRds.si...
[ "private", "void", "storeReferences", "(", "Object", "obj", ",", "ClassDescriptor", "cld", ",", "boolean", "insert", ",", "boolean", "ignoreReferences", ")", "{", "// get all members of obj that are references and store them", "Collection", "listRds", "=", "cld", ".", "...
Store all object references that <b>obj</b> points to. All objects which we have a FK pointing to (Via ReferenceDescriptors) will be stored if auto-update is true <b>AND</b> the member field containing the object reference is NOT null. With flag <em>ignoreReferences</em> the storing/linking of references can be suppres...
[ "Store", "all", "object", "references", "that", "<b", ">", "obj<", "/", "b", ">", "points", "to", ".", "All", "objects", "which", "we", "have", "a", "FK", "pointing", "to", "(", "Via", "ReferenceDescriptors", ")", "will", "be", "stored", "if", "auto", ...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java#L963-L987
OpenLiberty/open-liberty
dev/com.ibm.tx.core/src/com/ibm/tx/jta/impl/RegisteredResources.java
RegisteredResources.compare
@Override public int compare(JTAResource o1, JTAResource o2) { if (tc.isEntryEnabled()) Tr.entry(tc, "compare", new Object[] { o1, o2, this }); int result = 0; int p1 = o1.getPriority(); int p2 = o2.getPriority(); if (p1 < p2) result = 1; else ...
java
@Override public int compare(JTAResource o1, JTAResource o2) { if (tc.isEntryEnabled()) Tr.entry(tc, "compare", new Object[] { o1, o2, this }); int result = 0; int p1 = o1.getPriority(); int p2 = o2.getPriority(); if (p1 < p2) result = 1; else ...
[ "@", "Override", "public", "int", "compare", "(", "JTAResource", "o1", ",", "JTAResource", "o2", ")", "{", "if", "(", "tc", ".", "isEntryEnabled", "(", ")", ")", "Tr", ".", "entry", "(", "tc", ",", "\"compare\"", ",", "new", "Object", "[", "]", "{", ...
Comparator returning 0 should leave elements in list alone, preserving original order.
[ "Comparator", "returning", "0", "should", "leave", "elements", "in", "list", "alone", "preserving", "original", "order", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/tx/jta/impl/RegisteredResources.java#L2631-L2645
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterName.java
UCharacterName.getGroupName
public synchronized String getGroupName(int ch, int choice) { // gets the msb int msb = getCodepointMSB(ch); int group = getGroup(ch); // return this if it is an exact match if (msb == m_groupinfo_[group * m_groupsize_]) { int index = getGroupLengths(group, m_g...
java
public synchronized String getGroupName(int ch, int choice) { // gets the msb int msb = getCodepointMSB(ch); int group = getGroup(ch); // return this if it is an exact match if (msb == m_groupinfo_[group * m_groupsize_]) { int index = getGroupLengths(group, m_g...
[ "public", "synchronized", "String", "getGroupName", "(", "int", "ch", ",", "int", "choice", ")", "{", "// gets the msb", "int", "msb", "=", "getCodepointMSB", "(", "ch", ")", ";", "int", "group", "=", "getGroup", "(", "ch", ")", ";", "// return this if it is...
Gets the group name of the character @param ch character to get the group name @param choice name choice selector to choose a unicode 1.0 or newer name
[ "Gets", "the", "group", "name", "of", "the", "character" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterName.java#L507-L523
stephenc/redmine-java-api
src/main/java/org/redmine/ta/internal/RedmineJSONParser.java
RedmineJSONParser.getDateOrNull
private static Date getDateOrNull(JSONObject obj, String field) throws JSONException { String dateStr = JsonInput.getStringOrNull(obj, field); if (dateStr == null) return null; try { if (dateStr.length() >= 5 && dateStr.charAt(4) == '/') { return RedmineDateUtils.FULL_DATE_FORMAT.get().parse(dateStr)...
java
private static Date getDateOrNull(JSONObject obj, String field) throws JSONException { String dateStr = JsonInput.getStringOrNull(obj, field); if (dateStr == null) return null; try { if (dateStr.length() >= 5 && dateStr.charAt(4) == '/') { return RedmineDateUtils.FULL_DATE_FORMAT.get().parse(dateStr)...
[ "private", "static", "Date", "getDateOrNull", "(", "JSONObject", "obj", ",", "String", "field", ")", "throws", "JSONException", "{", "String", "dateStr", "=", "JsonInput", ".", "getStringOrNull", "(", "obj", ",", "field", ")", ";", "if", "(", "dateStr", "=="...
Fetches an optional date from an object. @param obj object to get a field from. @param field field to get a value from. @throws RedmineFormatException if value is not valid
[ "Fetches", "an", "optional", "date", "from", "an", "object", "." ]
train
https://github.com/stephenc/redmine-java-api/blob/7e5270c84aba32d74a506260ec47ff86ab6c9d84/src/main/java/org/redmine/ta/internal/RedmineJSONParser.java#L549-L574
pac4j/pac4j
pac4j-core/src/main/java/org/pac4j/core/context/ContextHelper.java
ContextHelper.getCookie
public static Cookie getCookie(final Collection<Cookie> cookies, final String name) { if (cookies != null) { for (final Cookie cookie : cookies) { if (cookie != null && CommonHelper.areEquals(name, cookie.getName())) { return cookie; } ...
java
public static Cookie getCookie(final Collection<Cookie> cookies, final String name) { if (cookies != null) { for (final Cookie cookie : cookies) { if (cookie != null && CommonHelper.areEquals(name, cookie.getName())) { return cookie; } ...
[ "public", "static", "Cookie", "getCookie", "(", "final", "Collection", "<", "Cookie", ">", "cookies", ",", "final", "String", "name", ")", "{", "if", "(", "cookies", "!=", "null", ")", "{", "for", "(", "final", "Cookie", "cookie", ":", "cookies", ")", ...
Get a specific cookie by its name. @param cookies provided cookies @param name the name of the cookie @return the cookie
[ "Get", "a", "specific", "cookie", "by", "its", "name", "." ]
train
https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-core/src/main/java/org/pac4j/core/context/ContextHelper.java#L22-L31
Red5/red5-server-common
src/main/java/org/red5/server/net/rtmp/RTMPHandshake.java
RTMPHandshake.getDHOffset2
protected int getDHOffset2(byte[] handshake, int bufferOffset) { bufferOffset += 768; int offset = handshake[bufferOffset] & 0xff; bufferOffset++; offset += handshake[bufferOffset] & 0xff; bufferOffset++; offset += handshake[bufferOffset] & 0xff; bufferOffs...
java
protected int getDHOffset2(byte[] handshake, int bufferOffset) { bufferOffset += 768; int offset = handshake[bufferOffset] & 0xff; bufferOffset++; offset += handshake[bufferOffset] & 0xff; bufferOffset++; offset += handshake[bufferOffset] & 0xff; bufferOffs...
[ "protected", "int", "getDHOffset2", "(", "byte", "[", "]", "handshake", ",", "int", "bufferOffset", ")", "{", "bufferOffset", "+=", "768", ";", "int", "offset", "=", "handshake", "[", "bufferOffset", "]", "&", "0xff", ";", "bufferOffset", "++", ";", "offse...
Returns the DH byte offset. @param handshake handshake sequence @param bufferOffset buffer offset @return dh offset
[ "Returns", "the", "DH", "byte", "offset", "." ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/RTMPHandshake.java#L467-L481
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/StepPattern.java
StepPattern.fixupVariables
public void fixupVariables(java.util.Vector vars, int globalsSize) { super.fixupVariables(vars, globalsSize); if (null != m_predicates) { for (int i = 0; i < m_predicates.length; i++) { m_predicates[i].fixupVariables(vars, globalsSize); } } if (null != m_relativePathPa...
java
public void fixupVariables(java.util.Vector vars, int globalsSize) { super.fixupVariables(vars, globalsSize); if (null != m_predicates) { for (int i = 0; i < m_predicates.length; i++) { m_predicates[i].fixupVariables(vars, globalsSize); } } if (null != m_relativePathPa...
[ "public", "void", "fixupVariables", "(", "java", ".", "util", ".", "Vector", "vars", ",", "int", "globalsSize", ")", "{", "super", ".", "fixupVariables", "(", "vars", ",", "globalsSize", ")", ";", "if", "(", "null", "!=", "m_predicates", ")", "{", "for",...
This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time. @param vars List of QNames that correspond to variables. This list should be searched backwards for the first qualified name that corresponds to the variable reference qname. The position of the QName in the vector f...
[ "This", "function", "is", "used", "to", "fixup", "variables", "from", "QNames", "to", "stack", "frame", "indexes", "at", "stylesheet", "build", "time", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/StepPattern.java#L158-L175
GoogleCloudPlatform/bigdata-interop
util/src/main/java/com/google/cloud/hadoop/util/AbstractGoogleAsyncWriteChannel.java
AbstractGoogleAsyncWriteChannel.waitForCompletionAndThrowIfUploadFailed
private S waitForCompletionAndThrowIfUploadFailed() throws IOException { try { return uploadOperation.get(); } catch (InterruptedException e) { // If we were interrupted, we need to cancel the upload operation. uploadOperation.cancel(true); IOException exception = new ClosedByInterruptEx...
java
private S waitForCompletionAndThrowIfUploadFailed() throws IOException { try { return uploadOperation.get(); } catch (InterruptedException e) { // If we were interrupted, we need to cancel the upload operation. uploadOperation.cancel(true); IOException exception = new ClosedByInterruptEx...
[ "private", "S", "waitForCompletionAndThrowIfUploadFailed", "(", ")", "throws", "IOException", "{", "try", "{", "return", "uploadOperation", ".", "get", "(", ")", ";", "}", "catch", "(", "InterruptedException", "e", ")", "{", "// If we were interrupted, we need to canc...
Throws if upload operation failed. Propagates any errors. @throws IOException on IO error
[ "Throws", "if", "upload", "operation", "failed", ".", "Propagates", "any", "errors", "." ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/util/src/main/java/com/google/cloud/hadoop/util/AbstractGoogleAsyncWriteChannel.java#L300-L315
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java
Properties.set
public <K, V> void set(PropertyMapKey<K, V> property, Map<K, V> value) { properties.put(property.getName(), value); }
java
public <K, V> void set(PropertyMapKey<K, V> property, Map<K, V> value) { properties.put(property.getName(), value); }
[ "public", "<", "K", ",", "V", ">", "void", "set", "(", "PropertyMapKey", "<", "K", ",", "V", ">", "property", ",", "Map", "<", "K", ",", "V", ">", "value", ")", "{", "properties", ".", "put", "(", "property", ".", "getName", "(", ")", ",", "val...
Associates the specified map with the specified property key. If the properties previously contained a mapping for the property key, the old value is replaced by the specified map. @param <K> the type of keys maintained by the map @param <V> the type of mapped values @param property the property key with which the spe...
[ "Associates", "the", "specified", "map", "with", "the", "specified", "property", "key", ".", "If", "the", "properties", "previously", "contained", "a", "mapping", "for", "the", "property", "key", "the", "old", "value", "is", "replaced", "by", "the", "specified...
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/core/model/Properties.java#L144-L146
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java
Validator.expectRange
public void expectRange(String name, int minLength, int maxLength) { expectRange(name, minLength, maxLength, messages.get(Validation.RANGE_KEY.name(), name, minLength, maxLength)); }
java
public void expectRange(String name, int minLength, int maxLength) { expectRange(name, minLength, maxLength, messages.get(Validation.RANGE_KEY.name(), name, minLength, maxLength)); }
[ "public", "void", "expectRange", "(", "String", "name", ",", "int", "minLength", ",", "int", "maxLength", ")", "{", "expectRange", "(", "name", ",", "minLength", ",", "maxLength", ",", "messages", ".", "get", "(", "Validation", ".", "RANGE_KEY", ".", "name...
Validates a field to be in a certain range @param name The field to check @param minLength The minimum length @param maxLength The maximum length
[ "Validates", "a", "field", "to", "be", "in", "a", "certain", "range" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java#L341-L343
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.serviceName_modem_lan_lanName_dhcp_dhcpName_PUT
public void serviceName_modem_lan_lanName_dhcp_dhcpName_PUT(String serviceName, String lanName, String dhcpName, OvhDHCP body) throws IOException { String qPath = "/xdsl/{serviceName}/modem/lan/{lanName}/dhcp/{dhcpName}"; StringBuilder sb = path(qPath, serviceName, lanName, dhcpName); exec(qPath, "PUT", sb.toStri...
java
public void serviceName_modem_lan_lanName_dhcp_dhcpName_PUT(String serviceName, String lanName, String dhcpName, OvhDHCP body) throws IOException { String qPath = "/xdsl/{serviceName}/modem/lan/{lanName}/dhcp/{dhcpName}"; StringBuilder sb = path(qPath, serviceName, lanName, dhcpName); exec(qPath, "PUT", sb.toStri...
[ "public", "void", "serviceName_modem_lan_lanName_dhcp_dhcpName_PUT", "(", "String", "serviceName", ",", "String", "lanName", ",", "String", "dhcpName", ",", "OvhDHCP", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/xdsl/{serviceName}/modem/lan/{lan...
Alter this object properties REST: PUT /xdsl/{serviceName}/modem/lan/{lanName}/dhcp/{dhcpName} @param body [required] New object properties @param serviceName [required] The internal name of your XDSL offer @param lanName [required] Name of the LAN @param dhcpName [required] Name of the DHCP
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L1038-L1042
sdl/odata
odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java
EntityDataModelUtil.formatEntityKey
public static String formatEntityKey(EntityDataModel entityDataModel, Object entity) throws ODataEdmException { Key entityKey = getAndCheckEntityType(entityDataModel, entity.getClass()).getKey(); List<PropertyRef> keyPropertyRefs = entityKey.getPropertyRefs(); try { if (keyPropertyR...
java
public static String formatEntityKey(EntityDataModel entityDataModel, Object entity) throws ODataEdmException { Key entityKey = getAndCheckEntityType(entityDataModel, entity.getClass()).getKey(); List<PropertyRef> keyPropertyRefs = entityKey.getPropertyRefs(); try { if (keyPropertyR...
[ "public", "static", "String", "formatEntityKey", "(", "EntityDataModel", "entityDataModel", ",", "Object", "entity", ")", "throws", "ODataEdmException", "{", "Key", "entityKey", "=", "getAndCheckEntityType", "(", "entityDataModel", ",", "entity", ".", "getClass", "(",...
Get the entity key for a given entity by inspecting the Entity Data Model. @param entityDataModel The Entity Data Model. @param entity The given entity. @return The String representation of the entity key. @throws ODataEdmException If unable to format entity key
[ "Get", "the", "entity", "key", "for", "a", "given", "entity", "by", "inspecting", "the", "Entity", "Data", "Model", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java#L696-L718
tango-controls/JTango
dao/src/main/java/fr/esrf/TangoDs/DeviceClass.java
DeviceClass.command_handler
public Any command_handler(final DeviceImpl device, final String command, final Any in_any) throws DevFailed { Any ret = Util.instance().get_orb().create_any(); Util.out4.println("Entering DeviceClass::command_handler() method"); int i; final String cmd_name = command.toLow...
java
public Any command_handler(final DeviceImpl device, final String command, final Any in_any) throws DevFailed { Any ret = Util.instance().get_orb().create_any(); Util.out4.println("Entering DeviceClass::command_handler() method"); int i; final String cmd_name = command.toLow...
[ "public", "Any", "command_handler", "(", "final", "DeviceImpl", "device", ",", "final", "String", "command", ",", "final", "Any", "in_any", ")", "throws", "DevFailed", "{", "Any", "ret", "=", "Util", ".", "instance", "(", ")", ".", "get_orb", "(", ")", "...
Execute a command. <p> It looks for the correct command object in the command object vector. If the command is found, it invoke the <i>always_executed_hook</i> method. Check if the command is allowed by invoking the <i>is_allowed</i> method If the command is allowed, invokes the <i>execute</i> method. @param device T...
[ "Execute", "a", "command", ".", "<p", ">", "It", "looks", "for", "the", "correct", "command", "object", "in", "the", "command", "object", "vector", ".", "If", "the", "command", "is", "found", "it", "invoke", "the", "<i", ">", "always_executed_hook<", "/", ...
train
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoDs/DeviceClass.java#L356-L410
Samsung/GearVRf
GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/AnimationInteractivityManager.java
AnimationInteractivityManager.ConvertDirectionalVectorToQuaternion
public Quaternionf ConvertDirectionalVectorToQuaternion(Vector3f d) { d.negate(); Quaternionf q = new Quaternionf(); // check for exception condition if ((d.x == 0) && (d.z == 0)) { // exception condition if direction is (0,y,0): // straight up, straight down or a...
java
public Quaternionf ConvertDirectionalVectorToQuaternion(Vector3f d) { d.negate(); Quaternionf q = new Quaternionf(); // check for exception condition if ((d.x == 0) && (d.z == 0)) { // exception condition if direction is (0,y,0): // straight up, straight down or a...
[ "public", "Quaternionf", "ConvertDirectionalVectorToQuaternion", "(", "Vector3f", "d", ")", "{", "d", ".", "negate", "(", ")", ";", "Quaternionf", "q", "=", "new", "Quaternionf", "(", ")", ";", "// check for exception condition", "if", "(", "(", "d", ".", "x",...
Converts a vector into a quaternion. Used for the direction of spot and directional lights Called upon initialization and updates to those vectors @param d
[ "Converts", "a", "vector", "into", "a", "quaternion", ".", "Used", "for", "the", "direction", "of", "spot", "and", "directional", "lights", "Called", "upon", "initialization", "and", "updates", "to", "those", "vectors" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/AnimationInteractivityManager.java#L2701-L2732
indeedeng/util
io/src/main/java/com/indeed/util/io/Files.java
Files.deleteOrDie
public static boolean deleteOrDie(@Nonnull final String file) throws IOException { // this returns true if the file was actually deleted // and false for 2 cases: // 1. file did not exist to start with // 2. File.delete() failed at some point for some reason // so we dis...
java
public static boolean deleteOrDie(@Nonnull final String file) throws IOException { // this returns true if the file was actually deleted // and false for 2 cases: // 1. file did not exist to start with // 2. File.delete() failed at some point for some reason // so we dis...
[ "public", "static", "boolean", "deleteOrDie", "(", "@", "Nonnull", "final", "String", "file", ")", "throws", "IOException", "{", "// this returns true if the file was actually deleted\r", "// and false for 2 cases:\r", "// 1. file did not exist to start with\r", "// 2. File.del...
Deletes file or recursively deletes a directory @param file path to erase @return true if all deletions were successful, false if file did not exist @throws IOException if deletion fails and the file still exists at the end
[ "Deletes", "file", "or", "recursively", "deletes", "a", "directory" ]
train
https://github.com/indeedeng/util/blob/332008426cf14b57e7fc3e817d9423e3f84fb922/io/src/main/java/com/indeed/util/io/Files.java#L726-L746
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.hosting_privateDatabase_serviceName_ram_duration_POST
public OvhOrder hosting_privateDatabase_serviceName_ram_duration_POST(String serviceName, String duration, OvhAvailableRamSizeEnum ram) throws IOException { String qPath = "/order/hosting/privateDatabase/{serviceName}/ram/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Object>o...
java
public OvhOrder hosting_privateDatabase_serviceName_ram_duration_POST(String serviceName, String duration, OvhAvailableRamSizeEnum ram) throws IOException { String qPath = "/order/hosting/privateDatabase/{serviceName}/ram/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Object>o...
[ "public", "OvhOrder", "hosting_privateDatabase_serviceName_ram_duration_POST", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhAvailableRamSizeEnum", "ram", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/hosting/privateDatabase/{serviceNa...
Create order REST: POST /order/hosting/privateDatabase/{serviceName}/ram/{duration} @param ram [required] Private database ram size @param serviceName [required] The internal name of your private database @param duration [required] Duration
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L5184-L5191
cdapio/tigon
tigon-api/src/main/java/co/cask/tigon/api/common/Bytes.java
Bytes.toStringBinary
public static String toStringBinary(final byte [] b, int off, int len) { StringBuilder result = new StringBuilder(); try { String first = new String(b, off, len, "ISO-8859-1"); for (int i = 0; i < first.length(); ++i) { int ch = first.charAt(i) & 0xFF; if ((ch >= '0' && ch <= '9') ...
java
public static String toStringBinary(final byte [] b, int off, int len) { StringBuilder result = new StringBuilder(); try { String first = new String(b, off, len, "ISO-8859-1"); for (int i = 0; i < first.length(); ++i) { int ch = first.charAt(i) & 0xFF; if ((ch >= '0' && ch <= '9') ...
[ "public", "static", "String", "toStringBinary", "(", "final", "byte", "[", "]", "b", ",", "int", "off", ",", "int", "len", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "try", "{", "String", "first", "=", "new", "Stri...
Write a printable representation of a byte array. Non-printable characters are hex escaped in the format \\x%02X, eg: \x00 \x05 etc @param b array to write out @param off offset to start at @param len length to write @return string output
[ "Write", "a", "printable", "representation", "of", "a", "byte", "array", ".", "Non", "-", "printable", "characters", "are", "hex", "escaped", "in", "the", "format", "\\\\", "x%02X", "eg", ":", "\\", "x00", "\\", "x05", "etc" ]
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-api/src/main/java/co/cask/tigon/api/common/Bytes.java#L231-L249
Azure/azure-sdk-for-java
cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java
DatabaseAccountsInner.offlineRegion
public void offlineRegion(String resourceGroupName, String accountName, String region) { offlineRegionWithServiceResponseAsync(resourceGroupName, accountName, region).toBlocking().last().body(); }
java
public void offlineRegion(String resourceGroupName, String accountName, String region) { offlineRegionWithServiceResponseAsync(resourceGroupName, accountName, region).toBlocking().last().body(); }
[ "public", "void", "offlineRegion", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "region", ")", "{", "offlineRegionWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ",", "region", ")", ".", "toBlocking", "(", ...
Offline the specified region for the specified Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @param region Cosmos DB region, with spaces between words and each word capitalized. @throws IllegalArgumentException thrown if ...
[ "Offline", "the", "specified", "region", "for", "the", "specified", "Azure", "Cosmos", "DB", "database", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java#L1284-L1286
Drivemode/TypefaceHelper
TypefaceHelper/src/main/java/com/drivemode/android/typeface/TypefaceHelper.java
TypefaceHelper.setTypeface
public View setTypeface(Context context, @LayoutRes int layoutRes, String typefaceName, int style) { return setTypeface(context, layoutRes, null, typefaceName, 0); }
java
public View setTypeface(Context context, @LayoutRes int layoutRes, String typefaceName, int style) { return setTypeface(context, layoutRes, null, typefaceName, 0); }
[ "public", "View", "setTypeface", "(", "Context", "context", ",", "@", "LayoutRes", "int", "layoutRes", ",", "String", "typefaceName", ",", "int", "style", ")", "{", "return", "setTypeface", "(", "context", ",", "layoutRes", ",", "null", ",", "typefaceName", ...
Set the typeface to the all text views belong to the view group. @param context the context. @param layoutRes the layout resource id. @param typefaceName typeface name. @param style the typeface style. @return the view.
[ "Set", "the", "typeface", "to", "the", "all", "text", "views", "belong", "to", "the", "view", "group", "." ]
train
https://github.com/Drivemode/TypefaceHelper/blob/86bef9ce16b9626b7076559e846db1b9f043c008/TypefaceHelper/src/main/java/com/drivemode/android/typeface/TypefaceHelper.java#L265-L267
alibaba/java-dns-cache-manipulator
library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java
DnsCacheManipulator.listDnsCache
public static List<DnsCacheEntry> listDnsCache() { try { return InetAddressCacheUtil.listInetAddressCache().getCache(); } catch (Exception e) { throw new DnsCacheManipulatorException("Fail to listDnsCache, cause: " + e.toString(), e); } }
java
public static List<DnsCacheEntry> listDnsCache() { try { return InetAddressCacheUtil.listInetAddressCache().getCache(); } catch (Exception e) { throw new DnsCacheManipulatorException("Fail to listDnsCache, cause: " + e.toString(), e); } }
[ "public", "static", "List", "<", "DnsCacheEntry", ">", "listDnsCache", "(", ")", "{", "try", "{", "return", "InetAddressCacheUtil", ".", "listInetAddressCache", "(", ")", ".", "getCache", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw...
Get all dns cache entries. @return dns cache entries @throws DnsCacheManipulatorException Operation fail @see #getWholeDnsCache() @since 1.2.0
[ "Get", "all", "dns", "cache", "entries", "." ]
train
https://github.com/alibaba/java-dns-cache-manipulator/blob/eab50ee5c27671f9159b55458301f9429b2fcc47/library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java#L162-L168
wildfly/wildfly-core
jmx/src/main/java/org/jboss/as/jmx/model/ObjectNameAddressUtil.java
ObjectNameAddressUtil.createObjectName
static ObjectName createObjectName(final String domain, final PathAddress pathAddress) { return createObjectName(domain, pathAddress, null); }
java
static ObjectName createObjectName(final String domain, final PathAddress pathAddress) { return createObjectName(domain, pathAddress, null); }
[ "static", "ObjectName", "createObjectName", "(", "final", "String", "domain", ",", "final", "PathAddress", "pathAddress", ")", "{", "return", "createObjectName", "(", "domain", ",", "pathAddress", ",", "null", ")", ";", "}" ]
Creates an ObjectName representation of a {@link PathAddress}. @param domain the JMX domain to use for the ObjectName. Cannot be {@code null} @param pathAddress the address. Cannot be {@code null} @return the ObjectName. Will not return {@code null}
[ "Creates", "an", "ObjectName", "representation", "of", "a", "{" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/jmx/src/main/java/org/jboss/as/jmx/model/ObjectNameAddressUtil.java#L135-L137
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java
MappingUtils.returnField
public static Object returnField(Object object, String fieldName) throws MjdbcException { AssertUtils.assertNotNull(object); Object result = null; Field field = null; try { field = object.getClass().getField(fieldName); result = field.get(object); ...
java
public static Object returnField(Object object, String fieldName) throws MjdbcException { AssertUtils.assertNotNull(object); Object result = null; Field field = null; try { field = object.getClass().getField(fieldName); result = field.get(object); ...
[ "public", "static", "Object", "returnField", "(", "Object", "object", ",", "String", "fieldName", ")", "throws", "MjdbcException", "{", "AssertUtils", ".", "assertNotNull", "(", "object", ")", ";", "Object", "result", "=", "null", ";", "Field", "field", "=", ...
Returns class field value Is used to return Constants @param object Class field of which would be returned @param fieldName field name @return field value @throws org.midao.jdbc.core.exception.MjdbcException if field is not present or access is prohibited
[ "Returns", "class", "field", "value", "Is", "used", "to", "return", "Constants" ]
train
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java#L451-L467
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/FileUtil.java
FileUtil.fullyDelete
@Deprecated public static void fullyDelete(FileSystem fs, Path dir) throws IOException { fs.delete(dir, true); }
java
@Deprecated public static void fullyDelete(FileSystem fs, Path dir) throws IOException { fs.delete(dir, true); }
[ "@", "Deprecated", "public", "static", "void", "fullyDelete", "(", "FileSystem", "fs", ",", "Path", "dir", ")", "throws", "IOException", "{", "fs", ".", "delete", "(", "dir", ",", "true", ")", ";", "}" ]
Recursively delete a directory. @param fs {@link FileSystem} on which the path is present @param dir directory to recursively delete @throws IOException @deprecated Use {@link FileSystem#delete(Path, boolean)}
[ "Recursively", "delete", "a", "directory", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/FileUtil.java#L120-L124
craftercms/commons
utilities/src/main/java/org/craftercms/commons/http/CookieManager.java
CookieManager.addCookie
public void addCookie(String name, String value, HttpServletResponse response) { Cookie cookie = new Cookie(name, value); cookie.setHttpOnly(httpOnly); cookie.setSecure(secure); if (StringUtils.isNotEmpty(domain)) { cookie.setDomain(domain); } if (StringUtils....
java
public void addCookie(String name, String value, HttpServletResponse response) { Cookie cookie = new Cookie(name, value); cookie.setHttpOnly(httpOnly); cookie.setSecure(secure); if (StringUtils.isNotEmpty(domain)) { cookie.setDomain(domain); } if (StringUtils....
[ "public", "void", "addCookie", "(", "String", "name", ",", "String", "value", ",", "HttpServletResponse", "response", ")", "{", "Cookie", "cookie", "=", "new", "Cookie", "(", "name", ",", "value", ")", ";", "cookie", ".", "setHttpOnly", "(", "httpOnly", ")...
Add a new cookie, using the configured domain, path and max age, to the response. @param name the name of the cookie @param value the value of the cookie
[ "Add", "a", "new", "cookie", "using", "the", "configured", "domain", "path", "and", "max", "age", "to", "the", "response", "." ]
train
https://github.com/craftercms/commons/blob/3074fe49e56c2a4aae0832f40b17ae563335dc83/utilities/src/main/java/org/craftercms/commons/http/CookieManager.java#L71-L88
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/MetamodelImpl.java
MetamodelImpl.assignMappedSuperClass
public void assignMappedSuperClass(Map<Class<?>, ManagedType<?>> mappedSuperClass) { if (this.mappedSuperClassTypes == null) { this.mappedSuperClassTypes = mappedSuperClass; } else { this.mappedSuperClassTypes.putAll(mappedSuperClassTypes); ...
java
public void assignMappedSuperClass(Map<Class<?>, ManagedType<?>> mappedSuperClass) { if (this.mappedSuperClassTypes == null) { this.mappedSuperClassTypes = mappedSuperClass; } else { this.mappedSuperClassTypes.putAll(mappedSuperClassTypes); ...
[ "public", "void", "assignMappedSuperClass", "(", "Map", "<", "Class", "<", "?", ">", ",", "ManagedType", "<", "?", ">", ">", "mappedSuperClass", ")", "{", "if", "(", "this", ".", "mappedSuperClassTypes", "==", "null", ")", "{", "this", ".", "mappedSuperCla...
Adds mapped super class to mapped super class collection. @param mappedSuperClass the mappedSuperClassTypes to set
[ "Adds", "mapped", "super", "class", "to", "mapped", "super", "class", "collection", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/MetamodelImpl.java#L333-L343
GerdHolz/TOVAL
src/de/invation/code/toval/time/TimeUtils.java
TimeUtils.diffFromDate
private static Date diffFromDate(Date date, long diff, boolean clearTimeOfDay){ Date result = convertToUtilDate(convertToLocalDateTime(date).plusNanos(diff*1000000)); if(!clearTimeOfDay) return result; return clearTimeOfDay(result); }
java
private static Date diffFromDate(Date date, long diff, boolean clearTimeOfDay){ Date result = convertToUtilDate(convertToLocalDateTime(date).plusNanos(diff*1000000)); if(!clearTimeOfDay) return result; return clearTimeOfDay(result); }
[ "private", "static", "Date", "diffFromDate", "(", "Date", "date", ",", "long", "diff", ",", "boolean", "clearTimeOfDay", ")", "{", "Date", "result", "=", "convertToUtilDate", "(", "convertToLocalDateTime", "(", "date", ")", ".", "plusNanos", "(", "diff", "*", ...
Caution: Difference calculation is based on adding/subtracting milliseconds and omits time zones.<br> In some cases the method might return possibly unexpected results due to time zones.<br> When for example to the last day of CEST without time of day information (in 2016: 30.10.2016 00:00:00 000) milliseconds for one ...
[ "Caution", ":", "Difference", "calculation", "is", "based", "on", "adding", "/", "subtracting", "milliseconds", "and", "omits", "time", "zones", ".", "<br", ">", "In", "some", "cases", "the", "method", "might", "return", "possibly", "unexpected", "results", "d...
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/time/TimeUtils.java#L128-L133
js-lib-com/dom
src/main/java/js/dom/w3c/DocumentImpl.java
DocumentImpl.evaluateXPathNodeNS
Element evaluateXPathNodeNS(Node contextNode, NamespaceContext namespaceContext, String expression, Object... args) { if (args.length > 0) { expression = Strings.format(expression, args); } Node node = null; try { XPath xpath = XPathFactory.newInstance().newXPath(); if (namespaceContext != nul...
java
Element evaluateXPathNodeNS(Node contextNode, NamespaceContext namespaceContext, String expression, Object... args) { if (args.length > 0) { expression = Strings.format(expression, args); } Node node = null; try { XPath xpath = XPathFactory.newInstance().newXPath(); if (namespaceContext != nul...
[ "Element", "evaluateXPathNodeNS", "(", "Node", "contextNode", ",", "NamespaceContext", "namespaceContext", ",", "String", "expression", ",", "Object", "...", "args", ")", "{", "if", "(", "args", ".", "length", ">", "0", ")", "{", "expression", "=", "Strings", ...
Name space aware variant for {@link #evaluateXPathNode(Node, String, Object...)}. @param contextNode evaluation context node, @param namespaceContext name space context maps prefixes to name space URIs, @param expression XPath expression, formatting tags supported, @param args optional formatting arguments. @return ev...
[ "Name", "space", "aware", "variant", "for", "{", "@link", "#evaluateXPathNode", "(", "Node", "String", "Object", "...", ")", "}", "." ]
train
https://github.com/js-lib-com/dom/blob/8c7cd7c802977f210674dec7c2a8f61e8de05b63/src/main/java/js/dom/w3c/DocumentImpl.java#L300-L324
irmen/Pyrolite
java/src/main/java/net/razorvine/pyro/PyroProxy.java
PyroProxy.call_oneway
public void call_oneway(String method, Object... arguments) throws PickleException, PyroException, IOException { internal_call(method, null, Message.FLAGS_ONEWAY, true, arguments); }
java
public void call_oneway(String method, Object... arguments) throws PickleException, PyroException, IOException { internal_call(method, null, Message.FLAGS_ONEWAY, true, arguments); }
[ "public", "void", "call_oneway", "(", "String", "method", ",", "Object", "...", "arguments", ")", "throws", "PickleException", ",", "PyroException", ",", "IOException", "{", "internal_call", "(", "method", ",", "null", ",", "Message", ".", "FLAGS_ONEWAY", ",", ...
Call a method on the remote Pyro object this proxy is for, using Oneway call semantics (return immediately). @param method the name of the method you want to call @param arguments zero or more arguments for the remote method
[ "Call", "a", "method", "on", "the", "remote", "Pyro", "object", "this", "proxy", "is", "for", "using", "Oneway", "call", "semantics", "(", "return", "immediately", ")", "." ]
train
https://github.com/irmen/Pyrolite/blob/060bc3c9069cd31560b6da4f67280736fb2cdf63/java/src/main/java/net/razorvine/pyro/PyroProxy.java#L186-L188
adyliu/jafka
src/main/java/io/jafka/producer/ZKBrokerPartitionInfo.java
ZKBrokerPartitionInfo.getZKTopicPartitionInfo
private Map<String, SortedSet<Partition>> getZKTopicPartitionInfo(Map<Integer, Broker> allBrokers) { final Map<String, SortedSet<Partition>> brokerPartitionsPerTopic = new HashMap<String, SortedSet<Partition>>(); ZkUtils.makeSurePersistentPathExists(zkClient, ZkUtils.BrokerTopicsPath); List<Stri...
java
private Map<String, SortedSet<Partition>> getZKTopicPartitionInfo(Map<Integer, Broker> allBrokers) { final Map<String, SortedSet<Partition>> brokerPartitionsPerTopic = new HashMap<String, SortedSet<Partition>>(); ZkUtils.makeSurePersistentPathExists(zkClient, ZkUtils.BrokerTopicsPath); List<Stri...
[ "private", "Map", "<", "String", ",", "SortedSet", "<", "Partition", ">", ">", "getZKTopicPartitionInfo", "(", "Map", "<", "Integer", ",", "Broker", ">", "allBrokers", ")", "{", "final", "Map", "<", "String", ",", "SortedSet", "<", "Partition", ">", ">", ...
Generate a sequence of (brokerId, numPartitions) for all topics registered in zookeeper @param allBrokers all register brokers @return a mapping from topic to sequence of (brokerId, numPartitions)
[ "Generate", "a", "sequence", "of", "(", "brokerId", "numPartitions", ")", "for", "all", "topics", "registered", "in", "zookeeper" ]
train
https://github.com/adyliu/jafka/blob/cc14d2ed60c039b12d7b106bb5269ef21d0add7e/src/main/java/io/jafka/producer/ZKBrokerPartitionInfo.java#L133-L163
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java
DBService.getColumnSlice
public Iterable<DColumn> getColumnSlice(String storeName, String rowKey, String startCol, String endCol) { DRow row = new DRow(m_tenant, storeName, rowKey); return row.getColumns(startCol, endCol, 1024); }
java
public Iterable<DColumn> getColumnSlice(String storeName, String rowKey, String startCol, String endCol) { DRow row = new DRow(m_tenant, storeName, rowKey); return row.getColumns(startCol, endCol, 1024); }
[ "public", "Iterable", "<", "DColumn", ">", "getColumnSlice", "(", "String", "storeName", ",", "String", "rowKey", ",", "String", "startCol", ",", "String", "endCol", ")", "{", "DRow", "row", "=", "new", "DRow", "(", "m_tenant", ",", "storeName", ",", "rowK...
Get columns for the row with the given key in the given store. Columns range is defined by an interval [startCol, endCol]. Columns are returned as an Iterator of {@link DColumn}s. Empty iterator is returned if no row is found with the given key or no columns in the given interval found. @param storeName Name of store ...
[ "Get", "columns", "for", "the", "row", "with", "the", "given", "key", "in", "the", "given", "store", ".", "Columns", "range", "is", "defined", "by", "an", "interval", "[", "startCol", "endCol", "]", ".", "Columns", "are", "returned", "as", "an", "Iterato...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java#L258-L261
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/util/DateUtils.java
DateUtils.handleException
private static <E extends RuntimeException> E handleException(E ex) { if (JodaTime.hasExpectedBehavior()) return ex; throw new IllegalStateException("Joda-time 2.2 or later version is required, but found version: " + JodaTime.getVersion(), ex); }
java
private static <E extends RuntimeException> E handleException(E ex) { if (JodaTime.hasExpectedBehavior()) return ex; throw new IllegalStateException("Joda-time 2.2 or later version is required, but found version: " + JodaTime.getVersion(), ex); }
[ "private", "static", "<", "E", "extends", "RuntimeException", ">", "E", "handleException", "(", "E", "ex", ")", "{", "if", "(", "JodaTime", ".", "hasExpectedBehavior", "(", ")", ")", "return", "ex", ";", "throw", "new", "IllegalStateException", "(", "\"Joda-...
Returns the original runtime exception iff the joda-time being used at runtime behaves as expected. @throws IllegalStateException if the joda-time being used at runtime doens't appear to be of the right version.
[ "Returns", "the", "original", "runtime", "exception", "iff", "the", "joda", "-", "time", "being", "used", "at", "runtime", "behaves", "as", "expected", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/DateUtils.java#L146-L150
fuinorg/utils4j
src/main/java/org/fuin/utils4j/PropertiesUtils.java
PropertiesUtils.loadProperties
public static Properties loadProperties(final String baseUrl, final String filename) { checkNotNull("baseUrl", baseUrl); checkNotNull("filename", filename); try { final URL url = new URL(baseUrl); return loadProperties(url, filename); } catch (final MalformedURLE...
java
public static Properties loadProperties(final String baseUrl, final String filename) { checkNotNull("baseUrl", baseUrl); checkNotNull("filename", filename); try { final URL url = new URL(baseUrl); return loadProperties(url, filename); } catch (final MalformedURLE...
[ "public", "static", "Properties", "loadProperties", "(", "final", "String", "baseUrl", ",", "final", "String", "filename", ")", "{", "checkNotNull", "(", "\"baseUrl\"", ",", "baseUrl", ")", ";", "checkNotNull", "(", "\"filename\"", ",", "filename", ")", ";", "...
Load a file from an directory. Wraps a possible <code>MalformedURLException</code> exception into a <code>RuntimeException</code>. @param baseUrl Directory URL as <code>String</code> - Cannot be <code>null</code>. @param filename Filename without path - Cannot be <code>null</code>. @return Properties.
[ "Load", "a", "file", "from", "an", "directory", ".", "Wraps", "a", "possible", "<code", ">", "MalformedURLException<", "/", "code", ">", "exception", "into", "a", "<code", ">", "RuntimeException<", "/", "code", ">", "." ]
train
https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/PropertiesUtils.java#L180-L191
Javacord/Javacord
javacord-api/src/main/java/org/javacord/api/entity/server/ServerUpdater.java
ServerUpdater.removeRoleFromUser
public ServerUpdater removeRoleFromUser(User user, Role role) { delegate.removeRoleFromUser(user, role); return this; }
java
public ServerUpdater removeRoleFromUser(User user, Role role) { delegate.removeRoleFromUser(user, role); return this; }
[ "public", "ServerUpdater", "removeRoleFromUser", "(", "User", "user", ",", "Role", "role", ")", "{", "delegate", ".", "removeRoleFromUser", "(", "user", ",", "role", ")", ";", "return", "this", ";", "}" ]
Queues a role to be removed from the user. @param user The server member the role should be removed from. @param role The role which should be removed from the user. @return The current instance in order to chain call methods.
[ "Queues", "a", "role", "to", "be", "removed", "from", "the", "user", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-api/src/main/java/org/javacord/api/entity/server/ServerUpdater.java#L491-L494
googleapis/google-cloud-java
google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceClient.java
NotificationChannelServiceClient.deleteNotificationChannel
public final void deleteNotificationChannel(NotificationChannelName name, boolean force) { DeleteNotificationChannelRequest request = DeleteNotificationChannelRequest.newBuilder() .setName(name == null ? null : name.toString()) .setForce(force) .build(); deleteNotifi...
java
public final void deleteNotificationChannel(NotificationChannelName name, boolean force) { DeleteNotificationChannelRequest request = DeleteNotificationChannelRequest.newBuilder() .setName(name == null ? null : name.toString()) .setForce(force) .build(); deleteNotifi...
[ "public", "final", "void", "deleteNotificationChannel", "(", "NotificationChannelName", "name", ",", "boolean", "force", ")", "{", "DeleteNotificationChannelRequest", "request", "=", "DeleteNotificationChannelRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", "...
Deletes a notification channel. <p>Sample code: <pre><code> try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) { NotificationChannelName name = NotificationChannelName.of("[PROJECT]", "[NOTIFICATION_CHANNEL]"); boolean force = false; notificationChannel...
[ "Deletes", "a", "notification", "channel", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceClient.java#L904-L912
maxirosson/jdroid-android
jdroid-android-google-maps/src/main/java/com/jdroid/android/google/maps/MapUtils.java
MapUtils.vectorToBitmap
public static BitmapDescriptor vectorToBitmap(@DrawableRes int drawableRes, @ColorRes int colorRes) { Drawable vectorDrawable = VectorDrawableCompat.create(AbstractApplication.get().getResources(), drawableRes, null); Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(), vectorDrawable.getIntrinsi...
java
public static BitmapDescriptor vectorToBitmap(@DrawableRes int drawableRes, @ColorRes int colorRes) { Drawable vectorDrawable = VectorDrawableCompat.create(AbstractApplication.get().getResources(), drawableRes, null); Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(), vectorDrawable.getIntrinsi...
[ "public", "static", "BitmapDescriptor", "vectorToBitmap", "(", "@", "DrawableRes", "int", "drawableRes", ",", "@", "ColorRes", "int", "colorRes", ")", "{", "Drawable", "vectorDrawable", "=", "VectorDrawableCompat", ".", "create", "(", "AbstractApplication", ".", "ge...
Convert a {@link Drawable} to a {@link BitmapDescriptor}, for use as a marker icon.
[ "Convert", "a", "{" ]
train
https://github.com/maxirosson/jdroid-android/blob/1ba9cae56a16fa36bdb2c9c04379853f0300707f/jdroid-android-google-maps/src/main/java/com/jdroid/android/google/maps/MapUtils.java#L31-L39
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.readOwner
public CmsUser readOwner(CmsDbContext dbc, CmsProject project) throws CmsException { return readUser(dbc, project.getOwnerId()); }
java
public CmsUser readOwner(CmsDbContext dbc, CmsProject project) throws CmsException { return readUser(dbc, project.getOwnerId()); }
[ "public", "CmsUser", "readOwner", "(", "CmsDbContext", "dbc", ",", "CmsProject", "project", ")", "throws", "CmsException", "{", "return", "readUser", "(", "dbc", ",", "project", ".", "getOwnerId", "(", ")", ")", ";", "}" ]
Reads the owner of a project.<p> @param dbc the current database context @param project the project to get the owner from @return the owner of a resource @throws CmsException if something goes wrong
[ "Reads", "the", "owner", "of", "a", "project", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L7117-L7120
killbill/killbill
util/src/main/java/org/killbill/billing/util/callcontext/InternalCallContextFactory.java
InternalCallContextFactory.createInternalCallContext
public InternalCallContext createInternalCallContext(@Nullable final Long tenantRecordId, @Nullable final Long accountRecordId, final String userName, final CallOrigin callOrigin, final UserType userType, @Nullable final UUID userToken) { return createInt...
java
public InternalCallContext createInternalCallContext(@Nullable final Long tenantRecordId, @Nullable final Long accountRecordId, final String userName, final CallOrigin callOrigin, final UserType userType, @Nullable final UUID userToken) { return createInt...
[ "public", "InternalCallContext", "createInternalCallContext", "(", "@", "Nullable", "final", "Long", "tenantRecordId", ",", "@", "Nullable", "final", "Long", "accountRecordId", ",", "final", "String", "userName", ",", "final", "CallOrigin", "callOrigin", ",", "final",...
Create an internal call callcontext <p/> This is used by notification queue and persistent bus - accountRecordId is expected to be non null @param tenantRecordId tenant record id - if null, the default tenant record id value will be used @param accountRecordId account record id (can be null in specific use-cases, e.g...
[ "Create", "an", "internal", "call", "callcontext", "<p", "/", ">", "This", "is", "used", "by", "notification", "queue", "and", "persistent", "bus", "-", "accountRecordId", "is", "expected", "to", "be", "non", "null" ]
train
https://github.com/killbill/killbill/blob/6457b485fb32a182c76197a83f428123331f1380/util/src/main/java/org/killbill/billing/util/callcontext/InternalCallContextFactory.java#L235-L238
Appendium/objectlabkit
datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/ExcelDateUtil.java
ExcelDateUtil.getJavaCalendar
public static Calendar getJavaCalendar(final double excelDate, final boolean use1904windowing) { if (isValidExcelDate(excelDate)) { int startYear = EXCEL_BASE_YEAR; int dayAdjust = -1; // Excel thinks 2/29/1900 is a valid date, which // it isn't final int who...
java
public static Calendar getJavaCalendar(final double excelDate, final boolean use1904windowing) { if (isValidExcelDate(excelDate)) { int startYear = EXCEL_BASE_YEAR; int dayAdjust = -1; // Excel thinks 2/29/1900 is a valid date, which // it isn't final int who...
[ "public", "static", "Calendar", "getJavaCalendar", "(", "final", "double", "excelDate", ",", "final", "boolean", "use1904windowing", ")", "{", "if", "(", "isValidExcelDate", "(", "excelDate", ")", ")", "{", "int", "startYear", "=", "EXCEL_BASE_YEAR", ";", "int",...
Given an Excel date with either 1900 or 1904 date windowing, converts it to a java.util.Date. @param excelDate The Excel date. @param use1904windowing true if date uses 1904 windowing, or false if using 1900 date windowing. @return Java representation of the date without any time. @see java.util.TimeZone
[ "Given", "an", "Excel", "date", "with", "either", "1900", "or", "1904", "date", "windowing", "converts", "it", "to", "a", "java", ".", "util", ".", "Date", "." ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/ExcelDateUtil.java#L72-L97
spotify/helios
helios-services/src/main/java/com/spotify/helios/master/ZooKeeperMasterModel.java
ZooKeeperMasterModel.rollingUpdateUndeploy
private RollingUpdateOp rollingUpdateUndeploy(final ZooKeeperClient client, final RollingUpdateOpFactory opFactory, final DeploymentGroup deploymentGroup, final String host) { ...
java
private RollingUpdateOp rollingUpdateUndeploy(final ZooKeeperClient client, final RollingUpdateOpFactory opFactory, final DeploymentGroup deploymentGroup, final String host) { ...
[ "private", "RollingUpdateOp", "rollingUpdateUndeploy", "(", "final", "ZooKeeperClient", "client", ",", "final", "RollingUpdateOpFactory", "opFactory", ",", "final", "DeploymentGroup", "deploymentGroup", ",", "final", "String", "host", ")", "{", "return", "rollingUpdateUnd...
rollingUpdateUndeploy is used to undeploy jobs during a rolling update. It enables the 'skipRedundantUndeploys' flag, which enables the redundantDeployment() check.
[ "rollingUpdateUndeploy", "is", "used", "to", "undeploy", "jobs", "during", "a", "rolling", "update", ".", "It", "enables", "the", "skipRedundantUndeploys", "flag", "which", "enables", "the", "redundantDeployment", "()", "check", "." ]
train
https://github.com/spotify/helios/blob/c9000bc1d6908651570be8b057d4981bba4df5b4/helios-services/src/main/java/com/spotify/helios/master/ZooKeeperMasterModel.java#L1077-L1082
gsi-upm/Shanks
shanks-core/src/main/java/es/upm/dit/gsi/shanks/agent/capability/reasoning/bayes/unbbayes/ShanksAgentBayesianReasoningCapability.java
ShanksAgentBayesianReasoningCapability.addEvidence
public static void addEvidence(ProbabilisticNetwork bn, String nodeName, String status) throws ShanksException { ProbabilisticNode node = ShanksAgentBayesianReasoningCapability .getNode(bn, nodeName); if (node.hasEvidence()) { ShanksAgentBayesianReasoningCapabilit...
java
public static void addEvidence(ProbabilisticNetwork bn, String nodeName, String status) throws ShanksException { ProbabilisticNode node = ShanksAgentBayesianReasoningCapability .getNode(bn, nodeName); if (node.hasEvidence()) { ShanksAgentBayesianReasoningCapabilit...
[ "public", "static", "void", "addEvidence", "(", "ProbabilisticNetwork", "bn", ",", "String", "nodeName", ",", "String", "status", ")", "throws", "ShanksException", "{", "ProbabilisticNode", "node", "=", "ShanksAgentBayesianReasoningCapability", ".", "getNode", "(", "b...
Add information to the Bayesian network to reason with it. @param bn @param nodeName @param status @throws ShanksException
[ "Add", "information", "to", "the", "Bayesian", "network", "to", "reason", "with", "it", "." ]
train
https://github.com/gsi-upm/Shanks/blob/35d87a81c22731f4f83bbd0571c9c6d466bd16be/shanks-core/src/main/java/es/upm/dit/gsi/shanks/agent/capability/reasoning/bayes/unbbayes/ShanksAgentBayesianReasoningCapability.java#L114-L134
groovy/groovy-core
subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
Sql.eachRow
public void eachRow(String sql, List<Object> params, int offset, int maxRows, Closure closure) throws SQLException { eachRow(sql, params, null, offset, maxRows, closure); }
java
public void eachRow(String sql, List<Object> params, int offset, int maxRows, Closure closure) throws SQLException { eachRow(sql, params, null, offset, maxRows, closure); }
[ "public", "void", "eachRow", "(", "String", "sql", ",", "List", "<", "Object", ">", "params", ",", "int", "offset", ",", "int", "maxRows", ",", "Closure", "closure", ")", "throws", "SQLException", "{", "eachRow", "(", "sql", ",", "params", ",", "null", ...
Performs the given SQL query calling the given <code>closure</code> with each row of the result set starting at the provided <code>offset</code>, and including up to <code>maxRows</code> number of rows. The row will be a <code>GroovyResultSet</code> which is a <code>ResultSet</code> that supports accessing the fields u...
[ "Performs", "the", "given", "SQL", "query", "calling", "the", "given", "<code", ">", "closure<", "/", "code", ">", "with", "each", "row", "of", "the", "result", "set", "starting", "at", "the", "provided", "<code", ">", "offset<", "/", "code", ">", "and",...
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java#L1445-L1447
cache2k/cache2k
cache2k-api/src/main/java/org/cache2k/Cache2kBuilder.java
Cache2kBuilder.buildForLongKey
@SuppressWarnings("unchecked") public final LongCache<V> buildForLongKey() { Cache2kConfiguration<K,V> cfg = config(); if (cfg.getKeyType().getType() != Long.class) { throw new IllegalArgumentException("Long key type expected, was: " + cfg.getKeyType()); } return (LongCache<V>) CacheManager.PROV...
java
@SuppressWarnings("unchecked") public final LongCache<V> buildForLongKey() { Cache2kConfiguration<K,V> cfg = config(); if (cfg.getKeyType().getType() != Long.class) { throw new IllegalArgumentException("Long key type expected, was: " + cfg.getKeyType()); } return (LongCache<V>) CacheManager.PROV...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "final", "LongCache", "<", "V", ">", "buildForLongKey", "(", ")", "{", "Cache2kConfiguration", "<", "K", ",", "V", ">", "cfg", "=", "config", "(", ")", ";", "if", "(", "cfg", ".", "getKeyType"...
Builds a cache with the specified configuration parameters. The behavior is identical to {@link #build()} except that it checks that the key type is {@code Integer} and casts the created cache to the specialized interface. @throws IllegalArgumentException if a cache of the same name is already active in the cache mana...
[ "Builds", "a", "cache", "with", "the", "specified", "configuration", "parameters", ".", "The", "behavior", "is", "identical", "to", "{", "@link", "#build", "()", "}", "except", "that", "it", "checks", "that", "the", "key", "type", "is", "{", "@code", "Inte...
train
https://github.com/cache2k/cache2k/blob/3c9ccff12608c598c387ec50957089784cc4b618/cache2k-api/src/main/java/org/cache2k/Cache2kBuilder.java#L906-L913
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/lang/URIUtils.java
URIUtils.newURIBuilder
public static StringBuilder newURIBuilder(String scheme, String server, int port) { StringBuilder builder = new StringBuilder(); appendSchemeHostPort(builder, scheme, server, port); return builder; }
java
public static StringBuilder newURIBuilder(String scheme, String server, int port) { StringBuilder builder = new StringBuilder(); appendSchemeHostPort(builder, scheme, server, port); return builder; }
[ "public", "static", "StringBuilder", "newURIBuilder", "(", "String", "scheme", ",", "String", "server", ",", "int", "port", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "appendSchemeHostPort", "(", "builder", ",", "scheme", ...
Create a new URI StringBuilder from the arguments, handling IPv6 host encoding and default ports @param scheme the URI scheme @param server the URI server @param port the URI port @return a StringBuilder containing URI prefix
[ "Create", "a", "new", "URI", "StringBuilder", "from", "the", "arguments", "handling", "IPv6", "host", "encoding", "and", "default", "ports" ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/lang/URIUtils.java#L856-L860
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/NetworkConfig.java
NetworkConfig.setPeerProperties
public void setPeerProperties(String name, Properties properties) throws InvalidArgumentException { setNodeProperties("Peer", name, peers, properties); }
java
public void setPeerProperties(String name, Properties properties) throws InvalidArgumentException { setNodeProperties("Peer", name, peers, properties); }
[ "public", "void", "setPeerProperties", "(", "String", "name", ",", "Properties", "properties", ")", "throws", "InvalidArgumentException", "{", "setNodeProperties", "(", "\"Peer\"", ",", "name", ",", "peers", ",", "properties", ")", ";", "}" ]
Set a specific peer's properties. @param name The name of the peer's property to set. @param properties The properties to set. @throws InvalidArgumentException
[ "Set", "a", "specific", "peer", "s", "properties", "." ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/NetworkConfig.java#L176-L178
thombergs/docx-stamper
src/main/java/org/wickedsource/docxstamper/processor/CommentProcessorRegistry.java
CommentProcessorRegistry.runProcessorsOnInlineContent
private <T> void runProcessorsOnInlineContent(ProxyBuilder<T> proxyBuilder, ParagraphCoordinates paragraphCoordinates) { ParagraphWrapper paragraph = new ParagraphWrapper(paragraphCoordinates.getParagraph()); List<String> processorExpressions = expressionUtil ...
java
private <T> void runProcessorsOnInlineContent(ProxyBuilder<T> proxyBuilder, ParagraphCoordinates paragraphCoordinates) { ParagraphWrapper paragraph = new ParagraphWrapper(paragraphCoordinates.getParagraph()); List<String> processorExpressions = expressionUtil ...
[ "private", "<", "T", ">", "void", "runProcessorsOnInlineContent", "(", "ProxyBuilder", "<", "T", ">", "proxyBuilder", ",", "ParagraphCoordinates", "paragraphCoordinates", ")", "{", "ParagraphWrapper", "paragraph", "=", "new", "ParagraphWrapper", "(", "paragraphCoordinat...
Finds all processor expressions within the specified paragraph and tries to evaluate it against all registered {@link ICommentProcessor}s. @param proxyBuilder a builder for a proxy around the context root object to customize its interface @param paragraphCoordinates the paragraph to process. @param <T> ...
[ "Finds", "all", "processor", "expressions", "within", "the", "specified", "paragraph", "and", "tries", "to", "evaluate", "it", "against", "all", "registered", "{", "@link", "ICommentProcessor", "}", "s", "." ]
train
https://github.com/thombergs/docx-stamper/blob/f1a7e3e92a59abaffac299532fe49450c3b041eb/src/main/java/org/wickedsource/docxstamper/processor/CommentProcessorRegistry.java#L112-L148
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/read/ScanAdapter.java
ScanAdapter.buildFilter
public Filters.Filter buildFilter(Scan scan, ReadHooks hooks) { ChainFilter chain = FILTERS.chain(); Optional<Filters.Filter> familyFilter = createColumnFamilyFilter(scan); if (familyFilter.isPresent()) { chain.filter(familyFilter.get()); } if (scan.getTimeRange() != null && !scan.getTimeRang...
java
public Filters.Filter buildFilter(Scan scan, ReadHooks hooks) { ChainFilter chain = FILTERS.chain(); Optional<Filters.Filter> familyFilter = createColumnFamilyFilter(scan); if (familyFilter.isPresent()) { chain.filter(familyFilter.get()); } if (scan.getTimeRange() != null && !scan.getTimeRang...
[ "public", "Filters", ".", "Filter", "buildFilter", "(", "Scan", "scan", ",", "ReadHooks", "hooks", ")", "{", "ChainFilter", "chain", "=", "FILTERS", ".", "chain", "(", ")", ";", "Optional", "<", "Filters", ".", "Filter", ">", "familyFilter", "=", "createCo...
Given a {@link Scan}, build a {@link Filters.Filter} that include matching columns @param scan a {@link Scan} object. @param hooks a {@link ReadHooks} object. @return a {@link Filters.Filter} object.
[ "Given", "a", "{", "@link", "Scan", "}", "build", "a", "{", "@link", "Filters", ".", "Filter", "}", "that", "include", "matching", "columns" ]
train
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/read/ScanAdapter.java#L117-L138
UrielCh/ovh-java-sdk
ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java
ApiOvhSms.serviceName_senders_sender_DELETE
public void serviceName_senders_sender_DELETE(String serviceName, String sender) throws IOException { String qPath = "/sms/{serviceName}/senders/{sender}"; StringBuilder sb = path(qPath, serviceName, sender); exec(qPath, "DELETE", sb.toString(), null); }
java
public void serviceName_senders_sender_DELETE(String serviceName, String sender) throws IOException { String qPath = "/sms/{serviceName}/senders/{sender}"; StringBuilder sb = path(qPath, serviceName, sender); exec(qPath, "DELETE", sb.toString(), null); }
[ "public", "void", "serviceName_senders_sender_DELETE", "(", "String", "serviceName", ",", "String", "sender", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/sms/{serviceName}/senders/{sender}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", "...
Delete the sms sender given REST: DELETE /sms/{serviceName}/senders/{sender} @param serviceName [required] The internal name of your SMS offer @param sender [required] The sms sender
[ "Delete", "the", "sms", "sender", "given" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java#L210-L214
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/internal/DefaultVelocityEngine.java
DefaultVelocityEngine.restoreTemplateScope
private void restoreTemplateScope(InternalContextAdapterImpl ica, Scope currentTemplateScope) { if (currentTemplateScope.getParent() != null) { ica.put(TEMPLATE_SCOPE_NAME, currentTemplateScope.getParent()); } else if (currentTemplateScope.getReplaced() != null) { ica.put(TEM...
java
private void restoreTemplateScope(InternalContextAdapterImpl ica, Scope currentTemplateScope) { if (currentTemplateScope.getParent() != null) { ica.put(TEMPLATE_SCOPE_NAME, currentTemplateScope.getParent()); } else if (currentTemplateScope.getReplaced() != null) { ica.put(TEM...
[ "private", "void", "restoreTemplateScope", "(", "InternalContextAdapterImpl", "ica", ",", "Scope", "currentTemplateScope", ")", "{", "if", "(", "currentTemplateScope", ".", "getParent", "(", ")", "!=", "null", ")", "{", "ica", ".", "put", "(", "TEMPLATE_SCOPE_NAME...
Restore the previous {@code $template} variable, if any, in the velocity context. @param ica the current velocity context @param currentTemplateScope the current Scope, from which to take the replaced variable
[ "Restore", "the", "previous", "{", "@code", "$template", "}", "variable", "if", "any", "in", "the", "velocity", "context", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/internal/DefaultVelocityEngine.java#L178-L187
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/user/UserRowSync.java
UserRowSync.setRow
public void setRow(long id, TRow row) { lock.lock(); try { RowCondition rowCondition = rows.remove(id); if (rowCondition != null) { rowCondition.row = row; rowCondition.condition.signalAll(); } } finally { lock.unlock(); } }
java
public void setRow(long id, TRow row) { lock.lock(); try { RowCondition rowCondition = rows.remove(id); if (rowCondition != null) { rowCondition.row = row; rowCondition.condition.signalAll(); } } finally { lock.unlock(); } }
[ "public", "void", "setRow", "(", "long", "id", ",", "TRow", "row", ")", "{", "lock", ".", "lock", "(", ")", ";", "try", "{", "RowCondition", "rowCondition", "=", "rows", ".", "remove", "(", "id", ")", ";", "if", "(", "rowCondition", "!=", "null", "...
Set the row id, row, and notify all waiting threads to retrieve the row. @param id user row id @param row user row or null
[ "Set", "the", "row", "id", "row", "and", "notify", "all", "waiting", "threads", "to", "retrieve", "the", "row", "." ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserRowSync.java#L114-L126
Stratio/stratio-cassandra
src/java/org/apache/cassandra/config/Schema.java
Schema.storeKeyspaceInstance
public void storeKeyspaceInstance(Keyspace keyspace) { if (keyspaceInstances.containsKey(keyspace.getName())) throw new IllegalArgumentException(String.format("Keyspace %s was already initialized.", keyspace.getName())); keyspaceInstances.put(keyspace.getName(), keyspace); }
java
public void storeKeyspaceInstance(Keyspace keyspace) { if (keyspaceInstances.containsKey(keyspace.getName())) throw new IllegalArgumentException(String.format("Keyspace %s was already initialized.", keyspace.getName())); keyspaceInstances.put(keyspace.getName(), keyspace); }
[ "public", "void", "storeKeyspaceInstance", "(", "Keyspace", "keyspace", ")", "{", "if", "(", "keyspaceInstances", ".", "containsKey", "(", "keyspace", ".", "getName", "(", ")", ")", ")", "throw", "new", "IllegalArgumentException", "(", "String", ".", "format", ...
Store given Keyspace instance to the schema @param keyspace The Keyspace instance to store @throws IllegalArgumentException if Keyspace is already stored
[ "Store", "given", "Keyspace", "instance", "to", "the", "schema" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/config/Schema.java#L150-L156
alkacon/opencms-core
src/org/opencms/workplace/CmsDialog.java
CmsDialog.dialogButtons
public String dialogButtons(int[] buttons, String[] attributes) { StringBuffer result = new StringBuffer(256); result.append(dialogButtonRow(HTML_START)); for (int i = 0; i < buttons.length; i++) { dialogButtonsHtml(result, buttons[i], attributes[i]); } result.append...
java
public String dialogButtons(int[] buttons, String[] attributes) { StringBuffer result = new StringBuffer(256); result.append(dialogButtonRow(HTML_START)); for (int i = 0; i < buttons.length; i++) { dialogButtonsHtml(result, buttons[i], attributes[i]); } result.append...
[ "public", "String", "dialogButtons", "(", "int", "[", "]", "buttons", ",", "String", "[", "]", "attributes", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", "256", ")", ";", "result", ".", "append", "(", "dialogButtonRow", "(", "HTML_S...
Builds the html for the button row under the dialog content area, including buttons.<p> @param buttons array of constants of which buttons to include in the row @param attributes array of Strings for additional button attributes @return the html for the button row under the dialog content area, including buttons
[ "Builds", "the", "html", "for", "the", "button", "row", "under", "the", "dialog", "content", "area", "including", "buttons", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/CmsDialog.java#L635-L644
autermann/yaml
src/main/java/com/github/autermann/yaml/nodes/YamlMappingNode.java
YamlMappingNode.put
public T put(YamlNode key, BigDecimal value) { return put(key, getNodeFactory().bigDecimalNode(value)); }
java
public T put(YamlNode key, BigDecimal value) { return put(key, getNodeFactory().bigDecimalNode(value)); }
[ "public", "T", "put", "(", "YamlNode", "key", ",", "BigDecimal", "value", ")", "{", "return", "put", "(", "key", ",", "getNodeFactory", "(", ")", ".", "bigDecimalNode", "(", "value", ")", ")", ";", "}" ]
Adds the specified {@code key}/{@code value} pair to this mapping. @param key the key @param value the value @return {@code this}
[ "Adds", "the", "specified", "{", "@code", "key", "}", "/", "{", "@code", "value", "}", "pair", "to", "this", "mapping", "." ]
train
https://github.com/autermann/yaml/blob/5f8ab03e4fec3a2abe72c03561cdaa3a3936634d/src/main/java/com/github/autermann/yaml/nodes/YamlMappingNode.java#L708-L710
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java
BigtableDataClient.readRowAsync
public ApiFuture<Row> readRowAsync(String tableId, String rowKey, @Nullable Filter filter) { return readRowAsync(tableId, ByteString.copyFromUtf8(rowKey), filter); }
java
public ApiFuture<Row> readRowAsync(String tableId, String rowKey, @Nullable Filter filter) { return readRowAsync(tableId, ByteString.copyFromUtf8(rowKey), filter); }
[ "public", "ApiFuture", "<", "Row", ">", "readRowAsync", "(", "String", "tableId", ",", "String", "rowKey", ",", "@", "Nullable", "Filter", "filter", ")", "{", "return", "readRowAsync", "(", "tableId", ",", "ByteString", ".", "copyFromUtf8", "(", "rowKey", ")...
Convenience method for asynchronously reading a single row. If the row does not exist, the future's value will be null. <p>Sample code: <pre>{@code try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) { String tableId = "[TABLE]"; // Build the filter expression Filters.F...
[ "Convenience", "method", "for", "asynchronously", "reading", "a", "single", "row", ".", "If", "the", "row", "does", "not", "exist", "the", "future", "s", "value", "will", "be", "null", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java#L375-L377
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/validation/rules/AttributeConstraintRule.java
AttributeConstraintRule.validateNull
private boolean validateNull(Object validationObject, Annotation annotate) { if (checkNullObject(validationObject)) { return true; } if (!validationObject.equals(null) || validationObject != null) { throwValidationException(((Null) annotate).message()...
java
private boolean validateNull(Object validationObject, Annotation annotate) { if (checkNullObject(validationObject)) { return true; } if (!validationObject.equals(null) || validationObject != null) { throwValidationException(((Null) annotate).message()...
[ "private", "boolean", "validateNull", "(", "Object", "validationObject", ",", "Annotation", "annotate", ")", "{", "if", "(", "checkNullObject", "(", "validationObject", ")", ")", "{", "return", "true", ";", "}", "if", "(", "!", "validationObject", ".", "equals...
Checks whether a given date is that in past or not @param validationObject @param annotate @return
[ "Checks", "whether", "a", "given", "date", "is", "that", "in", "past", "or", "not" ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/validation/rules/AttributeConstraintRule.java#L361-L374
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ExtensionsInner.java
ExtensionsInner.beginCreateAsync
public Observable<Void> beginCreateAsync(String resourceGroupName, String clusterName, String extensionName, ExtensionInner parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, clusterName, extensionName, parameters).map(new Func1<ServiceResponse<Void>, Void>() { @Override ...
java
public Observable<Void> beginCreateAsync(String resourceGroupName, String clusterName, String extensionName, ExtensionInner parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, clusterName, extensionName, parameters).map(new Func1<ServiceResponse<Void>, Void>() { @Override ...
[ "public", "Observable", "<", "Void", ">", "beginCreateAsync", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "extensionName", ",", "ExtensionInner", "parameters", ")", "{", "return", "beginCreateWithServiceResponseAsync", "(", "resource...
Creates an HDInsight cluster extension. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @param extensionName The name of the cluster extension. @param parameters The cluster extensions create request. @throws IllegalArgumentException thrown if parameters fail the va...
[ "Creates", "an", "HDInsight", "cluster", "extension", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ExtensionsInner.java#L634-L641
google/closure-templates
java/src/com/google/template/soy/passes/PluginResolver.java
PluginResolver.nullResolver
public static PluginResolver nullResolver(Mode mode, ErrorReporter reporter) { return new PluginResolver( mode, ImmutableMap.of(), ImmutableMap.of(), ImmutableMap.of(), reporter); }
java
public static PluginResolver nullResolver(Mode mode, ErrorReporter reporter) { return new PluginResolver( mode, ImmutableMap.of(), ImmutableMap.of(), ImmutableMap.of(), reporter); }
[ "public", "static", "PluginResolver", "nullResolver", "(", "Mode", "mode", ",", "ErrorReporter", "reporter", ")", "{", "return", "new", "PluginResolver", "(", "mode", ",", "ImmutableMap", ".", "of", "(", ")", ",", "ImmutableMap", ".", "of", "(", ")", ",", ...
Returns an empty resolver. Useful for tests, or situations where it is known that no plugins will be needed.
[ "Returns", "an", "empty", "resolver", ".", "Useful", "for", "tests", "or", "situations", "where", "it", "is", "known", "that", "no", "plugins", "will", "be", "needed", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/passes/PluginResolver.java#L48-L51
chrisjenx/Calligraphy
calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyContextWrapper.java
CalligraphyContextWrapper.onActivityCreateView
public static View onActivityCreateView(Activity activity, View parent, View view, String name, Context context, AttributeSet attr) { return get(activity).onActivityCreateView(parent, view, name, context, attr); }
java
public static View onActivityCreateView(Activity activity, View parent, View view, String name, Context context, AttributeSet attr) { return get(activity).onActivityCreateView(parent, view, name, context, attr); }
[ "public", "static", "View", "onActivityCreateView", "(", "Activity", "activity", ",", "View", "parent", ",", "View", "view", ",", "String", "name", ",", "Context", "context", ",", "AttributeSet", "attr", ")", "{", "return", "get", "(", "activity", ")", ".", ...
You only need to call this <b>IF</b> you call {@link uk.co.chrisjenx.calligraphy.CalligraphyConfig.Builder#disablePrivateFactoryInjection()} This will need to be called from the {@link android.app.Activity#onCreateView(android.view.View, String, android.content.Context, android.util.AttributeSet)} method to enable view...
[ "You", "only", "need", "to", "call", "this", "<b", ">", "IF<", "/", "b", ">", "you", "call", "{", "@link", "uk", ".", "co", ".", "chrisjenx", ".", "calligraphy", ".", "CalligraphyConfig", ".", "Builder#disablePrivateFactoryInjection", "()", "}", "This", "w...
train
https://github.com/chrisjenx/Calligraphy/blob/085e441954d787bd4ef31f245afe5f2f2a311ea5/calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyContextWrapper.java#L58-L60
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/XmlWriter.java
XmlWriter.writeBlockElement
public void writeBlockElement(String name, Object text) { startBlockElement(name); writeText(text); endBlockElement(name); }
java
public void writeBlockElement(String name, Object text) { startBlockElement(name); writeText(text); endBlockElement(name); }
[ "public", "void", "writeBlockElement", "(", "String", "name", ",", "Object", "text", ")", "{", "startBlockElement", "(", "name", ")", ";", "writeText", "(", "text", ")", ";", "endBlockElement", "(", "name", ")", ";", "}" ]
Convenience method, same as doing a startBlockElement(), writeText(text), endBlockElement().
[ "Convenience", "method", "same", "as", "doing", "a", "startBlockElement", "()", "writeText", "(", "text", ")", "endBlockElement", "()", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/XmlWriter.java#L279-L284
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.clickOnByJs
protected void clickOnByJs(PageElement toClick, Object... args) throws TechnicalException, FailureException { displayMessageAtTheBeginningOfMethod("clickOnByJs: %s in %s", toClick.toString(), toClick.getPage().getApplication()); try { Context.waitUntil(ExpectedConditions.elementToBeClicka...
java
protected void clickOnByJs(PageElement toClick, Object... args) throws TechnicalException, FailureException { displayMessageAtTheBeginningOfMethod("clickOnByJs: %s in %s", toClick.toString(), toClick.getPage().getApplication()); try { Context.waitUntil(ExpectedConditions.elementToBeClicka...
[ "protected", "void", "clickOnByJs", "(", "PageElement", "toClick", ",", "Object", "...", "args", ")", "throws", "TechnicalException", ",", "FailureException", "{", "displayMessageAtTheBeginningOfMethod", "(", "\"clickOnByJs: %s in %s\"", ",", "toClick", ".", "toString", ...
Click on html element by Javascript. @param toClick html element @param args list of arguments to format the found selector with @throws TechnicalException is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi. Exception with {@value com.github.noraui.utils.Messages#FAIL_MESSAGE_UNABLE_...
[ "Click", "on", "html", "element", "by", "Javascript", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L136-L146