repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
selendroid/selendroid
selendroid-server/src/main/java/io/selendroid/server/extension/ExtensionLoader.java
ExtensionLoader.loadHandler
public BaseRequestHandler loadHandler(String handlerClassName, String uri) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { """ Loads a {@link BaseRequestHandler} class from the extension dex. """ Class<? ext...
java
public BaseRequestHandler loadHandler(String handlerClassName, String uri) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { Class<? extends BaseRequestHandler> handlerClass = classLoader.loadClass(handlerClass...
[ "public", "BaseRequestHandler", "loadHandler", "(", "String", "handlerClassName", ",", "String", "uri", ")", "throws", "ClassNotFoundException", ",", "NoSuchMethodException", ",", "IllegalAccessException", ",", "InvocationTargetException", ",", "InstantiationException", "{", ...
Loads a {@link BaseRequestHandler} class from the extension dex.
[ "Loads", "a", "{" ]
train
https://github.com/selendroid/selendroid/blob/a32c1a96c973b80c14a588b1075f084201f7fe94/selendroid-server/src/main/java/io/selendroid/server/extension/ExtensionLoader.java#L110-L119
pravega/pravega
segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/rolling/RollingSegmentHandle.java
RollingSegmentHandle.addChunk
synchronized void addChunk(SegmentChunk segmentChunk, SegmentHandle activeChunkHandle) { """ Adds a new SegmentChunk. @param segmentChunk The SegmentChunk to add. This SegmentChunk must be in continuity of any existing SegmentChunks. @param activeChunkHandle The newly added SegmentChunk's write handle. ...
java
synchronized void addChunk(SegmentChunk segmentChunk, SegmentHandle activeChunkHandle) { Preconditions.checkState(!this.sealed, "Cannot add SegmentChunks for a Sealed Handle."); if (this.segmentChunks.size() > 0) { long expectedOffset = this.segmentChunks.get(this.segmentChunks.size() - 1).g...
[ "synchronized", "void", "addChunk", "(", "SegmentChunk", "segmentChunk", ",", "SegmentHandle", "activeChunkHandle", ")", "{", "Preconditions", ".", "checkState", "(", "!", "this", ".", "sealed", ",", "\"Cannot add SegmentChunks for a Sealed Handle.\"", ")", ";", "if", ...
Adds a new SegmentChunk. @param segmentChunk The SegmentChunk to add. This SegmentChunk must be in continuity of any existing SegmentChunks. @param activeChunkHandle The newly added SegmentChunk's write handle.
[ "Adds", "a", "new", "SegmentChunk", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/rolling/RollingSegmentHandle.java#L179-L194
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java
PatternBox.controlsStateChangeButIsParticipant
public static Pattern controlsStateChangeButIsParticipant() { """ Pattern for a EntityReference has a member PhysicalEntity that is controlling a state change reaction of another EntityReference. This pattern is different from the original controls-state-change. The controller in this case is not modeled as a co...
java
public static Pattern controlsStateChangeButIsParticipant() { Pattern p = new Pattern(SequenceEntityReference.class, "controller ER"); p.add(linkedER(true), "controller ER", "controller generic ER"); p.add(erToPE(), "controller generic ER", "controller simple PE"); p.add(linkToComplex(), "controller simple PE"...
[ "public", "static", "Pattern", "controlsStateChangeButIsParticipant", "(", ")", "{", "Pattern", "p", "=", "new", "Pattern", "(", "SequenceEntityReference", ".", "class", ",", "\"controller ER\"", ")", ";", "p", ".", "add", "(", "linkedER", "(", "true", ")", ",...
Pattern for a EntityReference has a member PhysicalEntity that is controlling a state change reaction of another EntityReference. This pattern is different from the original controls-state-change. The controller in this case is not modeled as a controller, but as a participant of the conversion, and it is at both sides...
[ "Pattern", "for", "a", "EntityReference", "has", "a", "member", "PhysicalEntity", "that", "is", "controlling", "a", "state", "change", "reaction", "of", "another", "EntityReference", ".", "This", "pattern", "is", "different", "from", "the", "original", "controls",...
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L151-L170
lazy-koala/java-toolkit
fast-toolkit/src/main/java/com/thankjava/toolkit/core/utils/TimeUtil.java
TimeUtil.formatDate
public static String formatDate(TimeType timeType, Date date) { """ 格式化日期 <p>Function: formatDate</p> <p>Description: </p> @param timeType @param date @return @author acexy@thankjava.com @date 2015年6月18日 上午10:01:09 @version 1.0 """ return getDateFormat(timeType).format(date); }
java
public static String formatDate(TimeType timeType, Date date) { return getDateFormat(timeType).format(date); }
[ "public", "static", "String", "formatDate", "(", "TimeType", "timeType", ",", "Date", "date", ")", "{", "return", "getDateFormat", "(", "timeType", ")", ".", "format", "(", "date", ")", ";", "}" ]
格式化日期 <p>Function: formatDate</p> <p>Description: </p> @param timeType @param date @return @author acexy@thankjava.com @date 2015年6月18日 上午10:01:09 @version 1.0
[ "格式化日期", "<p", ">", "Function", ":", "formatDate<", "/", "p", ">", "<p", ">", "Description", ":", "<", "/", "p", ">" ]
train
https://github.com/lazy-koala/java-toolkit/blob/f46055fae0cc73049597a3708e515f5c6582d27a/fast-toolkit/src/main/java/com/thankjava/toolkit/core/utils/TimeUtil.java#L86-L88
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/map/feature/Feature.java
Feature.addOneToManyValue
public void addOneToManyValue(String name, AssociationValue value) { """ Set attribute value of given type. @param name attribute name @param value attribute value """ Attribute attribute = getAttributes().get(name); if (!(attribute instanceof OneToManyAttribute)) { throw new IllegalStateException("...
java
public void addOneToManyValue(String name, AssociationValue value) { Attribute attribute = getAttributes().get(name); if (!(attribute instanceof OneToManyAttribute)) { throw new IllegalStateException("Cannot set oneToMany value on attribute with different type, " + attribute.getClass().getName() + " setting...
[ "public", "void", "addOneToManyValue", "(", "String", "name", ",", "AssociationValue", "value", ")", "{", "Attribute", "attribute", "=", "getAttributes", "(", ")", ".", "get", "(", "name", ")", ";", "if", "(", "!", "(", "attribute", "instanceof", "OneToManyA...
Set attribute value of given type. @param name attribute name @param value attribute value
[ "Set", "attribute", "value", "of", "given", "type", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/map/feature/Feature.java#L395-L406
prometheus/client_java
simpleclient_dropwizard/src/main/java/io/prometheus/client/dropwizard/DropwizardExports.java
DropwizardExports.fromSnapshotAndCount
MetricFamilySamples fromSnapshotAndCount(String dropwizardName, Snapshot snapshot, long count, double factor, String helpMessage) { """ Export a histogram snapshot as a prometheus SUMMARY. @param dropwizardName metric name. @param snapshot the histogram snapshot. @param count the total sample c...
java
MetricFamilySamples fromSnapshotAndCount(String dropwizardName, Snapshot snapshot, long count, double factor, String helpMessage) { List<MetricFamilySamples.Sample> samples = Arrays.asList( sampleBuilder.createSample(dropwizardName, "", Arrays.asList("quantile"), Arrays.asList("0.5"), snapshot.g...
[ "MetricFamilySamples", "fromSnapshotAndCount", "(", "String", "dropwizardName", ",", "Snapshot", "snapshot", ",", "long", "count", ",", "double", "factor", ",", "String", "helpMessage", ")", "{", "List", "<", "MetricFamilySamples", ".", "Sample", ">", "samples", "...
Export a histogram snapshot as a prometheus SUMMARY. @param dropwizardName metric name. @param snapshot the histogram snapshot. @param count the total sample count for this snapshot. @param factor a factor to apply to histogram values.
[ "Export", "a", "histogram", "snapshot", "as", "a", "prometheus", "SUMMARY", "." ]
train
https://github.com/prometheus/client_java/blob/4e0e7527b048f1ffd0382dcb74c0b9dab23b4d9f/simpleclient_dropwizard/src/main/java/io/prometheus/client/dropwizard/DropwizardExports.java#L86-L97
duracloud/management-console
account-management-monitor/src/main/java/org/duracloud/account/monitor/duplication/DuplicationMonitor.java
DuplicationMonitor.monitorDuplication
public DuplicationReport monitorDuplication() { """ This method performs the duplication checks. These checks compare the number of content items in identically named spaces. @return DuplicationReport report """ log.info("starting duplication monitor"); DuplicationReport report = new Duplic...
java
public DuplicationReport monitorDuplication() { log.info("starting duplication monitor"); DuplicationReport report = new DuplicationReport(); for (String host : dupHosts.keySet()) { DuplicationInfo info = new DuplicationInfo(host); try { // Connect to sto...
[ "public", "DuplicationReport", "monitorDuplication", "(", ")", "{", "log", ".", "info", "(", "\"starting duplication monitor\"", ")", ";", "DuplicationReport", "report", "=", "new", "DuplicationReport", "(", ")", ";", "for", "(", "String", "host", ":", "dupHosts",...
This method performs the duplication checks. These checks compare the number of content items in identically named spaces. @return DuplicationReport report
[ "This", "method", "performs", "the", "duplication", "checks", ".", "These", "checks", "compare", "the", "number", "of", "content", "items", "in", "identically", "named", "spaces", "." ]
train
https://github.com/duracloud/management-console/blob/7331015c01f9ac5cc5c0aa8ae9a2a1a77e9f4ac6/account-management-monitor/src/main/java/org/duracloud/account/monitor/duplication/DuplicationMonitor.java#L57-L102
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/reflect/RecursiveObjectWriter.java
RecursiveObjectWriter.setProperties
public static void setProperties(Object obj, Map<String, Object> values) { """ Recursively sets values of some (all) object and its subobjects properties. The object can be a user defined object, map or array. Property values correspondently are object properties, map key-pairs or array elements with their in...
java
public static void setProperties(Object obj, Map<String, Object> values) { if (values == null || values.size() == 0) return; for (Map.Entry<String, Object> entry : values.entrySet()) { setProperty(obj, entry.getKey(), entry.getValue()); } }
[ "public", "static", "void", "setProperties", "(", "Object", "obj", ",", "Map", "<", "String", ",", "Object", ">", "values", ")", "{", "if", "(", "values", "==", "null", "||", "values", ".", "size", "(", ")", "==", "0", ")", "return", ";", "for", "(...
Recursively sets values of some (all) object and its subobjects properties. The object can be a user defined object, map or array. Property values correspondently are object properties, map key-pairs or array elements with their indexes. If some properties do not exist or introspection fails they are just silently sk...
[ "Recursively", "sets", "values", "of", "some", "(", "all", ")", "object", "and", "its", "subobjects", "properties", "." ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/reflect/RecursiveObjectWriter.java#L78-L85
pressgang-ccms/PressGangCCMSQuery
src/main/java/org/jboss/pressgang/ccms/filter/utils/JPAUtils.java
JPAUtils.addOrder
public static String addOrder(String queryString, String propertyPath, boolean asc) { """ Add order by clause to queryString @param queryString JPL Query String @param propertyPath Order properti @param asc true if ascending @return JQL Query String with Order clause appened. """ if (S...
java
public static String addOrder(String queryString, String propertyPath, boolean asc) { if (StringUtils.containsIgnoreCase(queryString, "order by")) { return queryString; } StringBuilder sb = new StringBuilder(queryString); sb.append(" ORDER BY "); sb.append(getAlias(...
[ "public", "static", "String", "addOrder", "(", "String", "queryString", ",", "String", "propertyPath", ",", "boolean", "asc", ")", "{", "if", "(", "StringUtils", ".", "containsIgnoreCase", "(", "queryString", ",", "\"order by\"", ")", ")", "{", "return", "quer...
Add order by clause to queryString @param queryString JPL Query String @param propertyPath Order properti @param asc true if ascending @return JQL Query String with Order clause appened.
[ "Add", "order", "by", "clause", "to", "queryString" ]
train
https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/utils/JPAUtils.java#L209-L224
raydac/netbeans-mmd-plugin
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Utils.rescaleImageAndEncodeAsBase64
@Nullable public static String rescaleImageAndEncodeAsBase64(@Nonnull final InputStream in, final int maxSize) throws IOException { """ Load and encode image into Base64. @param in stream to read image @param maxSize max size of image, if less or zero then don't rescale @return null if it was impossible to ...
java
@Nullable public static String rescaleImageAndEncodeAsBase64(@Nonnull final InputStream in, final int maxSize) throws IOException { final Image image = ImageIO.read(in); String result = null; if (image != null) { result = rescaleImageAndEncodeAsBase64(image, maxSize); } return result; }
[ "@", "Nullable", "public", "static", "String", "rescaleImageAndEncodeAsBase64", "(", "@", "Nonnull", "final", "InputStream", "in", ",", "final", "int", "maxSize", ")", "throws", "IOException", "{", "final", "Image", "image", "=", "ImageIO", ".", "read", "(", "...
Load and encode image into Base64. @param in stream to read image @param maxSize max size of image, if less or zero then don't rescale @return null if it was impossible to load image for its format, loaded prepared image @throws IOException if any error during conversion or loading @since 1.4.0
[ "Load", "and", "encode", "image", "into", "Base64", "." ]
train
https://github.com/raydac/netbeans-mmd-plugin/blob/997493d23556a25354372b6419a64a0fbd0ac6ba/mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java#L282-L290
Azure/azure-sdk-for-java
redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/PatchSchedulesInner.java
PatchSchedulesInner.listByRedisResourceAsync
public Observable<Page<RedisPatchScheduleInner>> listByRedisResourceAsync(final String resourceGroupName, final String cacheName) { """ Gets all patch schedules in the specified redis cache (there is only one). @param resourceGroupName The name of the resource group. @param cacheName The name of the Redis cach...
java
public Observable<Page<RedisPatchScheduleInner>> listByRedisResourceAsync(final String resourceGroupName, final String cacheName) { return listByRedisResourceWithServiceResponseAsync(resourceGroupName, cacheName) .map(new Func1<ServiceResponse<Page<RedisPatchScheduleInner>>, Page<RedisPatchScheduleI...
[ "public", "Observable", "<", "Page", "<", "RedisPatchScheduleInner", ">", ">", "listByRedisResourceAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "cacheName", ")", "{", "return", "listByRedisResourceWithServiceResponseAsync", "(", "resourceGr...
Gets all patch schedules in the specified redis cache (there is only one). @param resourceGroupName The name of the resource group. @param cacheName The name of the Redis cache. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;RedisPatchScheduleInner&...
[ "Gets", "all", "patch", "schedules", "in", "the", "specified", "redis", "cache", "(", "there", "is", "only", "one", ")", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/PatchSchedulesInner.java#L137-L145
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/photos/PhotosInterface.java
PhotosInterface.setContentType
public void setContentType(String photoId, String contentType) throws FlickrException { """ Set the content type of a photo. This method requires authentication with 'write' permission. @see com.flickr4java.flickr.Flickr#CONTENTTYPE_PHOTO @see com.flickr4java.flickr.Flickr#CONTENTTYPE_SCREENSHOT @see com.f...
java
public void setContentType(String photoId, String contentType) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_SET_CONTENTTYPE); parameters.put("photo_id", photoId); parameters.put("content_type", contentType)...
[ "public", "void", "setContentType", "(", "String", "photoId", ",", "String", "contentType", ")", "throws", "FlickrException", "{", "Map", "<", "String", ",", "Object", ">", "parameters", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ")", "...
Set the content type of a photo. This method requires authentication with 'write' permission. @see com.flickr4java.flickr.Flickr#CONTENTTYPE_PHOTO @see com.flickr4java.flickr.Flickr#CONTENTTYPE_SCREENSHOT @see com.flickr4java.flickr.Flickr#CONTENTTYPE_OTHER @param photoId The photo ID @param contentType The contentTy...
[ "Set", "the", "content", "type", "of", "a", "photo", "." ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/PhotosInterface.java#L1136-L1147
networknt/light-4j
metrics/src/main/java/io/dropwizard/metrics/InstrumentedExecutors.java
InstrumentedExecutors.newFixedThreadPool
public static InstrumentedExecutorService newFixedThreadPool( int nThreads, ThreadFactory threadFactory, MetricRegistry registry, String name) { """ Creates an instrumented thread pool that reuses a fixed number of threads operating off a shared unbounded queue, using the provided ThreadFactory to cr...
java
public static InstrumentedExecutorService newFixedThreadPool( int nThreads, ThreadFactory threadFactory, MetricRegistry registry, String name) { return new InstrumentedExecutorService(Executors.newFixedThreadPool(nThreads, threadFactory), registry, name); }
[ "public", "static", "InstrumentedExecutorService", "newFixedThreadPool", "(", "int", "nThreads", ",", "ThreadFactory", "threadFactory", ",", "MetricRegistry", "registry", ",", "String", "name", ")", "{", "return", "new", "InstrumentedExecutorService", "(", "Executors", ...
Creates an instrumented thread pool that reuses a fixed number of threads operating off a shared unbounded queue, using the provided ThreadFactory to create new threads when needed. At any point, at most {@code nThreads} threads will be active processing tasks. If additional tasks are submitted when all threads are a...
[ "Creates", "an", "instrumented", "thread", "pool", "that", "reuses", "a", "fixed", "number", "of", "threads", "operating", "off", "a", "shared", "unbounded", "queue", "using", "the", "provided", "ThreadFactory", "to", "create", "new", "threads", "when", "needed"...
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/metrics/src/main/java/io/dropwizard/metrics/InstrumentedExecutors.java#L107-L110
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/connectionmanager/ccm/Context.java
Context.switchConnectionListener
void switchConnectionListener(Object c, ConnectionListener from, ConnectionListener to) { """ Switch the connection listener for a connection @param c The connection @param from The from connection listener @param to The to connection listener """ if (clToC != null && clToC.get(from) != null && clToC....
java
void switchConnectionListener(Object c, ConnectionListener from, ConnectionListener to) { if (clToC != null && clToC.get(from) != null && clToC.get(to) != null) { clToC.get(from).remove(c); clToC.get(to).add(c); } }
[ "void", "switchConnectionListener", "(", "Object", "c", ",", "ConnectionListener", "from", ",", "ConnectionListener", "to", ")", "{", "if", "(", "clToC", "!=", "null", "&&", "clToC", ".", "get", "(", "from", ")", "!=", "null", "&&", "clToC", ".", "get", ...
Switch the connection listener for a connection @param c The connection @param from The from connection listener @param to The to connection listener
[ "Switch", "the", "connection", "listener", "for", "a", "connection" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/connectionmanager/ccm/Context.java#L164-L171
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/graph/Weight.java
Weight.max
public static Weight max(Weight w1, Weight w2) { """ Gets the larger of the two given weights. @param w1 a weight. Cannot be <code>null</code>. @param w2 a weight. Cannot be <code>null</code>. @return a weight. """ if (w1 == null) { throw new IllegalArgumentException("Argument w1 can...
java
public static Weight max(Weight w1, Weight w2) { if (w1 == null) { throw new IllegalArgumentException("Argument w1 cannot be null"); } if (w2 == null) { throw new IllegalArgumentException("Argument w2 cannot be null"); } if ((w1.isInfinity && w1.posOrNeg) ...
[ "public", "static", "Weight", "max", "(", "Weight", "w1", ",", "Weight", "w2", ")", "{", "if", "(", "w1", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Argument w1 cannot be null\"", ")", ";", "}", "if", "(", "w2", "==", "nu...
Gets the larger of the two given weights. @param w1 a weight. Cannot be <code>null</code>. @param w2 a weight. Cannot be <code>null</code>. @return a weight.
[ "Gets", "the", "larger", "of", "the", "two", "given", "weights", "." ]
train
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/graph/Weight.java#L280-L297
groundupworks/wings
wings-facebook/src/main/java/com/groundupworks/wings/facebook/FacebookEndpoint.java
FacebookEndpoint.requestAccounts
boolean requestAccounts(Callback callback) { """ Asynchronously requests the Page accounts associated with the linked account. Requires an opened active {@link Session}. @param callback a {@link Callback} when the request completes. @return true if the request is made; false if no opened {@link Session} is act...
java
boolean requestAccounts(Callback callback) { boolean isSuccessful = false; Session session = Session.getActiveSession(); if (session != null && session.isOpened()) { // Construct fields to request. Bundle params = new Bundle(); params.putString(ACCOUNTS_LISTI...
[ "boolean", "requestAccounts", "(", "Callback", "callback", ")", "{", "boolean", "isSuccessful", "=", "false", ";", "Session", "session", "=", "Session", ".", "getActiveSession", "(", ")", ";", "if", "(", "session", "!=", "null", "&&", "session", ".", "isOpen...
Asynchronously requests the Page accounts associated with the linked account. Requires an opened active {@link Session}. @param callback a {@link Callback} when the request completes. @return true if the request is made; false if no opened {@link Session} is active.
[ "Asynchronously", "requests", "the", "Page", "accounts", "associated", "with", "the", "linked", "account", ".", "Requires", "an", "opened", "active", "{", "@link", "Session", "}", "." ]
train
https://github.com/groundupworks/wings/blob/03d2827c30ef55f2db4e23f7500e016c7771fa39/wings-facebook/src/main/java/com/groundupworks/wings/facebook/FacebookEndpoint.java#L675-L691
OpenLiberty/open-liberty
dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/ws/JoblogUtil.java
JoblogUtil.logToJobLogAndTraceOnly
@Trivial public static void logToJobLogAndTraceOnly(Level level, String msg, Object[] params, Logger traceLogger) { """ Logs the message to joblog and trace. If level > FINE, this method will reduce the level to FINE while logging to trace to prevent the message to be logged in console.log and messages.log fi...
java
@Trivial public static void logToJobLogAndTraceOnly(Level level, String msg, Object[] params, Logger traceLogger){ String formattedMsg = getFormattedMessage(msg, params, "Job event."); logRawMsgToJobLogAndTraceOnly(level, formattedMsg, traceLogger); }
[ "@", "Trivial", "public", "static", "void", "logToJobLogAndTraceOnly", "(", "Level", "level", ",", "String", "msg", ",", "Object", "[", "]", "params", ",", "Logger", "traceLogger", ")", "{", "String", "formattedMsg", "=", "getFormattedMessage", "(", "msg", ","...
Logs the message to joblog and trace. If level > FINE, this method will reduce the level to FINE while logging to trace to prevent the message to be logged in console.log and messages.log file Joblog messages will be logged as per original logging level Use this method when you don't want a very verbose stack in mes...
[ "Logs", "the", "message", "to", "joblog", "and", "trace", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/ws/JoblogUtil.java#L50-L54
apache/incubator-gobblin
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowConfigResourceLocalHandler.java
FlowConfigResourceLocalHandler.createFlowConfig
public CreateResponse createFlowConfig(FlowConfig flowConfig, boolean triggerListener) throws FlowConfigLoggedException { """ Add flowConfig locally and trigger all listeners iff @param triggerListener is set to true """ log.info("[GAAS-REST] Create called with flowGroup " + flowConfig.getId().getFlowGroup...
java
public CreateResponse createFlowConfig(FlowConfig flowConfig, boolean triggerListener) throws FlowConfigLoggedException { log.info("[GAAS-REST] Create called with flowGroup " + flowConfig.getId().getFlowGroup() + " flowName " + flowConfig.getId().getFlowName()); if (flowConfig.hasExplain()) { //Return Er...
[ "public", "CreateResponse", "createFlowConfig", "(", "FlowConfig", "flowConfig", ",", "boolean", "triggerListener", ")", "throws", "FlowConfigLoggedException", "{", "log", ".", "info", "(", "\"[GAAS-REST] Create called with flowGroup \"", "+", "flowConfig", ".", "getId", ...
Add flowConfig locally and trigger all listeners iff @param triggerListener is set to true
[ "Add", "flowConfig", "locally", "and", "trigger", "all", "listeners", "iff" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowConfigResourceLocalHandler.java#L109-L127
SonarSource/sonarqube
server/sonar-server/src/main/java/org/sonar/server/qualityprofile/RegisterQualityProfiles.java
RegisterQualityProfiles.renameOutdatedProfiles
private void renameOutdatedProfiles(DbSession dbSession, BuiltInQProfile profile) { """ The Quality profiles created by users should be renamed when they have the same name as the built-in profile to be persisted. <p> When upgrading from < 6.5 , all existing profiles are considered as "custom" (created by user...
java
private void renameOutdatedProfiles(DbSession dbSession, BuiltInQProfile profile) { Collection<String> uuids = dbClient.qualityProfileDao().selectUuidsOfCustomRulesProfiles(dbSession, profile.getLanguage(), profile.getName()); if (uuids.isEmpty()) { return; } Profiler profiler = Profiler.createIfD...
[ "private", "void", "renameOutdatedProfiles", "(", "DbSession", "dbSession", ",", "BuiltInQProfile", "profile", ")", "{", "Collection", "<", "String", ">", "uuids", "=", "dbClient", ".", "qualityProfileDao", "(", ")", ".", "selectUuidsOfCustomRulesProfiles", "(", "db...
The Quality profiles created by users should be renamed when they have the same name as the built-in profile to be persisted. <p> When upgrading from < 6.5 , all existing profiles are considered as "custom" (created by users) because the concept of built-in profile is not persisted. The "Sonar way" profiles are renamed...
[ "The", "Quality", "profiles", "created", "by", "users", "should", "be", "renamed", "when", "they", "have", "the", "same", "name", "as", "the", "built", "-", "in", "profile", "to", "be", "persisted", ".", "<p", ">", "When", "upgrading", "from", "<", "6", ...
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/RegisterQualityProfiles.java#L137-L147
UrielCh/ovh-java-sdk
ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java
ApiOvhVps.serviceName_snapshot_PUT
public void serviceName_snapshot_PUT(String serviceName, OvhSnapshot body) throws IOException { """ Alter this object properties REST: PUT /vps/{serviceName}/snapshot @param body [required] New object properties @param serviceName [required] The internal name of your VPS offer """ String qPath = "/vps/{...
java
public void serviceName_snapshot_PUT(String serviceName, OvhSnapshot body) throws IOException { String qPath = "/vps/{serviceName}/snapshot"; StringBuilder sb = path(qPath, serviceName); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "serviceName_snapshot_PUT", "(", "String", "serviceName", ",", "OvhSnapshot", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/vps/{serviceName}/snapshot\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "service...
Alter this object properties REST: PUT /vps/{serviceName}/snapshot @param body [required] New object properties @param serviceName [required] The internal name of your VPS offer
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java#L1116-L1120
Waikato/moa
moa/src/main/java/moa/gui/visualization/GraphScatter.java
GraphScatter.scatter
private void scatter(Graphics g, int i) { """ Paint a dot onto the panel. @param g graphics object @param i index of the varied parameter """ int height = getHeight(); int width = getWidth(); int x = (int)(((this.variedParamValues[i] - this.lower_x_value) / (this.upper_x_value - this.lower_x...
java
private void scatter(Graphics g, int i) { int height = getHeight(); int width = getWidth(); int x = (int)(((this.variedParamValues[i] - this.lower_x_value) / (this.upper_x_value - this.lower_x_value)) * width); double value = this.measures[i].getLastValue(this.measureSelected); if(Doub...
[ "private", "void", "scatter", "(", "Graphics", "g", ",", "int", "i", ")", "{", "int", "height", "=", "getHeight", "(", ")", ";", "int", "width", "=", "getWidth", "(", ")", ";", "int", "x", "=", "(", "int", ")", "(", "(", "(", "this", ".", "vari...
Paint a dot onto the panel. @param g graphics object @param i index of the varied parameter
[ "Paint", "a", "dot", "onto", "the", "panel", "." ]
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/gui/visualization/GraphScatter.java#L76-L100
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/message/MapMessage.java
MapMessage.forEach
public <CV, S> void forEach(final TriConsumer<String, ? super CV, S> action, final S state) { """ Performs the given action for each key-value pair in this data structure until all entries have been processed or the action throws an exception. <p> The third parameter lets callers pass in a stateful object to be...
java
public <CV, S> void forEach(final TriConsumer<String, ? super CV, S> action, final S state) { data.forEach(action, state); }
[ "public", "<", "CV", ",", "S", ">", "void", "forEach", "(", "final", "TriConsumer", "<", "String", ",", "?", "super", "CV", ",", "S", ">", "action", ",", "final", "S", "state", ")", "{", "data", ".", "forEach", "(", "action", ",", "state", ")", "...
Performs the given action for each key-value pair in this data structure until all entries have been processed or the action throws an exception. <p> The third parameter lets callers pass in a stateful object to be modified with the key-value pairs, so the TriConsumer implementation itself can be stateless and potentia...
[ "Performs", "the", "given", "action", "for", "each", "key", "-", "value", "pair", "in", "this", "data", "structure", "until", "all", "entries", "have", "been", "processed", "or", "the", "action", "throws", "an", "exception", ".", "<p", ">", "The", "third",...
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/MapMessage.java#L298-L300
alkacon/opencms-core
src/org/opencms/ui/sitemap/CmsLocaleComparePanel.java
CmsLocaleComparePanel.showHeader
private void showHeader() throws CmsException { """ Shows the header for the currently selected sitemap root.<p> @throws CmsException if something goes wrong """ CmsSitemapUI ui = (CmsSitemapUI)A_CmsUI.get(); String title = null; String description = null; String path = null...
java
private void showHeader() throws CmsException { CmsSitemapUI ui = (CmsSitemapUI)A_CmsUI.get(); String title = null; String description = null; String path = null; String locale = m_rootLocale.toString(); CmsObject cms = A_CmsUI.getCmsObject(); CmsResource targetR...
[ "private", "void", "showHeader", "(", ")", "throws", "CmsException", "{", "CmsSitemapUI", "ui", "=", "(", "CmsSitemapUI", ")", "A_CmsUI", ".", "get", "(", ")", ";", "String", "title", "=", "null", ";", "String", "description", "=", "null", ";", "String", ...
Shows the header for the currently selected sitemap root.<p> @throws CmsException if something goes wrong
[ "Shows", "the", "header", "for", "the", "currently", "selected", "sitemap", "root", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/sitemap/CmsLocaleComparePanel.java#L438-L464
apache/groovy
subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java
DateTimeExtensions.offsetFieldValue
private static int offsetFieldValue(ZoneOffset offset, TemporalField field) { """ Returns the value of the provided field for the ZoneOffset as if the ZoneOffset's hours/minutes/seconds were reckoned as a LocalTime. """ int offsetSeconds = offset.getTotalSeconds(); int value = LocalTime.ofSeco...
java
private static int offsetFieldValue(ZoneOffset offset, TemporalField field) { int offsetSeconds = offset.getTotalSeconds(); int value = LocalTime.ofSecondOfDay(Math.abs(offsetSeconds)).get(field); return offsetSeconds < 0 ? value * -1 : value; }
[ "private", "static", "int", "offsetFieldValue", "(", "ZoneOffset", "offset", ",", "TemporalField", "field", ")", "{", "int", "offsetSeconds", "=", "offset", ".", "getTotalSeconds", "(", ")", ";", "int", "value", "=", "LocalTime", ".", "ofSecondOfDay", "(", "Ma...
Returns the value of the provided field for the ZoneOffset as if the ZoneOffset's hours/minutes/seconds were reckoned as a LocalTime.
[ "Returns", "the", "value", "of", "the", "provided", "field", "for", "the", "ZoneOffset", "as", "if", "the", "ZoneOffset", "s", "hours", "/", "minutes", "/", "seconds", "were", "reckoned", "as", "a", "LocalTime", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java#L1885-L1889
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/util/Util.java
Util.getThemeColorFromAttrOrRes
public static int getThemeColorFromAttrOrRes(Context ctx, int attr, int res) { """ helper method to get the color by attr (if defined in the style) or by resource. @param ctx @param attr attribute that defines the color @param res color resource id @return """ int color = getThemeColor(ctx, attr); /...
java
public static int getThemeColorFromAttrOrRes(Context ctx, int attr, int res) { int color = getThemeColor(ctx, attr); // If this color is not styled, use the default from the resource if (color == 0) { color = ContextCompat.getColor(ctx, res); } return color; }
[ "public", "static", "int", "getThemeColorFromAttrOrRes", "(", "Context", "ctx", ",", "int", "attr", ",", "int", "res", ")", "{", "int", "color", "=", "getThemeColor", "(", "ctx", ",", "attr", ")", ";", "// If this color is not styled, use the default from the resour...
helper method to get the color by attr (if defined in the style) or by resource. @param ctx @param attr attribute that defines the color @param res color resource id @return
[ "helper", "method", "to", "get", "the", "color", "by", "attr", "(", "if", "defined", "in", "the", "style", ")", "or", "by", "resource", "." ]
train
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/util/Util.java#L427-L434
katharsis-project/katharsis-framework
katharsis-rs/src/main/java/io/katharsis/rs/JsonApiResponseFilter.java
JsonApiResponseFilter.filter
@Override public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException { """ Creates JSON API responses for custom JAX-RS actions returning Katharsis resources. """ Object response = responseContext.getEntity(); if (response == null) { return; ...
java
@Override public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException { Object response = responseContext.getEntity(); if (response == null) { return; } // only modify responses which contain a single or a list of Katharsis resources if (isRes...
[ "@", "Override", "public", "void", "filter", "(", "ContainerRequestContext", "requestContext", ",", "ContainerResponseContext", "responseContext", ")", "throws", "IOException", "{", "Object", "response", "=", "responseContext", ".", "getEntity", "(", ")", ";", "if", ...
Creates JSON API responses for custom JAX-RS actions returning Katharsis resources.
[ "Creates", "JSON", "API", "responses", "for", "custom", "JAX", "-", "RS", "actions", "returning", "Katharsis", "resources", "." ]
train
https://github.com/katharsis-project/katharsis-framework/blob/73d1a8763c49c5cf4643d43e2dbfedb647630c46/katharsis-rs/src/main/java/io/katharsis/rs/JsonApiResponseFilter.java#L37-L70
seam/faces
impl/src/main/java/org/jboss/seam/faces/view/SeamViewHandler.java
SeamViewHandler.getViewDeclarationLanguage
@Override public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId) { """ If non-null, wrap the {@link ViewDeclarationLanguage} returned by the delegate in a new {@link SeamViewDeclarationLanguage} instance. """ ViewDeclarationLanguage vdl = delegate.getViewDec...
java
@Override public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId) { ViewDeclarationLanguage vdl = delegate.getViewDeclarationLanguage(context, viewId); if (vdl != null) { return new SeamViewDeclarationLanguage(vdl); } else { retu...
[ "@", "Override", "public", "ViewDeclarationLanguage", "getViewDeclarationLanguage", "(", "FacesContext", "context", ",", "String", "viewId", ")", "{", "ViewDeclarationLanguage", "vdl", "=", "delegate", ".", "getViewDeclarationLanguage", "(", "context", ",", "viewId", ")...
If non-null, wrap the {@link ViewDeclarationLanguage} returned by the delegate in a new {@link SeamViewDeclarationLanguage} instance.
[ "If", "non", "-", "null", "wrap", "the", "{" ]
train
https://github.com/seam/faces/blob/2fdedbc7070318c2c58bfffb8a26f1ea1d0ee1e3/impl/src/main/java/org/jboss/seam/faces/view/SeamViewHandler.java#L42-L50
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/svm/PegasosK.java
PegasosK.setRegularization
public void setRegularization(double regularization) { """ Sets the amount of regularization to apply. The regularization must be a positive value @param regularization the amount of regularization to apply """ if(Double.isNaN(regularization) || Double.isInfinite(regularization) || regularization <= ...
java
public void setRegularization(double regularization) { if(Double.isNaN(regularization) || Double.isInfinite(regularization) || regularization <= 0) throw new ArithmeticException("Regularization must be a positive constant, not " + regularization); this.regularization = regularization; ...
[ "public", "void", "setRegularization", "(", "double", "regularization", ")", "{", "if", "(", "Double", ".", "isNaN", "(", "regularization", ")", "||", "Double", ".", "isInfinite", "(", "regularization", ")", "||", "regularization", "<=", "0", ")", "throw", "...
Sets the amount of regularization to apply. The regularization must be a positive value @param regularization the amount of regularization to apply
[ "Sets", "the", "amount", "of", "regularization", "to", "apply", ".", "The", "regularization", "must", "be", "a", "positive", "value" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/svm/PegasosK.java#L107-L112
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeReturn
private Status executeReturn(Stmt.Return stmt, CallStack frame, EnclosingScope scope) { """ Execute a Return statement at a given point in the function or method body @param stmt --- The return statement to execute @param frame --- The current stack frame @return """ // We know that a return statemen...
java
private Status executeReturn(Stmt.Return stmt, CallStack frame, EnclosingScope scope) { // We know that a return statement can only appear in either a function // or method declaration. It cannot appear, for example, in a type // declaration. Therefore, the enclosing declaration is a function or // method. De...
[ "private", "Status", "executeReturn", "(", "Stmt", ".", "Return", "stmt", ",", "CallStack", "frame", ",", "EnclosingScope", "scope", ")", "{", "// We know that a return statement can only appear in either a function", "// or method declaration. It cannot appear, for example, in a t...
Execute a Return statement at a given point in the function or method body @param stmt --- The return statement to execute @param frame --- The current stack frame @return
[ "Execute", "a", "Return", "statement", "at", "a", "given", "point", "in", "the", "function", "or", "method", "body" ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L445-L457
googleapis/google-cloud-java
google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Value.java
Value.int64Array
public static Value int64Array(@Nullable long[] v, int pos, int length) { """ Returns an {@code ARRAY<INT64>} value that takes its elements from a region of an array. @param v the source of element values, which may be null to produce a value for which {@code isNull()} is {@code true} @param pos the start pos...
java
public static Value int64Array(@Nullable long[] v, int pos, int length) { return int64ArrayFactory.create(v, pos, length); }
[ "public", "static", "Value", "int64Array", "(", "@", "Nullable", "long", "[", "]", "v", ",", "int", "pos", ",", "int", "length", ")", "{", "return", "int64ArrayFactory", ".", "create", "(", "v", ",", "pos", ",", "length", ")", ";", "}" ]
Returns an {@code ARRAY<INT64>} value that takes its elements from a region of an array. @param v the source of element values, which may be null to produce a value for which {@code isNull()} is {@code true} @param pos the start position of {@code v} to copy values from. Ignored if {@code v} is {@code null}. @param le...
[ "Returns", "an", "{", "@code", "ARRAY<INT64", ">", "}", "value", "that", "takes", "its", "elements", "from", "a", "region", "of", "an", "array", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Value.java#L238-L240
apereo/cas
core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/RegisteredServiceAccessStrategyUtils.java
RegisteredServiceAccessStrategyUtils.ensurePrincipalAccessIsAllowedForService
static void ensurePrincipalAccessIsAllowedForService(final Service service, final RegisteredService registeredService, final String principalId, fina...
java
static void ensurePrincipalAccessIsAllowedForService(final Service service, final RegisteredService registeredService, final String principalId, fina...
[ "static", "void", "ensurePrincipalAccessIsAllowedForService", "(", "final", "Service", "service", ",", "final", "RegisteredService", "registeredService", ",", "final", "String", "principalId", ",", "final", "Map", "<", "String", ",", "Object", ">", "attributes", ")", ...
Ensure principal access is allowed for service. @param service the service @param registeredService the registered service @param principalId the principal id @param attributes the attributes
[ "Ensure", "principal", "access", "is", "allowed", "for", "service", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/RegisteredServiceAccessStrategyUtils.java#L96-L110
threerings/nenya
core/src/main/java/com/threerings/cast/ComponentClass.java
ComponentClass.getRenderPriority
public int getRenderPriority (String action, String component, int orientation) { """ Returns the render priority appropriate for the specified action, orientation and component. """ // because we expect there to be relatively few priority overrides, we simply search // linearly through the li...
java
public int getRenderPriority (String action, String component, int orientation) { // because we expect there to be relatively few priority overrides, we simply search // linearly through the list for the closest match int ocount = (_overrides != null) ? _overrides.size() : 0; for (in...
[ "public", "int", "getRenderPriority", "(", "String", "action", ",", "String", "component", ",", "int", "orientation", ")", "{", "// because we expect there to be relatively few priority overrides, we simply search", "// linearly through the list for the closest match", "int", "ocou...
Returns the render priority appropriate for the specified action, orientation and component.
[ "Returns", "the", "render", "priority", "appropriate", "for", "the", "specified", "action", "orientation", "and", "component", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/cast/ComponentClass.java#L159-L174
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/WebConfigParamUtils.java
WebConfigParamUtils.getLongInitParameter
public static long getLongInitParameter(ExternalContext context, String[] names, long defaultValue) { """ Gets the long init parameter value from the specified context. If the parameter was not specified, the default value is used instead. @param context the application's external context @param names the i...
java
public static long getLongInitParameter(ExternalContext context, String[] names, long defaultValue) { if (names == null) { throw new NullPointerException(); } String param = null; for (String name : names) { if (name == null) ...
[ "public", "static", "long", "getLongInitParameter", "(", "ExternalContext", "context", ",", "String", "[", "]", "names", ",", "long", "defaultValue", ")", "{", "if", "(", "names", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";",...
Gets the long init parameter value from the specified context. If the parameter was not specified, the default value is used instead. @param context the application's external context @param names the init parameter's names @param defaultValue the default value to return in case the parameter was not set @return the ...
[ "Gets", "the", "long", "init", "parameter", "value", "from", "the", "specified", "context", ".", "If", "the", "parameter", "was", "not", "specified", "the", "default", "value", "is", "used", "instead", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/WebConfigParamUtils.java#L638-L667
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/Utils.java
Utils.makeComparatorForIndexUse
public Comparator<Doc> makeComparatorForIndexUse() { """ A comparator for index file presentations, and are sorted as follows: 1. sort on simple names of entities 2. if equal, then compare the DocKind ex: Package, Interface etc. 3a. if equal and if the type is of ExecutableMemberDoc(Constructor, Methods), a ca...
java
public Comparator<Doc> makeComparatorForIndexUse() { return new Utils.DocComparator<Doc>() { /** * Compare two given Doc entities, first sort on names, then on the kinds, * then on the parameters only if the type is an instance of ExecutableMemberDocs, * the pa...
[ "public", "Comparator", "<", "Doc", ">", "makeComparatorForIndexUse", "(", ")", "{", "return", "new", "Utils", ".", "DocComparator", "<", "Doc", ">", "(", ")", "{", "/**\n * Compare two given Doc entities, first sort on names, then on the kinds,\n * th...
A comparator for index file presentations, and are sorted as follows: 1. sort on simple names of entities 2. if equal, then compare the DocKind ex: Package, Interface etc. 3a. if equal and if the type is of ExecutableMemberDoc(Constructor, Methods), a case insensitive comparison of parameter the type signatures 3b. if ...
[ "A", "comparator", "for", "index", "file", "presentations", "and", "are", "sorted", "as", "follows", ":", "1", ".", "sort", "on", "simple", "names", "of", "entities", "2", ".", "if", "equal", "then", "compare", "the", "DocKind", "ex", ":", "Package", "In...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/Utils.java#L840-L876
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/util/Bundle.java
Bundle.getString
public static String getString(String aKey, Object arg) { """ Returns the string specified by aKey from the errors.properties bundle. @param aKey The key for the message pattern in the bundle. @param arg The arg to use in the message format. """ return getString(aKey,new Object[]{arg}); }
java
public static String getString(String aKey, Object arg) { return getString(aKey,new Object[]{arg}); }
[ "public", "static", "String", "getString", "(", "String", "aKey", ",", "Object", "arg", ")", "{", "return", "getString", "(", "aKey", ",", "new", "Object", "[", "]", "{", "arg", "}", ")", ";", "}" ]
Returns the string specified by aKey from the errors.properties bundle. @param aKey The key for the message pattern in the bundle. @param arg The arg to use in the message format.
[ "Returns", "the", "string", "specified", "by", "aKey", "from", "the", "errors", ".", "properties", "bundle", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/util/Bundle.java#L66-L69
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/files/FileUtilities.java
FileUtilities.writeFile
public static void writeFile( List<String> lines, File file ) throws IOException { """ Write a list of lines to a file. @param lines the list of lines to write. @param file the file to write to. @throws IOException """ try (BufferedWriter bw = new BufferedWriter(new FileWriter(file))) { ...
java
public static void writeFile( List<String> lines, File file ) throws IOException { try (BufferedWriter bw = new BufferedWriter(new FileWriter(file))) { for( String line : lines ) { bw.write(line); bw.write("\n"); //$NON-NLS-1$ } } }
[ "public", "static", "void", "writeFile", "(", "List", "<", "String", ">", "lines", ",", "File", "file", ")", "throws", "IOException", "{", "try", "(", "BufferedWriter", "bw", "=", "new", "BufferedWriter", "(", "new", "FileWriter", "(", "file", ")", ")", ...
Write a list of lines to a file. @param lines the list of lines to write. @param file the file to write to. @throws IOException
[ "Write", "a", "list", "of", "lines", "to", "a", "file", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/files/FileUtilities.java#L245-L252
apereo/cas
support/cas-server-support-saml-mdui/src/main/java/org/apereo/cas/support/saml/mdui/web/flow/SamlMetadataUIParserAction.java
SamlMetadataUIParserAction.loadSamlMetadataIntoRequestContext
protected void loadSamlMetadataIntoRequestContext(final RequestContext requestContext, final String entityId, final RegisteredService registeredService) { """ Load saml metadata into request context. @param requestContext the request context @param entityId the entity id @param registeredService t...
java
protected void loadSamlMetadataIntoRequestContext(final RequestContext requestContext, final String entityId, final RegisteredService registeredService) { LOGGER.debug("Locating SAML MDUI for entity [{}]", entityId); val mdui = MetadataUIUtils.locateMetadataUserInterfaceForEntityId( this.met...
[ "protected", "void", "loadSamlMetadataIntoRequestContext", "(", "final", "RequestContext", "requestContext", ",", "final", "String", "entityId", ",", "final", "RegisteredService", "registeredService", ")", "{", "LOGGER", ".", "debug", "(", "\"Locating SAML MDUI for entity [...
Load saml metadata into request context. @param requestContext the request context @param entityId the entity id @param registeredService the registered service
[ "Load", "saml", "metadata", "into", "request", "context", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-mdui/src/main/java/org/apereo/cas/support/saml/mdui/web/flow/SamlMetadataUIParserAction.java#L75-L81
andriusvelykis/reflow-maven-skin
reflow-velocity-tools/src/main/java/lt/velykis/maven/skins/reflow/HtmlTool.java
HtmlTool.adaptSlug
private static String adaptSlug(String input, String separator) { """ Creates a slug but does not change capitalization. @param input @param separator @return """ String nowhitespace = WHITESPACE.matcher(input).replaceAll(separator); String normalized = Normalizer.normalize(nowhitespace, Form.NFD); ...
java
private static String adaptSlug(String input, String separator) { String nowhitespace = WHITESPACE.matcher(input).replaceAll(separator); String normalized = Normalizer.normalize(nowhitespace, Form.NFD); return NONLATIN.matcher(normalized).replaceAll(""); }
[ "private", "static", "String", "adaptSlug", "(", "String", "input", ",", "String", "separator", ")", "{", "String", "nowhitespace", "=", "WHITESPACE", ".", "matcher", "(", "input", ")", ".", "replaceAll", "(", "separator", ")", ";", "String", "normalized", "...
Creates a slug but does not change capitalization. @param input @param separator @return
[ "Creates", "a", "slug", "but", "does", "not", "change", "capitalization", "." ]
train
https://github.com/andriusvelykis/reflow-maven-skin/blob/01170ae1426a1adfe7cc9c199e77aaa2ecb37ef2/reflow-velocity-tools/src/main/java/lt/velykis/maven/skins/reflow/HtmlTool.java#L1157-L1161
symphonyoss/messageml-utils
src/main/java/org/symphonyoss/symphony/messageml/util/XmlPrintStream.java
XmlPrintStream.printElement
public void printElement(String name, String value, String... attributes) { """ Output an element with the given content (value). The opening and closing tags are output in a single operation. @param name Name of the element. @param value Contents of the element. @param attributes Alternate names and values of...
java
public void printElement(String name, String value, String... attributes) { startElement(name, attributes); if (value != null) { println(">" + escape(value) + "</" + name + ">"); } else { println("/>"); } outdent(); }
[ "public", "void", "printElement", "(", "String", "name", ",", "String", "value", ",", "String", "...", "attributes", ")", "{", "startElement", "(", "name", ",", "attributes", ")", ";", "if", "(", "value", "!=", "null", ")", "{", "println", "(", "\">\"", ...
Output an element with the given content (value). The opening and closing tags are output in a single operation. @param name Name of the element. @param value Contents of the element. @param attributes Alternate names and values of attributes for the element.
[ "Output", "an", "element", "with", "the", "given", "content", "(", "value", ")", ".", "The", "opening", "and", "closing", "tags", "are", "output", "in", "a", "single", "operation", "." ]
train
https://github.com/symphonyoss/messageml-utils/blob/68daed66267062d144a05b3ee9a9bf4b715e3f95/src/main/java/org/symphonyoss/symphony/messageml/util/XmlPrintStream.java#L120-L124
doanduyhai/Achilles
achilles-core/src/main/java/info/archinnov/achilles/internals/dsl/raw/TypedQuery.java
TypedQuery.withResultSetAsyncListener
public TypedQuery<ENTITY> withResultSetAsyncListener(Function<ResultSet, ResultSet> resultSetAsyncListener) { """ Add the given async listener on the {@link com.datastax.driver.core.ResultSet} object. Example of usage: <pre class="code"><code class="java"> .withResultSetAsyncListener(resultSet -> { //Do some...
java
public TypedQuery<ENTITY> withResultSetAsyncListener(Function<ResultSet, ResultSet> resultSetAsyncListener) { this.options.setResultSetAsyncListeners(Optional.of(asList(resultSetAsyncListener))); return this; }
[ "public", "TypedQuery", "<", "ENTITY", ">", "withResultSetAsyncListener", "(", "Function", "<", "ResultSet", ",", "ResultSet", ">", "resultSetAsyncListener", ")", "{", "this", ".", "options", ".", "setResultSetAsyncListeners", "(", "Optional", ".", "of", "(", "asL...
Add the given async listener on the {@link com.datastax.driver.core.ResultSet} object. Example of usage: <pre class="code"><code class="java"> .withResultSetAsyncListener(resultSet -> { //Do something with the resultSet object here }) </code></pre> Remark: <strong>it is not allowed to consume the ResultSet values. I...
[ "Add", "the", "given", "async", "listener", "on", "the", "{", "@link", "com", ".", "datastax", ".", "driver", ".", "core", ".", "ResultSet", "}", "object", ".", "Example", "of", "usage", ":", "<pre", "class", "=", "code", ">", "<code", "class", "=", ...
train
https://github.com/doanduyhai/Achilles/blob/8281c33100e72c993e570592ae1a5306afac6813/achilles-core/src/main/java/info/archinnov/achilles/internals/dsl/raw/TypedQuery.java#L101-L104
diffplug/durian
src/com/diffplug/common/base/Either.java
Either.acceptBoth
public final void acceptBoth(Consumer<? super L> left, Consumer<? super R> right, L defaultLeft, R defaultRight) { """ Accepts both the left and right consumers, using the default values to set the empty side. """ left.accept(isLeft() ? getLeft() : defaultLeft); right.accept(isRight() ? getRight() : defaul...
java
public final void acceptBoth(Consumer<? super L> left, Consumer<? super R> right, L defaultLeft, R defaultRight) { left.accept(isLeft() ? getLeft() : defaultLeft); right.accept(isRight() ? getRight() : defaultRight); }
[ "public", "final", "void", "acceptBoth", "(", "Consumer", "<", "?", "super", "L", ">", "left", ",", "Consumer", "<", "?", "super", "R", ">", "right", ",", "L", "defaultLeft", ",", "R", "defaultRight", ")", "{", "left", ".", "accept", "(", "isLeft", "...
Accepts both the left and right consumers, using the default values to set the empty side.
[ "Accepts", "both", "the", "left", "and", "right", "consumers", "using", "the", "default", "values", "to", "set", "the", "empty", "side", "." ]
train
https://github.com/diffplug/durian/blob/10631a3480e5491eb6eb6ee06e752d8596914232/src/com/diffplug/common/base/Either.java#L104-L107
grails/grails-core
grails-core/src/main/groovy/org/grails/transaction/TransactionManagerPostProcessor.java
TransactionManagerPostProcessor.postProcessAfterInstantiation
@Override public boolean postProcessAfterInstantiation(Object bean, String name) throws BeansException { """ Injects the platform transaction manager into the given bean if that bean implements the {@link grails.transaction.TransactionManagerAware} interface. @param bean The bean to process. @param name The...
java
@Override public boolean postProcessAfterInstantiation(Object bean, String name) throws BeansException { if (bean instanceof TransactionManagerAware) { initialize(); if(transactionManager != null) { TransactionManagerAware tma = (TransactionManagerAware) bean; ...
[ "@", "Override", "public", "boolean", "postProcessAfterInstantiation", "(", "Object", "bean", ",", "String", "name", ")", "throws", "BeansException", "{", "if", "(", "bean", "instanceof", "TransactionManagerAware", ")", "{", "initialize", "(", ")", ";", "if", "(...
Injects the platform transaction manager into the given bean if that bean implements the {@link grails.transaction.TransactionManagerAware} interface. @param bean The bean to process. @param name The name of the bean. @return The bean after the transaction manager has been injected. @throws BeansException
[ "Injects", "the", "platform", "transaction", "manager", "into", "the", "given", "bean", "if", "that", "bean", "implements", "the", "{" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/transaction/TransactionManagerPostProcessor.java#L64-L74
ManfredTremmel/gwt-bean-validators
gwtp-spring-integration/src/main/super/de/knightsoftnet/gwtp/spring/supersource/org/springframework/data/domain/Sort.java
Sort.withDirection
private Sort withDirection(final Direction direction) { """ Creates a new {@link Sort} with the current setup but the given order direction. @param direction @return """ return Sort.by(orders.stream().map(it -> new Order(direction, it.getProperty())) .collect(Collectors.toList())); }
java
private Sort withDirection(final Direction direction) { return Sort.by(orders.stream().map(it -> new Order(direction, it.getProperty())) .collect(Collectors.toList())); }
[ "private", "Sort", "withDirection", "(", "final", "Direction", "direction", ")", "{", "return", "Sort", ".", "by", "(", "orders", ".", "stream", "(", ")", ".", "map", "(", "it", "->", "new", "Order", "(", "direction", ",", "it", ".", "getProperty", "("...
Creates a new {@link Sort} with the current setup but the given order direction. @param direction @return
[ "Creates", "a", "new", "{", "@link", "Sort", "}", "with", "the", "current", "setup", "but", "the", "given", "order", "direction", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwtp-spring-integration/src/main/super/de/knightsoftnet/gwtp/spring/supersource/org/springframework/data/domain/Sort.java#L328-L332
hawkular/hawkular-commons
hawkular-command-gateway/hawkular-command-gateway-war/src/main/java/org/hawkular/cmdgw/command/ws/server/AbstractGatewayWebSocket.java
AbstractGatewayWebSocket.onMessage
@OnMessage public void onMessage(String nameAndJsonStr, Session session) { """ When a message is received from a WebSocket client, this method will lookup the {@link WsCommand} for the given request class and execute it. @param nameAndJsonStr the name of the API request followed by "=" followed then by the...
java
@OnMessage public void onMessage(String nameAndJsonStr, Session session) { String requestClassName = "?"; try { // parse the JSON and get its message POJO BasicMessageWithExtraData<BasicMessage> request = new ApiDeserializer().deserialize(nameAndJsonStr); requestC...
[ "@", "OnMessage", "public", "void", "onMessage", "(", "String", "nameAndJsonStr", ",", "Session", "session", ")", "{", "String", "requestClassName", "=", "\"?\"", ";", "try", "{", "// parse the JSON and get its message POJO", "BasicMessageWithExtraData", "<", "BasicMess...
When a message is received from a WebSocket client, this method will lookup the {@link WsCommand} for the given request class and execute it. @param nameAndJsonStr the name of the API request followed by "=" followed then by the request's JSON data @param session the client session making the request
[ "When", "a", "message", "is", "received", "from", "a", "WebSocket", "client", "this", "method", "will", "lookup", "the", "{", "@link", "WsCommand", "}", "for", "the", "given", "request", "class", "and", "execute", "it", "." ]
train
https://github.com/hawkular/hawkular-commons/blob/e4a832862b3446d7f4d629bb05790f2df578e035/hawkular-command-gateway/hawkular-command-gateway-war/src/main/java/org/hawkular/cmdgw/command/ws/server/AbstractGatewayWebSocket.java#L140-L156
elki-project/elki
elki-core/src/main/java/de/lmu/ifi/dbs/elki/result/ResultUtil.java
ResultUtil.removeRecursive
public static void removeRecursive(ResultHierarchy hierarchy, Result child) { """ Recursively remove a result and its children. @param hierarchy Result hierarchy @param child Result to remove """ for(It<Result> iter = hierarchy.iterParents(child); iter.valid(); iter.advance()) { hierarchy.remove(...
java
public static void removeRecursive(ResultHierarchy hierarchy, Result child) { for(It<Result> iter = hierarchy.iterParents(child); iter.valid(); iter.advance()) { hierarchy.remove(iter.get(), child); } for(It<Result> iter = hierarchy.iterChildren(child); iter.valid(); iter.advance()) { removeRecu...
[ "public", "static", "void", "removeRecursive", "(", "ResultHierarchy", "hierarchy", ",", "Result", "child", ")", "{", "for", "(", "It", "<", "Result", ">", "iter", "=", "hierarchy", ".", "iterParents", "(", "child", ")", ";", "iter", ".", "valid", "(", "...
Recursively remove a result and its children. @param hierarchy Result hierarchy @param child Result to remove
[ "Recursively", "remove", "a", "result", "and", "its", "children", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core/src/main/java/de/lmu/ifi/dbs/elki/result/ResultUtil.java#L188-L195
twilio/authy-java
src/main/java/com/authy/AuthyUtil.java
AuthyUtil.validateSignatureForPost
public static boolean validateSignatureForPost(String body, Map<String, String> headers, String url, String apiKey) throws OneTouchException, UnsupportedEncodingException { """ Validates the request information to @param body The body of the request in case of a POST method @param headers The headers of the...
java
public static boolean validateSignatureForPost(String body, Map<String, String> headers, String url, String apiKey) throws OneTouchException, UnsupportedEncodingException { HashMap<String, String> params = new HashMap<>(); if (body == null || body.isEmpty()) throw new OneTouchException("'PAR...
[ "public", "static", "boolean", "validateSignatureForPost", "(", "String", "body", ",", "Map", "<", "String", ",", "String", ">", "headers", ",", "String", "url", ",", "String", "apiKey", ")", "throws", "OneTouchException", ",", "UnsupportedEncodingException", "{",...
Validates the request information to @param body The body of the request in case of a POST method @param headers The headers of the request @param url The url of the request. @param apiKey the security token from the authy library @return true if the signature ios valid, false otherwise @throws com.authy.OneTo...
[ "Validates", "the", "request", "information", "to" ]
train
https://github.com/twilio/authy-java/blob/55e3a5ff57a93b3eb36f5b59e8824e60af2b8b91/src/main/java/com/authy/AuthyUtil.java#L183-L189
beihaifeiwu/dolphin
dolphin-common/src/main/java/com/freetmp/common/annotation/AnnotationUtils.java
AnnotationUtils.isAnnotationDeclaredLocally
public static boolean isAnnotationDeclaredLocally(Class<? extends Annotation> annotationType, Class<?> clazz) { """ Determine whether an annotation for the specified {@code annotationType} is declared locally on the supplied {@code clazz}. The supplied {@link Class} may represent any type. <p>Note: This method ...
java
public static boolean isAnnotationDeclaredLocally(Class<? extends Annotation> annotationType, Class<?> clazz) { Assert.notNull(annotationType, "Annotation type must not be null"); Assert.notNull(clazz, "Class must not be null"); boolean declaredLocally = false; try { for (Annotation ann : clazz.getDeclaredAn...
[ "public", "static", "boolean", "isAnnotationDeclaredLocally", "(", "Class", "<", "?", "extends", "Annotation", ">", "annotationType", ",", "Class", "<", "?", ">", "clazz", ")", "{", "Assert", ".", "notNull", "(", "annotationType", ",", "\"Annotation type must not ...
Determine whether an annotation for the specified {@code annotationType} is declared locally on the supplied {@code clazz}. The supplied {@link Class} may represent any type. <p>Note: This method does <strong>not</strong> determine if the annotation is {@linkplain java.lang.annotation.Inherited inherited}. For greater ...
[ "Determine", "whether", "an", "annotation", "for", "the", "specified", "{" ]
train
https://github.com/beihaifeiwu/dolphin/blob/b100579cc6986dce5eba5593ebb5fbae7bad9d1a/dolphin-common/src/main/java/com/freetmp/common/annotation/AnnotationUtils.java#L471-L488
Azure/azure-sdk-for-java
iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java
IotHubResourcesInner.getKeysForKeyName
public SharedAccessSignatureAuthorizationRuleInner getKeysForKeyName(String resourceGroupName, String resourceName, String keyName) { """ Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. Get a shared access policy by...
java
public SharedAccessSignatureAuthorizationRuleInner getKeysForKeyName(String resourceGroupName, String resourceName, String keyName) { return getKeysForKeyNameWithServiceResponseAsync(resourceGroupName, resourceName, keyName).toBlocking().single().body(); }
[ "public", "SharedAccessSignatureAuthorizationRuleInner", "getKeysForKeyName", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "String", "keyName", ")", "{", "return", "getKeysForKeyNameWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceNa...
Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. @param resourceGroupName ...
[ "Get", "a", "shared", "access", "policy", "by", "name", "from", "an", "IoT", "hub", ".", "For", "more", "information", "see", ":", "https", ":", "//", "docs", ".", "microsoft", ".", "com", "/", "azure", "/", "iot", "-", "hub", "/", "iot", "-", "hub...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java#L2970-L2972
ralscha/extclassgenerator
src/main/java/ch/rasc/extclassgenerator/ModelGenerator.java
ModelGenerator.createModel
public static ModelBean createModel(Class<?> clazz, IncludeValidation includeValidation) { """ Instrospects the provided class and creates a {@link ModelBean} instance. A program could customize this and call {@link #generateJavascript(ModelBean, OutputFormat, boolean)} or {@link #writeModel(HttpServletReque...
java
public static ModelBean createModel(Class<?> clazz, IncludeValidation includeValidation) { OutputConfig outputConfig = new OutputConfig(); outputConfig.setIncludeValidation(includeValidation); return createModel(clazz, outputConfig); }
[ "public", "static", "ModelBean", "createModel", "(", "Class", "<", "?", ">", "clazz", ",", "IncludeValidation", "includeValidation", ")", "{", "OutputConfig", "outputConfig", "=", "new", "OutputConfig", "(", ")", ";", "outputConfig", ".", "setIncludeValidation", "...
Instrospects the provided class and creates a {@link ModelBean} instance. A program could customize this and call {@link #generateJavascript(ModelBean, OutputFormat, boolean)} or {@link #writeModel(HttpServletRequest, HttpServletResponse, ModelBean, OutputFormat)} to create the JS code. Models are being cached. A secon...
[ "Instrospects", "the", "provided", "class", "and", "creates", "a", "{", "@link", "ModelBean", "}", "instance", ".", "A", "program", "could", "customize", "this", "and", "call", "{", "@link", "#generateJavascript", "(", "ModelBean", "OutputFormat", "boolean", ")"...
train
https://github.com/ralscha/extclassgenerator/blob/6f106cf5ca83ef004225a3512e2291dfd028cf07/src/main/java/ch/rasc/extclassgenerator/ModelGenerator.java#L212-L217
Bandwidth/java-bandwidth
src/main/java/com/bandwidth/sdk/model/Error.java
Error.get
public static Error get(final BandwidthClient client, final String id) throws Exception { """ Factory method for Error. Returns Error object from id. @param client the client @param id error id @return information about one user error @throws IOException unexpected error. """ final String errorsUri...
java
public static Error get(final BandwidthClient client, final String id) throws Exception { final String errorsUri = client.getUserResourceInstanceUri(BandwidthConstants.ERRORS_URI_PATH, id); final JSONObject jsonObject = toJSONObject(client.get(errorsUri, null)); return new Error(client, errorsU...
[ "public", "static", "Error", "get", "(", "final", "BandwidthClient", "client", ",", "final", "String", "id", ")", "throws", "Exception", "{", "final", "String", "errorsUri", "=", "client", ".", "getUserResourceInstanceUri", "(", "BandwidthConstants", ".", "ERRORS_...
Factory method for Error. Returns Error object from id. @param client the client @param id error id @return information about one user error @throws IOException unexpected error.
[ "Factory", "method", "for", "Error", ".", "Returns", "Error", "object", "from", "id", "." ]
train
https://github.com/Bandwidth/java-bandwidth/blob/2124c85148ad6a54d2f2949cb952eb3985830e2a/src/main/java/com/bandwidth/sdk/model/Error.java#L38-L43
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_outplanNotification_POST
public OvhConsumptionThreshold billingAccount_outplanNotification_POST(String billingAccount, OvhOutplanNotificationBlockEnum block, String notifyEmail, Double percentage) throws IOException { """ Add an outplan notification on the billing account REST: POST /telephony/{billingAccount}/outplanNotification @par...
java
public OvhConsumptionThreshold billingAccount_outplanNotification_POST(String billingAccount, OvhOutplanNotificationBlockEnum block, String notifyEmail, Double percentage) throws IOException { String qPath = "/telephony/{billingAccount}/outplanNotification"; StringBuilder sb = path(qPath, billingAccount); HashMap...
[ "public", "OvhConsumptionThreshold", "billingAccount_outplanNotification_POST", "(", "String", "billingAccount", ",", "OvhOutplanNotificationBlockEnum", "block", ",", "String", "notifyEmail", ",", "Double", "percentage", ")", "throws", "IOException", "{", "String", "qPath", ...
Add an outplan notification on the billing account REST: POST /telephony/{billingAccount}/outplanNotification @param percentage [required] The notification percentage of maximum outplan @param block [required] The blocking type of the associate lines @param notifyEmail [required] Override the nichandle email for this ...
[ "Add", "an", "outplan", "notification", "on", "the", "billing", "account" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L8328-L8337
GenesysPureEngage/provisioning-client-java
src/main/java/com/genesys/internal/provisioning/api/UsersApi.java
UsersApi.updateUserWithHttpInfo
public ApiResponse<ApiSuccessResponse> updateUserWithHttpInfo(String dbid, UpdateUserData updateUserData) throws ApiException { """ Update a user. Update a user ([CfgPerson](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgPerson)) with the specified attributes. @param dbid The user&#39;s DBI...
java
public ApiResponse<ApiSuccessResponse> updateUserWithHttpInfo(String dbid, UpdateUserData updateUserData) throws ApiException { com.squareup.okhttp.Call call = updateUserValidateBeforeCall(dbid, updateUserData, null, null); Type localVarReturnType = new TypeToken<ApiSuccessResponse>(){}.getType(); ...
[ "public", "ApiResponse", "<", "ApiSuccessResponse", ">", "updateUserWithHttpInfo", "(", "String", "dbid", ",", "UpdateUserData", "updateUserData", ")", "throws", "ApiException", "{", "com", ".", "squareup", ".", "okhttp", ".", "Call", "call", "=", "updateUserValidat...
Update a user. Update a user ([CfgPerson](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgPerson)) with the specified attributes. @param dbid The user&#39;s DBID. (required) @param updateUserData Update user data (required) @return ApiResponse&lt;ApiSuccessResponse&gt; @throws ApiException If fail ...
[ "Update", "a", "user", ".", "Update", "a", "user", "(", "[", "CfgPerson", "]", "(", "https", ":", "//", "docs", ".", "genesys", ".", "com", "/", "Documentation", "/", "PSDK", "/", "latest", "/", "ConfigLayerRef", "/", "CfgPerson", "))", "with", "the", ...
train
https://github.com/GenesysPureEngage/provisioning-client-java/blob/1ad594c3767cec83052168e350994f922a26f75e/src/main/java/com/genesys/internal/provisioning/api/UsersApi.java#L813-L817
gosu-lang/gosu-lang
gosu-core-api/src/main/java/gw/util/GosuStringUtil.java
GosuStringUtil.getNestedString
public static String getNestedString(String str, String open, String close) { """ <p>Gets the String that is nested in between two Strings. Only the first match is returned.</p> <p>A <code>null</code> input String returns <code>null</code>. A <code>null</code> open/close returns <code>null</code> (no match). ...
java
public static String getNestedString(String str, String open, String close) { return substringBetween(str, open, close); }
[ "public", "static", "String", "getNestedString", "(", "String", "str", ",", "String", "open", ",", "String", "close", ")", "{", "return", "substringBetween", "(", "str", ",", "open", ",", "close", ")", ";", "}" ]
<p>Gets the String that is nested in between two Strings. Only the first match is returned.</p> <p>A <code>null</code> input String returns <code>null</code>. A <code>null</code> open/close returns <code>null</code> (no match). An empty ("") open/close returns an empty string.</p> <pre> GosuStringUtil.getNestedString...
[ "<p", ">", "Gets", "the", "String", "that", "is", "nested", "in", "between", "two", "Strings", ".", "Only", "the", "first", "match", "is", "returned", ".", "<", "/", "p", ">" ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/util/GosuStringUtil.java#L2051-L2053
3redronin/mu-server
src/main/java/io/muserver/MediaTypeParser.java
MediaTypeParser.fromString
public static MediaType fromString(String value) { """ Converts a string such as "text/plain" into a MediaType object. @param value The value to parse @return A MediaType object """ if (value == null) { throw new NullPointerException("value"); } List<ParameterizedHeaderWit...
java
public static MediaType fromString(String value) { if (value == null) { throw new NullPointerException("value"); } List<ParameterizedHeaderWithValue> headerValues = ParameterizedHeaderWithValue.fromString(value); if (headerValues.isEmpty()) { throw new IllegalArgu...
[ "public", "static", "MediaType", "fromString", "(", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"value\"", ")", ";", "}", "List", "<", "ParameterizedHeaderWithValue", ">", "headerValue...
Converts a string such as "text/plain" into a MediaType object. @param value The value to parse @return A MediaType object
[ "Converts", "a", "string", "such", "as", "text", "/", "plain", "into", "a", "MediaType", "object", "." ]
train
https://github.com/3redronin/mu-server/blob/51598606a3082a121fbd785348ee9770b40308e6/src/main/java/io/muserver/MediaTypeParser.java#L22-L36
DDTH/ddth-dlock
ddth-dlock-core/src/main/java/com/github/ddth/dlock/impl/AbstractDLockFactory.java
AbstractDLockFactory.createAndInitLockInstance
protected AbstractDLock createAndInitLockInstance(String name, Properties lockProps) { """ Create and initializes an {@link IDLock} instance, ready for use. @param name @param lockProps @return """ AbstractDLock lock = createLockInternal(name, lockProps); lock.init(); return lock; ...
java
protected AbstractDLock createAndInitLockInstance(String name, Properties lockProps) { AbstractDLock lock = createLockInternal(name, lockProps); lock.init(); return lock; }
[ "protected", "AbstractDLock", "createAndInitLockInstance", "(", "String", "name", ",", "Properties", "lockProps", ")", "{", "AbstractDLock", "lock", "=", "createLockInternal", "(", "name", ",", "lockProps", ")", ";", "lock", ".", "init", "(", ")", ";", "return",...
Create and initializes an {@link IDLock} instance, ready for use. @param name @param lockProps @return
[ "Create", "and", "initializes", "an", "{", "@link", "IDLock", "}", "instance", "ready", "for", "use", "." ]
train
https://github.com/DDTH/ddth-dlock/blob/56786c61a04fe505556a834133b3de36562c6cb6/ddth-dlock-core/src/main/java/com/github/ddth/dlock/impl/AbstractDLockFactory.java#L141-L145
Azure/azure-sdk-for-java
eventhubs/data-plane/azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/EventProcessorHost.java
EventProcessorHost.registerEventProcessorFactory
public CompletableFuture<Void> registerEventProcessorFactory(IEventProcessorFactory<?> factory, EventProcessorOptions processorOptions) { """ Register user-supplied event processor factory and start processing. <p> This overload takes user-specified options. <p> The returned CompletableFuture completes when ho...
java
public CompletableFuture<Void> registerEventProcessorFactory(IEventProcessorFactory<?> factory, EventProcessorOptions processorOptions) { if (this.unregistered != null) { throw new IllegalStateException("Register cannot be called on an EventProcessorHost after unregister. Please create a new EventPr...
[ "public", "CompletableFuture", "<", "Void", ">", "registerEventProcessorFactory", "(", "IEventProcessorFactory", "<", "?", ">", "factory", ",", "EventProcessorOptions", "processorOptions", ")", "{", "if", "(", "this", ".", "unregistered", "!=", "null", ")", "{", "...
Register user-supplied event processor factory and start processing. <p> This overload takes user-specified options. <p> The returned CompletableFuture completes when host initialization is finished. Initialization failures are reported by completing the future with an exception, so it is important to call get() on the...
[ "Register", "user", "-", "supplied", "event", "processor", "factory", "and", "start", "processing", ".", "<p", ">", "This", "overload", "takes", "user", "-", "specified", "options", ".", "<p", ">", "The", "returned", "CompletableFuture", "completes", "when", "...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventhubs/data-plane/azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/EventProcessorHost.java#L464-L492
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/quantiles/DoublesUpdateImpl.java
DoublesUpdateImpl.getRequiredItemCapacity
static int getRequiredItemCapacity(final int k, final long newN) { """ This only increases the size and does not touch or move any data. """ final int numLevelsNeeded = Util.computeNumLevelsNeeded(k, newN); if (numLevelsNeeded == 0) { // don't need any levels yet, and might have small base buffer...
java
static int getRequiredItemCapacity(final int k, final long newN) { final int numLevelsNeeded = Util.computeNumLevelsNeeded(k, newN); if (numLevelsNeeded == 0) { // don't need any levels yet, and might have small base buffer; this can happen during a merge return 2 * k; } // from here on we n...
[ "static", "int", "getRequiredItemCapacity", "(", "final", "int", "k", ",", "final", "long", "newN", ")", "{", "final", "int", "numLevelsNeeded", "=", "Util", ".", "computeNumLevelsNeeded", "(", "k", ",", "newN", ")", ";", "if", "(", "numLevelsNeeded", "==", ...
This only increases the size and does not touch or move any data.
[ "This", "only", "increases", "the", "size", "and", "does", "not", "touch", "or", "move", "any", "data", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/quantiles/DoublesUpdateImpl.java#L27-L38
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java
TasksImpl.listNextAsync
public ServiceFuture<List<CloudTask>> listNextAsync(final String nextPageLink, final ServiceFuture<List<CloudTask>> serviceFuture, final ListOperationCallback<CloudTask> serviceCallback) { """ Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinity...
java
public ServiceFuture<List<CloudTask>> listNextAsync(final String nextPageLink, final ServiceFuture<List<CloudTask>> serviceFuture, final ListOperationCallback<CloudTask> serviceCallback) { return AzureServiceFuture.fromHeaderPageResponse( listNextSinglePageAsync(nextPageLink), new Func1<...
[ "public", "ServiceFuture", "<", "List", "<", "CloudTask", ">", ">", "listNextAsync", "(", "final", "String", "nextPageLink", ",", "final", "ServiceFuture", "<", "List", "<", "CloudTask", ">", ">", "serviceFuture", ",", "final", "ListOperationCallback", "<", "Clo...
Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks. @param nextPageLink The NextLink from the previous successful call to List...
[ "Lists", "all", "of", "the", "tasks", "that", "are", "associated", "with", "the", "specified", "job", ".", "For", "multi", "-", "instance", "tasks", "information", "such", "as", "affinityId", "executionInfo", "and", "nodeInfo", "refer", "to", "the", "primary",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java#L2343-L2353
deeplearning4j/deeplearning4j
datavec/datavec-arrow/src/main/java/org/datavec/arrow/ArrowConverter.java
ArrowConverter.fromEntry
public static Writable fromEntry(int item,FieldVector from,ColumnType columnType) { """ Based on an input {@link ColumnType} get an entry from a {@link FieldVector} @param item the row of the item to get from the column vector @param from the column vector from @param columnType the column type @return the ...
java
public static Writable fromEntry(int item,FieldVector from,ColumnType columnType) { if(from.getValueCount() < item) { throw new IllegalArgumentException("Index specified greater than the number of items in the vector with length " + from.getValueCount()); } switch(columnType) { ...
[ "public", "static", "Writable", "fromEntry", "(", "int", "item", ",", "FieldVector", "from", ",", "ColumnType", "columnType", ")", "{", "if", "(", "from", ".", "getValueCount", "(", ")", "<", "item", ")", "{", "throw", "new", "IllegalArgumentException", "(",...
Based on an input {@link ColumnType} get an entry from a {@link FieldVector} @param item the row of the item to get from the column vector @param from the column vector from @param columnType the column type @return the resulting writable
[ "Based", "on", "an", "input", "{", "@link", "ColumnType", "}", "get", "an", "entry", "from", "a", "{", "@link", "FieldVector", "}" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-arrow/src/main/java/org/datavec/arrow/ArrowConverter.java#L1193-L1229
openengsb/openengsb
api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java
TransformationDescription.replaceField
public void replaceField(String sourceField, String targetField, String oldString, String newString) { """ Adds a replace step to the transformation description. The source and the target field need to be of String type. Performs standard string replacement on the string of the source field and writes the result ...
java
public void replaceField(String sourceField, String targetField, String oldString, String newString) { TransformationStep step = new TransformationStep(); step.setSourceFields(sourceField); step.setTargetField(targetField); step.setOperationParameter(TransformationConstants.REPLACE_OLD_P...
[ "public", "void", "replaceField", "(", "String", "sourceField", ",", "String", "targetField", ",", "String", "oldString", ",", "String", "newString", ")", "{", "TransformationStep", "step", "=", "new", "TransformationStep", "(", ")", ";", "step", ".", "setSource...
Adds a replace step to the transformation description. The source and the target field need to be of String type. Performs standard string replacement on the string of the source field and writes the result to the target field.
[ "Adds", "a", "replace", "step", "to", "the", "transformation", "description", ".", "The", "source", "and", "the", "target", "field", "need", "to", "be", "of", "String", "type", ".", "Performs", "standard", "string", "replacement", "on", "the", "string", "of"...
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java#L215-L223
fuinorg/objects4j
src/main/java/org/fuin/objects4j/ui/TableColumnInfo.java
TableColumnInfo.create
public static TableColumnInfo create(@NotNull final Field field, @NotNull final Locale locale) { """ Return the table column information for a given field. @param field Field to check for <code>@TableColumn</code> and <code>@Label</code> annotations. @param locale Locale to use. @return Information or <co...
java
public static TableColumnInfo create(@NotNull final Field field, @NotNull final Locale locale) { Contract.requireArgNotNull("field", field); Contract.requireArgNotNull("locale", locale); final TableColumn tableColumn = field.getAnnotation(TableColumn.class); if (tableColumn == nu...
[ "public", "static", "TableColumnInfo", "create", "(", "@", "NotNull", "final", "Field", "field", ",", "@", "NotNull", "final", "Locale", "locale", ")", "{", "Contract", ".", "requireArgNotNull", "(", "\"field\"", ",", "field", ")", ";", "Contract", ".", "req...
Return the table column information for a given field. @param field Field to check for <code>@TableColumn</code> and <code>@Label</code> annotations. @param locale Locale to use. @return Information or <code>null</code>.
[ "Return", "the", "table", "column", "information", "for", "a", "given", "field", "." ]
train
https://github.com/fuinorg/objects4j/blob/e7f278b5bae073ebb6a76053650571c718f36246/src/main/java/org/fuin/objects4j/ui/TableColumnInfo.java#L241-L281
logic-ng/LogicNG
src/main/java/org/logicng/solvers/maxsat/encodings/Encoding.java
Encoding.addBinaryClause
void addBinaryClause(final MiniSatStyleSolver s, int a, int b) { """ Adds a binary clause to the given SAT solver. @param s the sat solver @param a the first literal @param b the second literal """ this.addBinaryClause(s, a, b, LIT_UNDEF); }
java
void addBinaryClause(final MiniSatStyleSolver s, int a, int b) { this.addBinaryClause(s, a, b, LIT_UNDEF); }
[ "void", "addBinaryClause", "(", "final", "MiniSatStyleSolver", "s", ",", "int", "a", ",", "int", "b", ")", "{", "this", ".", "addBinaryClause", "(", "s", ",", "a", ",", "b", ",", "LIT_UNDEF", ")", ";", "}" ]
Adds a binary clause to the given SAT solver. @param s the sat solver @param a the first literal @param b the second literal
[ "Adds", "a", "binary", "clause", "to", "the", "given", "SAT", "solver", "." ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/maxsat/encodings/Encoding.java#L107-L109
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listWorkerPoolSkusWithServiceResponseAsync
public Observable<ServiceResponse<Page<SkuInfoInner>>> listWorkerPoolSkusWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName) { """ Get available SKUs for scaling a worker pool. Get available SKUs for scaling a worker pool. @param resourceGroupName Name of th...
java
public Observable<ServiceResponse<Page<SkuInfoInner>>> listWorkerPoolSkusWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName) { return listWorkerPoolSkusSinglePageAsync(resourceGroupName, name, workerPoolName) .concatMap(new Func1<ServiceResponse<P...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "SkuInfoInner", ">", ">", ">", "listWorkerPoolSkusWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ",", "final", "String", "workerPoolName", ")", ...
Get available SKUs for scaling a worker pool. Get available SKUs for scaling a worker pool. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @param workerPoolName Name of the worker pool. @throws IllegalArgumentException thrown if param...
[ "Get", "available", "SKUs", "for", "scaling", "a", "worker", "pool", ".", "Get", "available", "SKUs", "for", "scaling", "a", "worker", "pool", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L6408-L6420
soi-toolkit/soi-toolkit-mule
tools/soitoolkit-generator/soitoolkit-generator-eclipse-plugin/soitoolkit-generator-plugin/src/soi_toolkit_generator_plugin/preferences/SoiToolkiGeneratorPreferencePage.java
SoiToolkiGeneratorPreferencePage.createFieldEditors
public void createFieldEditors() { """ Creates the field editors. Field editors are abstractions of the common GUI blocks needed to manipulate various types of preferences. Each field editor knows how to save and restore itself. """ addField(new DirectoryFieldEditor(PreferenceConstants.P_MAVEN_HOME, "&Mav...
java
public void createFieldEditors() { addField(new DirectoryFieldEditor(PreferenceConstants.P_MAVEN_HOME, "&Maven home folder:", getFieldEditorParent())); addField(new DirectoryFieldEditor(PreferenceConstants.P_DEFAULT_ROOT_FOLDER, "Default root folder:", getFieldEditorParent())); // addField(new RadioGroupFieldE...
[ "public", "void", "createFieldEditors", "(", ")", "{", "addField", "(", "new", "DirectoryFieldEditor", "(", "PreferenceConstants", ".", "P_MAVEN_HOME", ",", "\"&Maven home folder:\"", ",", "getFieldEditorParent", "(", ")", ")", ")", ";", "addField", "(", "new", "D...
Creates the field editors. Field editors are abstractions of the common GUI blocks needed to manipulate various types of preferences. Each field editor knows how to save and restore itself.
[ "Creates", "the", "field", "editors", ".", "Field", "editors", "are", "abstractions", "of", "the", "common", "GUI", "blocks", "needed", "to", "manipulate", "various", "types", "of", "preferences", ".", "Each", "field", "editor", "knows", "how", "to", "save", ...
train
https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/tools/soitoolkit-generator/soitoolkit-generator-eclipse-plugin/soitoolkit-generator-plugin/src/soi_toolkit_generator_plugin/preferences/SoiToolkiGeneratorPreferencePage.java#L58-L77
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/NameNode.java
NameNode.stopRPC
protected void stopRPC(boolean interruptClientHandlers) throws IOException, InterruptedException { """ Quiescess all communication to namenode cleanly. Ensures all RPC handlers have exited. @param interruptClientHandlers should the handlers be interrupted """ // stop client handlers stopRPCIn...
java
protected void stopRPC(boolean interruptClientHandlers) throws IOException, InterruptedException { // stop client handlers stopRPCInternal(server, "client", interruptClientHandlers); // stop datanode handlers stopRPCInternal(dnProtocolServer, "datanode", interruptClientHandlers); // waiting ...
[ "protected", "void", "stopRPC", "(", "boolean", "interruptClientHandlers", ")", "throws", "IOException", ",", "InterruptedException", "{", "// stop client handlers", "stopRPCInternal", "(", "server", ",", "\"client\"", ",", "interruptClientHandlers", ")", ";", "// stop da...
Quiescess all communication to namenode cleanly. Ensures all RPC handlers have exited. @param interruptClientHandlers should the handlers be interrupted
[ "Quiescess", "all", "communication", "to", "namenode", "cleanly", ".", "Ensures", "all", "RPC", "handlers", "have", "exited", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NameNode.java#L674-L685
Grasia/phatsim
phat-core/src/main/java/phat/util/SpatialFactory.java
SpatialFactory.attachAName
public static BitmapText attachAName(Node node, String name) { """ Creates a geometry with the same name of the given node. It adds a controller called BillboardControl that turns the name of the node in order to look at the camera. Letter's size can be changed using setSize() method, the text with setText()...
java
public static BitmapText attachAName(Node node, String name) { checkInit(); BitmapFont guiFont = assetManager.loadFont("Interface/Fonts/Default.fnt"); BitmapText ch = new BitmapText(guiFont, false); ch.setName("BitmapText"); ch.setSize(guiFont.getCharSet().getRenderedSize() * 0....
[ "public", "static", "BitmapText", "attachAName", "(", "Node", "node", ",", "String", "name", ")", "{", "checkInit", "(", ")", ";", "BitmapFont", "guiFont", "=", "assetManager", ".", "loadFont", "(", "\"Interface/Fonts/Default.fnt\"", ")", ";", "BitmapText", "ch"...
Creates a geometry with the same name of the given node. It adds a controller called BillboardControl that turns the name of the node in order to look at the camera. Letter's size can be changed using setSize() method, the text with setText() method and the color using setColor() method. @param node @return
[ "Creates", "a", "geometry", "with", "the", "same", "name", "of", "the", "given", "node", ".", "It", "adds", "a", "controller", "called", "BillboardControl", "that", "turns", "the", "name", "of", "the", "node", "in", "order", "to", "look", "at", "the", "c...
train
https://github.com/Grasia/phatsim/blob/2d4fc8189be9730b34c8e3e1a08fb4800e01c5df/phat-core/src/main/java/phat/util/SpatialFactory.java#L153-L168
camunda/camunda-xml-model
src/main/java/org/camunda/bpm/model/xml/impl/ModelImpl.java
ModelImpl.declareAlternativeNamespace
public void declareAlternativeNamespace(String alternativeNs, String actualNs) { """ Declares an alternative namespace for an actual so that during lookup of elements/attributes both will be considered. This can be used if a newer namespaces replaces an older one but XML files with the old one should still be par...
java
public void declareAlternativeNamespace(String alternativeNs, String actualNs) { if(actualNsToAlternative.containsKey(actualNs) || alternativeNsToActual.containsKey(alternativeNs)){ throw new IllegalArgumentException("Cannot register two alternatives for one namespace! Actual Ns: " + actualNs + " second alter...
[ "public", "void", "declareAlternativeNamespace", "(", "String", "alternativeNs", ",", "String", "actualNs", ")", "{", "if", "(", "actualNsToAlternative", ".", "containsKey", "(", "actualNs", ")", "||", "alternativeNsToActual", ".", "containsKey", "(", "alternativeNs",...
Declares an alternative namespace for an actual so that during lookup of elements/attributes both will be considered. This can be used if a newer namespaces replaces an older one but XML files with the old one should still be parseable. @param alternativeNs @param actualNs @throws IllegalArgumentException if the altern...
[ "Declares", "an", "alternative", "namespace", "for", "an", "actual", "so", "that", "during", "lookup", "of", "elements", "/", "attributes", "both", "will", "be", "considered", ".", "This", "can", "be", "used", "if", "a", "newer", "namespaces", "replaces", "a...
train
https://github.com/camunda/camunda-xml-model/blob/85b3f879e26d063f71c94cfd21ac17d9ff6baf4d/src/main/java/org/camunda/bpm/model/xml/impl/ModelImpl.java#L60-L66
paymill/paymill-java
src/main/java/com/paymill/services/TransactionService.java
TransactionService.createWithPreauthorization
public Transaction createWithPreauthorization( String preauthorizationId, Integer amount, String currency ) { """ Executes a {@link Transaction} with {@link Preauthorization} for the given amount in the given currency. @param preauthorizationId The Id of a {@link Preauthorization}, which has reserved some money ...
java
public Transaction createWithPreauthorization( String preauthorizationId, Integer amount, String currency ) { return this.createWithPreauthorization( preauthorizationId, amount, currency, null ); }
[ "public", "Transaction", "createWithPreauthorization", "(", "String", "preauthorizationId", ",", "Integer", "amount", ",", "String", "currency", ")", "{", "return", "this", ".", "createWithPreauthorization", "(", "preauthorizationId", ",", "amount", ",", "currency", "...
Executes a {@link Transaction} with {@link Preauthorization} for the given amount in the given currency. @param preauthorizationId The Id of a {@link Preauthorization}, which has reserved some money from the client’s credit card. @param amount Amount (in cents) which will be charged. @param currency ISO 4217 formatted ...
[ "Executes", "a", "{" ]
train
https://github.com/paymill/paymill-java/blob/17281a0d4376c76f1711af9f09bfc138c90ba65a/src/main/java/com/paymill/services/TransactionService.java#L353-L355
pietermartin/sqlg
sqlg-core/src/main/java/org/umlg/sqlg/structure/topology/Schema.java
Schema.removeEdgeLabel
void removeEdgeLabel(EdgeLabel edgeLabel, boolean preserveData) { """ remove a given edge label @param edgeLabel the edge label @param preserveData should we keep the SQL data """ getTopology().lock(); String fn = this.name + "." + EDGE_PREFIX + edgeLabel.getName(); if (!uncommi...
java
void removeEdgeLabel(EdgeLabel edgeLabel, boolean preserveData) { getTopology().lock(); String fn = this.name + "." + EDGE_PREFIX + edgeLabel.getName(); if (!uncommittedRemovedEdgeLabels.contains(fn)) { uncommittedRemovedEdgeLabels.add(fn); TopologyManager.removeEdgeLabe...
[ "void", "removeEdgeLabel", "(", "EdgeLabel", "edgeLabel", ",", "boolean", "preserveData", ")", "{", "getTopology", "(", ")", ".", "lock", "(", ")", ";", "String", "fn", "=", "this", ".", "name", "+", "\".\"", "+", "EDGE_PREFIX", "+", "edgeLabel", ".", "g...
remove a given edge label @param edgeLabel the edge label @param preserveData should we keep the SQL data
[ "remove", "a", "given", "edge", "label" ]
train
https://github.com/pietermartin/sqlg/blob/c1845a1b31328a5ffda646873b0369ee72af56a7/sqlg-core/src/main/java/org/umlg/sqlg/structure/topology/Schema.java#L1757-L1776
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/TasksInner.java
TasksInner.updateAsync
public Observable<TaskInner> updateAsync(String resourceGroupName, String registryName, String taskName, TaskUpdateParameters taskUpdateParameters) { """ Updates a task with the specified parameters. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registr...
java
public Observable<TaskInner> updateAsync(String resourceGroupName, String registryName, String taskName, TaskUpdateParameters taskUpdateParameters) { return updateWithServiceResponseAsync(resourceGroupName, registryName, taskName, taskUpdateParameters).map(new Func1<ServiceResponse<TaskInner>, TaskInner>() { ...
[ "public", "Observable", "<", "TaskInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "registryName", ",", "String", "taskName", ",", "TaskUpdateParameters", "taskUpdateParameters", ")", "{", "return", "updateWithServiceResponseAsync", "(", "r...
Updates a task with the specified parameters. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param taskName The name of the container registry task. @param taskUpdateParameters The parameters for updating a task....
[ "Updates", "a", "task", "with", "the", "specified", "parameters", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/TasksInner.java#L709-L716
autermann/yaml
src/main/java/com/github/autermann/yaml/nodes/YamlMappingNode.java
YamlMappingNode.put
public T put(YamlNode key, byte value) { """ Adds the specified {@code key}/{@code value} pair to this mapping. @param key the key @param value the value @return {@code this} """ return put(key, getNodeFactory().byteNode(value)); }
java
public T put(YamlNode key, byte value) { return put(key, getNodeFactory().byteNode(value)); }
[ "public", "T", "put", "(", "YamlNode", "key", ",", "byte", "value", ")", "{", "return", "put", "(", "key", ",", "getNodeFactory", "(", ")", ".", "byteNode", "(", "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#L420-L422
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.updateBaseCalendarNames
private static void updateBaseCalendarNames(List<Pair<ProjectCalendar, BigInteger>> baseCalendars, HashMap<BigInteger, ProjectCalendar> map) { """ The way calendars are stored in an MSPDI file means that there can be forward references between the base calendar unique ID for a derived calendar, and the base cale...
java
private static void updateBaseCalendarNames(List<Pair<ProjectCalendar, BigInteger>> baseCalendars, HashMap<BigInteger, ProjectCalendar> map) { for (Pair<ProjectCalendar, BigInteger> pair : baseCalendars) { ProjectCalendar cal = pair.getFirst(); BigInteger baseCalendarID = pair.getSecond...
[ "private", "static", "void", "updateBaseCalendarNames", "(", "List", "<", "Pair", "<", "ProjectCalendar", ",", "BigInteger", ">", ">", "baseCalendars", ",", "HashMap", "<", "BigInteger", ",", "ProjectCalendar", ">", "map", ")", "{", "for", "(", "Pair", "<", ...
The way calendars are stored in an MSPDI file means that there can be forward references between the base calendar unique ID for a derived calendar, and the base calendar itself. To get around this, we initially populate the base calendar name attribute with the base calendar unique ID, and now in this method we can co...
[ "The", "way", "calendars", "are", "stored", "in", "an", "MSPDI", "file", "means", "that", "there", "can", "be", "forward", "references", "between", "the", "base", "calendar", "unique", "ID", "for", "a", "derived", "calendar", "and", "the", "base", "calendar"...
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L422-L435
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/sql/Date.java
Date.valueOf
public static Date valueOf(String s) { """ Converts a string in JDBC date escape format to a <code>Date</code> value. @param s a <code>String</code> object representing a date in in the format "yyyy-[m]m-[d]d". The leading zero for <code>mm</code> and <code>dd</code> may also be omitted. @return a <code>jav...
java
public static Date valueOf(String s) { final int YEAR_LENGTH = 4; final int MONTH_LENGTH = 2; final int DAY_LENGTH = 2; final int MAX_MONTH = 12; final int MAX_DAY = 31; int firstDash; int secondDash; Date d = null; if (s == null) { th...
[ "public", "static", "Date", "valueOf", "(", "String", "s", ")", "{", "final", "int", "YEAR_LENGTH", "=", "4", ";", "final", "int", "MONTH_LENGTH", "=", "2", ";", "final", "int", "DAY_LENGTH", "=", "2", ";", "final", "int", "MAX_MONTH", "=", "12", ";", ...
Converts a string in JDBC date escape format to a <code>Date</code> value. @param s a <code>String</code> object representing a date in in the format "yyyy-[m]m-[d]d". The leading zero for <code>mm</code> and <code>dd</code> may also be omitted. @return a <code>java.sql.Date</code> object representing the given date @...
[ "Converts", "a", "string", "in", "JDBC", "date", "escape", "format", "to", "a", "<code", ">", "Date<", "/", "code", ">", "value", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/sql/Date.java#L108-L147
threerings/nenya
core/src/main/java/com/threerings/media/util/MathUtil.java
MathUtil.floorDiv
public static int floorDiv (int dividend, int divisor) { """ Computes the floored division <code>dividend/divisor</code> which is useful when dividing potentially negative numbers into bins. <p> For example, the following numbers floorDiv 10 are: <pre> -15 -10 -8 -2 0 2 8 10 15 -2 -1 -1 -1 0 0 0 1 1 </p...
java
public static int floorDiv (int dividend, int divisor) { return ((dividend >= 0) == (divisor >= 0)) ? dividend / divisor : (divisor >= 0 ? (dividend - divisor + 1) / divisor : (dividend - divisor - 1) / divisor); }
[ "public", "static", "int", "floorDiv", "(", "int", "dividend", ",", "int", "divisor", ")", "{", "return", "(", "(", "dividend", ">=", "0", ")", "==", "(", "divisor", ">=", "0", ")", ")", "?", "dividend", "/", "divisor", ":", "(", "divisor", ">=", "...
Computes the floored division <code>dividend/divisor</code> which is useful when dividing potentially negative numbers into bins. <p> For example, the following numbers floorDiv 10 are: <pre> -15 -10 -8 -2 0 2 8 10 15 -2 -1 -1 -1 0 0 0 1 1 </pre>
[ "Computes", "the", "floored", "division", "<code", ">", "dividend", "/", "divisor<", "/", "code", ">", "which", "is", "useful", "when", "dividing", "potentially", "negative", "numbers", "into", "bins", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/util/MathUtil.java#L109-L114
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java
CommonOps_DDRM.multTransAB
public static void multTransAB(double alpha , DMatrix1Row a , DMatrix1Row b , DMatrix1Row c ) { """ <p> Performs the following operation:<br> <br> c = &alpha; * a<sup>T</sup> * b<sup>T</sup><br> c<sub>ij</sub> = &alpha; &sum;<sub>k=1:n</sub> { a<sub>ki</sub> * b<sub>jk</sub>} </p> @param alpha Scaling fact...
java
public static void multTransAB(double alpha , DMatrix1Row a , DMatrix1Row b , DMatrix1Row c ) { // TODO add a matrix vectory multiply here if( a.numCols >= EjmlParameters.MULT_TRANAB_COLUMN_SWITCH ) { MatrixMatrixMult_DDRM.multTransAB_aux(alpha, a, b, c, null); } else { ...
[ "public", "static", "void", "multTransAB", "(", "double", "alpha", ",", "DMatrix1Row", "a", ",", "DMatrix1Row", "b", ",", "DMatrix1Row", "c", ")", "{", "// TODO add a matrix vectory multiply here", "if", "(", "a", ".", "numCols", ">=", "EjmlParameters", ".", "MU...
<p> Performs the following operation:<br> <br> c = &alpha; * a<sup>T</sup> * b<sup>T</sup><br> c<sub>ij</sub> = &alpha; &sum;<sub>k=1:n</sub> { a<sub>ki</sub> * b<sub>jk</sub>} </p> @param alpha Scaling factor. @param a The left matrix in the multiplication operation. Not modified. @param b The right matrix in the mul...
[ "<p", ">", "Performs", "the", "following", "operation", ":", "<br", ">", "<br", ">", "c", "=", "&alpha", ";", "*", "a<sup", ">", "T<", "/", "sup", ">", "*", "b<sup", ">", "T<", "/", "sup", ">", "<br", ">", "c<sub", ">", "ij<", "/", "sub", ">", ...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java#L244-L252
ops4j/org.ops4j.pax.wicket
spi/blueprint/src/main/java/org/ops4j/pax/wicket/spi/blueprint/injection/blueprint/AbstractBlueprintBeanDefinitionParser.java
AbstractBlueprintBeanDefinitionParser.createStringValue
protected ValueMetadata createStringValue(ParserContext context, String str) { """ <p>createStringValue.</p> @param context a {@link org.apache.aries.blueprint.ParserContext} object. @param str a {@link java.lang.String} object. @return a {@link org.osgi.service.blueprint.reflect.ValueMetadata} object. ""...
java
protected ValueMetadata createStringValue(ParserContext context, String str) { MutableValueMetadata value = context.createMetadata(MutableValueMetadata.class); value.setStringValue(str); return value; }
[ "protected", "ValueMetadata", "createStringValue", "(", "ParserContext", "context", ",", "String", "str", ")", "{", "MutableValueMetadata", "value", "=", "context", ".", "createMetadata", "(", "MutableValueMetadata", ".", "class", ")", ";", "value", ".", "setStringV...
<p>createStringValue.</p> @param context a {@link org.apache.aries.blueprint.ParserContext} object. @param str a {@link java.lang.String} object. @return a {@link org.osgi.service.blueprint.reflect.ValueMetadata} object.
[ "<p", ">", "createStringValue", ".", "<", "/", "p", ">" ]
train
https://github.com/ops4j/org.ops4j.pax.wicket/blob/ef7cb4bdf918e9e61ec69789b9c690567616faa9/spi/blueprint/src/main/java/org/ops4j/pax/wicket/spi/blueprint/injection/blueprint/AbstractBlueprintBeanDefinitionParser.java#L174-L178
tango-controls/JTango
server/src/main/java/org/tango/server/servant/DeviceImpl.java
DeviceImpl.read_attribute_history_5
@Override public DevAttrHistory_5 read_attribute_history_5(final String attributeName, final int maxSize) throws DevFailed { """ read an attribute history. IDL 5 version. The history is filled only be attribute polling @param attributeName The attribute to retrieve @param maxSize The history maximum...
java
@Override public DevAttrHistory_5 read_attribute_history_5(final String attributeName, final int maxSize) throws DevFailed { MDC.setContextMap(contextMap); xlogger.entry(); checkInitialization(); deviceMonitoring.startRequest("read_attribute_history_5"); DevAttrHistory_5 resu...
[ "@", "Override", "public", "DevAttrHistory_5", "read_attribute_history_5", "(", "final", "String", "attributeName", ",", "final", "int", "maxSize", ")", "throws", "DevFailed", "{", "MDC", ".", "setContextMap", "(", "contextMap", ")", ";", "xlogger", ".", "entry", ...
read an attribute history. IDL 5 version. The history is filled only be attribute polling @param attributeName The attribute to retrieve @param maxSize The history maximum size returned @throws DevFailed
[ "read", "an", "attribute", "history", ".", "IDL", "5", "version", ".", "The", "history", "is", "filled", "only", "be", "attribute", "polling" ]
train
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/servant/DeviceImpl.java#L2540-L2571
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/JIT_Tie.java
JIT_Tie.initializeStaticFields
private static void initializeStaticFields(ClassWriter cw, String tieClassName, Class<?> remoteInterface) { """ Initializes the static variables common to all Tie classes. <p> _type_ids = { "RMI:<remote interface name>...
java
private static void initializeStaticFields(ClassWriter cw, String tieClassName, Class<?> remoteInterface) { GeneratorAdapter mg; final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d576626 ...
[ "private", "static", "void", "initializeStaticFields", "(", "ClassWriter", "cw", ",", "String", "tieClassName", ",", "Class", "<", "?", ">", "remoteInterface", ")", "{", "GeneratorAdapter", "mg", ";", "final", "boolean", "isTraceOn", "=", "TraceComponent", ".", ...
Initializes the static variables common to all Tie classes. <p> _type_ids = { "RMI:<remote interface name>:0000000000000000", "RMI:<remote interface parent>:0000000000000000", etc... }; Note: unlike a Tie generated with RMIC from the generated wrapper, the _type_ids field for JIT Deploy Ties do NOT include CSIServant...
[ "Initializes", "the", "static", "variables", "common", "to", "all", "Tie", "classes", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/JIT_Tie.java#L313-L363
xdcrafts/flower
flower-tools/src/main/java/com/github/xdcrafts/flower/tools/ListApi.java
ListApi.getList
public static <T> Optional<List<T>> getList(final List list, final Class<T> clazz, final Integer... path) { """ Get list value by path. @param <T> list value type @param clazz type of value @param list subject @param path nodes to walk in map @return value """ return get(list, List.class, path).ma...
java
public static <T> Optional<List<T>> getList(final List list, final Class<T> clazz, final Integer... path) { return get(list, List.class, path).map(c -> (List<T>) c); }
[ "public", "static", "<", "T", ">", "Optional", "<", "List", "<", "T", ">", ">", "getList", "(", "final", "List", "list", ",", "final", "Class", "<", "T", ">", "clazz", ",", "final", "Integer", "...", "path", ")", "{", "return", "get", "(", "list", ...
Get list value by path. @param <T> list value type @param clazz type of value @param list subject @param path nodes to walk in map @return value
[ "Get", "list", "value", "by", "path", "." ]
train
https://github.com/xdcrafts/flower/blob/96a8e49102fea434bd383a3c7852f0ee9545f999/flower-tools/src/main/java/com/github/xdcrafts/flower/tools/ListApi.java#L208-L210
apache/groovy
subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
NioGroovyMethods.eachDirRecurse
public static void eachDirRecurse(final Path self, @ClosureParams(value = SimpleType.class, options = "java.nio.file.Path") final Closure closure) throws IOException { """ Recursively processes each descendant subdirectory in this directory. Processing consists of calling <code>closure</code> passing it the curre...
java
public static void eachDirRecurse(final Path self, @ClosureParams(value = SimpleType.class, options = "java.nio.file.Path") final Closure closure) throws IOException { //throws FileNotFoundException, IllegalArgumentException { eachFileRecurse(self, FileType.DIRECTORIES, closure); }
[ "public", "static", "void", "eachDirRecurse", "(", "final", "Path", "self", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"java.nio.file.Path\"", ")", "final", "Closure", "closure", ")", "throws", "IOException",...
Recursively processes each descendant subdirectory in this directory. Processing consists of calling <code>closure</code> passing it the current subdirectory and then recursively processing that subdirectory. Regular files are ignored during traversal. @param self a Path (that happens to be a folder/directory) @par...
[ "Recursively", "processes", "each", "descendant", "subdirectory", "in", "this", "directory", ".", "Processing", "consists", "of", "calling", "<code", ">", "closure<", "/", "code", ">", "passing", "it", "the", "current", "subdirectory", "and", "then", "recursively"...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java#L1186-L1188
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Counters.java
Counters.subtractInPlace
public static <E> void subtractInPlace(double[] target, Counter<E> arg, Index<E> idx) { """ Sets each value of double[] target to be target[idx.indexOf(k)]-a.getCount(k) for all keys k in arg """ for (Map.Entry<E, Double> entry : arg.entrySet()) { target[idx.indexOf(entry.getKey())] -= entry.getVa...
java
public static <E> void subtractInPlace(double[] target, Counter<E> arg, Index<E> idx) { for (Map.Entry<E, Double> entry : arg.entrySet()) { target[idx.indexOf(entry.getKey())] -= entry.getValue(); } }
[ "public", "static", "<", "E", ">", "void", "subtractInPlace", "(", "double", "[", "]", "target", ",", "Counter", "<", "E", ">", "arg", ",", "Index", "<", "E", ">", "idx", ")", "{", "for", "(", "Map", ".", "Entry", "<", "E", ",", "Double", ">", ...
Sets each value of double[] target to be target[idx.indexOf(k)]-a.getCount(k) for all keys k in arg
[ "Sets", "each", "value", "of", "double", "[]", "target", "to", "be", "target", "[", "idx", ".", "indexOf", "(", "k", ")", "]", "-", "a", ".", "getCount", "(", "k", ")", "for", "all", "keys", "k", "in", "arg" ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Counters.java#L402-L406
gallandarakhneorg/afc
core/text/src/main/java/org/arakhne/afc/text/TextUtil.java
TextUtil.equalsIgnoreAccents
@Pure @Inline(value = "TextUtil.removeAccents($1, $3).equals(TextUtil.removeAccents($2, $3))", imported = { """ Compares this <code>String</code> to another <code>String</code>, ignoring accent considerations. Two strings are considered equal ignoring accents if they are of the same length, and corresponding ...
java
@Pure @Inline(value = "TextUtil.removeAccents($1, $3).equals(TextUtil.removeAccents($2, $3))", imported = {TextUtil.class}) public static boolean equalsIgnoreAccents(String s1, String s2, Map<Character, String> map) { return removeAccents(s1, map).equals(removeAccents(s2, map)); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"TextUtil.removeAccents($1, $3).equals(TextUtil.removeAccents($2, $3))\"", ",", "imported", "=", "{", "TextUtil", ".", "class", "}", ")", "public", "static", "boolean", "equalsIgnoreAccents", "(", "String", "s1", ",", ...
Compares this <code>String</code> to another <code>String</code>, ignoring accent considerations. Two strings are considered equal ignoring accents if they are of the same length, and corresponding characters in the two strings are equal ignoring accents. <p>This method is equivalent to: <pre><code> TextUtil.removeAc...
[ "Compares", "this", "<code", ">", "String<", "/", "code", ">", "to", "another", "<code", ">", "String<", "/", "code", ">", "ignoring", "accent", "considerations", ".", "Two", "strings", "are", "considered", "equal", "ignoring", "accents", "if", "they", "are"...
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L1350-L1354
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/dns/dns_stats.java
dns_stats.get_nitro_response
protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception { """ <pre> converts nitro response into object and returns the object array in case of get request. </pre> """ dns_stats[] resources = new dns_stats[1]; dns_response result = (dns_response) service.get_...
java
protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception { dns_stats[] resources = new dns_stats[1]; dns_response result = (dns_response) service.get_payload_formatter().string_to_resource(dns_response.class, response); if(result.errorcode != 0) { if (result.errorco...
[ "protected", "base_resource", "[", "]", "get_nitro_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "dns_stats", "[", "]", "resources", "=", "new", "dns_stats", "[", "1", "]", ";", "dns_response", "result", ...
<pre> converts nitro response into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "converts", "nitro", "response", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/dns/dns_stats.java#L1177-L1196
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java
AbstractJcrNode.setProperty
final AbstractJcrProperty setProperty( Name name, Value[] values, int jcrPropertyType, boolean skipReferenceValidation ) throws VersionException, LockException, ConstraintViolationExc...
java
final AbstractJcrProperty setProperty( Name name, Value[] values, int jcrPropertyType, boolean skipReferenceValidation ) throws VersionException, LockException, ConstraintViolationExc...
[ "final", "AbstractJcrProperty", "setProperty", "(", "Name", "name", ",", "Value", "[", "]", "values", ",", "int", "jcrPropertyType", ",", "boolean", "skipReferenceValidation", ")", "throws", "VersionException", ",", "LockException", ",", "ConstraintViolationException", ...
Sets a multi valued property, skipping over protected ones. @param name the name of the property; may not be null @param values the values of the property; may not be null @param jcrPropertyType the expected property type; may be {@link PropertyType#UNDEFINED} if the values should not be converted @param skipReference...
[ "Sets", "a", "multi", "valued", "property", "skipping", "over", "protected", "ones", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java#L1823-L1829
rzwitserloot/lombok
src/core/lombok/javac/handlers/JavacHandlerUtil.java
JavacHandlerUtil.createAnnotation
public static <A extends Annotation> AnnotationValues<A> createAnnotation(Class<A> type, final JavacNode node) { """ Creates an instance of {@code AnnotationValues} for the provided AST Node. @param type An annotation class type, such as {@code lombok.Getter.class}. @param node A Lombok AST node representing a...
java
public static <A extends Annotation> AnnotationValues<A> createAnnotation(Class<A> type, final JavacNode node) { return createAnnotation(type, (JCAnnotation) node.get(), node); }
[ "public", "static", "<", "A", "extends", "Annotation", ">", "AnnotationValues", "<", "A", ">", "createAnnotation", "(", "Class", "<", "A", ">", "type", ",", "final", "JavacNode", "node", ")", "{", "return", "createAnnotation", "(", "type", ",", "(", "JCAnn...
Creates an instance of {@code AnnotationValues} for the provided AST Node. @param type An annotation class type, such as {@code lombok.Getter.class}. @param node A Lombok AST node representing an annotation in source code.
[ "Creates", "an", "instance", "of", "{", "@code", "AnnotationValues", "}", "for", "the", "provided", "AST", "Node", "." ]
train
https://github.com/rzwitserloot/lombok/blob/75601240760bd81ff95fcde7a1b8185769ce64e8/src/core/lombok/javac/handlers/JavacHandlerUtil.java#L350-L352
jamesagnew/hapi-fhir
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchBuilder.java
SearchBuilder.calculateFuzzAmount
static BigDecimal calculateFuzzAmount(ParamPrefixEnum cmpValue, BigDecimal theValue) { """ Figures out the tolerance for a search. For example, if the user is searching for <code>4.00</code>, this method returns <code>0.005</code> because we shold actually match values which are <code>4 (+/-) 0.005</code> accord...
java
static BigDecimal calculateFuzzAmount(ParamPrefixEnum cmpValue, BigDecimal theValue) { if (cmpValue == ParamPrefixEnum.APPROXIMATE) { return theValue.multiply(new BigDecimal(0.1)); } else { String plainString = theValue.toPlainString(); int dotIdx = plainString.indexOf('.'); if (dotIdx == -1) { retu...
[ "static", "BigDecimal", "calculateFuzzAmount", "(", "ParamPrefixEnum", "cmpValue", ",", "BigDecimal", "theValue", ")", "{", "if", "(", "cmpValue", "==", "ParamPrefixEnum", ".", "APPROXIMATE", ")", "{", "return", "theValue", ".", "multiply", "(", "new", "BigDecimal...
Figures out the tolerance for a search. For example, if the user is searching for <code>4.00</code>, this method returns <code>0.005</code> because we shold actually match values which are <code>4 (+/-) 0.005</code> according to the FHIR specs.
[ "Figures", "out", "the", "tolerance", "for", "a", "search", ".", "For", "example", "if", "the", "user", "is", "searching", "for", "<code", ">", "4", ".", "00<", "/", "code", ">", "this", "method", "returns", "<code", ">", "0", ".", "005<", "/", "code...
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/SearchBuilder.java#L2695-L2710
rholder/moar-concurrent
src/main/java/com/github/rholder/moar/concurrent/StrategicExecutors.java
StrategicExecutors.newBalancingThreadPoolExecutor
public static BalancingThreadPoolExecutor newBalancingThreadPoolExecutor(ThreadPoolExecutor tpe, float targetUtilization, float smoothingWeight, ...
java
public static BalancingThreadPoolExecutor newBalancingThreadPoolExecutor(ThreadPoolExecutor tpe, float targetUtilization, float smoothingWeight, ...
[ "public", "static", "BalancingThreadPoolExecutor", "newBalancingThreadPoolExecutor", "(", "ThreadPoolExecutor", "tpe", ",", "float", "targetUtilization", ",", "float", "smoothingWeight", ",", "int", "balanceAfter", ")", "{", "ThreadProfiler", "tp", "=", "new", "MXBeanThre...
Return a {@link BalancingThreadPoolExecutor} with the given {@link ThreadPoolExecutor}, target utilization, smoothing weight, and balance after values. @param tpe the underlying executor to use for this instance @param targetUtilization a float between 0.0 and 1.0 representing the percentage of the total...
[ "Return", "a", "{", "@link", "BalancingThreadPoolExecutor", "}", "with", "the", "given", "{", "@link", "ThreadPoolExecutor", "}", "target", "utilization", "smoothing", "weight", "and", "balance", "after", "values", "." ]
train
https://github.com/rholder/moar-concurrent/blob/c28facbf02e628cc37266c051c23d4a7654b4eba/src/main/java/com/github/rholder/moar/concurrent/StrategicExecutors.java#L90-L96
prestodb/presto
presto-raptor/src/main/java/com/facebook/presto/raptor/util/RebindSafeMBeanServer.java
RebindSafeMBeanServer.registerMBean
@Override public ObjectInstance registerMBean(Object object, ObjectName name) throws MBeanRegistrationException, NotCompliantMBeanException { """ Delegates to the wrapped mbean server, but if a mbean is already registered with the specified name, the existing instance is returned. """ ...
java
@Override public ObjectInstance registerMBean(Object object, ObjectName name) throws MBeanRegistrationException, NotCompliantMBeanException { while (true) { try { // try to register the mbean return mbeanServer.registerMBean(object, name); ...
[ "@", "Override", "public", "ObjectInstance", "registerMBean", "(", "Object", "object", ",", "ObjectName", "name", ")", "throws", "MBeanRegistrationException", ",", "NotCompliantMBeanException", "{", "while", "(", "true", ")", "{", "try", "{", "// try to register the m...
Delegates to the wrapped mbean server, but if a mbean is already registered with the specified name, the existing instance is returned.
[ "Delegates", "to", "the", "wrapped", "mbean", "server", "but", "if", "a", "mbean", "is", "already", "registered", "with", "the", "specified", "name", "the", "existing", "instance", "is", "returned", "." ]
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-raptor/src/main/java/com/facebook/presto/raptor/util/RebindSafeMBeanServer.java#L67-L90
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfDashPattern.java
PdfDashPattern.toPdf
public void toPdf(PdfWriter writer, OutputStream os) throws IOException { """ Returns the PDF representation of this <CODE>PdfArray</CODE>. """ os.write('['); if (dash >= 0) { new PdfNumber(dash).toPdf(writer, os); if (gap >= 0) { os.write(' '); ...
java
public void toPdf(PdfWriter writer, OutputStream os) throws IOException { os.write('['); if (dash >= 0) { new PdfNumber(dash).toPdf(writer, os); if (gap >= 0) { os.write(' '); new PdfNumber(gap).toPdf(writer, os); } } o...
[ "public", "void", "toPdf", "(", "PdfWriter", "writer", ",", "OutputStream", "os", ")", "throws", "IOException", "{", "os", ".", "write", "(", "'", "'", ")", ";", "if", "(", "dash", ">=", "0", ")", "{", "new", "PdfNumber", "(", "dash", ")", ".", "to...
Returns the PDF representation of this <CODE>PdfArray</CODE>.
[ "Returns", "the", "PDF", "representation", "of", "this", "<CODE", ">", "PdfArray<", "/", "CODE", ">", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfDashPattern.java#L125-L140
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/Utils.java
Utils.getShort
public static short getShort(ByteBuffer buf, int index) { """ Reads a short value from the buffer starting at the given index relative to the current position() of the buffer, without mutating the buffer in any way (so it's thread safe). """ return buf.order() == BIG_ENDIAN ? getShortB(buf, index) : g...
java
public static short getShort(ByteBuffer buf, int index) { return buf.order() == BIG_ENDIAN ? getShortB(buf, index) : getShortL(buf, index); }
[ "public", "static", "short", "getShort", "(", "ByteBuffer", "buf", ",", "int", "index", ")", "{", "return", "buf", ".", "order", "(", ")", "==", "BIG_ENDIAN", "?", "getShortB", "(", "buf", ",", "index", ")", ":", "getShortL", "(", "buf", ",", "index", ...
Reads a short value from the buffer starting at the given index relative to the current position() of the buffer, without mutating the buffer in any way (so it's thread safe).
[ "Reads", "a", "short", "value", "from", "the", "buffer", "starting", "at", "the", "given", "index", "relative", "to", "the", "current", "position", "()", "of", "the", "buffer", "without", "mutating", "the", "buffer", "in", "any", "way", "(", "so", "it", ...
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/Utils.java#L450-L452
JadiraOrg/jadira
cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java
UnsafeOperations.deepCopyObjectField
public final void deepCopyObjectField(Object obj, Object copy, Field field) { """ Copies the object of the specified type from the given field in the source object to the same field in the copy, visiting the object during the copy so that its fields are also copied @param obj The object to copy from @param copy...
java
public final void deepCopyObjectField(Object obj, Object copy, Field field) { deepCopyObjectAtOffset(obj, copy, field.getType(), getObjectFieldOffset(field), new IdentityHashMap<Object, Object>(100)); }
[ "public", "final", "void", "deepCopyObjectField", "(", "Object", "obj", ",", "Object", "copy", ",", "Field", "field", ")", "{", "deepCopyObjectAtOffset", "(", "obj", ",", "copy", ",", "field", ".", "getType", "(", ")", ",", "getObjectFieldOffset", "(", "fiel...
Copies the object of the specified type from the given field in the source object to the same field in the copy, visiting the object during the copy so that its fields are also copied @param obj The object to copy from @param copy The target object @param field Field to be copied
[ "Copies", "the", "object", "of", "the", "specified", "type", "from", "the", "given", "field", "in", "the", "source", "object", "to", "the", "same", "field", "in", "the", "copy", "visiting", "the", "object", "during", "the", "copy", "so", "that", "its", "...
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java#L441-L444
apache/groovy
subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java
SwingGroovyMethods.leftShift
public static JMenu leftShift(JMenu self, Action action) { """ Overloads the left shift operator to provide an easy way to add components to a menu.<p> @param self a JMenu @param action an action to be added to the menu. @return same menu, after the value was added to it. @since 1.6.4 """ self...
java
public static JMenu leftShift(JMenu self, Action action) { self.add(action); return self; }
[ "public", "static", "JMenu", "leftShift", "(", "JMenu", "self", ",", "Action", "action", ")", "{", "self", ".", "add", "(", "action", ")", ";", "return", "self", ";", "}" ]
Overloads the left shift operator to provide an easy way to add components to a menu.<p> @param self a JMenu @param action an action to be added to the menu. @return same menu, after the value was added to it. @since 1.6.4
[ "Overloads", "the", "left", "shift", "operator", "to", "provide", "an", "easy", "way", "to", "add", "components", "to", "a", "menu", ".", "<p", ">" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java#L767-L770
javagl/ND
nd-distance/src/main/java/de/javagl/nd/distance/tuples/i/IntTupleDistanceFunctions.java
IntTupleDistanceFunctions.computeEuclidean
static double computeEuclidean(IntTuple t0, IntTuple t1) { """ Computes the Euclidean distance between the given arrays @param t0 The first array @param t1 The second array @return The distance @throws IllegalArgumentException If the given array do not have the same length """ return Math.sqrt(...
java
static double computeEuclidean(IntTuple t0, IntTuple t1) { return Math.sqrt(computeEuclideanSquared(t0, t1)); }
[ "static", "double", "computeEuclidean", "(", "IntTuple", "t0", ",", "IntTuple", "t1", ")", "{", "return", "Math", ".", "sqrt", "(", "computeEuclideanSquared", "(", "t0", ",", "t1", ")", ")", ";", "}" ]
Computes the Euclidean distance between the given arrays @param t0 The first array @param t1 The second array @return The distance @throws IllegalArgumentException If the given array do not have the same length
[ "Computes", "the", "Euclidean", "distance", "between", "the", "given", "arrays" ]
train
https://github.com/javagl/ND/blob/bcb655aaf5fc88af6194f73a27cca079186ff559/nd-distance/src/main/java/de/javagl/nd/distance/tuples/i/IntTupleDistanceFunctions.java#L183-L186
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java
WordVectorSerializer.readSequenceVectors
public static <T extends SequenceElement> SequenceVectors<T> readSequenceVectors( @NonNull SequenceElementFactory<T> factory, @NonNull InputStream stream) throws IOException { """ This method loads previously saved SequenceVectors model from InputStream @param factory @param stream @param <T> @re...
java
public static <T extends SequenceElement> SequenceVectors<T> readSequenceVectors( @NonNull SequenceElementFactory<T> factory, @NonNull InputStream stream) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(stream, "UTF-8")); // at first we load vectors con...
[ "public", "static", "<", "T", "extends", "SequenceElement", ">", "SequenceVectors", "<", "T", ">", "readSequenceVectors", "(", "@", "NonNull", "SequenceElementFactory", "<", "T", ">", "factory", ",", "@", "NonNull", "InputStream", "stream", ")", "throws", "IOExc...
This method loads previously saved SequenceVectors model from InputStream @param factory @param stream @param <T> @return
[ "This", "method", "loads", "previously", "saved", "SequenceVectors", "model", "from", "InputStream" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java#L2135-L2176
Coveros/selenified
src/main/java/com/coveros/selenified/Selenified.java
Selenified.setAppURL
protected static void setAppURL(Selenified clazz, ITestContext context, String siteURL) { """ Sets the URL of the application under test. If the site was provided as a system property, this method ignores the passed in value, and uses the system property. @param clazz - the test suite class, used for making...
java
protected static void setAppURL(Selenified clazz, ITestContext context, String siteURL) { context.setAttribute(clazz.getClass().getName() + APP_URL, siteURL); }
[ "protected", "static", "void", "setAppURL", "(", "Selenified", "clazz", ",", "ITestContext", "context", ",", "String", "siteURL", ")", "{", "context", ".", "setAttribute", "(", "clazz", ".", "getClass", "(", ")", ".", "getName", "(", ")", "+", "APP_URL", "...
Sets the URL of the application under test. If the site was provided as a system property, this method ignores the passed in value, and uses the system property. @param clazz - the test suite class, used for making threadsafe storage of application, allowing suites to have independent applications under test, run at...
[ "Sets", "the", "URL", "of", "the", "application", "under", "test", ".", "If", "the", "site", "was", "provided", "as", "a", "system", "property", "this", "method", "ignores", "the", "passed", "in", "value", "and", "uses", "the", "system", "property", "." ]
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/Selenified.java#L106-L108
dropbox/dropbox-sdk-java
src/main/java/com/dropbox/core/v1/DbxClientV1.java
DbxClientV1.disableAccessToken
public void disableAccessToken() throws DbxException { """ Disable the access token that you constructed this {@code DbxClientV1} with. After calling this, API calls made with this {@code DbxClientV1} will fail. """ String host = this.host.getApi(); String apiPath = "1/disable_access...
java
public void disableAccessToken() throws DbxException { String host = this.host.getApi(); String apiPath = "1/disable_access_token"; doPost(host, apiPath, null, null, new DbxRequestUtil.ResponseHandler</*@Nullable*/Void>() { @Override public /*@Nullable*/Void ...
[ "public", "void", "disableAccessToken", "(", ")", "throws", "DbxException", "{", "String", "host", "=", "this", ".", "host", ".", "getApi", "(", ")", ";", "String", "apiPath", "=", "\"1/disable_access_token\"", ";", "doPost", "(", "host", ",", "apiPath", ","...
Disable the access token that you constructed this {@code DbxClientV1} with. After calling this, API calls made with this {@code DbxClientV1} will fail.
[ "Disable", "the", "access", "token", "that", "you", "constructed", "this", "{" ]
train
https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/v1/DbxClientV1.java#L374-L391
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CPDefinitionInventoryPersistenceImpl.java
CPDefinitionInventoryPersistenceImpl.removeByUUID_G
@Override public CPDefinitionInventory removeByUUID_G(String uuid, long groupId) throws NoSuchCPDefinitionInventoryException { """ Removes the cp definition inventory where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the cp definition invento...
java
@Override public CPDefinitionInventory removeByUUID_G(String uuid, long groupId) throws NoSuchCPDefinitionInventoryException { CPDefinitionInventory cpDefinitionInventory = findByUUID_G(uuid, groupId); return remove(cpDefinitionInventory); }
[ "@", "Override", "public", "CPDefinitionInventory", "removeByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "NoSuchCPDefinitionInventoryException", "{", "CPDefinitionInventory", "cpDefinitionInventory", "=", "findByUUID_G", "(", "uuid", ",", "group...
Removes the cp definition inventory where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the cp definition inventory that was removed
[ "Removes", "the", "cp", "definition", "inventory", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CPDefinitionInventoryPersistenceImpl.java#L816-L822
alkacon/opencms-core
src/org/opencms/ade/sitemap/CmsModelPageHelper.java
CmsModelPageHelper.createModelPageEntry
CmsModelPageEntry createModelPageEntry(CmsResource resource, boolean disabled, boolean isDefault, Locale locale) { """ Creates a model page entry bean from a model page resource.<p> @param resource the model page resource @param disabled if the model page is disabled @param isDefault if this is the default mo...
java
CmsModelPageEntry createModelPageEntry(CmsResource resource, boolean disabled, boolean isDefault, Locale locale) { try { CmsModelPageEntry result = new CmsModelPageEntry(); result.setDefault(isDefault); result.setDisabled(disabled); List<CmsProperty> properties =...
[ "CmsModelPageEntry", "createModelPageEntry", "(", "CmsResource", "resource", ",", "boolean", "disabled", ",", "boolean", "isDefault", ",", "Locale", "locale", ")", "{", "try", "{", "CmsModelPageEntry", "result", "=", "new", "CmsModelPageEntry", "(", ")", ";", "res...
Creates a model page entry bean from a model page resource.<p> @param resource the model page resource @param disabled if the model page is disabled @param isDefault if this is the default model page @param locale the current user locale @return the model page entry bean
[ "Creates", "a", "model", "page", "entry", "bean", "from", "a", "model", "page", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/sitemap/CmsModelPageHelper.java#L419-L459
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.fetchMode
public void fetchMode(String associationPath, FetchMode fetchMode) { """ Sets the fetch mode of an associated path @param associationPath The name of the associated path @param fetchMode The fetch mode to set """ if (criteria != null) { criteria.setFetchMode(associationPath, fetchMode);...
java
public void fetchMode(String associationPath, FetchMode fetchMode) { if (criteria != null) { criteria.setFetchMode(associationPath, fetchMode); } }
[ "public", "void", "fetchMode", "(", "String", "associationPath", ",", "FetchMode", "fetchMode", ")", "{", "if", "(", "criteria", "!=", "null", ")", "{", "criteria", ".", "setFetchMode", "(", "associationPath", ",", "fetchMode", ")", ";", "}", "}" ]
Sets the fetch mode of an associated path @param associationPath The name of the associated path @param fetchMode The fetch mode to set
[ "Sets", "the", "fetch", "mode", "of", "an", "associated", "path" ]
train
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L544-L548
l0s/fernet-java8
fernet-aws-secrets-manager-rotator/src/main/java/com/macasaet/fernet/aws/secretsmanager/rotation/SecretsManager.java
SecretsManager.getSecretVersion
public ByteBuffer getSecretVersion(final String secretId, final String clientRequestToken) { """ Retrieve a specific version of the secret. This requires the permission <code>secretsmanager:GetSecretValue</code> @param secretId the ARN of the secret @param clientRequestToken the version identifier of the secre...
java
public ByteBuffer getSecretVersion(final String secretId, final String clientRequestToken) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionId(clientRequestToken); final GetSecr...
[ "public", "ByteBuffer", "getSecretVersion", "(", "final", "String", "secretId", ",", "final", "String", "clientRequestToken", ")", "{", "final", "GetSecretValueRequest", "getSecretValueRequest", "=", "new", "GetSecretValueRequest", "(", ")", ";", "getSecretValueRequest", ...
Retrieve a specific version of the secret. This requires the permission <code>secretsmanager:GetSecretValue</code> @param secretId the ARN of the secret @param clientRequestToken the version identifier of the secret @return the Fernet key or keys in binary form
[ "Retrieve", "a", "specific", "version", "of", "the", "secret", ".", "This", "requires", "the", "permission", "<code", ">", "secretsmanager", ":", "GetSecretValue<", "/", "code", ">" ]
train
https://github.com/l0s/fernet-java8/blob/427244bc1af605ffca0ac2469d66b297ea9f77b3/fernet-aws-secrets-manager-rotator/src/main/java/com/macasaet/fernet/aws/secretsmanager/rotation/SecretsManager.java#L92-L98