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
JodaOrg/joda-time
src/main/java/org/joda/time/format/DateTimeFormatterBuilder.java
DateTimeFormatterBuilder.appendTimeZoneOffset
public DateTimeFormatterBuilder appendTimeZoneOffset( String zeroOffsetPrintText, String zeroOffsetParseText, boolean showSeparators, int minFields, int maxFields) { """ Instructs the printer to emit text and numbers to display time zone offset from UTC. A parser will use the parsed time z...
java
public DateTimeFormatterBuilder appendTimeZoneOffset( String zeroOffsetPrintText, String zeroOffsetParseText, boolean showSeparators, int minFields, int maxFields) { return append0(new TimeZoneOffset (zeroOffsetPrintText, zeroOffsetParseText, showSeparators, minFie...
[ "public", "DateTimeFormatterBuilder", "appendTimeZoneOffset", "(", "String", "zeroOffsetPrintText", ",", "String", "zeroOffsetParseText", ",", "boolean", "showSeparators", ",", "int", "minFields", ",", "int", "maxFields", ")", "{", "return", "append0", "(", "new", "Ti...
Instructs the printer to emit text and numbers to display time zone offset from UTC. A parser will use the parsed time zone offset to adjust the datetime. <p> If zero offset print text is supplied, then it will be printed when the zone is zero. If zero offset parse text is supplied, then either it or the offset will be...
[ "Instructs", "the", "printer", "to", "emit", "text", "and", "numbers", "to", "display", "time", "zone", "offset", "from", "UTC", ".", "A", "parser", "will", "use", "the", "parsed", "time", "zone", "offset", "to", "adjust", "the", "datetime", ".", "<p", "...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/DateTimeFormatterBuilder.java#L1116-L1121
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.paymentMean_paypal_id_PUT
public void paymentMean_paypal_id_PUT(Long id, OvhPaypal body) throws IOException { """ Alter this object properties REST: PUT /me/paymentMean/paypal/{id} @param body [required] New object properties @param id [required] Id of the object """ String qPath = "/me/paymentMean/paypal/{id}"; StringBuilder ...
java
public void paymentMean_paypal_id_PUT(Long id, OvhPaypal body) throws IOException { String qPath = "/me/paymentMean/paypal/{id}"; StringBuilder sb = path(qPath, id); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "paymentMean_paypal_id_PUT", "(", "Long", "id", ",", "OvhPaypal", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/paymentMean/paypal/{id}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "id", ")", ";", ...
Alter this object properties REST: PUT /me/paymentMean/paypal/{id} @param body [required] New object properties @param id [required] Id of the object
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L643-L647
xiancloud/xian
xian-core/src/main/java/info/xiancloud/core/message/UnitResponse.java
UnitResponse.createError
public static UnitResponse createError(String errCode, Object data, String errMsg) { """ create a new error unit response instance. @param errCode the error code. @param data the data, anything you want, can be an exception object too @param errMsg the error message. @return the newly created unit respon...
java
public static UnitResponse createError(String errCode, Object data, String errMsg) { if (Group.CODE_SUCCESS.equalsIgnoreCase(errCode)) { throw new IllegalArgumentException("Only non-success code is allowed here."); } return new UnitResponse().setCode(errCode).setData(data).setMessage...
[ "public", "static", "UnitResponse", "createError", "(", "String", "errCode", ",", "Object", "data", ",", "String", "errMsg", ")", "{", "if", "(", "Group", ".", "CODE_SUCCESS", ".", "equalsIgnoreCase", "(", "errCode", ")", ")", "{", "throw", "new", "IllegalAr...
create a new error unit response instance. @param errCode the error code. @param data the data, anything you want, can be an exception object too @param errMsg the error message. @return the newly created unit response object.
[ "create", "a", "new", "error", "unit", "response", "instance", "." ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/message/UnitResponse.java#L174-L179
hazelcast/hazelcast
hazelcast-client/src/main/java/com/hazelcast/client/spi/ProxyManager.java
ProxyManager.destroyProxyLocally
public void destroyProxyLocally(String service, String id) { """ Locally destroys the proxy identified by the given service and object ID. <p> Upon successful completion the proxy is unregistered in this proxy manager and all local resources associated with the proxy are released. @param service the service ...
java
public void destroyProxyLocally(String service, String id) { ObjectNamespace objectNamespace = new DistributedObjectNamespace(service, id); ClientProxyFuture clientProxyFuture = proxies.remove(objectNamespace); if (clientProxyFuture != null) { ClientProxy clientProxy = clientProxyFut...
[ "public", "void", "destroyProxyLocally", "(", "String", "service", ",", "String", "id", ")", "{", "ObjectNamespace", "objectNamespace", "=", "new", "DistributedObjectNamespace", "(", "service", ",", "id", ")", ";", "ClientProxyFuture", "clientProxyFuture", "=", "pro...
Locally destroys the proxy identified by the given service and object ID. <p> Upon successful completion the proxy is unregistered in this proxy manager and all local resources associated with the proxy are released. @param service the service associated with the proxy. @param id the ID of the object to destroy t...
[ "Locally", "destroys", "the", "proxy", "identified", "by", "the", "given", "service", "and", "object", "ID", ".", "<p", ">", "Upon", "successful", "completion", "the", "proxy", "is", "unregistered", "in", "this", "proxy", "manager", "and", "all", "local", "r...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast-client/src/main/java/com/hazelcast/client/spi/ProxyManager.java#L375-L382
radkovo/SwingBox
src/main/java/org/fit/cssbox/swingbox/BrowserPane.java
BrowserPane.renderContent
public Graphics2D renderContent() { """ Renders current content to graphic context, which is returned. May return null; @return the Graphics2D context @see Graphics2D """ View view = null; ViewFactory factory = getEditorKit().getViewFactory(); if (factory instanceof SwingBoxViewFac...
java
public Graphics2D renderContent() { View view = null; ViewFactory factory = getEditorKit().getViewFactory(); if (factory instanceof SwingBoxViewFactory) { view = ((SwingBoxViewFactory) factory).getViewport(); } if (view != null) { int ...
[ "public", "Graphics2D", "renderContent", "(", ")", "{", "View", "view", "=", "null", ";", "ViewFactory", "factory", "=", "getEditorKit", "(", ")", ".", "getViewFactory", "(", ")", ";", "if", "(", "factory", "instanceof", "SwingBoxViewFactory", ")", "{", "vie...
Renders current content to graphic context, which is returned. May return null; @return the Graphics2D context @see Graphics2D
[ "Renders", "current", "content", "to", "graphic", "context", "which", "is", "returned", ".", "May", "return", "null", ";" ]
train
https://github.com/radkovo/SwingBox/blob/ff370f3dc54d248e4c8852c17513618c83c25984/src/main/java/org/fit/cssbox/swingbox/BrowserPane.java#L230-L256
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/optimize/solvers/accumulation/BasicGradientsAccumulator.java
BasicGradientsAccumulator.applyUpdate
@Override public void applyUpdate(StepFunction function, INDArray params, INDArray grad, boolean isFinalStep) { """ This method applies accumulated updates via given StepFunction @param function @param params """ try { updatesLock.readLock().lock(); firstOne.compareAnd...
java
@Override public void applyUpdate(StepFunction function, INDArray params, INDArray grad, boolean isFinalStep) { try { updatesLock.readLock().lock(); firstOne.compareAndSet(-1L, Thread.currentThread().getId()); if (hasSomething.get()) function.step(param...
[ "@", "Override", "public", "void", "applyUpdate", "(", "StepFunction", "function", ",", "INDArray", "params", ",", "INDArray", "grad", ",", "boolean", "isFinalStep", ")", "{", "try", "{", "updatesLock", ".", "readLock", "(", ")", ".", "lock", "(", ")", ";"...
This method applies accumulated updates via given StepFunction @param function @param params
[ "This", "method", "applies", "accumulated", "updates", "via", "given", "StepFunction" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/optimize/solvers/accumulation/BasicGradientsAccumulator.java#L105-L133
termsuite/termsuite-core
src/main/java/fr/univnantes/termsuite/engines/postproc/TwoOrderVariationMerger.java
TwoOrderVariationMerger.mergeTwoOrderVariations
private void mergeTwoOrderVariations(Predicate<RelationService> p1, Predicate<RelationService> p2) { """ /* When baseTerm -r1-> v1 baseTerm --rtrans--> v2 and v1 -r2-> v2 Then remove baseTerm --rtrans--> v2 """ /* * t1 --r1--> t2 --r2--> t3 * t1 --rtrans--> t3 */ terminology.terms(T...
java
private void mergeTwoOrderVariations(Predicate<RelationService> p1, Predicate<RelationService> p2) { /* * t1 --r1--> t2 --r2--> t3 * t1 --rtrans--> t3 */ terminology.terms(TermProperty.FREQUENCY.getComparator(true)) .forEach(t1 -> { final Map<Term, Relation> r1Set = new HashMap<>(); t1.variatio...
[ "private", "void", "mergeTwoOrderVariations", "(", "Predicate", "<", "RelationService", ">", "p1", ",", "Predicate", "<", "RelationService", ">", "p2", ")", "{", "/*\n\t\t * t1 --r1--> t2 --r2--> t3\n\t\t * t1 --rtrans--> t3\n\t\t */", "terminology", ".", "terms", "(", ...
/* When baseTerm -r1-> v1 baseTerm --rtrans--> v2 and v1 -r2-> v2 Then remove baseTerm --rtrans--> v2
[ "/", "*", "When" ]
train
https://github.com/termsuite/termsuite-core/blob/731e5d0bc7c14180713c01a9c7dffe1925f26130/src/main/java/fr/univnantes/termsuite/engines/postproc/TwoOrderVariationMerger.java#L99-L140
virgo47/javasimon
console-embed/src/main/java/org/javasimon/console/SimonVisitors.java
SimonVisitors.visitTree
public static void visitTree(Simon simon, SimonVisitor visitor) throws IOException { """ Visit Simons recursively as a tree starting from the specified Simon. @param simon Parent simon @param visitor Visitor @throws IOException """ visitor.visit(simon); for (Simon childSimon : simon.getChildren()) {...
java
public static void visitTree(Simon simon, SimonVisitor visitor) throws IOException { visitor.visit(simon); for (Simon childSimon : simon.getChildren()) { visitTree(childSimon, visitor); } }
[ "public", "static", "void", "visitTree", "(", "Simon", "simon", ",", "SimonVisitor", "visitor", ")", "throws", "IOException", "{", "visitor", ".", "visit", "(", "simon", ")", ";", "for", "(", "Simon", "childSimon", ":", "simon", ".", "getChildren", "(", ")...
Visit Simons recursively as a tree starting from the specified Simon. @param simon Parent simon @param visitor Visitor @throws IOException
[ "Visit", "Simons", "recursively", "as", "a", "tree", "starting", "from", "the", "specified", "Simon", "." ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/console-embed/src/main/java/org/javasimon/console/SimonVisitors.java#L58-L63
netty/netty
transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java
AbstractNioByteChannel.doWrite0
protected final int doWrite0(ChannelOutboundBuffer in) throws Exception { """ Write objects to the OS. @param in the collection which contains objects to write. @return The value that should be decremented from the write quantum which starts at {@link ChannelConfig#getWriteSpinCount()}. The typical use cases ar...
java
protected final int doWrite0(ChannelOutboundBuffer in) throws Exception { Object msg = in.current(); if (msg == null) { // Directly return here so incompleteWrite(...) is not called. return 0; } return doWriteInternal(in, in.current()); }
[ "protected", "final", "int", "doWrite0", "(", "ChannelOutboundBuffer", "in", ")", "throws", "Exception", "{", "Object", "msg", "=", "in", ".", "current", "(", ")", ";", "if", "(", "msg", "==", "null", ")", "{", "// Directly return here so incompleteWrite(...) is...
Write objects to the OS. @param in the collection which contains objects to write. @return The value that should be decremented from the write quantum which starts at {@link ChannelConfig#getWriteSpinCount()}. The typical use cases are as follows: <ul> <li>0 - if no write was attempted. This is appropriate if an empty ...
[ "Write", "objects", "to", "the", "OS", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java#L203-L210
spring-projects/spring-mobile
spring-mobile-device/src/main/java/org/springframework/mobile/device/util/ResolverUtils.java
ResolverUtils.isNormal
public static boolean isNormal(Device device, SitePreference sitePreference) { """ Should the combination of {@link Device} and {@link SitePreference} be handled as a normal device @param device the resolved device @param sitePreference the specified site preference @return true if normal """ return site...
java
public static boolean isNormal(Device device, SitePreference sitePreference) { return sitePreference == SitePreference.NORMAL || (device == null || device.isNormal() && sitePreference == null); }
[ "public", "static", "boolean", "isNormal", "(", "Device", "device", ",", "SitePreference", "sitePreference", ")", "{", "return", "sitePreference", "==", "SitePreference", ".", "NORMAL", "||", "(", "device", "==", "null", "||", "device", ".", "isNormal", "(", "...
Should the combination of {@link Device} and {@link SitePreference} be handled as a normal device @param device the resolved device @param sitePreference the specified site preference @return true if normal
[ "Should", "the", "combination", "of", "{" ]
train
https://github.com/spring-projects/spring-mobile/blob/a402cbcaf208e24288b957f44c9984bd6e8bf064/spring-mobile-device/src/main/java/org/springframework/mobile/device/util/ResolverUtils.java#L36-L39
stapler/stapler
core/src/main/java/org/kohsuke/stapler/Stapler.java
Stapler.setClassLoader
public static void setClassLoader( ServletContext context, ClassLoader classLoader ) { """ Sets the classloader used by {@link StaplerRequest#bindJSON(Class, JSONObject)} and its sibling methods. @deprecated Use {@link WebApp#setClassLoader(ClassLoader)} """ WebApp.get(context).setClassLoader(class...
java
public static void setClassLoader( ServletContext context, ClassLoader classLoader ) { WebApp.get(context).setClassLoader(classLoader); }
[ "public", "static", "void", "setClassLoader", "(", "ServletContext", "context", ",", "ClassLoader", "classLoader", ")", "{", "WebApp", ".", "get", "(", "context", ")", ".", "setClassLoader", "(", "classLoader", ")", ";", "}" ]
Sets the classloader used by {@link StaplerRequest#bindJSON(Class, JSONObject)} and its sibling methods. @deprecated Use {@link WebApp#setClassLoader(ClassLoader)}
[ "Sets", "the", "classloader", "used", "by", "{", "@link", "StaplerRequest#bindJSON", "(", "Class", "JSONObject", ")", "}", "and", "its", "sibling", "methods", "." ]
train
https://github.com/stapler/stapler/blob/11ad5af185e062fb46e01bf9fbed66f3ebf2a8f7/core/src/main/java/org/kohsuke/stapler/Stapler.java#L956-L958
alkacon/opencms-core
src/org/opencms/db/CmsLoginManager.java
CmsLoginManager.canLockBecauseOfInactivity
public boolean canLockBecauseOfInactivity(CmsObject cms, CmsUser user) { """ Checks whether a user account can be locked because of inactivity. @param cms the CMS context @param user the user to check @return true if the user may be locked after being inactive for too long """ return !user.isMana...
java
public boolean canLockBecauseOfInactivity(CmsObject cms, CmsUser user) { return !user.isManaged() && !user.isWebuser() && !OpenCms.getDefaultUsers().isDefaultUser(user.getName()) && !OpenCms.getRoleManager().hasRole(cms, user.getName(), CmsRole.ROOT_ADMIN); }
[ "public", "boolean", "canLockBecauseOfInactivity", "(", "CmsObject", "cms", ",", "CmsUser", "user", ")", "{", "return", "!", "user", ".", "isManaged", "(", ")", "&&", "!", "user", ".", "isWebuser", "(", ")", "&&", "!", "OpenCms", ".", "getDefaultUsers", "(...
Checks whether a user account can be locked because of inactivity. @param cms the CMS context @param user the user to check @return true if the user may be locked after being inactive for too long
[ "Checks", "whether", "a", "user", "account", "can", "be", "locked", "because", "of", "inactivity", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsLoginManager.java#L265-L271
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.setSecret
public SecretBundle setSecret(String vaultBaseUrl, String secretName, String value) { """ Sets a secret in a specified key vault. The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret. This operation requires the secrets/se...
java
public SecretBundle setSecret(String vaultBaseUrl, String secretName, String value) { return setSecretWithServiceResponseAsync(vaultBaseUrl, secretName, value).toBlocking().single().body(); }
[ "public", "SecretBundle", "setSecret", "(", "String", "vaultBaseUrl", ",", "String", "secretName", ",", "String", "value", ")", "{", "return", "setSecretWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "secretName", ",", "value", ")", ".", "toBlocking", "(", "...
Sets a secret in a specified key vault. The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret. This operation requires the secrets/set permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. ...
[ "Sets", "a", "secret", "in", "a", "specified", "key", "vault", ".", "The", "SET", "operation", "adds", "a", "secret", "to", "the", "Azure", "Key", "Vault", ".", "If", "the", "named", "secret", "already", "exists", "Azure", "Key", "Vault", "creates", "a",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L3322-L3324
sculptor/sculptor
sculptor-examples/DDDSample/src/main/java/org/sculptor/dddsample/cargo/domain/RouteSpecification.java
RouteSpecification.forCargo
public static RouteSpecification forCargo(Cargo cargo, DateTime arrivalDeadline) { """ Factory for creatig a route specification for a cargo, from cargo origin to cargo destination. Use for initial routing. @param cargo cargo @param arrivalDeadline arrival deadline @return A route specification for this carg...
java
public static RouteSpecification forCargo(Cargo cargo, DateTime arrivalDeadline) { Validate.notNull(cargo); Validate.notNull(arrivalDeadline); return new RouteSpecification(arrivalDeadline, cargo.getOrigin(), cargo.getDestination()); }
[ "public", "static", "RouteSpecification", "forCargo", "(", "Cargo", "cargo", ",", "DateTime", "arrivalDeadline", ")", "{", "Validate", ".", "notNull", "(", "cargo", ")", ";", "Validate", ".", "notNull", "(", "arrivalDeadline", ")", ";", "return", "new", "Route...
Factory for creatig a route specification for a cargo, from cargo origin to cargo destination. Use for initial routing. @param cargo cargo @param arrivalDeadline arrival deadline @return A route specification for this cargo and arrival deadline
[ "Factory", "for", "creatig", "a", "route", "specification", "for", "a", "cargo", "from", "cargo", "origin", "to", "cargo", "destination", ".", "Use", "for", "initial", "routing", "." ]
train
https://github.com/sculptor/sculptor/blob/38df06ceb7e40f5f52dbd53b1cd1d07ee11aade5/sculptor-examples/DDDSample/src/main/java/org/sculptor/dddsample/cargo/domain/RouteSpecification.java#L28-L33
openbase/jul
extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java
LabelProcessor.getBestMatch
public static String getBestMatch(final LabelOrBuilder label, final String alternative) { """ Get the first label for the default language from a label type. This is equivalent to calling {@link #getLabelByLanguage(String, LabelOrBuilder)} but the language code is extracted from the locale by calling {@link Loca...
java
public static String getBestMatch(final LabelOrBuilder label, final String alternative) { try { return getBestMatch(Locale.getDefault(), label); } catch (NotAvailableException e) { return alternative; } }
[ "public", "static", "String", "getBestMatch", "(", "final", "LabelOrBuilder", "label", ",", "final", "String", "alternative", ")", "{", "try", "{", "return", "getBestMatch", "(", "Locale", ".", "getDefault", "(", ")", ",", "label", ")", ";", "}", "catch", ...
Get the first label for the default language from a label type. This is equivalent to calling {@link #getLabelByLanguage(String, LabelOrBuilder)} but the language code is extracted from the locale by calling {@link Locale#getDefault()} . If no label matches the languageCode, than the first label of any other provided l...
[ "Get", "the", "first", "label", "for", "the", "default", "language", "from", "a", "label", "type", ".", "This", "is", "equivalent", "to", "calling", "{", "@link", "#getLabelByLanguage", "(", "String", "LabelOrBuilder", ")", "}", "but", "the", "language", "co...
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java#L255-L261
kubernetes-client/java
util/src/main/java/io/kubernetes/client/informer/cache/DeltaFIFO.java
DeltaFIFO.queueActionLocked
private void queueActionLocked(DeltaType actionType, Object obj) { """ queueActionLocked appends to the delta list for the object. Caller must hold the lock. """ String id = this.keyOf(obj); // If object is supposed to be deleted (last event is Deleted), // then we should ignore Sync events, becau...
java
private void queueActionLocked(DeltaType actionType, Object obj) { String id = this.keyOf(obj); // If object is supposed to be deleted (last event is Deleted), // then we should ignore Sync events, because it would result in // recreation of this object. if (actionType == DeltaType.Sync && this.wil...
[ "private", "void", "queueActionLocked", "(", "DeltaType", "actionType", ",", "Object", "obj", ")", "{", "String", "id", "=", "this", ".", "keyOf", "(", "obj", ")", ";", "// If object is supposed to be deleted (last event is Deleted),", "// then we should ignore Sync event...
queueActionLocked appends to the delta list for the object. Caller must hold the lock.
[ "queueActionLocked", "appends", "to", "the", "delta", "list", "for", "the", "object", ".", "Caller", "must", "hold", "the", "lock", "." ]
train
https://github.com/kubernetes-client/java/blob/7413e98bd904f09d1ad00fb60e8c6ff787f3f560/util/src/main/java/io/kubernetes/client/informer/cache/DeltaFIFO.java#L337-L370
jcuda/jcusparse
JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java
JCusparse.cusparseCsr2cscEx
public static int cusparseCsr2cscEx( cusparseHandle handle, int m, int n, int nnz, Pointer csrSortedVal, int csrSortedValtype, Pointer csrSortedRowPtr, Pointer csrSortedColInd, Pointer cscSortedVal, int cscSortedValtype, ...
java
public static int cusparseCsr2cscEx( cusparseHandle handle, int m, int n, int nnz, Pointer csrSortedVal, int csrSortedValtype, Pointer csrSortedRowPtr, Pointer csrSortedColInd, Pointer cscSortedVal, int cscSortedValtype, ...
[ "public", "static", "int", "cusparseCsr2cscEx", "(", "cusparseHandle", "handle", ",", "int", "m", ",", "int", "n", ",", "int", "nnz", ",", "Pointer", "csrSortedVal", ",", "int", "csrSortedValtype", ",", "Pointer", "csrSortedRowPtr", ",", "Pointer", "csrSortedCol...
Description: This routine converts a matrix from CSR to CSC sparse storage format. The resulting matrix can be re-interpreted as a transpose of the original matrix in CSR storage format.
[ "Description", ":", "This", "routine", "converts", "a", "matrix", "from", "CSR", "to", "CSC", "sparse", "storage", "format", ".", "The", "resulting", "matrix", "can", "be", "re", "-", "interpreted", "as", "a", "transpose", "of", "the", "original", "matrix", ...
train
https://github.com/jcuda/jcusparse/blob/7687a62a4ef6b76cb91cf7da93d4cf5ade96a791/JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java#L11644-L11662
CenturyLinkCloud/mdw
mdw-workflow/src/com/centurylink/mdw/workflow/adapter/TextAdapterActivity.java
TextAdapterActivity.countTries
private int countTries() throws ActivityException { """ This is only used by activities, not connection pools @return """ Integer[] statuses = { WorkStatus.STATUS_FAILED }; // note the current activity is at in-progress status. Failed status must be counted // It is debatable if we sho...
java
private int countTries() throws ActivityException { Integer[] statuses = { WorkStatus.STATUS_FAILED }; // note the current activity is at in-progress status. Failed status must be counted // It is debatable if we should include other statuses int count; try { count = ...
[ "private", "int", "countTries", "(", ")", "throws", "ActivityException", "{", "Integer", "[", "]", "statuses", "=", "{", "WorkStatus", ".", "STATUS_FAILED", "}", ";", "// note the current activity is at in-progress status. Failed status must be counted", "// It is debatable i...
This is only used by activities, not connection pools @return
[ "This", "is", "only", "used", "by", "activities", "not", "connection", "pools" ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/TextAdapterActivity.java#L274-L288
apache/incubator-druid
core/src/main/java/org/apache/druid/common/guava/GuavaUtils.java
GuavaUtils.getEnumIfPresent
@Nullable public static <T extends Enum<T>> T getEnumIfPresent(final Class<T> enumClass, final String value) { """ Like Guava's Enums.getIfPresent, with some differences. <ul> <li>Returns nullable rather than Optional</li> <li>Does not require Guava 12</li> </ul> """ Preconditions.checkNotNull(enumCl...
java
@Nullable public static <T extends Enum<T>> T getEnumIfPresent(final Class<T> enumClass, final String value) { Preconditions.checkNotNull(enumClass, "enumClass"); Preconditions.checkNotNull(value, "value"); for (T enumValue : enumClass.getEnumConstants()) { if (enumValue.name().equals(value)) { ...
[ "@", "Nullable", "public", "static", "<", "T", "extends", "Enum", "<", "T", ">", ">", "T", "getEnumIfPresent", "(", "final", "Class", "<", "T", ">", "enumClass", ",", "final", "String", "value", ")", "{", "Preconditions", ".", "checkNotNull", "(", "enumC...
Like Guava's Enums.getIfPresent, with some differences. <ul> <li>Returns nullable rather than Optional</li> <li>Does not require Guava 12</li> </ul>
[ "Like", "Guava", "s", "Enums", ".", "getIfPresent", "with", "some", "differences", ".", "<ul", ">", "<li", ">", "Returns", "nullable", "rather", "than", "Optional<", "/", "li", ">", "<li", ">", "Does", "not", "require", "Guava", "12<", "/", "li", ">", ...
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/common/guava/GuavaUtils.java#L51-L64
JodaOrg/joda-time
src/main/java/org/joda/time/convert/ReadableIntervalConverter.java
ReadableIntervalConverter.setInto
public void setInto(ReadWritableInterval writableInterval, Object object, Chronology chrono) { """ Extracts interval endpoint values from an object of this converter's type, and sets them into the given ReadWritableInterval. @param writableInterval interval to get modified, not null @param object the object ...
java
public void setInto(ReadWritableInterval writableInterval, Object object, Chronology chrono) { ReadableInterval input = (ReadableInterval) object; writableInterval.setInterval(input); if (chrono != null) { writableInterval.setChronology(chrono); } else { writableI...
[ "public", "void", "setInto", "(", "ReadWritableInterval", "writableInterval", ",", "Object", "object", ",", "Chronology", "chrono", ")", "{", "ReadableInterval", "input", "=", "(", "ReadableInterval", ")", "object", ";", "writableInterval", ".", "setInterval", "(", ...
Extracts interval endpoint values from an object of this converter's type, and sets them into the given ReadWritableInterval. @param writableInterval interval to get modified, not null @param object the object to convert, must not be null @param chrono the chronology to use, may be null @throws ClassCastException if...
[ "Extracts", "interval", "endpoint", "values", "from", "an", "object", "of", "this", "converter", "s", "type", "and", "sets", "them", "into", "the", "given", "ReadWritableInterval", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/convert/ReadableIntervalConverter.java#L98-L106
Sciss/abc4j
abc/src/main/java/abc/ui/swing/JTune.java
JTune.getNoteGlyphesBetween
private Collection getNoteGlyphesBetween(NoteAbstract start, NoteAbstract end) { """ Returns a Collection of JNote representing the note glyphes between start and end NoteAbstract. """ Collection jnotes = new Vector(); try { Collection notes = m_music.getVoice(start.getReference().getVoice()).getNot...
java
private Collection getNoteGlyphesBetween(NoteAbstract start, NoteAbstract end) { Collection jnotes = new Vector(); try { Collection notes = m_music.getVoice(start.getReference().getVoice()).getNotesBetween(start, end); for (Object note : notes) { NoteAbstract n = (NoteAbstract) n...
[ "private", "Collection", "getNoteGlyphesBetween", "(", "NoteAbstract", "start", ",", "NoteAbstract", "end", ")", "{", "Collection", "jnotes", "=", "new", "Vector", "(", ")", ";", "try", "{", "Collection", "notes", "=", "m_music", ".", "getVoice", "(", "start",...
Returns a Collection of JNote representing the note glyphes between start and end NoteAbstract.
[ "Returns", "a", "Collection", "of", "JNote", "representing", "the", "note", "glyphes", "between", "start", "and", "end", "NoteAbstract", "." ]
train
https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/ui/swing/JTune.java#L1514-L1526
tvesalainen/util
util/src/main/java/org/vesalainen/util/CollectionHelp.java
CollectionHelp.print
public static final String print(String start, String delim, String quotStart, String quotEnd, String end, Object... array) { """ Returns array items delimited with given strings. If any of delimiters is null, it is ignored. @param start @param delim @param quotStart @param quotEnd @param end @param array ...
java
public static final String print(String start, String delim, String quotStart, String quotEnd, String end, Object... array) { try { StringBuilder out = new StringBuilder(); print(out, start, delim, quotStart, quotEnd, end, array); return out.toString(); ...
[ "public", "static", "final", "String", "print", "(", "String", "start", ",", "String", "delim", ",", "String", "quotStart", ",", "String", "quotEnd", ",", "String", "end", ",", "Object", "...", "array", ")", "{", "try", "{", "StringBuilder", "out", "=", ...
Returns array items delimited with given strings. If any of delimiters is null, it is ignored. @param start @param delim @param quotStart @param quotEnd @param end @param array @return
[ "Returns", "array", "items", "delimited", "with", "given", "strings", ".", "If", "any", "of", "delimiters", "is", "null", "it", "is", "ignored", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CollectionHelp.java#L252-L264
glyptodon/guacamole-client
extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/api/DuoCookie.java
DuoCookie.parseDuoCookie
public static DuoCookie parseDuoCookie(String str) throws GuacamoleException { """ Parses a base64-encoded Duo cookie, producing a new DuoCookie object containing the data therein. If the given string is not a valid Duo cookie, an exception is thrown. Note that the cookie may be expired, and must be checked for...
java
public static DuoCookie parseDuoCookie(String str) throws GuacamoleException { // Attempt to decode data as base64 String data; try { data = new String(BaseEncoding.base64().decode(str), "UTF-8"); } // Bail if invalid base64 is provided catch (IllegalArgumen...
[ "public", "static", "DuoCookie", "parseDuoCookie", "(", "String", "str", ")", "throws", "GuacamoleException", "{", "// Attempt to decode data as base64", "String", "data", ";", "try", "{", "data", "=", "new", "String", "(", "BaseEncoding", ".", "base64", "(", ")",...
Parses a base64-encoded Duo cookie, producing a new DuoCookie object containing the data therein. If the given string is not a valid Duo cookie, an exception is thrown. Note that the cookie may be expired, and must be checked for expiration prior to actual use. @param str The base64-encoded Duo cookie to parse. @retu...
[ "Parses", "a", "base64", "-", "encoded", "Duo", "cookie", "producing", "a", "new", "DuoCookie", "object", "containing", "the", "data", "therein", ".", "If", "the", "given", "string", "is", "not", "a", "valid", "Duo", "cookie", "an", "exception", "is", "thr...
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/api/DuoCookie.java#L169-L214
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/form/builder/ValidationInterceptor.java
ValidationInterceptor.registerMessageReceiver
protected ValidationListener registerMessageReceiver(String propertyName, Messagable messageReceiver) { """ Register a messageReceiver on a specific property. To keep things in sync, it also triggers a first time check. (validationResultsModel can already be populated) @param propertyName property to listen f...
java
protected ValidationListener registerMessageReceiver(String propertyName, Messagable messageReceiver) { MessagableValidationListener messagableValidationListener = new MessagableValidationListener(propertyName, messageReceiver); validationResults.addValidationListener(propertyName, messagableValidationListener)...
[ "protected", "ValidationListener", "registerMessageReceiver", "(", "String", "propertyName", ",", "Messagable", "messageReceiver", ")", "{", "MessagableValidationListener", "messagableValidationListener", "=", "new", "MessagableValidationListener", "(", "propertyName", ",", "me...
Register a messageReceiver on a specific property. To keep things in sync, it also triggers a first time check. (validationResultsModel can already be populated) @param propertyName property to listen for. @param messageReceiver message capable component. @return {@link ValidationListener} created during the process.
[ "Register", "a", "messageReceiver", "on", "a", "specific", "property", ".", "To", "keep", "things", "in", "sync", "it", "also", "triggers", "a", "first", "time", "check", ".", "(", "validationResultsModel", "can", "already", "be", "populated", ")" ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/form/builder/ValidationInterceptor.java#L57-L63
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java
HttpFields.put
public String put(String name,String value) { """ Set a field. @param name the name of the field @param value the value of the field. If null the field is cleared. """ if (value==null) return remove(name); FieldInfo info=getFieldInfo(name); Field field=getField(in...
java
public String put(String name,String value) { if (value==null) return remove(name); FieldInfo info=getFieldInfo(name); Field field=getField(info,false); // Look for value to replace. if (field!=null) { String old=(field._version==_vers...
[ "public", "String", "put", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "return", "remove", "(", "name", ")", ";", "FieldInfo", "info", "=", "getFieldInfo", "(", "name", ")", ";", "Field", "field", "...
Set a field. @param name the name of the field @param value the value of the field. If null the field is cleared.
[ "Set", "a", "field", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java#L815-L846
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/weightfunctions/QuadraticStddevWeight.java
QuadraticStddevWeight.getWeight
@Override public double getWeight(double distance, double max, double stddev) { """ Evaluate weight function at given parameters. max is ignored. """ if(stddev <= 0) { return 1; } double scaleddistance = distance / (scaling * stddev); // After this, the result would be negative. if(...
java
@Override public double getWeight(double distance, double max, double stddev) { if(stddev <= 0) { return 1; } double scaleddistance = distance / (scaling * stddev); // After this, the result would be negative. if(scaleddistance >= 1.0) { return 0.0; } return 1.0 - scaleddistanc...
[ "@", "Override", "public", "double", "getWeight", "(", "double", "distance", ",", "double", "max", ",", "double", "stddev", ")", "{", "if", "(", "stddev", "<=", "0", ")", "{", "return", "1", ";", "}", "double", "scaleddistance", "=", "distance", "/", "...
Evaluate weight function at given parameters. max is ignored.
[ "Evaluate", "weight", "function", "at", "given", "parameters", ".", "max", "is", "ignored", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/weightfunctions/QuadraticStddevWeight.java#L43-L54
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
UserCoreDao.buildWhereLike
public String buildWhereLike(String field, ColumnValue value) { """ Build where (or selection) LIKE statement for a single field @param field field name @param value column value @return where clause @since 3.0.1 """ String where; if (value != null) { if (value.getTolerance() != null) { thro...
java
public String buildWhereLike(String field, ColumnValue value) { String where; if (value != null) { if (value.getTolerance() != null) { throw new GeoPackageException( "Field value tolerance not supported for LIKE query, Field: " + field + ", Value: " + ", Tolerance: " + value.getToleranc...
[ "public", "String", "buildWhereLike", "(", "String", "field", ",", "ColumnValue", "value", ")", "{", "String", "where", ";", "if", "(", "value", "!=", "null", ")", "{", "if", "(", "value", ".", "getTolerance", "(", ")", "!=", "null", ")", "{", "throw",...
Build where (or selection) LIKE statement for a single field @param field field name @param value column value @return where clause @since 3.0.1
[ "Build", "where", "(", "or", "selection", ")", "LIKE", "statement", "for", "a", "single", "field" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L759-L773
protegeproject/jpaul
src/main/java/jpaul/DataStructs/Relation.java
Relation.containsAll
public boolean containsAll(K key, Collection<? extends V> values) { """ Checks the existence of the relation between <code>key</code> and every element from <code>values</code>. """ return _getValues(key).containsAll(values); }
java
public boolean containsAll(K key, Collection<? extends V> values) { return _getValues(key).containsAll(values); }
[ "public", "boolean", "containsAll", "(", "K", "key", ",", "Collection", "<", "?", "extends", "V", ">", "values", ")", "{", "return", "_getValues", "(", "key", ")", ".", "containsAll", "(", "values", ")", ";", "}" ]
Checks the existence of the relation between <code>key</code> and every element from <code>values</code>.
[ "Checks", "the", "existence", "of", "the", "relation", "between", "<code", ">", "key<", "/", "code", ">", "and", "every", "element", "from", "<code", ">", "values<", "/", "code", ">", "." ]
train
https://github.com/protegeproject/jpaul/blob/db579ffb16faaa4b0c577ec82c246f7349427714/src/main/java/jpaul/DataStructs/Relation.java#L125-L127
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/Input.java
Input.isControlPressed
public boolean isControlPressed(int button, int controller) { """ Check if a controller button has been pressed since last time @param controller The index of the controller to check @param button The button to check for (note that this includes directional controls first) @return True if the button has been...
java
public boolean isControlPressed(int button, int controller) { if (controllerPressed[controller][button]) { controllerPressed[controller][button] = false; return true; } return false; }
[ "public", "boolean", "isControlPressed", "(", "int", "button", ",", "int", "controller", ")", "{", "if", "(", "controllerPressed", "[", "controller", "]", "[", "button", "]", ")", "{", "controllerPressed", "[", "controller", "]", "[", "button", "]", "=", "...
Check if a controller button has been pressed since last time @param controller The index of the controller to check @param button The button to check for (note that this includes directional controls first) @return True if the button has been pressed since last time
[ "Check", "if", "a", "controller", "button", "has", "been", "pressed", "since", "last", "time" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/Input.java#L712-L719
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.serviceName_task_taskId_changeMaintenanceExecutionDate_POST
public OvhTask serviceName_task_taskId_changeMaintenanceExecutionDate_POST(String serviceName, Long taskId, Date executionDate) throws IOException { """ Change the execution date of a maintenance. Works only if task type is maintenance and if it has not started yet. REST: POST /dedicatedCloud/{serviceName}/task...
java
public OvhTask serviceName_task_taskId_changeMaintenanceExecutionDate_POST(String serviceName, Long taskId, Date executionDate) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/task/{taskId}/changeMaintenanceExecutionDate"; StringBuilder sb = path(qPath, serviceName, taskId); HashMap<String, Obj...
[ "public", "OvhTask", "serviceName_task_taskId_changeMaintenanceExecutionDate_POST", "(", "String", "serviceName", ",", "Long", "taskId", ",", "Date", "executionDate", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicatedCloud/{serviceName}/task/{taskId}/chang...
Change the execution date of a maintenance. Works only if task type is maintenance and if it has not started yet. REST: POST /dedicatedCloud/{serviceName}/task/{taskId}/changeMaintenanceExecutionDate @param executionDate [required] The new execution date @param serviceName [required] Domain of the service @param taskI...
[ "Change", "the", "execution", "date", "of", "a", "maintenance", ".", "Works", "only", "if", "task", "type", "is", "maintenance", "and", "if", "it", "has", "not", "started", "yet", "." ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L225-L232
OpenLiberty/open-liberty
dev/com.ibm.ws.org.apache.cxf.cxf.rt.rs.client.3.2/src/com/ibm/ws/jaxrs21/clientconfig/JAXRSClientConfigHolder.java
JAXRSClientConfigHolder.addConfig
public static synchronized void addConfig(String id, String uri, Map<String, String> params) { """ add a configuration for a URL We'd like a set of hashmaps keyed by URL, however when osgi calls deactivate, we have no arguments, so we have to associate a url with the object id of the service. That allows us to ...
java
public static synchronized void addConfig(String id, String uri, Map<String, String> params) { uriMap.put(id, uri); configInfo.put(uri, params); resolvedConfigInfo.clear(); if (uri.endsWith("*")) { wildcardsPresentInConfigInfo = true; } }
[ "public", "static", "synchronized", "void", "addConfig", "(", "String", "id", ",", "String", "uri", ",", "Map", "<", "String", ",", "String", ">", "params", ")", "{", "uriMap", ".", "put", "(", "id", ",", "uri", ")", ";", "configInfo", ".", "put", "(...
add a configuration for a URL We'd like a set of hashmaps keyed by URL, however when osgi calls deactivate, we have no arguments, so we have to associate a url with the object id of the service. That allows us to remove the right one. @param id - the object id of the service instance that added this. @param url - the ...
[ "add", "a", "configuration", "for", "a", "URL", "We", "d", "like", "a", "set", "of", "hashmaps", "keyed", "by", "URL", "however", "when", "osgi", "calls", "deactivate", "we", "have", "no", "arguments", "so", "we", "have", "to", "associate", "a", "url", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.org.apache.cxf.cxf.rt.rs.client.3.2/src/com/ibm/ws/jaxrs21/clientconfig/JAXRSClientConfigHolder.java#L54-L61
liyiorg/weixin-popular
src/main/java/weixin/popular/api/UserAPI.java
UserAPI.groupsMembersBatchUpdate
public static BaseResult groupsMembersBatchUpdate(String access_token,List<String> openid_list,String to_groupid) { """ 批量移动用户分组 @param access_token access_token @param openid_list openid_list @param to_groupid to_groupid @return BaseResult """ String openidListStr = JsonUtil.toJSONString(openid_list); ...
java
public static BaseResult groupsMembersBatchUpdate(String access_token,List<String> openid_list,String to_groupid){ String openidListStr = JsonUtil.toJSONString(openid_list); String groupJson = "{\"openid_list\":"+openidListStr+",\"to_groupid\":"+to_groupid+"}"; HttpUriRequest httpUriRequest = RequestBuilder.post(...
[ "public", "static", "BaseResult", "groupsMembersBatchUpdate", "(", "String", "access_token", ",", "List", "<", "String", ">", "openid_list", ",", "String", "to_groupid", ")", "{", "String", "openidListStr", "=", "JsonUtil", ".", "toJSONString", "(", "openid_list", ...
批量移动用户分组 @param access_token access_token @param openid_list openid_list @param to_groupid to_groupid @return BaseResult
[ "批量移动用户分组" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/UserAPI.java#L246-L256
JOML-CI/JOML
src/org/joml/Vector4d.java
Vector4d.rotateAxis
public Vector4d rotateAxis(double angle, double x, double y, double z) { """ Rotate this vector the specified radians around the given rotation axis. @param angle the angle in radians @param x the x component of the rotation axis @param y the y component of the rotation axis @param z the z component of t...
java
public Vector4d rotateAxis(double angle, double x, double y, double z) { return rotateAxis(angle, x, y, z, thisOrNew()); }
[ "public", "Vector4d", "rotateAxis", "(", "double", "angle", ",", "double", "x", ",", "double", "y", ",", "double", "z", ")", "{", "return", "rotateAxis", "(", "angle", ",", "x", ",", "y", ",", "z", ",", "thisOrNew", "(", ")", ")", ";", "}" ]
Rotate this vector the specified radians around the given rotation axis. @param angle the angle in radians @param x the x component of the rotation axis @param y the y component of the rotation axis @param z the z component of the rotation axis @return a vector holding the result
[ "Rotate", "this", "vector", "the", "specified", "radians", "around", "the", "given", "rotation", "axis", "." ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector4d.java#L1146-L1148
box/box-java-sdk
src/main/java/com/box/sdk/BoxTransactionalAPIConnection.java
BoxTransactionalAPIConnection.getTransactionConnection
public static BoxAPIConnection getTransactionConnection(String accessToken, String scope) { """ Request a scoped transactional token. @param accessToken application access token. @param scope scope of transactional token. @return a BoxAPIConnection which can be used to perform transactional requests. """ ...
java
public static BoxAPIConnection getTransactionConnection(String accessToken, String scope) { return BoxTransactionalAPIConnection.getTransactionConnection(accessToken, scope, null); }
[ "public", "static", "BoxAPIConnection", "getTransactionConnection", "(", "String", "accessToken", ",", "String", "scope", ")", "{", "return", "BoxTransactionalAPIConnection", ".", "getTransactionConnection", "(", "accessToken", ",", "scope", ",", "null", ")", ";", "}"...
Request a scoped transactional token. @param accessToken application access token. @param scope scope of transactional token. @return a BoxAPIConnection which can be used to perform transactional requests.
[ "Request", "a", "scoped", "transactional", "token", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTransactionalAPIConnection.java#L35-L37
leancloud/java-sdk-all
realtime/src/main/java/cn/leancloud/im/v2/AVIMConversationsQuery.java
AVIMConversationsQuery.whereWithinMiles
public AVIMConversationsQuery whereWithinMiles(String key, AVGeoPoint point, double maxDistance) { """ 增加一个基于地理位置的近似查询,当conversation的属性中有对应的地址位置与指定的地理位置间距不超过指定距离时返回 @param key @param point 指定的地理位置 @param maxDistance 距离,以英里计算 @return """ conditions.whereWithinMiles(key, point, maxDistance); ...
java
public AVIMConversationsQuery whereWithinMiles(String key, AVGeoPoint point, double maxDistance) { conditions.whereWithinMiles(key, point, maxDistance); return this; }
[ "public", "AVIMConversationsQuery", "whereWithinMiles", "(", "String", "key", ",", "AVGeoPoint", "point", ",", "double", "maxDistance", ")", "{", "conditions", ".", "whereWithinMiles", "(", "key", ",", "point", ",", "maxDistance", ")", ";", "return", "this", ";"...
增加一个基于地理位置的近似查询,当conversation的属性中有对应的地址位置与指定的地理位置间距不超过指定距离时返回 @param key @param point 指定的地理位置 @param maxDistance 距离,以英里计算 @return
[ "增加一个基于地理位置的近似查询,当conversation的属性中有对应的地址位置与指定的地理位置间距不超过指定距离时返回" ]
train
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/realtime/src/main/java/cn/leancloud/im/v2/AVIMConversationsQuery.java#L329-L332
lucee/Lucee
core/src/main/java/lucee/commons/lang/HTMLUtil.java
HTMLUtil.getURLS
public List<URL> getURLS(String html, URL url) { """ returns all urls in a html String @param html HTML String to search urls @param url Absolute URL path to set @return urls found in html String """ List<URL> urls = new ArrayList<URL>(); SourceCode cfml = new SourceCode(html, false, CFMLEngine.DIALECT...
java
public List<URL> getURLS(String html, URL url) { List<URL> urls = new ArrayList<URL>(); SourceCode cfml = new SourceCode(html, false, CFMLEngine.DIALECT_CFML); while (!cfml.isAfterLast()) { if (cfml.forwardIfCurrent('<')) { for (int i = 0; i < tags.length; i++) { if (cfml.forwardIfCurrent(tags[i].tag +...
[ "public", "List", "<", "URL", ">", "getURLS", "(", "String", "html", ",", "URL", "url", ")", "{", "List", "<", "URL", ">", "urls", "=", "new", "ArrayList", "<", "URL", ">", "(", ")", ";", "SourceCode", "cfml", "=", "new", "SourceCode", "(", "html",...
returns all urls in a html String @param html HTML String to search urls @param url Absolute URL path to set @return urls found in html String
[ "returns", "all", "urls", "in", "a", "html", "String" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/HTMLUtil.java#L50-L67
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/ImmutableChecker.java
ImmutableChecker.checkSubtype
private Description checkSubtype(ClassTree tree, VisitorState state) { """ Check for classes without {@code @Immutable} that have immutable supertypes. """ ClassSymbol sym = ASTHelpers.getSymbol(tree); if (sym == null) { return NO_MATCH; } Type superType = immutableSupertype(sym, state); ...
java
private Description checkSubtype(ClassTree tree, VisitorState state) { ClassSymbol sym = ASTHelpers.getSymbol(tree); if (sym == null) { return NO_MATCH; } Type superType = immutableSupertype(sym, state); if (superType == null) { return NO_MATCH; } String message = String....
[ "private", "Description", "checkSubtype", "(", "ClassTree", "tree", ",", "VisitorState", "state", ")", "{", "ClassSymbol", "sym", "=", "ASTHelpers", ".", "getSymbol", "(", "tree", ")", ";", "if", "(", "sym", "==", "null", ")", "{", "return", "NO_MATCH", ";...
Check for classes without {@code @Immutable} that have immutable supertypes.
[ "Check", "for", "classes", "without", "{" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/ImmutableChecker.java#L309-L327
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/function/Actions.java
Actions.toFunc
public static <T1, T2> Func2<T1, T2, Void> toFunc(final Action2<T1, T2> action) { """ Converts an {@link Action2} to a function that calls the action and returns {@code null}. @param action the {@link Action2} to convert @return a {@link Func2} that calls {@code action} and returns {@code null} """ ...
java
public static <T1, T2> Func2<T1, T2, Void> toFunc(final Action2<T1, T2> action) { return toFunc(action, (Void) null); }
[ "public", "static", "<", "T1", ",", "T2", ">", "Func2", "<", "T1", ",", "T2", ",", "Void", ">", "toFunc", "(", "final", "Action2", "<", "T1", ",", "T2", ">", "action", ")", "{", "return", "toFunc", "(", "action", ",", "(", "Void", ")", "null", ...
Converts an {@link Action2} to a function that calls the action and returns {@code null}. @param action the {@link Action2} to convert @return a {@link Func2} that calls {@code action} and returns {@code null}
[ "Converts", "an", "{", "@link", "Action2", "}", "to", "a", "function", "that", "calls", "the", "action", "and", "returns", "{", "@code", "null", "}", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/function/Actions.java#L105-L107
TheHortonMachine/hortonmachine
hmachine/src/main/java/org/hortonmachine/hmachine/modules/hydrogeomorphology/hillshade/OmsHillshade.java
OmsHillshade.setNoValueBorder
private void setNoValueBorder( WritableRaster pitWR, int width, int height, WritableRaster hillshadeWR ) { """ /* Re-set the no value to NaN (I have set it to -9999.0 in order to use this value in the equation) and set the border to 0. """ for( int y = 2; y < height - 2; y++ ) { for( int ...
java
private void setNoValueBorder( WritableRaster pitWR, int width, int height, WritableRaster hillshadeWR ) { for( int y = 2; y < height - 2; y++ ) { for( int x = 2; x < width - 2; x++ ) { if (pitWR.getSampleDouble(x, y, 0) == -9999.0) { hillshadeWR.setSample(x, y, 0...
[ "private", "void", "setNoValueBorder", "(", "WritableRaster", "pitWR", ",", "int", "width", ",", "int", "height", ",", "WritableRaster", "hillshadeWR", ")", "{", "for", "(", "int", "y", "=", "2", ";", "y", "<", "height", "-", "2", ";", "y", "++", ")", ...
/* Re-set the no value to NaN (I have set it to -9999.0 in order to use this value in the equation) and set the border to 0.
[ "/", "*", "Re", "-", "set", "the", "no", "value", "to", "NaN", "(", "I", "have", "set", "it", "to", "-", "9999", ".", "0", "in", "order", "to", "use", "this", "value", "in", "the", "equation", ")", "and", "set", "the", "border", "to", "0", "." ...
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/hmachine/src/main/java/org/hortonmachine/hmachine/modules/hydrogeomorphology/hillshade/OmsHillshade.java#L132-L155
blackfizz/EazeGraph
EazeGraphLibrary/src/main/java/org/eazegraph/lib/utils/Utils.java
Utils.calculateMaxTextHeight
public static float calculateMaxTextHeight(Paint _Paint, String _Text) { """ Calculates the maximum text height which is possible based on the used Paint and its settings. @param _Paint Paint object which will be used to display a text. @param _Text The text which should be measured. If null, a default text i...
java
public static float calculateMaxTextHeight(Paint _Paint, String _Text) { Rect height = new Rect(); String text = _Text == null ? "MgHITasger" : _Text; _Paint.getTextBounds(text, 0, text.length(), height); return height.height(); }
[ "public", "static", "float", "calculateMaxTextHeight", "(", "Paint", "_Paint", ",", "String", "_Text", ")", "{", "Rect", "height", "=", "new", "Rect", "(", ")", ";", "String", "text", "=", "_Text", "==", "null", "?", "\"MgHITasger\"", ":", "_Text", ";", ...
Calculates the maximum text height which is possible based on the used Paint and its settings. @param _Paint Paint object which will be used to display a text. @param _Text The text which should be measured. If null, a default text is chosen, which has a maximum possible height @return Maximum text height in px.
[ "Calculates", "the", "maximum", "text", "height", "which", "is", "possible", "based", "on", "the", "used", "Paint", "and", "its", "settings", "." ]
train
https://github.com/blackfizz/EazeGraph/blob/ce5e68ecc70e154f83bbb2fcce1a970db125c1e6/EazeGraphLibrary/src/main/java/org/eazegraph/lib/utils/Utils.java#L165-L170
lessthanoptimal/ddogleg
src/org/ddogleg/sorting/ApproximateSort_F64.java
ApproximateSort_F64.setRange
public void setRange( double minValue , double maxValue ) { """ Specify the data range @param minValue Minimum allowed value. (inclusive) @param maxValue Maximum allowed value. (inclusive) """ this.maxValue = maxValue; this.minValue = minValue; divisor = 1.00001*(maxValue-minValue)/numBins; his...
java
public void setRange( double minValue , double maxValue ) { this.maxValue = maxValue; this.minValue = minValue; divisor = 1.00001*(maxValue-minValue)/numBins; histIndexes.resize(numBins); if( histObjs.length < numBins ) { histObjs = new FastQueue[ numBins ]; for (int i = 0; i < numBins; i++) { his...
[ "public", "void", "setRange", "(", "double", "minValue", ",", "double", "maxValue", ")", "{", "this", ".", "maxValue", "=", "maxValue", ";", "this", ".", "minValue", "=", "minValue", ";", "divisor", "=", "1.00001", "*", "(", "maxValue", "-", "minValue", ...
Specify the data range @param minValue Minimum allowed value. (inclusive) @param maxValue Maximum allowed value. (inclusive)
[ "Specify", "the", "data", "range" ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/sorting/ApproximateSort_F64.java#L53-L67
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/core/PeerGroup.java
PeerGroup.broadcastTransaction
@Override public TransactionBroadcast broadcastTransaction(final Transaction tx) { """ Calls {@link PeerGroup#broadcastTransaction(Transaction,int)} with getMinBroadcastConnections() as the number of connections to wait for before commencing broadcast. """ return broadcastTransaction(tx, Math.max(...
java
@Override public TransactionBroadcast broadcastTransaction(final Transaction tx) { return broadcastTransaction(tx, Math.max(1, getMinBroadcastConnections())); }
[ "@", "Override", "public", "TransactionBroadcast", "broadcastTransaction", "(", "final", "Transaction", "tx", ")", "{", "return", "broadcastTransaction", "(", "tx", ",", "Math", ".", "max", "(", "1", ",", "getMinBroadcastConnections", "(", ")", ")", ")", ";", ...
Calls {@link PeerGroup#broadcastTransaction(Transaction,int)} with getMinBroadcastConnections() as the number of connections to wait for before commencing broadcast.
[ "Calls", "{" ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/PeerGroup.java#L2019-L2022
lessthanoptimal/BoofCV
integration/boofcv-swing/src/main/java/boofcv/gui/feature/CompareTwoImagePanel.java
CompareTwoImagePanel.setImages
public synchronized void setImages(BufferedImage leftImage , BufferedImage rightImage ) { """ Sets the internal images. Not thread safe. @param leftImage @param rightImage """ this.leftImage = leftImage; this.rightImage = rightImage; setPreferredSize(leftImage.getWidth(),leftImage.getHeight(),right...
java
public synchronized void setImages(BufferedImage leftImage , BufferedImage rightImage ) { this.leftImage = leftImage; this.rightImage = rightImage; setPreferredSize(leftImage.getWidth(),leftImage.getHeight(),rightImage.getWidth(),rightImage.getHeight()); }
[ "public", "synchronized", "void", "setImages", "(", "BufferedImage", "leftImage", ",", "BufferedImage", "rightImage", ")", "{", "this", ".", "leftImage", "=", "leftImage", ";", "this", ".", "rightImage", "=", "rightImage", ";", "setPreferredSize", "(", "leftImage"...
Sets the internal images. Not thread safe. @param leftImage @param rightImage
[ "Sets", "the", "internal", "images", ".", "Not", "thread", "safe", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/feature/CompareTwoImagePanel.java#L93-L98
facebookarchive/hadoop-20
src/core/org/apache/hadoop/io/AbstractMapWritable.java
AbstractMapWritable.addToMap
private synchronized void addToMap(Class clazz, byte id) { """ Used to add "predefined" classes and by Writable to copy "new" classes. """ if (classToIdMap.containsKey(clazz)) { byte b = classToIdMap.get(clazz); if (b != id) { throw new IllegalArgumentException ("Class " + clazz.getName...
java
private synchronized void addToMap(Class clazz, byte id) { if (classToIdMap.containsKey(clazz)) { byte b = classToIdMap.get(clazz); if (b != id) { throw new IllegalArgumentException ("Class " + clazz.getName() + " already registered but maps to " + b + " and not " + id); } } ...
[ "private", "synchronized", "void", "addToMap", "(", "Class", "clazz", ",", "byte", "id", ")", "{", "if", "(", "classToIdMap", ".", "containsKey", "(", "clazz", ")", ")", "{", "byte", "b", "=", "classToIdMap", ".", "get", "(", "clazz", ")", ";", "if", ...
Used to add "predefined" classes and by Writable to copy "new" classes.
[ "Used", "to", "add", "predefined", "classes", "and", "by", "Writable", "to", "copy", "new", "classes", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/io/AbstractMapWritable.java#L62-L79
openbase/jul
extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java
LabelProcessor.buildLabel
public static Label buildLabel(final Locale locale, final String label) { """ Create a new labelBuilder and register label with given locale. @param locale the locale from which the language code is extracted for which the label is added @param label the label to be added @return the updated label builder ...
java
public static Label buildLabel(final Locale locale, final String label) { return addLabel(Label.newBuilder(), locale.getLanguage(), label).build(); }
[ "public", "static", "Label", "buildLabel", "(", "final", "Locale", "locale", ",", "final", "String", "label", ")", "{", "return", "addLabel", "(", "Label", ".", "newBuilder", "(", ")", ",", "locale", ".", "getLanguage", "(", ")", ",", "label", ")", ".", ...
Create a new labelBuilder and register label with given locale. @param locale the locale from which the language code is extracted for which the label is added @param label the label to be added @return the updated label builder
[ "Create", "a", "new", "labelBuilder", "and", "register", "label", "with", "given", "locale", "." ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java#L131-L133
roboconf/roboconf-platform
karaf/roboconf-karaf-commands-dm/src/main/java/net/roboconf/karaf/commands/dm/KarafDmCommandsUtils.java
KarafDmCommandsUtils.findInstances
public static RbcfInfo findInstances( Manager manager, String applicationName, String scopedInstancePath, PrintStream out ) { """ Finds instances for a given application. @param manager @param applicationName @param scopedInstancePath @param out @return an object with non-null list of instances ...
java
public static RbcfInfo findInstances( Manager manager, String applicationName, String scopedInstancePath, PrintStream out ) { ManagedApplication ma = null; List<Instance> scopedInstances = new ArrayList<> (); Instance scopedInstance; if(( ma = manager.applicationMngr().findManagedApplicationByName...
[ "public", "static", "RbcfInfo", "findInstances", "(", "Manager", "manager", ",", "String", "applicationName", ",", "String", "scopedInstancePath", ",", "PrintStream", "out", ")", "{", "ManagedApplication", "ma", "=", "null", ";", "List", "<", "Instance", ">", "s...
Finds instances for a given application. @param manager @param applicationName @param scopedInstancePath @param out @return an object with non-null list of instances and a (nullable) managed application
[ "Finds", "instances", "for", "a", "given", "application", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/karaf/roboconf-karaf-commands-dm/src/main/java/net/roboconf/karaf/commands/dm/KarafDmCommandsUtils.java#L59-L85
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLAnnotationPropertyRangeAxiomImpl_CustomFieldSerializer.java
OWLAnnotationPropertyRangeAxiomImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLAnnotationPropertyRangeAxiomImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link co...
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLAnnotationPropertyRangeAxiomImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLAnnotationPropertyRangeAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}"...
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLAnnotationPropertyRangeAxiomImpl_CustomFieldSerializer.java#L77-L80
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobSchedulesImpl.java
JobSchedulesImpl.listNextAsync
public Observable<Page<CloudJobSchedule>> listNextAsync(final String nextPageLink, final JobScheduleListNextOptions jobScheduleListNextOptions) { """ Lists all of the job schedules in the specified account. @param nextPageLink The NextLink from the previous successful call to List operation. @param jobSchedule...
java
public Observable<Page<CloudJobSchedule>> listNextAsync(final String nextPageLink, final JobScheduleListNextOptions jobScheduleListNextOptions) { return listNextWithServiceResponseAsync(nextPageLink, jobScheduleListNextOptions) .map(new Func1<ServiceResponseWithHeaders<Page<CloudJobSchedule>, JobSch...
[ "public", "Observable", "<", "Page", "<", "CloudJobSchedule", ">", ">", "listNextAsync", "(", "final", "String", "nextPageLink", ",", "final", "JobScheduleListNextOptions", "jobScheduleListNextOptions", ")", "{", "return", "listNextWithServiceResponseAsync", "(", "nextPag...
Lists all of the job schedules in the specified account. @param nextPageLink The NextLink from the previous successful call to List operation. @param jobScheduleListNextOptions Additional parameters for the operation @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to th...
[ "Lists", "all", "of", "the", "job", "schedules", "in", "the", "specified", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobSchedulesImpl.java#L2621-L2629
zaproxy/zaproxy
src/org/zaproxy/zap/extension/script/ExtensionScript.java
ExtensionScript.getInterface
public <T> T getInterface(ScriptWrapper script, Class<T> class1) throws ScriptException, IOException { """ Gets the interface {@code class1} from the given {@code script}. Might return {@code null} if the {@code script} does not implement the interface. <p> First tries to get the interface directly from the {@c...
java
public <T> T getInterface(ScriptWrapper script, Class<T> class1) throws ScriptException, IOException { ClassLoader previousContextClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(ExtensionFactory.getAddOnLoader()); try { T iface = script.getInter...
[ "public", "<", "T", ">", "T", "getInterface", "(", "ScriptWrapper", "script", ",", "Class", "<", "T", ">", "class1", ")", "throws", "ScriptException", ",", "IOException", "{", "ClassLoader", "previousContextClassLoader", "=", "Thread", ".", "currentThread", "(",...
Gets the interface {@code class1} from the given {@code script}. Might return {@code null} if the {@code script} does not implement the interface. <p> First tries to get the interface directly from the {@code script} by calling the method {@code ScriptWrapper.getInterface(Class)}, if it returns {@code null} the interfa...
[ "Gets", "the", "interface", "{", "@code", "class1", "}", "from", "the", "given", "{", "@code", "script", "}", ".", "Might", "return", "{", "@code", "null", "}", "if", "the", "{", "@code", "script", "}", "does", "not", "implement", "the", "interface", "...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ExtensionScript.java#L1706-L1731
Alluxio/alluxio
core/server/worker/src/main/java/alluxio/worker/block/BlockMetadataManager.java
BlockMetadataManager.getBlockPath
public String getBlockPath(long blockId, BlockStoreLocation location) { """ Returns the path of a block given its location, or null if the location is not a specific {@link StorageDir}. Throws an {@link IllegalArgumentException} if the location is not a specific {@link StorageDir}. @param blockId the id of th...
java
public String getBlockPath(long blockId, BlockStoreLocation location) { return AbstractBlockMeta.commitPath(getDir(location), blockId); }
[ "public", "String", "getBlockPath", "(", "long", "blockId", ",", "BlockStoreLocation", "location", ")", "{", "return", "AbstractBlockMeta", ".", "commitPath", "(", "getDir", "(", "location", ")", ",", "blockId", ")", ";", "}" ]
Returns the path of a block given its location, or null if the location is not a specific {@link StorageDir}. Throws an {@link IllegalArgumentException} if the location is not a specific {@link StorageDir}. @param blockId the id of the block @param location location of a particular {@link StorageDir} to store this blo...
[ "Returns", "the", "path", "of", "a", "block", "given", "its", "location", "or", "null", "if", "the", "location", "is", "not", "a", "specific", "{", "@link", "StorageDir", "}", ".", "Throws", "an", "{", "@link", "IllegalArgumentException", "}", "if", "the",...
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/worker/src/main/java/alluxio/worker/block/BlockMetadataManager.java#L206-L208
hibernate/hibernate-ogm
mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/query/parsing/impl/AggregationRenderer.java
AggregationRenderer.getDistinctCountGroup
private List<Document> getDistinctCountGroup() { """ /* A distinct query on the id looks something like: db.Author.aggregate([{ $group : { _id: "$_id" }}, {$group : {_id:null, n: {$sum: 1}}}, {$project: {n: 1, _id:0}}]) This method returns the "groups" part. """ // propertyPath is null when the query ...
java
private List<Document> getDistinctCountGroup() { // propertyPath is null when the query is a select on an entity // In this case we can make the distinct on the id of the document Object groupColumn = propertyPath == null ? "$_id" : propertyPath; Document group = new Document(); group.append( "$group", new Do...
[ "private", "List", "<", "Document", ">", "getDistinctCountGroup", "(", ")", "{", "// propertyPath is null when the query is a select on an entity", "// In this case we can make the distinct on the id of the document", "Object", "groupColumn", "=", "propertyPath", "==", "null", "?",...
/* A distinct query on the id looks something like: db.Author.aggregate([{ $group : { _id: "$_id" }}, {$group : {_id:null, n: {$sum: 1}}}, {$project: {n: 1, _id:0}}]) This method returns the "groups" part.
[ "/", "*", "A", "distinct", "query", "on", "the", "id", "looks", "something", "like", ":" ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/query/parsing/impl/AggregationRenderer.java#L83-L95
lucee/Lucee
core/src/main/java/lucee/commons/date/DateTimeUtil.java
DateTimeUtil.toHTTPTimeString
public static String toHTTPTimeString(Date date, boolean oldFormat) { """ converts a date to a http time String @param date date to convert @param oldFormat "old" in that context means the format support the existing functionality in CFML like the function getHTTPTimeString, in that format the date parts are ...
java
public static String toHTTPTimeString(Date date, boolean oldFormat) { if (oldFormat) { synchronized (HTTP_TIME_STRING_FORMAT_OLD) { return StringUtil.replace(HTTP_TIME_STRING_FORMAT_OLD.format(date), "+00:00", "", true); } } synchronized (HTTP_TIME_STRING_FORMAT) { return StringUtil.replace(HTTP_TIM...
[ "public", "static", "String", "toHTTPTimeString", "(", "Date", "date", ",", "boolean", "oldFormat", ")", "{", "if", "(", "oldFormat", ")", "{", "synchronized", "(", "HTTP_TIME_STRING_FORMAT_OLD", ")", "{", "return", "StringUtil", ".", "replace", "(", "HTTP_TIME_...
converts a date to a http time String @param date date to convert @param oldFormat "old" in that context means the format support the existing functionality in CFML like the function getHTTPTimeString, in that format the date parts are separated by a space (like "EE, dd MMM yyyy HH:mm:ss zz"), in the "new" format, the...
[ "converts", "a", "date", "to", "a", "http", "time", "String" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/date/DateTimeUtil.java#L279-L288
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/util/IOUtils.java
IOUtils.processReader
public static void processReader(BufferedReader br, ReaderProcessor processor) throws ParserException { """ Takes in a reader and a processor, reads every line from the given file and then invokes the processor. What you do with the lines is dependent on your processor. The code will automatically close the g...
java
public static void processReader(BufferedReader br, ReaderProcessor processor) throws ParserException { String line; try { while( (line = br.readLine()) != null ) { processor.process(line); } } catch(IOException e) { throw new ParserException("Could not read from the given BufferedReader"); } f...
[ "public", "static", "void", "processReader", "(", "BufferedReader", "br", ",", "ReaderProcessor", "processor", ")", "throws", "ParserException", "{", "String", "line", ";", "try", "{", "while", "(", "(", "line", "=", "br", ".", "readLine", "(", ")", ")", "...
Takes in a reader and a processor, reads every line from the given file and then invokes the processor. What you do with the lines is dependent on your processor. The code will automatically close the given BufferedReader. @param br The reader to process @param processor The processor to invoke on all lines @throws P...
[ "Takes", "in", "a", "reader", "and", "a", "processor", "reads", "every", "line", "from", "the", "given", "file", "and", "then", "invokes", "the", "processor", ".", "What", "you", "do", "with", "the", "lines", "is", "dependent", "on", "your", "processor", ...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/util/IOUtils.java#L90-L103
sawano/java-commons
src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java
AbstractValidate.isTrue
public void isTrue(final boolean expression, final String message, final long value) { """ <p>Validate that the argument condition is {@code true}; otherwise throwing an exception with the specified message. This method is useful when validating according to an arbitrary boolean expression, such as validating a p...
java
public void isTrue(final boolean expression, final String message, final long value) { if (!expression) { fail(String.format(message, value)); } }
[ "public", "void", "isTrue", "(", "final", "boolean", "expression", ",", "final", "String", "message", ",", "final", "long", "value", ")", "{", "if", "(", "!", "expression", ")", "{", "fail", "(", "String", ".", "format", "(", "message", ",", "value", "...
<p>Validate that the argument condition is {@code true}; otherwise throwing an exception with the specified message. This method is useful when validating according to an arbitrary boolean expression, such as validating a primitive number or using your own custom validation expression.</p> <pre>Validate.isTrue(i &gt; 0...
[ "<p", ">", "Validate", "that", "the", "argument", "condition", "is", "{", "@code", "true", "}", ";", "otherwise", "throwing", "an", "exception", "with", "the", "specified", "message", ".", "This", "method", "is", "useful", "when", "validating", "according", ...
train
https://github.com/sawano/java-commons/blob/6f219c9e8dec4401dbe528d17ae6ec1ef9c0d284/src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java#L298-L302
cdk/cdk
legacy/src/main/java/org/openscience/cdk/tools/IonizationPotentialTool.java
IonizationPotentialTool.initiateIonization
private static IAtomContainer initiateIonization(IAtomContainer container, IAtom atom) throws CDKException { """ Initiate the reaction ElectronImpactNBE. @param container The IAtomContainer @param atom The IAtom to ionize @return The product resultant @throws CDKException """ IReact...
java
private static IAtomContainer initiateIonization(IAtomContainer container, IAtom atom) throws CDKException { IReactionProcess reactionNBE = new ElectronImpactNBEReaction(); IAtomContainerSet setOfReactants = container.getBuilder().newInstance(IAtomContainerSet.class); setOfReactants.addAtomCont...
[ "private", "static", "IAtomContainer", "initiateIonization", "(", "IAtomContainer", "container", ",", "IAtom", "atom", ")", "throws", "CDKException", "{", "IReactionProcess", "reactionNBE", "=", "new", "ElectronImpactNBEReaction", "(", ")", ";", "IAtomContainerSet", "se...
Initiate the reaction ElectronImpactNBE. @param container The IAtomContainer @param atom The IAtom to ionize @return The product resultant @throws CDKException
[ "Initiate", "the", "reaction", "ElectronImpactNBE", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/tools/IonizationPotentialTool.java#L461-L482
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/spider/SpiderTransaction.java
SpiderTransaction.deleteShardedLinkValue
public void deleteShardedLinkValue(String objID, FieldDefinition linkDef, String targetObjID, int shardNo) { """ Delete a link value column in the Terms store for a sharded link. @param objID ID of object that owns the link field. @param linkDef {@link FieldDefinition} of (sharded) link field. @...
java
public void deleteShardedLinkValue(String objID, FieldDefinition linkDef, String targetObjID, int shardNo) { assert linkDef.isSharded(); assert shardNo > 0; deleteColumn(SpiderService.termsStoreName(linkDef.getTableDef()), SpiderService.shardedLinkTermRowKey(linkDef, obj...
[ "public", "void", "deleteShardedLinkValue", "(", "String", "objID", ",", "FieldDefinition", "linkDef", ",", "String", "targetObjID", ",", "int", "shardNo", ")", "{", "assert", "linkDef", ".", "isSharded", "(", ")", ";", "assert", "shardNo", ">", "0", ";", "d...
Delete a link value column in the Terms store for a sharded link. @param objID ID of object that owns the link field. @param linkDef {@link FieldDefinition} of (sharded) link field. @param targetObjID ID of referenced object. @param shardNo Shard number. Must be > 0.
[ "Delete", "a", "link", "value", "column", "in", "the", "Terms", "store", "for", "a", "sharded", "link", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/SpiderTransaction.java#L464-L470
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/util/FileUtil.java
FileUtil.zipDir
public static void zipDir(String dirName, String nameZipFile) throws IOException { """ Compresses directory into zip archive. @param dirName the path to the directory @param nameZipFile archive name. @throws IOException """ try (FileOutputStream fW = new FileOutputStream(nameZipFile); ...
java
public static void zipDir(String dirName, String nameZipFile) throws IOException { try (FileOutputStream fW = new FileOutputStream(nameZipFile); ZipOutputStream zip = new ZipOutputStream(fW)) { addFolderToZip("", dirName, zip); } }
[ "public", "static", "void", "zipDir", "(", "String", "dirName", ",", "String", "nameZipFile", ")", "throws", "IOException", "{", "try", "(", "FileOutputStream", "fW", "=", "new", "FileOutputStream", "(", "nameZipFile", ")", ";", "ZipOutputStream", "zip", "=", ...
Compresses directory into zip archive. @param dirName the path to the directory @param nameZipFile archive name. @throws IOException
[ "Compresses", "directory", "into", "zip", "archive", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/util/FileUtil.java#L251-L256
UrielCh/ovh-java-sdk
ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java
ApiOvhDomain.serviceName_configurations_optin_GET
public ArrayList<net.minidev.ovh.api.domain.configurations.OvhOptin> serviceName_configurations_optin_GET(String serviceName) throws IOException { """ Retrieve optin configuration REST: GET /domain/{serviceName}/configurations/optin @param serviceName [required] The internal name of your domain """ Strin...
java
public ArrayList<net.minidev.ovh.api.domain.configurations.OvhOptin> serviceName_configurations_optin_GET(String serviceName) throws IOException { String qPath = "/domain/{serviceName}/configurations/optin"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); retu...
[ "public", "ArrayList", "<", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "domain", ".", "configurations", ".", "OvhOptin", ">", "serviceName_configurations_optin_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "="...
Retrieve optin configuration REST: GET /domain/{serviceName}/configurations/optin @param serviceName [required] The internal name of your domain
[ "Retrieve", "optin", "configuration" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L1546-L1551
apache/incubator-gobblin
gobblin-modules/gobblin-crypto/src/main/java/org/apache/gobblin/crypto/GPGFileEncryptor.java
GPGFileEncryptor.encryptFile
public OutputStream encryptFile(OutputStream outputStream, String passPhrase, String cipher) throws IOException { """ Taking in an input {@link OutputStream} and a passPhrase, return an {@link OutputStream} that can be used to output encrypted output to the input {@link OutputStream}. @param outputStream the out...
java
public OutputStream encryptFile(OutputStream outputStream, String passPhrase, String cipher) throws IOException { try { if (Security.getProvider(PROVIDER_NAME) == null) { Security.addProvider(new BouncyCastleProvider()); } PGPEncryptedDataGenerator cPk = new PGPEncryptedDataGenerator( ...
[ "public", "OutputStream", "encryptFile", "(", "OutputStream", "outputStream", ",", "String", "passPhrase", ",", "String", "cipher", ")", "throws", "IOException", "{", "try", "{", "if", "(", "Security", ".", "getProvider", "(", "PROVIDER_NAME", ")", "==", "null",...
Taking in an input {@link OutputStream} and a passPhrase, return an {@link OutputStream} that can be used to output encrypted output to the input {@link OutputStream}. @param outputStream the output stream to hold the ciphertext {@link OutputStream} @param passPhrase pass phrase @param cipher the symmetric cipher to us...
[ "Taking", "in", "an", "input", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-crypto/src/main/java/org/apache/gobblin/crypto/GPGFileEncryptor.java#L69-L91
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/authorization/BasicEnvironmentalContext.java
BasicEnvironmentalContext.patternContextFor
public static BasicEnvironmentalContext patternContextFor(String key, String value) { """ @param key key @param value value to check for equality and regular expression if it is a valid regular expression @return context with possible regular expression value match """ if (null == key) { ...
java
public static BasicEnvironmentalContext patternContextFor(String key, String value) { if (null == key) { throw new IllegalArgumentException("key cannot be null"); } if (null == value) { throw new IllegalArgumentException("value cannot be null"); } try { ...
[ "public", "static", "BasicEnvironmentalContext", "patternContextFor", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "null", "==", "key", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"key cannot be null\"", ")", ";", "}", "if"...
@param key key @param value value to check for equality and regular expression if it is a valid regular expression @return context with possible regular expression value match
[ "@param", "key", "key", "@param", "value", "value", "to", "check", "for", "equality", "and", "regular", "expression", "if", "it", "is", "a", "valid", "regular", "expression" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/authorization/BasicEnvironmentalContext.java#L51-L63
vincentk/joptimizer
src/main/java/com/joptimizer/functions/SDPLogarithmicBarrier.java
SDPLogarithmicBarrier.createPhase1BarrierFunction
@Override public BarrierFunction createPhase1BarrierFunction() { """ Create the barrier function for the Phase I. It is an instance of this class for the constraint: <br>G + Sum[x_i * F_i(x),i] < t * I @see "S.Boyd and L.Vandenberghe, Convex Optimization, 11.6.2" """ List<double[][]> FiPh1MatrixList = ...
java
@Override public BarrierFunction createPhase1BarrierFunction(){ List<double[][]> FiPh1MatrixList = new ArrayList<double[][]>(); for(int i=0; i<this.Fi.length; i++){ FiPh1MatrixList.add(FiPh1MatrixList.size(), this.Fi[i].getData()); } FiPh1MatrixList.add(FiPh1MatrixList.size(), MatrixUtils.createRealId...
[ "@", "Override", "public", "BarrierFunction", "createPhase1BarrierFunction", "(", ")", "{", "List", "<", "double", "[", "]", "[", "]", ">", "FiPh1MatrixList", "=", "new", "ArrayList", "<", "double", "[", "]", "[", "]", ">", "(", ")", ";", "for", "(", "...
Create the barrier function for the Phase I. It is an instance of this class for the constraint: <br>G + Sum[x_i * F_i(x),i] < t * I @see "S.Boyd and L.Vandenberghe, Convex Optimization, 11.6.2"
[ "Create", "the", "barrier", "function", "for", "the", "Phase", "I", ".", "It", "is", "an", "instance", "of", "this", "class", "for", "the", "constraint", ":", "<br", ">", "G", "+", "Sum", "[", "x_i", "*", "F_i", "(", "x", ")", "i", "]", "<", "t",...
train
https://github.com/vincentk/joptimizer/blob/65064c1bb0b26c7261358021e4c93d06dd43564f/src/main/java/com/joptimizer/functions/SDPLogarithmicBarrier.java#L129-L137
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/text/codepoint/CodepointHelper.java
CodepointHelper.verify
public static void verify (@Nullable final char [] aArray, @Nonnull final ECodepointProfile eProfile) { """ Verifies a sequence of codepoints using the specified profile @param aArray char array @param eProfile profile to use """ if (aArray != null) verify (new CodepointIteratorCharArray (aArra...
java
public static void verify (@Nullable final char [] aArray, @Nonnull final ECodepointProfile eProfile) { if (aArray != null) verify (new CodepointIteratorCharArray (aArray), eProfile); }
[ "public", "static", "void", "verify", "(", "@", "Nullable", "final", "char", "[", "]", "aArray", ",", "@", "Nonnull", "final", "ECodepointProfile", "eProfile", ")", "{", "if", "(", "aArray", "!=", "null", ")", "verify", "(", "new", "CodepointIteratorCharArra...
Verifies a sequence of codepoints using the specified profile @param aArray char array @param eProfile profile to use
[ "Verifies", "a", "sequence", "of", "codepoints", "using", "the", "specified", "profile" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/text/codepoint/CodepointHelper.java#L775-L779
hawkular/hawkular-inventory
hawkular-inventory-impl-tinkerpop-parent/hawkular-inventory-impl-tinkerpop/src/main/java/org/hawkular/inventory/impl/tinkerpop/TinkerpopBackend.java
TinkerpopBackend.updateProperties
static void updateProperties(Element e, Map<String, Object> properties, String[] disallowedProperties) { """ Updates the properties of the element, disregarding any changes of the disallowed properties <p> The list of the disallowed properties will usually come from {@link Constants.Type#getMappedProperties()}...
java
static void updateProperties(Element e, Map<String, Object> properties, String[] disallowedProperties) { if (properties == null) { return; } Set<String> disallowed = new HashSet<>(Arrays.asList(disallowedProperties)); //remove all non-mapped properties, that are not in the ...
[ "static", "void", "updateProperties", "(", "Element", "e", ",", "Map", "<", "String", ",", "Object", ">", "properties", ",", "String", "[", "]", "disallowedProperties", ")", "{", "if", "(", "properties", "==", "null", ")", "{", "return", ";", "}", "Set",...
Updates the properties of the element, disregarding any changes of the disallowed properties <p> The list of the disallowed properties will usually come from {@link Constants.Type#getMappedProperties()}. @param e the element to update properties of @param properties the properties to upda...
[ "Updates", "the", "properties", "of", "the", "element", "disregarding", "any", "changes", "of", "the", "disallowed", "properties" ]
train
https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-impl-tinkerpop-parent/hawkular-inventory-impl-tinkerpop/src/main/java/org/hawkular/inventory/impl/tinkerpop/TinkerpopBackend.java#L1292-L1316
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/expressions/Expressions.java
Expressions.notLike
public static NotLike notLike(Expression<String> left, String constant, boolean caseInsensitive) { """ Creates a NotLike expression from the given expressions with % as the wildcard character @param left The left expression. @param constant The constant. @param caseInsensitive Indicates whether comparison sh...
java
public static NotLike notLike(Expression<String> left, String constant, boolean caseInsensitive) { return new NotLike(left, constant(constant), caseInsensitive); }
[ "public", "static", "NotLike", "notLike", "(", "Expression", "<", "String", ">", "left", ",", "String", "constant", ",", "boolean", "caseInsensitive", ")", "{", "return", "new", "NotLike", "(", "left", ",", "constant", "(", "constant", ")", ",", "caseInsensi...
Creates a NotLike expression from the given expressions with % as the wildcard character @param left The left expression. @param constant The constant. @param caseInsensitive Indicates whether comparison should be case insensitive. @return A NotLike expression.
[ "Creates", "a", "NotLike", "expression", "from", "the", "given", "expressions", "with", "%", "as", "the", "wildcard", "character" ]
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/expressions/Expressions.java#L601-L603
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADSTM.java
MOEADSTM.calculateDistance
public double calculateDistance(DoubleSolution individual, double[] lambda) { """ Calculate the perpendicular distance between the solution and reference line """ double scale; double distance; double[] vecInd = new double[problem.getNumberOfObjectives()]; double[] vecProj = new double[problem...
java
public double calculateDistance(DoubleSolution individual, double[] lambda) { double scale; double distance; double[] vecInd = new double[problem.getNumberOfObjectives()]; double[] vecProj = new double[problem.getNumberOfObjectives()]; // vecInd has been normalized to the range [0,1] for (int ...
[ "public", "double", "calculateDistance", "(", "DoubleSolution", "individual", ",", "double", "[", "]", "lambda", ")", "{", "double", "scale", ";", "double", "distance", ";", "double", "[", "]", "vecInd", "=", "new", "double", "[", "problem", ".", "getNumberO...
Calculate the perpendicular distance between the solution and reference line
[ "Calculate", "the", "perpendicular", "distance", "between", "the", "solution", "and", "reference", "line" ]
train
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADSTM.java#L319-L340
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java
SDBaseOps.fill
public SDVariable fill(SDVariable shape, org.nd4j.linalg.api.buffer.DataType dataType, double value) { """ Generate an output variable with the specified (dynamic) shape with all elements set to the specified value @param shape Shape: must be a 1D array/variable @param value Value to set all elements to @retu...
java
public SDVariable fill(SDVariable shape, org.nd4j.linalg.api.buffer.DataType dataType, double value) { return fill(null, shape, dataType, value); }
[ "public", "SDVariable", "fill", "(", "SDVariable", "shape", ",", "org", ".", "nd4j", ".", "linalg", ".", "api", ".", "buffer", ".", "DataType", "dataType", ",", "double", "value", ")", "{", "return", "fill", "(", "null", ",", "shape", ",", "dataType", ...
Generate an output variable with the specified (dynamic) shape with all elements set to the specified value @param shape Shape: must be a 1D array/variable @param value Value to set all elements to @return Output variable
[ "Generate", "an", "output", "variable", "with", "the", "specified", "(", "dynamic", ")", "shape", "with", "all", "elements", "set", "to", "the", "specified", "value" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java#L526-L528
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/ui/jedit/TextUtilities.java
TextUtilities.findWordEnd
public static int findWordEnd(String line, int pos, String noWordSep, boolean joinNonWordChars) { """ Locates the end of the word at the specified position. @param line The text @param pos The position @param noWordSep Characters that are non-alphanumeric, but should be treated as word characters anyway @pa...
java
public static int findWordEnd(String line, int pos, String noWordSep, boolean joinNonWordChars) { return findWordEnd(line, pos, noWordSep, joinNonWordChars, false); }
[ "public", "static", "int", "findWordEnd", "(", "String", "line", ",", "int", "pos", ",", "String", "noWordSep", ",", "boolean", "joinNonWordChars", ")", "{", "return", "findWordEnd", "(", "line", ",", "pos", ",", "noWordSep", ",", "joinNonWordChars", ",", "f...
Locates the end of the word at the specified position. @param line The text @param pos The position @param noWordSep Characters that are non-alphanumeric, but should be treated as word characters anyway @param joinNonWordChars Treat consecutive non-alphanumeric characters as one word @since jEdit 4.1pre2
[ "Locates", "the", "end", "of", "the", "word", "at", "the", "specified", "position", "." ]
train
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/ui/jedit/TextUtilities.java#L151-L153
UrielCh/ovh-java-sdk
ovh-java-sdk-emailpro/src/main/java/net/minidev/ovh/api/ApiOvhEmailpro.java
ApiOvhEmailpro.service_domain_domainName_disclaimer_GET
public OvhDisclaimer service_domain_domainName_disclaimer_GET(String service, String domainName) throws IOException { """ Get this object properties REST: GET /email/pro/{service}/domain/{domainName}/disclaimer @param service [required] The internal name of your pro organization @param domainName [required] D...
java
public OvhDisclaimer service_domain_domainName_disclaimer_GET(String service, String domainName) throws IOException { String qPath = "/email/pro/{service}/domain/{domainName}/disclaimer"; StringBuilder sb = path(qPath, service, domainName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo...
[ "public", "OvhDisclaimer", "service_domain_domainName_disclaimer_GET", "(", "String", "service", ",", "String", "domainName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/pro/{service}/domain/{domainName}/disclaimer\"", ";", "StringBuilder", "sb", "=",...
Get this object properties REST: GET /email/pro/{service}/domain/{domainName}/disclaimer @param service [required] The internal name of your pro organization @param domainName [required] Domain name API beta
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailpro/src/main/java/net/minidev/ovh/api/ApiOvhEmailpro.java#L771-L776
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/impl/PeriodFormatterData.java
PeriodFormatterData.appendSuffix
public void appendSuffix(int tl, int td, StringBuffer sb) { """ Append the appropriate suffix to the string builder, depending on whether and how a limit and direction are to be displayed. @param tl how and whether to display the time limit @param td how and whether to display the time direction @param sb th...
java
public void appendSuffix(int tl, int td, StringBuffer sb) { if (dr.scopeData != null) { int ix = tl * 3 + td; ScopeData sd = dr.scopeData[ix]; if (sd != null) { String suffix = sd.suffix; if (suffix != null) { if (trace) { System.out.println("appendSuffix '" +...
[ "public", "void", "appendSuffix", "(", "int", "tl", ",", "int", "td", ",", "StringBuffer", "sb", ")", "{", "if", "(", "dr", ".", "scopeData", "!=", "null", ")", "{", "int", "ix", "=", "tl", "*", "3", "+", "td", ";", "ScopeData", "sd", "=", "dr", ...
Append the appropriate suffix to the string builder, depending on whether and how a limit and direction are to be displayed. @param tl how and whether to display the time limit @param td how and whether to display the time direction @param sb the string builder to which to append the text
[ "Append", "the", "appropriate", "suffix", "to", "the", "string", "builder", "depending", "on", "whether", "and", "how", "a", "limit", "and", "direction", "are", "to", "be", "displayed", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/impl/PeriodFormatterData.java#L121-L135
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java
OSMTablesFactory.createNodeMemberTable
public static PreparedStatement createNodeMemberTable(Connection connection, String nodeMemberTable) throws SQLException { """ Create the node members table @param connection @param nodeMemberTable @return @throws SQLException """ try (Statement stmt = connection.createStatement()) { ...
java
public static PreparedStatement createNodeMemberTable(Connection connection, String nodeMemberTable) throws SQLException { try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(nodeMemberTable); sb.append("(ID_R...
[ "public", "static", "PreparedStatement", "createNodeMemberTable", "(", "Connection", "connection", ",", "String", "nodeMemberTable", ")", "throws", "SQLException", "{", "try", "(", "Statement", "stmt", "=", "connection", ".", "createStatement", "(", ")", ")", "{", ...
Create the node members table @param connection @param nodeMemberTable @return @throws SQLException
[ "Create", "the", "node", "members", "table" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java#L272-L280
phax/ph-javacc-maven-plugin
src/main/java/org/codehaus/mojo/javacc/JTB.java
JTB.getEffectiveVisitorDirectory
private File getEffectiveVisitorDirectory () { """ Gets the absolute path to the output directory for the visitor files. @return The absolute path to the output directory for the visitor, only <code>null</code> if neither {@link #outputDirectory} nor {@link #visitorDirectory} have been set. """ if (th...
java
private File getEffectiveVisitorDirectory () { if (this.visitorDirectory != null) return this.visitorDirectory; if (this.outputDirectory != null) return new File (this.outputDirectory, getLastPackageName (getEffectiveVisitorPackageName ())); return null; }
[ "private", "File", "getEffectiveVisitorDirectory", "(", ")", "{", "if", "(", "this", ".", "visitorDirectory", "!=", "null", ")", "return", "this", ".", "visitorDirectory", ";", "if", "(", "this", ".", "outputDirectory", "!=", "null", ")", "return", "new", "F...
Gets the absolute path to the output directory for the visitor files. @return The absolute path to the output directory for the visitor, only <code>null</code> if neither {@link #outputDirectory} nor {@link #visitorDirectory} have been set.
[ "Gets", "the", "absolute", "path", "to", "the", "output", "directory", "for", "the", "visitor", "files", "." ]
train
https://github.com/phax/ph-javacc-maven-plugin/blob/99497a971fe59ab2289258ca7ddcfa40e651f19f/src/main/java/org/codehaus/mojo/javacc/JTB.java#L248-L255
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/MavenCoord.java
MavenCoord.fromGAVPC
public static MavenCoord fromGAVPC(String coordGavpc) { """ Creates a {@link MavenCoord} from the given coordinate String. """ Matcher mat = REGEX_GAVCP.matcher(coordGavpc); if (!mat.matches()) throw new IllegalArgumentException("Wrong Maven coordinates format, must be G:A:V[:P[:C]]...
java
public static MavenCoord fromGAVPC(String coordGavpc) { Matcher mat = REGEX_GAVCP.matcher(coordGavpc); if (!mat.matches()) throw new IllegalArgumentException("Wrong Maven coordinates format, must be G:A:V[:P[:C]] . " + coordGavpc); return new MavenCoord() .setGroupId(mat...
[ "public", "static", "MavenCoord", "fromGAVPC", "(", "String", "coordGavpc", ")", "{", "Matcher", "mat", "=", "REGEX_GAVCP", ".", "matcher", "(", "coordGavpc", ")", ";", "if", "(", "!", "mat", ".", "matches", "(", ")", ")", "throw", "new", "IllegalArgumentE...
Creates a {@link MavenCoord} from the given coordinate String.
[ "Creates", "a", "{" ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/MavenCoord.java#L55-L67
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/failover/AbstractMastersListener.java
AbstractMastersListener.throwFailoverMessage
@Override public void throwFailoverMessage(HostAddress failHostAddress, boolean wasMaster, SQLException queryException, boolean reconnected) throws SQLException { """ Throw a human readable message after a failoverException. @param failHostAddress failedHostAddress @param wasMaster was fail...
java
@Override public void throwFailoverMessage(HostAddress failHostAddress, boolean wasMaster, SQLException queryException, boolean reconnected) throws SQLException { String firstPart = "Communications link failure with " + (wasMaster ? "primary" : "secondary") + ((failHostAddress != null)...
[ "@", "Override", "public", "void", "throwFailoverMessage", "(", "HostAddress", "failHostAddress", ",", "boolean", "wasMaster", ",", "SQLException", "queryException", ",", "boolean", "reconnected", ")", "throws", "SQLException", "{", "String", "firstPart", "=", "\"Comm...
Throw a human readable message after a failoverException. @param failHostAddress failedHostAddress @param wasMaster was failed connection master @param queryException internal error @param reconnected connection status @throws SQLException error with failover information
[ "Throw", "a", "human", "readable", "message", "after", "a", "failoverException", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/failover/AbstractMastersListener.java#L496-L540
alibaba/vlayout
vlayout/src/main/java/com/alibaba/android/vlayout/layout/OnePlusNLayoutHelperEx.java
OnePlusNLayoutHelperEx.onRangeChange
@Override public void onRangeChange(int start, int end) { """ {@inheritDoc} <p/> Currently, this layout supports maximum children up to 5, otherwise {@link IllegalArgumentException} will be thrown @param start start position of items handled by this layoutHelper @param end end position of items handl...
java
@Override public void onRangeChange(int start, int end) { if (end - start < 4) { throw new IllegalArgumentException( "pls use OnePlusNLayoutHelper instead of OnePlusNLayoutHelperEx which childcount <= 5"); } if (end - start > 6) { throw new Illegal...
[ "@", "Override", "public", "void", "onRangeChange", "(", "int", "start", ",", "int", "end", ")", "{", "if", "(", "end", "-", "start", "<", "4", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"pls use OnePlusNLayoutHelper instead of OnePlusNLayoutHelp...
{@inheritDoc} <p/> Currently, this layout supports maximum children up to 5, otherwise {@link IllegalArgumentException} will be thrown @param start start position of items handled by this layoutHelper @param end end position of items handled by this layoutHelper, if end &lt; start or end - start &gt 4, it will throw...
[ "{", "@inheritDoc", "}", "<p", "/", ">", "Currently", "this", "layout", "supports", "maximum", "children", "up", "to", "5", "otherwise", "{", "@link", "IllegalArgumentException", "}", "will", "be", "thrown" ]
train
https://github.com/alibaba/vlayout/blob/8a5a51d9d2eeb91fed2ee331a4cf3496282452ce/vlayout/src/main/java/com/alibaba/android/vlayout/layout/OnePlusNLayoutHelperEx.java#L117-L127
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TableHeaderRendererPainter.java
TableHeaderRendererPainter.getTableHeaderColors
private FourColors getTableHeaderColors(CommonControlState type, boolean isSorted) { """ DOCUMENT ME! @param type DOCUMENT ME! @param isSorted DOCUMENT ME! @return DOCUMENT ME! """ switch (type) { case DISABLED: return isSorted ? tableHeaderDisabledSorted : tableHeader...
java
private FourColors getTableHeaderColors(CommonControlState type, boolean isSorted) { switch (type) { case DISABLED: return isSorted ? tableHeaderDisabledSorted : tableHeaderDisabled; case ENABLED: return isSorted ? tableHeaderSorted : tableHeaderEnabled; case P...
[ "private", "FourColors", "getTableHeaderColors", "(", "CommonControlState", "type", ",", "boolean", "isSorted", ")", "{", "switch", "(", "type", ")", "{", "case", "DISABLED", ":", "return", "isSorted", "?", "tableHeaderDisabledSorted", ":", "tableHeaderDisabled", ";...
DOCUMENT ME! @param type DOCUMENT ME! @param isSorted DOCUMENT ME! @return DOCUMENT ME!
[ "DOCUMENT", "ME!" ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TableHeaderRendererPainter.java#L173-L187
kevoree/kevoree-library
toys/src/main/java/com/rendion/util/WindowUtils.java
WindowUtils.createAncestorListener
private static AncestorListener createAncestorListener(JComponent component, final WindowFocusListener windowListener) { """ Creates an {@link AncestorListener} that installs a weakly referenced version of the given {@link WindowFocusListener} when the given {@link JComponent}'s parent changes. """ final...
java
private static AncestorListener createAncestorListener(JComponent component, final WindowFocusListener windowListener) { final WeakReference<JComponent> weakReference = new WeakReference<JComponent>(component); return new AncestorListener() { public void ancestorAdded(AncestorEvent event) { ...
[ "private", "static", "AncestorListener", "createAncestorListener", "(", "JComponent", "component", ",", "final", "WindowFocusListener", "windowListener", ")", "{", "final", "WeakReference", "<", "JComponent", ">", "weakReference", "=", "new", "WeakReference", "<", "JCom...
Creates an {@link AncestorListener} that installs a weakly referenced version of the given {@link WindowFocusListener} when the given {@link JComponent}'s parent changes.
[ "Creates", "an", "{" ]
train
https://github.com/kevoree/kevoree-library/blob/617460e6c5881902ebc488a31ecdea179024d8f1/toys/src/main/java/com/rendion/util/WindowUtils.java#L155-L208
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java
SqlDateTimeUtils.internalToTime
public static java.sql.Time internalToTime(int v, TimeZone tz) { """ Converts the internal representation of a SQL TIME (int) to the Java type used for UDF parameters ({@link java.sql.Time}). <p>The internal int represents the seconds since "00:00:00". When we convert it to {@link java.sql.Time} (time millise...
java
public static java.sql.Time internalToTime(int v, TimeZone tz) { // note that, in this case, can't handle Daylight Saving Time return new java.sql.Time(v - tz.getOffset(v)); }
[ "public", "static", "java", ".", "sql", ".", "Time", "internalToTime", "(", "int", "v", ",", "TimeZone", "tz", ")", "{", "// note that, in this case, can't handle Daylight Saving Time", "return", "new", "java", ".", "sql", ".", "Time", "(", "v", "-", "tz", "."...
Converts the internal representation of a SQL TIME (int) to the Java type used for UDF parameters ({@link java.sql.Time}). <p>The internal int represents the seconds since "00:00:00". When we convert it to {@link java.sql.Time} (time milliseconds since January 1, 1970, 00:00:00 GMT), we need a TimeZone.
[ "Converts", "the", "internal", "representation", "of", "a", "SQL", "TIME", "(", "int", ")", "to", "the", "Java", "type", "used", "for", "UDF", "parameters", "(", "{", "@link", "java", ".", "sql", ".", "Time", "}", ")", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java#L153-L156
ThreeTen/threetenbp
src/main/java/org/threeten/bp/format/DateTimeFormatterBuilder.java
DateTimeFormatterBuilder.appendOffset
public DateTimeFormatterBuilder appendOffset(String pattern, String noOffsetText) { """ Appends the zone offset, such as '+01:00', to the formatter. <p> This appends an instruction to print/parse the offset ID to the builder. <p> During printing, the offset is obtained using a mechanism equivalent to querying...
java
public DateTimeFormatterBuilder appendOffset(String pattern, String noOffsetText) { appendInternal(new OffsetIdPrinterParser(noOffsetText, pattern)); return this; }
[ "public", "DateTimeFormatterBuilder", "appendOffset", "(", "String", "pattern", ",", "String", "noOffsetText", ")", "{", "appendInternal", "(", "new", "OffsetIdPrinterParser", "(", "noOffsetText", ",", "pattern", ")", ")", ";", "return", "this", ";", "}" ]
Appends the zone offset, such as '+01:00', to the formatter. <p> This appends an instruction to print/parse the offset ID to the builder. <p> During printing, the offset is obtained using a mechanism equivalent to querying the temporal with {@link TemporalQueries#offset()}. It will be printed using the format defined b...
[ "Appends", "the", "zone", "offset", "such", "as", "+", "01", ":", "00", "to", "the", "formatter", ".", "<p", ">", "This", "appends", "an", "instruction", "to", "print", "/", "parse", "the", "offset", "ID", "to", "the", "builder", ".", "<p", ">", "Dur...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/format/DateTimeFormatterBuilder.java#L866-L869
voldemort/voldemort
contrib/hadoop-store-builder/src/java/voldemort/store/readonly/hooks/http/HttpHookRunnable.java
HttpHookRunnable.handleResponse
protected void handleResponse(int responseCode, InputStream inputStream) { """ Can be overridden if you want to replace or supplement the debug handling for responses. @param responseCode @param inputStream """ BufferedReader rd = null; try { // Buffer the result into a string ...
java
protected void handleResponse(int responseCode, InputStream inputStream) { BufferedReader rd = null; try { // Buffer the result into a string rd = new BufferedReader(new InputStreamReader(inputStream)); StringBuilder sb = new StringBuilder(); String line; ...
[ "protected", "void", "handleResponse", "(", "int", "responseCode", ",", "InputStream", "inputStream", ")", "{", "BufferedReader", "rd", "=", "null", ";", "try", "{", "// Buffer the result into a string", "rd", "=", "new", "BufferedReader", "(", "new", "InputStreamRe...
Can be overridden if you want to replace or supplement the debug handling for responses. @param responseCode @param inputStream
[ "Can", "be", "overridden", "if", "you", "want", "to", "replace", "or", "supplement", "the", "debug", "handling", "for", "responses", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/contrib/hadoop-store-builder/src/java/voldemort/store/readonly/hooks/http/HttpHookRunnable.java#L92-L114
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceRegionPersistenceImpl.java
CommerceRegionPersistenceImpl.fetchByC_C
@Override public CommerceRegion fetchByC_C(long commerceCountryId, String code) { """ Returns the commerce region where commerceCountryId = &#63; and code = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param commerceCountryId the commerce country ID @param code the code...
java
@Override public CommerceRegion fetchByC_C(long commerceCountryId, String code) { return fetchByC_C(commerceCountryId, code, true); }
[ "@", "Override", "public", "CommerceRegion", "fetchByC_C", "(", "long", "commerceCountryId", ",", "String", "code", ")", "{", "return", "fetchByC_C", "(", "commerceCountryId", ",", "code", ",", "true", ")", ";", "}" ]
Returns the commerce region where commerceCountryId = &#63; and code = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param commerceCountryId the commerce country ID @param code the code @return the matching commerce region, or <code>null</code> if a matching commerce region could...
[ "Returns", "the", "commerce", "region", "where", "commerceCountryId", "=", "&#63", ";", "and", "code", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", ".", "Uses", "the", "finder", ...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceRegionPersistenceImpl.java#L2058-L2061
mgm-tp/jfunk
jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java
WebDriverTool.getCssValue
public String getCssValue(final By by, final String propertyName) { """ Delegates to {@link #findElement(By)} and then calls {@link WebElement#getCssValue(String) getAttribute(String)} on the returned element. @param by the {@link By} used to locate the element @param propertyName the name of the CSS proper...
java
public String getCssValue(final By by, final String propertyName) { WebElement element = findElement(by); return element.getCssValue(propertyName); }
[ "public", "String", "getCssValue", "(", "final", "By", "by", ",", "final", "String", "propertyName", ")", "{", "WebElement", "element", "=", "findElement", "(", "by", ")", ";", "return", "element", ".", "getCssValue", "(", "propertyName", ")", ";", "}" ]
Delegates to {@link #findElement(By)} and then calls {@link WebElement#getCssValue(String) getAttribute(String)} on the returned element. @param by the {@link By} used to locate the element @param propertyName the name of the CSS property @return The current, computed value of the property.
[ "Delegates", "to", "{", "@link", "#findElement", "(", "By", ")", "}", "and", "then", "calls", "{", "@link", "WebElement#getCssValue", "(", "String", ")", "getAttribute", "(", "String", ")", "}", "on", "the", "returned", "element", "." ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java#L543-L546
jayantk/jklol
src/com/jayantkrish/jklol/lisp/Environment.java
Environment.unbindName
public Object unbindName(String name, IndexedList<String> symbolTable) { """ Removes a binding from this environment. Returns the value bound to that name if the name was bound, otherwise returns {@code null}. @param name @param symbolTable @return """ if (!symbolTable.contains(name)) { return...
java
public Object unbindName(String name, IndexedList<String> symbolTable) { if (!symbolTable.contains(name)) { return null; } int index = symbolTable.getIndex(name); return bindings.remove(index); }
[ "public", "Object", "unbindName", "(", "String", "name", ",", "IndexedList", "<", "String", ">", "symbolTable", ")", "{", "if", "(", "!", "symbolTable", ".", "contains", "(", "name", ")", ")", "{", "return", "null", ";", "}", "int", "index", "=", "symb...
Removes a binding from this environment. Returns the value bound to that name if the name was bound, otherwise returns {@code null}. @param name @param symbolTable @return
[ "Removes", "a", "binding", "from", "this", "environment", ".", "Returns", "the", "value", "bound", "to", "that", "name", "if", "the", "name", "was", "bound", "otherwise", "returns", "{", "@code", "null", "}", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/lisp/Environment.java#L80-L86
mangstadt/biweekly
src/main/java/biweekly/property/DateOrDateTimeProperty.java
DateOrDateTimeProperty.setValue
public void setValue(Date value, boolean hasTime) { """ Sets the date-time value. @param value the date-time value @param hasTime true if the value has a time component, false if it is strictly a date """ setValue((value == null) ? null : new ICalDate(value, hasTime)); }
java
public void setValue(Date value, boolean hasTime) { setValue((value == null) ? null : new ICalDate(value, hasTime)); }
[ "public", "void", "setValue", "(", "Date", "value", ",", "boolean", "hasTime", ")", "{", "setValue", "(", "(", "value", "==", "null", ")", "?", "null", ":", "new", "ICalDate", "(", "value", ",", "hasTime", ")", ")", ";", "}" ]
Sets the date-time value. @param value the date-time value @param hasTime true if the value has a time component, false if it is strictly a date
[ "Sets", "the", "date", "-", "time", "value", "." ]
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/property/DateOrDateTimeProperty.java#L78-L80
signalapp/libsignal-service-java
java/src/main/java/org/whispersystems/signalservice/internal/util/Base64.java
Base64.decodeToObject
public static Object decodeToObject( String encodedObject ) throws java.io.IOException, java.lang.ClassNotFoundException { """ Attempts to decode Base64 data and deserialize a Java Object within. Returns <tt>null</tt> if there was an error. @param encodedObject The Base64 data to decode @return The decode...
java
public static Object decodeToObject( String encodedObject ) throws java.io.IOException, java.lang.ClassNotFoundException { return decodeToObject(encodedObject,NO_OPTIONS,null); }
[ "public", "static", "Object", "decodeToObject", "(", "String", "encodedObject", ")", "throws", "java", ".", "io", ".", "IOException", ",", "java", ".", "lang", ".", "ClassNotFoundException", "{", "return", "decodeToObject", "(", "encodedObject", ",", "NO_OPTIONS",...
Attempts to decode Base64 data and deserialize a Java Object within. Returns <tt>null</tt> if there was an error. @param encodedObject The Base64 data to decode @return The decoded and deserialized object @throws NullPointerException if encodedObject is null @throws java.io.IOException if there is a general error @thr...
[ "Attempts", "to", "decode", "Base64", "data", "and", "deserialize", "a", "Java", "Object", "within", ".", "Returns", "<tt", ">", "null<", "/", "tt", ">", "if", "there", "was", "an", "error", "." ]
train
https://github.com/signalapp/libsignal-service-java/blob/64f1150c5e4062d67d31c9a2a9c3a0237d022902/java/src/main/java/org/whispersystems/signalservice/internal/util/Base64.java#L1345-L1348
jenetics/jenetics
jenetics.tool/src/main/java/io/jenetics/tool/trial/Gnuplot.java
Gnuplot.create
public void create(final Path data, final Path output) throws IOException { """ Generate the Gnuplot graph. @param data the input data file @param output the output path of the graph @throws IOException if the Gnuplot generation fails """ _parameters.put(DATA_NAME, data.toString()); _parameters.put(...
java
public void create(final Path data, final Path output) throws IOException { _parameters.put(DATA_NAME, data.toString()); _parameters.put(OUTPUT_NAME, output.toString()); final String params = _parameters.entrySet().stream() .map(Gnuplot::toParamString) .collect(Collectors.joining("; ")); String scrip...
[ "public", "void", "create", "(", "final", "Path", "data", ",", "final", "Path", "output", ")", "throws", "IOException", "{", "_parameters", ".", "put", "(", "DATA_NAME", ",", "data", ".", "toString", "(", ")", ")", ";", "_parameters", ".", "put", "(", ...
Generate the Gnuplot graph. @param data the input data file @param output the output path of the graph @throws IOException if the Gnuplot generation fails
[ "Generate", "the", "Gnuplot", "graph", "." ]
train
https://github.com/jenetics/jenetics/blob/ee516770c65ef529b27deb283f071c85f344eff4/jenetics.tool/src/main/java/io/jenetics/tool/trial/Gnuplot.java#L86-L121
nmorel/gwt-jackson
gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/rebind/AbstractCreator.java
AbstractCreator.methodCallCodeWithClassParameters
private CodeBlock methodCallCodeWithClassParameters( MapperInstance instance, ImmutableList<? extends JType> parameters ) { """ Build the code to create a mapper. @param instance the class to call @param parameters the parameters of the method @return the code to create the mapper """ CodeBlock....
java
private CodeBlock methodCallCodeWithClassParameters( MapperInstance instance, ImmutableList<? extends JType> parameters ) { CodeBlock.Builder builder = initMethodCallCode( instance ); return methodCallParametersCode( builder, Lists.transform( parameters, new Function<JType, CodeBlock>() { @...
[ "private", "CodeBlock", "methodCallCodeWithClassParameters", "(", "MapperInstance", "instance", ",", "ImmutableList", "<", "?", "extends", "JType", ">", "parameters", ")", "{", "CodeBlock", ".", "Builder", "builder", "=", "initMethodCallCode", "(", "instance", ")", ...
Build the code to create a mapper. @param instance the class to call @param parameters the parameters of the method @return the code to create the mapper
[ "Build", "the", "code", "to", "create", "a", "mapper", "." ]
train
https://github.com/nmorel/gwt-jackson/blob/3fdc4350a27a9b64fc437d5fe516bf9191b74824/gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/rebind/AbstractCreator.java#L898-L907
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.email_exchange_organizationName_service_exchangeService_accountUpgrade_duration_GET
public OvhOrder email_exchange_organizationName_service_exchangeService_accountUpgrade_duration_GET(String organizationName, String exchangeService, String duration, OvhAccountQuotaEnum newQuota, String primaryEmailAddress) throws IOException { """ Get prices and contracts information REST: GET /order/email/exc...
java
public OvhOrder email_exchange_organizationName_service_exchangeService_accountUpgrade_duration_GET(String organizationName, String exchangeService, String duration, OvhAccountQuotaEnum newQuota, String primaryEmailAddress) throws IOException { String qPath = "/order/email/exchange/{organizationName}/service/{exchang...
[ "public", "OvhOrder", "email_exchange_organizationName_service_exchangeService_accountUpgrade_duration_GET", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "String", "duration", ",", "OvhAccountQuotaEnum", "newQuota", ",", "String", "primaryEmailAddress",...
Get prices and contracts information REST: GET /order/email/exchange/{organizationName}/service/{exchangeService}/accountUpgrade/{duration} @param newQuota [required] New storage quota for that account @param primaryEmailAddress [required] The account you wish to upgrade @param organizationName [required] The internal...
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L3984-L3991
jboss/jboss-jsf-api_spec
src/main/java/javax/faces/TypedCollections.java
TypedCollections.checkCollectionMembers
private static boolean checkCollectionMembers(Collection<?> c, Class<?> type) { """ Dynamically check that the members of the collection are all instances of the given type (or null). """ for (Object element : c) { if (element != null && !type.isInstance(element)) { return ...
java
private static boolean checkCollectionMembers(Collection<?> c, Class<?> type) { for (Object element : c) { if (element != null && !type.isInstance(element)) { return false; } } return true; }
[ "private", "static", "boolean", "checkCollectionMembers", "(", "Collection", "<", "?", ">", "c", ",", "Class", "<", "?", ">", "type", ")", "{", "for", "(", "Object", "element", ":", "c", ")", "{", "if", "(", "element", "!=", "null", "&&", "!", "type"...
Dynamically check that the members of the collection are all instances of the given type (or null).
[ "Dynamically", "check", "that", "the", "members", "of", "the", "collection", "are", "all", "instances", "of", "the", "given", "type", "(", "or", "null", ")", "." ]
train
https://github.com/jboss/jboss-jsf-api_spec/blob/cb33d215acbab847f2db5cdf2c6fe4d99c0a01c3/src/main/java/javax/faces/TypedCollections.java#L54-L61
threerings/narya
core/src/main/java/com/threerings/crowd/chat/server/ChatChannelManager.java
ChatChannelManager.deliverSpeak
protected void deliverSpeak (ChatChannel channel, UserMessage message, int[] bodyIds) { """ Delivers the supplied chat channel message to the specified bodies. """ channel = intern(channel); for (int bodyId : bodyIds) { BodyObject bobj = getBodyObject(bodyId); if (bobj !...
java
protected void deliverSpeak (ChatChannel channel, UserMessage message, int[] bodyIds) { channel = intern(channel); for (int bodyId : bodyIds) { BodyObject bobj = getBodyObject(bodyId); if (bobj != null && shouldDeliverSpeak(channel, message, bobj)) { _chatHist...
[ "protected", "void", "deliverSpeak", "(", "ChatChannel", "channel", ",", "UserMessage", "message", ",", "int", "[", "]", "bodyIds", ")", "{", "channel", "=", "intern", "(", "channel", ")", ";", "for", "(", "int", "bodyId", ":", "bodyIds", ")", "{", "Body...
Delivers the supplied chat channel message to the specified bodies.
[ "Delivers", "the", "supplied", "chat", "channel", "message", "to", "the", "specified", "bodies", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/server/ChatChannelManager.java#L331-L341
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ProjectStats.java
ProjectStats.setTimestamp
public void setTimestamp(String timestamp) throws ParseException { """ Set the timestamp for this analysis run. @param timestamp the time of the analysis run this ProjectStats represents, as previously reported by writeXML. """ this.analysisTimestamp = new SimpleDateFormat(TIMESTAMP_FORMAT, Locale...
java
public void setTimestamp(String timestamp) throws ParseException { this.analysisTimestamp = new SimpleDateFormat(TIMESTAMP_FORMAT, Locale.ENGLISH).parse(timestamp); }
[ "public", "void", "setTimestamp", "(", "String", "timestamp", ")", "throws", "ParseException", "{", "this", ".", "analysisTimestamp", "=", "new", "SimpleDateFormat", "(", "TIMESTAMP_FORMAT", ",", "Locale", ".", "ENGLISH", ")", ".", "parse", "(", "timestamp", ")"...
Set the timestamp for this analysis run. @param timestamp the time of the analysis run this ProjectStats represents, as previously reported by writeXML.
[ "Set", "the", "timestamp", "for", "this", "analysis", "run", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ProjectStats.java#L161-L163
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/ws/bytebuffer/internal/WsByteBufferPoolManagerImpl.java
WsByteBufferPoolManagerImpl.setLeakDetectionSettings
public void setLeakDetectionSettings(int interval, String output) throws IOException { """ Set the memory leak detection parameters. If the interval is 0 or greater, then the detection code will enabled. @param interval the minimum amount of time between leak detection code will be ran. Also the minimum amoun...
java
public void setLeakDetectionSettings(int interval, String output) throws IOException { this.leakDetectionInterval = interval; this.leakDetectionOutput = TrConfigurator.getLogLocation() + File.separator + output; if ((interval > -1) && (output != null)) { // clear file Fi...
[ "public", "void", "setLeakDetectionSettings", "(", "int", "interval", ",", "String", "output", ")", "throws", "IOException", "{", "this", ".", "leakDetectionInterval", "=", "interval", ";", "this", ".", "leakDetectionOutput", "=", "TrConfigurator", ".", "getLogLocat...
Set the memory leak detection parameters. If the interval is 0 or greater, then the detection code will enabled. @param interval the minimum amount of time between leak detection code will be ran. Also the minimum amount of time that a buffer can go without being accessed before it will be flagged as a possible memory...
[ "Set", "the", "memory", "leak", "detection", "parameters", ".", "If", "the", "interval", "is", "0", "or", "greater", "then", "the", "detection", "code", "will", "enabled", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/bytebuffer/internal/WsByteBufferPoolManagerImpl.java#L329-L338
ontop/ontop
core/obda/src/main/java/it/unibz/inf/ontop/spec/ontology/impl/OntologyBuilderImpl.java
OntologyBuilderImpl.createObjectPropertyAssertion
public static ObjectPropertyAssertion createObjectPropertyAssertion(ObjectPropertyExpression ope, ObjectConstant o1, ObjectConstant o2) throws InconsistentOntologyException { """ Creates an object property assertion <p> ObjectPropertyAssertion := 'ObjectPropertyAssertion' '(' axiomAnnotations ObjectPropertyExpr...
java
public static ObjectPropertyAssertion createObjectPropertyAssertion(ObjectPropertyExpression ope, ObjectConstant o1, ObjectConstant o2) throws InconsistentOntologyException { if (ope.isTop()) return null; if (ope.isBottom()) throw new InconsistentOntologyException(); if ...
[ "public", "static", "ObjectPropertyAssertion", "createObjectPropertyAssertion", "(", "ObjectPropertyExpression", "ope", ",", "ObjectConstant", "o1", ",", "ObjectConstant", "o2", ")", "throws", "InconsistentOntologyException", "{", "if", "(", "ope", ".", "isTop", "(", ")...
Creates an object property assertion <p> ObjectPropertyAssertion := 'ObjectPropertyAssertion' '(' axiomAnnotations ObjectPropertyExpression sourceIndividual targetIndividual ')' <p> Implements rule [O4]: - ignore (return null) if the property is top - inconsistency if the property is bot - swap the arguments to elimina...
[ "Creates", "an", "object", "property", "assertion", "<p", ">", "ObjectPropertyAssertion", ":", "=", "ObjectPropertyAssertion", "(", "axiomAnnotations", "ObjectPropertyExpression", "sourceIndividual", "targetIndividual", ")", "<p", ">", "Implements", "rule", "[", "O4", "...
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/obda/src/main/java/it/unibz/inf/ontop/spec/ontology/impl/OntologyBuilderImpl.java#L457-L467
Erudika/para
para-server/src/main/java/com/erudika/para/persistence/AWSDynamoUtils.java
AWSDynamoUtils.createTable
public static boolean createTable(String appid, long readCapacity, long writeCapacity) { """ Creates a table in AWS DynamoDB. @param appid name of the {@link com.erudika.para.core.App} @param readCapacity read capacity @param writeCapacity write capacity @return true if created """ if (StringUtils.isBlan...
java
public static boolean createTable(String appid, long readCapacity, long writeCapacity) { if (StringUtils.isBlank(appid)) { return false; } else if (StringUtils.containsWhitespace(appid)) { logger.warn("DynamoDB table name contains whitespace. The name '{}' is invalid.", appid); return false; } else if (e...
[ "public", "static", "boolean", "createTable", "(", "String", "appid", ",", "long", "readCapacity", ",", "long", "writeCapacity", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "appid", ")", ")", "{", "return", "false", ";", "}", "else", "if", "...
Creates a table in AWS DynamoDB. @param appid name of the {@link com.erudika.para.core.App} @param readCapacity read capacity @param writeCapacity write capacity @return true if created
[ "Creates", "a", "table", "in", "AWS", "DynamoDB", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/persistence/AWSDynamoUtils.java#L179-L202
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
ComputerVisionImpl.describeImageWithServiceResponseAsync
public Observable<ServiceResponse<ImageDescription>> describeImageWithServiceResponseAsync(String url, DescribeImageOptionalParameter describeImageOptionalParameter) { """ This operation generates a description of an image in human readable language with complete sentences. The description is based on a collectio...
java
public Observable<ServiceResponse<ImageDescription>> describeImageWithServiceResponseAsync(String url, DescribeImageOptionalParameter describeImageOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be...
[ "public", "Observable", "<", "ServiceResponse", "<", "ImageDescription", ">", ">", "describeImageWithServiceResponseAsync", "(", "String", "url", ",", "DescribeImageOptionalParameter", "describeImageOptionalParameter", ")", "{", "if", "(", "this", ".", "client", ".", "e...
This operation generates a description of an image in human readable language with complete sentences. The description is based on a collection of content tags, which are also returned by the operation. More than one description can be generated for each image. Descriptions are ordered by their confidence score. All ...
[ "This", "operation", "generates", "a", "description", "of", "an", "image", "in", "human", "readable", "language", "with", "complete", "sentences", ".", "The", "description", "is", "based", "on", "a", "collection", "of", "content", "tags", "which", "are", "also...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java#L1779-L1790
FXMisc/RichTextFX
richtextfx/src/main/java/org/fxmisc/richtext/model/ReadOnlyStyledDocumentBuilder.java
ReadOnlyStyledDocumentBuilder.addParagraphs
public ReadOnlyStyledDocumentBuilder<PS, SEG, S> addParagraphs(List<List<SEG>> listOfSegLists, StyleSpans<S> entireDocumentStyleSpans) { """ Adds multiple paragraphs to the list, using the {@link #defaultParagraphStyle} for each paragraph. For more configuration on each paragraph'...
java
public ReadOnlyStyledDocumentBuilder<PS, SEG, S> addParagraphs(List<List<SEG>> listOfSegLists, StyleSpans<S> entireDocumentStyleSpans) { return addParagraphList(listOfSegLists, entireDocumentStyleSpans, ignore -> null, Function.identity()); }
[ "public", "ReadOnlyStyledDocumentBuilder", "<", "PS", ",", "SEG", ",", "S", ">", "addParagraphs", "(", "List", "<", "List", "<", "SEG", ">", ">", "listOfSegLists", ",", "StyleSpans", "<", "S", ">", "entireDocumentStyleSpans", ")", "{", "return", "addParagraphL...
Adds multiple paragraphs to the list, using the {@link #defaultParagraphStyle} for each paragraph. For more configuration on each paragraph's paragraph style, use {@link #addParagraphs0(List, StyleSpans)} @param listOfSegLists each item is the list of segments for a single paragraph @param entireDocumentStyleSpans sty...
[ "Adds", "multiple", "paragraphs", "to", "the", "list", "using", "the", "{", "@link", "#defaultParagraphStyle", "}", "for", "each", "paragraph", ".", "For", "more", "configuration", "on", "each", "paragraph", "s", "paragraph", "style", "use", "{", "@link", "#ad...
train
https://github.com/FXMisc/RichTextFX/blob/bc7cab6a637855e0f37d9b9c12a9172c31545f0b/richtextfx/src/main/java/org/fxmisc/richtext/model/ReadOnlyStyledDocumentBuilder.java#L153-L156
jMotif/SAX
src/main/java/net/seninp/jmotif/sax/TSProcessor.java
TSProcessor.num2char
public char num2char(double value, double[] cuts) { """ Get mapping of a number to char. @param value the value to map. @param cuts the array of intervals. @return character corresponding to numeric value. """ int idx = 0; if (value >= 0) { idx = cuts.length; while ((idx > 0) && (c...
java
public char num2char(double value, double[] cuts) { int idx = 0; if (value >= 0) { idx = cuts.length; while ((idx > 0) && (cuts[idx - 1] > value)) { idx--; } } else { while ((idx < cuts.length) && (cuts[idx] <= value)) { idx++; } } retur...
[ "public", "char", "num2char", "(", "double", "value", ",", "double", "[", "]", "cuts", ")", "{", "int", "idx", "=", "0", ";", "if", "(", "value", ">=", "0", ")", "{", "idx", "=", "cuts", ".", "length", ";", "while", "(", "(", "idx", ">", "0", ...
Get mapping of a number to char. @param value the value to map. @param cuts the array of intervals. @return character corresponding to numeric value.
[ "Get", "mapping", "of", "a", "number", "to", "char", "." ]
train
https://github.com/jMotif/SAX/blob/39ee07a69facaa330def5130b8790aeda85f1061/src/main/java/net/seninp/jmotif/sax/TSProcessor.java#L394-L408
camunda/camunda-xml-model
src/main/java/org/camunda/bpm/model/xml/impl/util/DomUtil.java
DomUtil.filterNodeListByName
public static List<DomElement> filterNodeListByName(NodeList nodeList, String namespaceUri, String localName) { """ Filter a {@link NodeList} retaining all elements with a specific name @param nodeList the {@link NodeList} to filter @param namespaceUri the namespace for the elements @param localName the loc...
java
public static List<DomElement> filterNodeListByName(NodeList nodeList, String namespaceUri, String localName) { return filterNodeList(nodeList, new ElementByNameListFilter(localName, namespaceUri)); }
[ "public", "static", "List", "<", "DomElement", ">", "filterNodeListByName", "(", "NodeList", "nodeList", ",", "String", "namespaceUri", ",", "String", "localName", ")", "{", "return", "filterNodeList", "(", "nodeList", ",", "new", "ElementByNameListFilter", "(", "...
Filter a {@link NodeList} retaining all elements with a specific name @param nodeList the {@link NodeList} to filter @param namespaceUri the namespace for the elements @param localName the local element name to filter for @return the List of all Elements which match the filter
[ "Filter", "a", "{", "@link", "NodeList", "}", "retaining", "all", "elements", "with", "a", "specific", "name" ]
train
https://github.com/camunda/camunda-xml-model/blob/85b3f879e26d063f71c94cfd21ac17d9ff6baf4d/src/main/java/org/camunda/bpm/model/xml/impl/util/DomUtil.java#L170-L172
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/RestorePointsInner.java
RestorePointsInner.getAsync
public Observable<RestorePointInner> getAsync(String resourceGroupName, String serverName, String databaseName, String restorePointName) { """ Gets a restore point. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API o...
java
public Observable<RestorePointInner> getAsync(String resourceGroupName, String serverName, String databaseName, String restorePointName) { return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName, restorePointName).map(new Func1<ServiceResponse<RestorePointInner>, RestorePointInner>() { ...
[ "public", "Observable", "<", "RestorePointInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "String", "restorePointName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupNa...
Gets a restore point. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database. @param restorePointName The name of the restore ...
[ "Gets", "a", "restore", "point", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/RestorePointsInner.java#L409-L416
jamesagnew/hapi-fhir
hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirServerImpl.java
FhirServerImpl.registerOsgiProviders
@Override public void registerOsgiProviders (Collection<Object> providers) throws FhirConfigurationException { """ Dynamically registers a list of providers with the RestfulServer @param provider the providers to be registered @throws FhirConfigurationException """ if (null == providers) { throw new ...
java
@Override public void registerOsgiProviders (Collection<Object> providers) throws FhirConfigurationException { if (null == providers) { throw new NullPointerException("FHIR Provider list cannot be null"); } try { super.registerProviders(providers); for (Object provider : providers) { log.trace("regi...
[ "@", "Override", "public", "void", "registerOsgiProviders", "(", "Collection", "<", "Object", ">", "providers", ")", "throws", "FhirConfigurationException", "{", "if", "(", "null", "==", "providers", ")", "{", "throw", "new", "NullPointerException", "(", "\"FHIR P...
Dynamically registers a list of providers with the RestfulServer @param provider the providers to be registered @throws FhirConfigurationException
[ "Dynamically", "registers", "a", "list", "of", "providers", "with", "the", "RestfulServer" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirServerImpl.java#L102-L117
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/color/ColorXyz.java
ColorXyz.rgbToXyz
public static <T extends ImageGray<T>> void rgbToXyz(Planar<T> rgb , Planar<GrayF32> xyz ) { """ Convert a 3-channel {@link Planar} image from RGB into XYZ. RGB is assumed to have a range from 0:255 NOTE: Input and output image can be the same instance. @param rgb (Input) RGB encoded image @param xyz (O...
java
public static <T extends ImageGray<T>> void rgbToXyz(Planar<T> rgb , Planar<GrayF32> xyz ) { xyz.reshape(rgb.width,rgb.height,3); if( rgb.getBandType() == GrayU8.class ) { if (BoofConcurrency.USE_CONCURRENT) { ImplColorXyz_MT.rgbToXyz_U8((Planar<GrayU8>) rgb, xyz); } else { ImplColorXyz.rgbToXyz_U8...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "void", "rgbToXyz", "(", "Planar", "<", "T", ">", "rgb", ",", "Planar", "<", "GrayF32", ">", "xyz", ")", "{", "xyz", ".", "reshape", "(", "rgb", ".", "width", ",", "rgb", "...
Convert a 3-channel {@link Planar} image from RGB into XYZ. RGB is assumed to have a range from 0:255 NOTE: Input and output image can be the same instance. @param rgb (Input) RGB encoded image @param xyz (Output) XYZ encoded image
[ "Convert", "a", "3", "-", "channel", "{", "@link", "Planar", "}", "image", "from", "RGB", "into", "XYZ", ".", "RGB", "is", "assumed", "to", "have", "a", "range", "from", "0", ":", "255" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/color/ColorXyz.java#L112-L131