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
agapsys/captcha-servlet
src/main/java/com/agapsys/captcha/CaptchaServlet.java
CaptchaServlet.isValid
public final boolean isValid(HttpServletRequest req, String token) { """ Tests given token against stored one. @param req request used to retrieve stored cookie @param token token to be tested @return a boolean indicating if given token is valid. """ String storedToken = getStoredToken(req); if (stor...
java
public final boolean isValid(HttpServletRequest req, String token) { String storedToken = getStoredToken(req); if (storedToken == null) return false; return storedToken.equals(token); }
[ "public", "final", "boolean", "isValid", "(", "HttpServletRequest", "req", ",", "String", "token", ")", "{", "String", "storedToken", "=", "getStoredToken", "(", "req", ")", ";", "if", "(", "storedToken", "==", "null", ")", "return", "false", ";", "return", ...
Tests given token against stored one. @param req request used to retrieve stored cookie @param token token to be tested @return a boolean indicating if given token is valid.
[ "Tests", "given", "token", "against", "stored", "one", "." ]
train
https://github.com/agapsys/captcha-servlet/blob/35ec59de53f115646f41bfe72dc5f30187204ee4/src/main/java/com/agapsys/captcha/CaptchaServlet.java#L53-L60
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.retainAll
public static <K, V> boolean retainAll(Map<K, V> self, @ClosureParams(MapEntryOrKeyValue.class) Closure condition) { """ Modifies this map so that it retains only its elements that are matched according to the specified closure condition. In other words, removes from this map all of its elements that don't matc...
java
public static <K, V> boolean retainAll(Map<K, V> self, @ClosureParams(MapEntryOrKeyValue.class) Closure condition) { Iterator<Map.Entry<K, V>> iter = self.entrySet().iterator(); BooleanClosureWrapper bcw = new BooleanClosureWrapper(condition); boolean result = false; while (iter.hasNext(...
[ "public", "static", "<", "K", ",", "V", ">", "boolean", "retainAll", "(", "Map", "<", "K", ",", "V", ">", "self", ",", "@", "ClosureParams", "(", "MapEntryOrKeyValue", ".", "class", ")", "Closure", "condition", ")", "{", "Iterator", "<", "Map", ".", ...
Modifies this map so that it retains only its elements that are matched according to the specified closure condition. In other words, removes from this map all of its elements that don't match. If the closure takes one parameter then it will be passed the <code>Map.Entry</code>. Otherwise the closure should take two p...
[ "Modifies", "this", "map", "so", "that", "it", "retains", "only", "its", "elements", "that", "are", "matched", "according", "to", "the", "specified", "closure", "condition", ".", "In", "other", "words", "removes", "from", "this", "map", "all", "of", "its", ...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L5045-L5057
phax/ph-masterdata
ph-masterdata/src/main/java/com/helger/masterdata/locale/ContinentHelper.java
ContinentHelper._register
private static void _register (@Nonnull @Nonempty final String sCountryCode, @Nonnull final EContinent... aContinents) { """ Register assignment @param sCountryCode Country code to be used. May not be <code>null</code> nor empty @param aContinents The enum to be used. May not be <code>null</code> but may con...
java
private static void _register (@Nonnull @Nonempty final String sCountryCode, @Nonnull final EContinent... aContinents) { final Locale aCountry = CountryCache.getInstance ().getCountry (sCountryCode); if (s_aMap.containsKey (aCountry)) throw new IllegalArgumentException ("Country code '" + sCountryCode +...
[ "private", "static", "void", "_register", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sCountryCode", ",", "@", "Nonnull", "final", "EContinent", "...", "aContinents", ")", "{", "final", "Locale", "aCountry", "=", "CountryCache", ".", "getInstance",...
Register assignment @param sCountryCode Country code to be used. May not be <code>null</code> nor empty @param aContinents The enum to be used. May not be <code>null</code> but may contain a single <code>null</code> element.
[ "Register", "assignment" ]
train
https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/locale/ContinentHelper.java#L309-L316
syphr42/libmythtv-java
commons/src/main/java/org/syphr/mythtv/commons/socket/CommandUtils.java
CommandUtils.expectOk
public static void expectOk(String response) throws ProtocolException { """ Check the response for an "OK" message. Throw an exception if response is not expected. @param response the response to check @throws ProtocolException if the response is not the expected case-insensitive "OK" """ if (!...
java
public static void expectOk(String response) throws ProtocolException { if (!"OK".equalsIgnoreCase(response)) { throw new ProtocolException(response, Direction.RECEIVE); } }
[ "public", "static", "void", "expectOk", "(", "String", "response", ")", "throws", "ProtocolException", "{", "if", "(", "!", "\"OK\"", ".", "equalsIgnoreCase", "(", "response", ")", ")", "{", "throw", "new", "ProtocolException", "(", "response", ",", "Direction...
Check the response for an "OK" message. Throw an exception if response is not expected. @param response the response to check @throws ProtocolException if the response is not the expected case-insensitive "OK"
[ "Check", "the", "response", "for", "an", "OK", "message", ".", "Throw", "an", "exception", "if", "response", "is", "not", "expected", "." ]
train
https://github.com/syphr42/libmythtv-java/blob/cc7a2012fbd4a4ba2562dda6b2614fb0548526ea/commons/src/main/java/org/syphr/mythtv/commons/socket/CommandUtils.java#L51-L57
Stratio/stratio-connector-commons
connector-commons/src/main/java/com/stratio/connector/commons/util/SelectorHelper.java
SelectorHelper.getRestrictedValue
public static Object getRestrictedValue(Selector selector, SelectorType type) throws ExecutionException { """ Return the selector value only if the type matches with the specified value. @param selector the selector. @param type the type of the expected selector @return the corresponding value or null if ...
java
public static Object getRestrictedValue(Selector selector, SelectorType type) throws ExecutionException { Object field = null; if (type != null && selector.getType() != type) { throw new ExecutionException("The selector type expected is: " + type + " but received: " + se...
[ "public", "static", "Object", "getRestrictedValue", "(", "Selector", "selector", ",", "SelectorType", "type", ")", "throws", "ExecutionException", "{", "Object", "field", "=", "null", ";", "if", "(", "type", "!=", "null", "&&", "selector", ".", "getType", "(",...
Return the selector value only if the type matches with the specified value. @param selector the selector. @param type the type of the expected selector @return the corresponding value or null if the selector type does not match. @throws ExecutionException if an error happens.
[ "Return", "the", "selector", "value", "only", "if", "the", "type", "matches", "with", "the", "specified", "value", "." ]
train
https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/util/SelectorHelper.java#L78-L118
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/RSAUtils.java
RSAUtils.verifySignatureWithPublicKey
public static boolean verifySignatureWithPublicKey(byte[] keyData, byte[] message, byte[] signature, String signAlgo) throws NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException, SignatureException { """ Verify a signature with RSA public key. @param keyData RSA public...
java
public static boolean verifySignatureWithPublicKey(byte[] keyData, byte[] message, byte[] signature, String signAlgo) throws NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException, SignatureException { RSAPublicKey key = buildPublicKey(keyData); return verifySigna...
[ "public", "static", "boolean", "verifySignatureWithPublicKey", "(", "byte", "[", "]", "keyData", ",", "byte", "[", "]", "message", ",", "byte", "[", "]", "signature", ",", "String", "signAlgo", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeySpecExcepti...
Verify a signature with RSA public key. @param keyData RSA public key data (value of {@link RSAPublicKey#getEncoded()}) @param message @param signature @param signAlgo signature algorithm to use. If empty, {@link #DEFAULT_SIGNATURE_ALGORITHM} will be used. @return @throws NoSuchAlgorithmException @throws InvalidKeySpe...
[ "Verify", "a", "signature", "with", "RSA", "public", "key", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/RSAUtils.java#L330-L335
io7m/jaffirm
com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Postconditions.java
Postconditions.checkPostcondition
public static <T> T checkPostcondition( final T value, final boolean condition, final Function<T, String> describer) { """ <p>Evaluate the given {@code predicate} using {@code value} as input.</p> <p>The function throws {@link PostconditionViolationException} if the predicate is false.</p> @para...
java
public static <T> T checkPostcondition( final T value, final boolean condition, final Function<T, String> describer) { return innerCheck(value, condition, describer); }
[ "public", "static", "<", "T", ">", "T", "checkPostcondition", "(", "final", "T", "value", ",", "final", "boolean", "condition", ",", "final", "Function", "<", "T", ",", "String", ">", "describer", ")", "{", "return", "innerCheck", "(", "value", ",", "con...
<p>Evaluate the given {@code predicate} using {@code value} as input.</p> <p>The function throws {@link PostconditionViolationException} if the predicate is false.</p> @param value The value @param condition The predicate @param describer A describer for the predicate @param <T> The type of values @return ...
[ "<p", ">", "Evaluate", "the", "given", "{", "@code", "predicate", "}", "using", "{", "@code", "value", "}", "as", "input", ".", "<", "/", "p", ">" ]
train
https://github.com/io7m/jaffirm/blob/c97d246242d381e48832838737418cfe4cb57b4d/com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Postconditions.java#L229-L235
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/group/GroupBy.java
GroupBy.sortedMap
public static <K, V, T extends Comparable<? super T>> AbstractGroupExpression<Pair<K, V>, SortedMap<T, V>> sortedMap(GroupExpression<K, T> key, Expression<V> value) { """ Create a new aggregatin...
java
public static <K, V, T extends Comparable<? super T>> AbstractGroupExpression<Pair<K, V>, SortedMap<T, V>> sortedMap(GroupExpression<K, T> key, Expression<V> value) { return sortedMap(key, ne...
[ "public", "static", "<", "K", ",", "V", ",", "T", "extends", "Comparable", "<", "?", "super", "T", ">", ">", "AbstractGroupExpression", "<", "Pair", "<", "K", ",", "V", ">", ",", "SortedMap", "<", "T", ",", "V", ">", ">", "sortedMap", "(", "GroupEx...
Create a new aggregating map expression using a backing TreeMap @param key key for the map entries @param value value for the map entries @return wrapper expression
[ "Create", "a", "new", "aggregating", "map", "expression", "using", "a", "backing", "TreeMap" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/group/GroupBy.java#L258-L261
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/util/SwitchSubScreenHandler.java
SwitchSubScreenHandler.getSubScreen
public BasePanel getSubScreen(BasePanel parentScreen, ScreenLocation screenLocation, Map<String, Object> properties, int screenNo) { """ Build this sub-screen. @param parentScreen The parent screen. @param screenLocation The location to place the new sub-screen (null = same as current sub-screen). @param iScree...
java
public BasePanel getSubScreen(BasePanel parentScreen, ScreenLocation screenLocation, Map<String, Object> properties, int screenNo) { return null; // Must override }
[ "public", "BasePanel", "getSubScreen", "(", "BasePanel", "parentScreen", ",", "ScreenLocation", "screenLocation", ",", "Map", "<", "String", ",", "Object", ">", "properties", ",", "int", "screenNo", ")", "{", "return", "null", ";", "// Must override", "}" ]
Build this sub-screen. @param parentScreen The parent screen. @param screenLocation The location to place the new sub-screen (null = same as current sub-screen). @param iScreenNo The sub-screen to build.
[ "Build", "this", "sub", "-", "screen", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/util/SwitchSubScreenHandler.java#L161-L164
inaiat/jqplot4java
src/main/java/br/com/digilabs/jqplot/JqPlotUtils.java
JqPlotUtils.createJquery
public static String createJquery(Chart<?> chart, String divId) { """ Cria um comando jquery @param chart Chart @param divId id of element div @return jquery javascript """ return createJquery(chart, divId, null); }
java
public static String createJquery(Chart<?> chart, String divId) { return createJquery(chart, divId, null); }
[ "public", "static", "String", "createJquery", "(", "Chart", "<", "?", ">", "chart", ",", "String", "divId", ")", "{", "return", "createJquery", "(", "chart", ",", "divId", ",", "null", ")", ";", "}" ]
Cria um comando jquery @param chart Chart @param divId id of element div @return jquery javascript
[ "Cria", "um", "comando", "jquery" ]
train
https://github.com/inaiat/jqplot4java/blob/35bcd17749442e88695df0438c8330a65a3977cc/src/main/java/br/com/digilabs/jqplot/JqPlotUtils.java#L70-L72
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/UpdateIntegrationResponseResult.java
UpdateIntegrationResponseResult.withResponseParameters
public UpdateIntegrationResponseResult withResponseParameters(java.util.Map<String, String> responseParameters) { """ <p> A key-value map specifying response parameters that are passed to the method response from the back end. The key is a method response header parameter name and the mapped value is an integrat...
java
public UpdateIntegrationResponseResult withResponseParameters(java.util.Map<String, String> responseParameters) { setResponseParameters(responseParameters); return this; }
[ "public", "UpdateIntegrationResponseResult", "withResponseParameters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "responseParameters", ")", "{", "setResponseParameters", "(", "responseParameters", ")", ";", "return", "this", ";", "}" ]
<p> A key-value map specifying response parameters that are passed to the method response from the back end. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration ...
[ "<p", ">", "A", "key", "-", "value", "map", "specifying", "response", "parameters", "that", "are", "passed", "to", "the", "method", "response", "from", "the", "back", "end", ".", "The", "key", "is", "a", "method", "response", "header", "parameter", "name",...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/UpdateIntegrationResponseResult.java#L284-L287
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/block/decomposition/qr/BlockHouseHolder_DDRB.java
BlockHouseHolder_DDRB.decomposeQR_block_col
public static boolean decomposeQR_block_col( final int blockLength , final DSubmatrixD1 Y , final double gamma[] ) { """ Performs a standard QR decomposition on the specified submatrix that is one block wide. @para...
java
public static boolean decomposeQR_block_col( final int blockLength , final DSubmatrixD1 Y , final double gamma[] ) { int width = Y.col1-Y.col0; int height = Y.row1-Y.row0; int min = Math.min(wid...
[ "public", "static", "boolean", "decomposeQR_block_col", "(", "final", "int", "blockLength", ",", "final", "DSubmatrixD1", "Y", ",", "final", "double", "gamma", "[", "]", ")", "{", "int", "width", "=", "Y", ".", "col1", "-", "Y", ".", "col0", ";", "int", ...
Performs a standard QR decomposition on the specified submatrix that is one block wide. @param blockLength @param Y @param gamma
[ "Performs", "a", "standard", "QR", "decomposition", "on", "the", "specified", "submatrix", "that", "is", "one", "block", "wide", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/block/decomposition/qr/BlockHouseHolder_DDRB.java#L50-L67
duracloud/duracloud
retrievaltool/src/main/java/org/duracloud/retrieval/mgmt/RetrievalWorker.java
RetrievalWorker.retrieveToFile
protected Map<String, String> retrieveToFile(File localFile, RetrievalListener listener) throws IOException { """ Transfers the remote file stream to the local file @param localFile @param listener @return @throws IOException @returns the checksum of the File upon successful retrieval. Successful retrieva...
java
protected Map<String, String> retrieveToFile(File localFile, RetrievalListener listener) throws IOException { try { contentStream = new Retrier(5, 4000, 3).execute(() -> { return source.getSourceContent(contentItem, listener); }); } catch (Exception ex) { ...
[ "protected", "Map", "<", "String", ",", "String", ">", "retrieveToFile", "(", "File", "localFile", ",", "RetrievalListener", "listener", ")", "throws", "IOException", "{", "try", "{", "contentStream", "=", "new", "Retrier", "(", "5", ",", "4000", ",", "3", ...
Transfers the remote file stream to the local file @param localFile @param listener @return @throws IOException @returns the checksum of the File upon successful retrieval. Successful retrieval means the checksum of the local file and remote file match, otherwise an IOException is thrown.
[ "Transfers", "the", "remote", "file", "stream", "to", "the", "local", "file" ]
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/retrievaltool/src/main/java/org/duracloud/retrieval/mgmt/RetrievalWorker.java#L233-L269
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ejs/ras/hpel/TraceNLSResolver.java
TraceNLSResolver.logEvent
protected final static void logEvent(String message, Object[] args) { """ Common method to use Tr to log that something above couldn't be resolved. This method further checks whether or not the <code>com.ibm.ejs.ras.debugTraceNLSResolver</code> property has been set before calling Tr to log the event. @param...
java
protected final static void logEvent(String message, Object[] args) { // if ( makeNoise && tc.isEventEnabled() ) // { // if ( args == null ) // com.ibm.websphere.ras.Tr.event(tc, message); // else // com.ibm.websphere.ras.Tr.event(tc, MessageFormat.format(message, ...
[ "protected", "final", "static", "void", "logEvent", "(", "String", "message", ",", "Object", "[", "]", "args", ")", "{", "// if ( makeNoise && tc.isEventEnabled() )", "// {", "// if ( args == null )", "// com.ibm.websphere.ras.Tr.event(tc, message);", "// else", "// com.ibm.w...
Common method to use Tr to log that something above couldn't be resolved. This method further checks whether or not the <code>com.ibm.ejs.ras.debugTraceNLSResolver</code> property has been set before calling Tr to log the event. @param message Event message @param args Parameters for message formatter
[ "Common", "method", "to", "use", "Tr", "to", "log", "that", "something", "above", "couldn", "t", "be", "resolved", ".", "This", "method", "further", "checks", "whether", "or", "not", "the", "<code", ">", "com", ".", "ibm", ".", "ejs", ".", "ras", ".", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ejs/ras/hpel/TraceNLSResolver.java#L385-L396
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/DdosProtectionPlansInner.java
DdosProtectionPlansInner.createOrUpdate
public DdosProtectionPlanInner createOrUpdate(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { """ Creates or updates a DDoS protection plan. @param resourceGroupName The name of the resource group. @param ddosProtectionPlanName The name of the DDoS protection plan...
java
public DdosProtectionPlanInner createOrUpdate(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).toBlocking().last().body(); }
[ "public", "DdosProtectionPlanInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "ddosProtectionPlanName", ",", "DdosProtectionPlanInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "ddosPr...
Creates or updates a DDoS protection plan. @param resourceGroupName The name of the resource group. @param ddosProtectionPlanName The name of the DDoS protection plan. @param parameters Parameters supplied to the create or update operation. @throws IllegalArgumentException thrown if parameters fail the validation @thr...
[ "Creates", "or", "updates", "a", "DDoS", "protection", "plan", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/DdosProtectionPlansInner.java#L351-L353
albfernandez/itext2
src/main/java/com/lowagie/text/Document.java
Document.addTitle
public boolean addTitle(String title) { """ Adds the title to a Document. @param title the title @return <CODE>true</CODE> if successful, <CODE>false</CODE> otherwise """ try { return add(new Meta(Element.TITLE, title)); } catch (DocumentException de) { throw new Exceptio...
java
public boolean addTitle(String title) { try { return add(new Meta(Element.TITLE, title)); } catch (DocumentException de) { throw new ExceptionConverter(de); } }
[ "public", "boolean", "addTitle", "(", "String", "title", ")", "{", "try", "{", "return", "add", "(", "new", "Meta", "(", "Element", ".", "TITLE", ",", "title", ")", ")", ";", "}", "catch", "(", "DocumentException", "de", ")", "{", "throw", "new", "Ex...
Adds the title to a Document. @param title the title @return <CODE>true</CODE> if successful, <CODE>false</CODE> otherwise
[ "Adds", "the", "title", "to", "a", "Document", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/Document.java#L528-L534
deeplearning4j/deeplearning4j
nd4j/nd4j-common/src/main/java/org/nd4j/linalg/primitives/CounterMap.java
CounterMap.setCount
public double setCount(F first, S second, double value) { """ This method allows you to set counter value for a given first/second pair @param first @param second @param value @return """ Counter<S> counter = maps.get(first); if (counter == null) { counter = new Counter<S>(); ...
java
public double setCount(F first, S second, double value) { Counter<S> counter = maps.get(first); if (counter == null) { counter = new Counter<S>(); maps.put(first, counter); } return counter.setCount(second, value); }
[ "public", "double", "setCount", "(", "F", "first", ",", "S", "second", ",", "double", "value", ")", "{", "Counter", "<", "S", ">", "counter", "=", "maps", ".", "get", "(", "first", ")", ";", "if", "(", "counter", "==", "null", ")", "{", "counter", ...
This method allows you to set counter value for a given first/second pair @param first @param second @param value @return
[ "This", "method", "allows", "you", "to", "set", "counter", "value", "for", "a", "given", "first", "/", "second", "pair" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-common/src/main/java/org/nd4j/linalg/primitives/CounterMap.java#L123-L131
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/property/AbstractReadableProperty.java
AbstractReadableProperty.maybeNotifyListeners
protected void maybeNotifyListeners(R oldValue, R newValue) { """ Notifies the listeners that the property value has changed, if all the conditions are fulfilled (typically, if the old and new values are different, and if the property is not inhibited). <p> Sub-classes should typically call this method when the...
java
protected void maybeNotifyListeners(R oldValue, R newValue) { if (!ValueUtils.areEqual(oldValue, newValue)) { notifyListenersIfUninhibited(oldValue, newValue); } }
[ "protected", "void", "maybeNotifyListeners", "(", "R", "oldValue", ",", "R", "newValue", ")", "{", "if", "(", "!", "ValueUtils", ".", "areEqual", "(", "oldValue", ",", "newValue", ")", ")", "{", "notifyListenersIfUninhibited", "(", "oldValue", ",", "newValue",...
Notifies the listeners that the property value has changed, if all the conditions are fulfilled (typically, if the old and new values are different, and if the property is not inhibited). <p> Sub-classes should typically call this method when they are ready to fire value change events. <p> However, sub-classes may over...
[ "Notifies", "the", "listeners", "that", "the", "property", "value", "has", "changed", "if", "all", "the", "conditions", "are", "fulfilled", "(", "typically", "if", "the", "old", "and", "new", "values", "are", "different", "and", "if", "the", "property", "is"...
train
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/property/AbstractReadableProperty.java#L162-L166
Azure/azure-sdk-for-java
containerinstance/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/containerinstance/v2018_10_01/implementation/ContainersInner.java
ContainersInner.executeCommandAsync
public Observable<ContainerExecResponseInner> executeCommandAsync(String resourceGroupName, String containerGroupName, String containerName, ContainerExecRequest containerExecRequest) { """ Executes a command in a specific container instance. Executes a command for a specific container instance in a specified res...
java
public Observable<ContainerExecResponseInner> executeCommandAsync(String resourceGroupName, String containerGroupName, String containerName, ContainerExecRequest containerExecRequest) { return executeCommandWithServiceResponseAsync(resourceGroupName, containerGroupName, containerName, containerExecRequest).map(...
[ "public", "Observable", "<", "ContainerExecResponseInner", ">", "executeCommandAsync", "(", "String", "resourceGroupName", ",", "String", "containerGroupName", ",", "String", "containerName", ",", "ContainerExecRequest", "containerExecRequest", ")", "{", "return", "executeC...
Executes a command in a specific container instance. Executes a command for a specific container instance in a specified resource group and container group. @param resourceGroupName The name of the resource group. @param containerGroupName The name of the container group. @param containerName The name of the container...
[ "Executes", "a", "command", "in", "a", "specific", "container", "instance", ".", "Executes", "a", "command", "for", "a", "specific", "container", "instance", "in", "a", "specified", "resource", "group", "and", "container", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerinstance/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/containerinstance/v2018_10_01/implementation/ContainersInner.java#L304-L311
remkop/picocli
src/main/java/picocli/CommandLine.java
CommandLine.registerConverter
public <K> CommandLine registerConverter(Class<K> cls, ITypeConverter<K> converter) { """ Registers the specified type converter for the specified class. When initializing fields annotated with {@link Option}, the field's type is used as a lookup key to find the associated type converter, and this type converter...
java
public <K> CommandLine registerConverter(Class<K> cls, ITypeConverter<K> converter) { interpreter.converterRegistry.put(Assert.notNull(cls, "class"), Assert.notNull(converter, "converter")); for (CommandLine command : getCommandSpec().commands.values()) { command.registerConverter(cls, conve...
[ "public", "<", "K", ">", "CommandLine", "registerConverter", "(", "Class", "<", "K", ">", "cls", ",", "ITypeConverter", "<", "K", ">", "converter", ")", "{", "interpreter", ".", "converterRegistry", ".", "put", "(", "Assert", ".", "notNull", "(", "cls", ...
Registers the specified type converter for the specified class. When initializing fields annotated with {@link Option}, the field's type is used as a lookup key to find the associated type converter, and this type converter converts the original command line argument string value to the correct type. <p> Java 8 lambdas...
[ "Registers", "the", "specified", "type", "converter", "for", "the", "specified", "class", ".", "When", "initializing", "fields", "annotated", "with", "{", "@link", "Option", "}", "the", "field", "s", "type", "is", "used", "as", "a", "lookup", "key", "to", ...
train
https://github.com/remkop/picocli/blob/3c5384f0d12817401d1921c3013c1282e2edcab2/src/main/java/picocli/CommandLine.java#L2774-L2780
virgo47/javasimon
core/src/main/java/org/javasimon/callback/quantiles/QuantilesCallback.java
QuantilesCallback.createBuckets
protected final Buckets createBuckets(Stopwatch stopwatch, long min, long max, int bucketNb) { """ Factory method to create a Buckets object using given configuration. @param stopwatch Target Stopwatch @param min Min bound @param max Max bound @param bucketNb Number of buckets between min and max @return Bu...
java
protected final Buckets createBuckets(Stopwatch stopwatch, long min, long max, int bucketNb) { Buckets buckets = bucketsType.createBuckets(stopwatch, min, max, bucketNb); buckets.setLogTemplate(createLogTemplate(stopwatch)); return buckets; }
[ "protected", "final", "Buckets", "createBuckets", "(", "Stopwatch", "stopwatch", ",", "long", "min", ",", "long", "max", ",", "int", "bucketNb", ")", "{", "Buckets", "buckets", "=", "bucketsType", ".", "createBuckets", "(", "stopwatch", ",", "min", ",", "max...
Factory method to create a Buckets object using given configuration. @param stopwatch Target Stopwatch @param min Min bound @param max Max bound @param bucketNb Number of buckets between min and max @return Buckets
[ "Factory", "method", "to", "create", "a", "Buckets", "object", "using", "given", "configuration", "." ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/core/src/main/java/org/javasimon/callback/quantiles/QuantilesCallback.java#L106-L110
ralscha/extdirectspring
src/main/java/ch/ralscha/extdirectspring/bean/ExtDirectFormPostResult.java
ExtDirectFormPostResult.addError
public void addError(String field, String error) { """ Adds one error message to a specific field. Does not overwrite already existing errors. @param field the name of the field @param error the error message """ Assert.notNull(field, "field must not be null"); Assert.notNull(error, "field must not be...
java
public void addError(String field, String error) { Assert.notNull(field, "field must not be null"); Assert.notNull(error, "field must not be null"); addErrors(field, Collections.singletonList(error)); addResultProperty(SUCCESS_PROPERTY, Boolean.FALSE); }
[ "public", "void", "addError", "(", "String", "field", ",", "String", "error", ")", "{", "Assert", ".", "notNull", "(", "field", ",", "\"field must not be null\"", ")", ";", "Assert", ".", "notNull", "(", "error", ",", "\"field must not be null\"", ")", ";", ...
Adds one error message to a specific field. Does not overwrite already existing errors. @param field the name of the field @param error the error message
[ "Adds", "one", "error", "message", "to", "a", "specific", "field", ".", "Does", "not", "overwrite", "already", "existing", "errors", "." ]
train
https://github.com/ralscha/extdirectspring/blob/4b018497c4e7503033f91d0491b4e74bf8291d2c/src/main/java/ch/ralscha/extdirectspring/bean/ExtDirectFormPostResult.java#L181-L188
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java
SubWriterHolderWriter.addMemberTree
public void addMemberTree(Content memberSummaryTree, Content memberTree) { """ Add the member tree. @param memberSummaryTree the content tree representing the member summary @param memberTree the content tree representing the member """ if (configuration.allowTag(HtmlTag.SECTION)) { Htm...
java
public void addMemberTree(Content memberSummaryTree, Content memberTree) { if (configuration.allowTag(HtmlTag.SECTION)) { HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(memberTree)); memberSummaryTree.addContent(htmlTree); } else { memberSummaryTree.addContent(get...
[ "public", "void", "addMemberTree", "(", "Content", "memberSummaryTree", ",", "Content", "memberTree", ")", "{", "if", "(", "configuration", ".", "allowTag", "(", "HtmlTag", ".", "SECTION", ")", ")", "{", "HtmlTree", "htmlTree", "=", "HtmlTree", ".", "SECTION",...
Add the member tree. @param memberSummaryTree the content tree representing the member summary @param memberTree the content tree representing the member
[ "Add", "the", "member", "tree", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java#L312-L319
joniles/mpxj
src/main/java/net/sf/mpxj/planner/PlannerWriter.java
PlannerWriter.isWorkingDay
private boolean isWorkingDay(ProjectCalendar mpxjCalendar, Day day) { """ Used to determine if a particular day of the week is normally a working day. @param mpxjCalendar ProjectCalendar instance @param day Day instance @return boolean flag """ boolean result = false; net.sf.mpxj.DayType type...
java
private boolean isWorkingDay(ProjectCalendar mpxjCalendar, Day day) { boolean result = false; net.sf.mpxj.DayType type = mpxjCalendar.getWorkingDay(day); if (type == null) { type = net.sf.mpxj.DayType.DEFAULT; } switch (type) { case WORKING: { ...
[ "private", "boolean", "isWorkingDay", "(", "ProjectCalendar", "mpxjCalendar", ",", "Day", "day", ")", "{", "boolean", "result", "=", "false", ";", "net", ".", "sf", ".", "mpxj", ".", "DayType", "type", "=", "mpxjCalendar", ".", "getWorkingDay", "(", "day", ...
Used to determine if a particular day of the week is normally a working day. @param mpxjCalendar ProjectCalendar instance @param day Day instance @return boolean flag
[ "Used", "to", "determine", "if", "a", "particular", "day", "of", "the", "week", "is", "normally", "a", "working", "day", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L613-L651
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/RectifyImageOps.java
RectifyImageOps.rectifyImage
public static <T extends ImageGray<T>> ImageDistort<T,T> rectifyImage( FMatrixRMaj rectify , BorderType borderType, Class<T> imageType) { """ Creates an {@link ImageDistort} for rectifying an image given its rectification matrix. Lens distortion is assumed to have been previously removed. @param rectify Trans...
java
public static <T extends ImageGray<T>> ImageDistort<T,T> rectifyImage( FMatrixRMaj rectify , BorderType borderType, Class<T> imageType) { boolean skip = borderType == BorderType.SKIP; if( skip ) { borderType = BorderType.EXTENDED; } InterpolatePixelS<T> interp = FactoryInterpolation.bilinearPixelS(imageTyp...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "ImageDistort", "<", "T", ",", "T", ">", "rectifyImage", "(", "FMatrixRMaj", "rectify", ",", "BorderType", "borderType", ",", "Class", "<", "T", ">", "imageType", ")", "{", "boolea...
Creates an {@link ImageDistort} for rectifying an image given its rectification matrix. Lens distortion is assumed to have been previously removed. @param rectify Transform for rectifying the image. @param imageType Type of single band image the transform is to be applied to. @return ImageDistort for rectifying the im...
[ "Creates", "an", "{", "@link", "ImageDistort", "}", "for", "rectifying", "an", "image", "given", "its", "rectification", "matrix", ".", "Lens", "distortion", "is", "assumed", "to", "have", "been", "previously", "removed", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/RectifyImageOps.java#L376-L396
ops4j/org.ops4j.pax.exam2
containers/pax-exam-container-karaf/src/main/java/org/ops4j/pax/exam/karaf/options/KarafDistributionOption.java
KarafDistributionOption.editConfigurationFilePut
public static Option[] editConfigurationFilePut(final String configurationFilePath, File source, String... keysToUseFromSource) { """ This option allows to configure each configuration file based on the karaf.home location. The value is "put" which means it is either replaced or added. For simpler configu...
java
public static Option[] editConfigurationFilePut(final String configurationFilePath, File source, String... keysToUseFromSource) { return createOptionListFromFile(source, new FileOptionFactory() { @Override public Option createOption(String key, Object value) { re...
[ "public", "static", "Option", "[", "]", "editConfigurationFilePut", "(", "final", "String", "configurationFilePath", ",", "File", "source", ",", "String", "...", "keysToUseFromSource", ")", "{", "return", "createOptionListFromFile", "(", "source", ",", "new", "FileO...
This option allows to configure each configuration file based on the karaf.home location. The value is "put" which means it is either replaced or added. For simpler configuration you can add a file source. If you want to put all values from this file do not configure any keysToUseFromSource; otherwise define them to us...
[ "This", "option", "allows", "to", "configure", "each", "configuration", "file", "based", "on", "the", "karaf", ".", "home", "location", ".", "The", "value", "is", "put", "which", "means", "it", "is", "either", "replaced", "or", "added", ".", "For", "simple...
train
https://github.com/ops4j/org.ops4j.pax.exam2/blob/7f83796cbbb857123d8fc7fe817a7637218d5d77/containers/pax-exam-container-karaf/src/main/java/org/ops4j/pax/exam/karaf/options/KarafDistributionOption.java#L194-L204
inkstand-io/scribble
scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java
Directory.createDirectoryService
private DirectoryService createDirectoryService() { """ Creates a new DirectoryService instance for the test rule. Initialization of the service is done in the apply Statement phase by invoking the setupService method. """ final DirectoryServiceFactory factory = new DefaultDirectoryServiceFactory(); ...
java
private DirectoryService createDirectoryService() { final DirectoryServiceFactory factory = new DefaultDirectoryServiceFactory(); try { factory.init("scribble"); return factory.getDirectoryService(); } catch (Exception e) { //NOSONAR throw new AssertionError...
[ "private", "DirectoryService", "createDirectoryService", "(", ")", "{", "final", "DirectoryServiceFactory", "factory", "=", "new", "DefaultDirectoryServiceFactory", "(", ")", ";", "try", "{", "factory", ".", "init", "(", "\"scribble\"", ")", ";", "return", "factory"...
Creates a new DirectoryService instance for the test rule. Initialization of the service is done in the apply Statement phase by invoking the setupService method.
[ "Creates", "a", "new", "DirectoryService", "instance", "for", "the", "test", "rule", ".", "Initialization", "of", "the", "service", "is", "done", "in", "the", "apply", "Statement", "phase", "by", "invoking", "the", "setupService", "method", "." ]
train
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java#L158-L168
alkacon/opencms-core
src/org/opencms/util/CmsStringUtil.java
CmsStringUtil.getLocaleForName
public static Locale getLocaleForName(String name) { """ Returns a Locale calculated from the suffix of the given String, or <code>null</code> if no locale suffix is found.<p> The locale returned will include the optional country code if this was part of the suffix.<p> Calls {@link CmsResource#getName(String...
java
public static Locale getLocaleForName(String name) { String suffix = getLocaleSuffixForName(CmsResource.getName(name)); if (suffix != null) { String laguageString = suffix.substring(0, 2); return suffix.length() == 5 ? new Locale(laguageString, suffix.substring(3, 5)) : new Loca...
[ "public", "static", "Locale", "getLocaleForName", "(", "String", "name", ")", "{", "String", "suffix", "=", "getLocaleSuffixForName", "(", "CmsResource", ".", "getName", "(", "name", ")", ")", ";", "if", "(", "suffix", "!=", "null", ")", "{", "String", "la...
Returns a Locale calculated from the suffix of the given String, or <code>null</code> if no locale suffix is found.<p> The locale returned will include the optional country code if this was part of the suffix.<p> Calls {@link CmsResource#getName(String)} first, so the given name can also be a resource root path.<p> ...
[ "Returns", "a", "Locale", "calculated", "from", "the", "suffix", "of", "the", "given", "String", "or", "<code", ">", "null<", "/", "code", ">", "if", "no", "locale", "suffix", "is", "found", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsStringUtil.java#L859-L867
buschmais/jqa-maven-plugin
src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java
AbstractMojo.getStore
private Store getStore(MavenProject rootModule) throws MojoExecutionException { """ Determine the store instance to use for the given root module. @param rootModule The root module. @return The store instance. @throws MojoExecutionException If the store cannot be opened. """ StoreConfiguration con...
java
private Store getStore(MavenProject rootModule) throws MojoExecutionException { StoreConfiguration configuration = getStoreConfiguration(rootModule); List<Class<?>> descriptorTypes; try { descriptorTypes = pluginRepositoryProvider.getPluginRepository().getModelPluginRepository().getD...
[ "private", "Store", "getStore", "(", "MavenProject", "rootModule", ")", "throws", "MojoExecutionException", "{", "StoreConfiguration", "configuration", "=", "getStoreConfiguration", "(", "rootModule", ")", ";", "List", "<", "Class", "<", "?", ">", ">", "descriptorTy...
Determine the store instance to use for the given root module. @param rootModule The root module. @return The store instance. @throws MojoExecutionException If the store cannot be opened.
[ "Determine", "the", "store", "instance", "to", "use", "for", "the", "given", "root", "module", "." ]
train
https://github.com/buschmais/jqa-maven-plugin/blob/5c21a8058fc1b013333081907fbf00d3525e11c3/src/main/java/com/buschmais/jqassistant/scm/maven/AbstractMojo.java#L409-L424
sstrickx/yahoofinance-api
src/main/java/yahoofinance/Stock.java
Stock.getDividendHistory
public List<HistoricalDividend> getDividendHistory(Calendar from, Calendar to) throws IOException { """ Requests the historical dividends for this stock with the following characteristics. <ul> <li> from: specified value <li> to: specified value </ul> @param from start date of the historical data ...
java
public List<HistoricalDividend> getDividendHistory(Calendar from, Calendar to) throws IOException { if(YahooFinance.HISTQUOTES2_ENABLED.equalsIgnoreCase("true")) { HistDividendsRequest histDiv = new HistDividendsRequest(this.symbol, from, to); this.setDividendHistory(histDiv.getResult())...
[ "public", "List", "<", "HistoricalDividend", ">", "getDividendHistory", "(", "Calendar", "from", ",", "Calendar", "to", ")", "throws", "IOException", "{", "if", "(", "YahooFinance", ".", "HISTQUOTES2_ENABLED", ".", "equalsIgnoreCase", "(", "\"true\"", ")", ")", ...
Requests the historical dividends for this stock with the following characteristics. <ul> <li> from: specified value <li> to: specified value </ul> @param from start date of the historical data @param to end date of the historical data @return a list of historical dividends from this s...
[ "Requests", "the", "historical", "dividends", "for", "this", "stock", "with", "the", "following", "characteristics", ".", "<ul", ">", "<li", ">", "from", ":", "specified", "value", "<li", ">", "to", ":", "specified", "value", "<", "/", "ul", ">" ]
train
https://github.com/sstrickx/yahoofinance-api/blob/2766ba52fc5cccf9b4da5c06423d68059cf0a6e6/src/main/java/yahoofinance/Stock.java#L397-L406
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/utils/MangooUtils.java
MangooUtils.readableFileSize
public static String readableFileSize(long size) { """ Converts a given file size into a readable file size including unit @param size The size in bytes to convert @return Readable files size, e.g. 24 MB """ if (size <= 0) { return "0"; } int index = (int) (Math...
java
public static String readableFileSize(long size) { if (size <= 0) { return "0"; } int index = (int) (Math.log10(size) / Math.log10(CONVERTION)); return new DecimalFormat("#,##0.#").format(size / Math.pow(CONVERTION, index)) + " " + UNITS[index]; }
[ "public", "static", "String", "readableFileSize", "(", "long", "size", ")", "{", "if", "(", "size", "<=", "0", ")", "{", "return", "\"0\"", ";", "}", "int", "index", "=", "(", "int", ")", "(", "Math", ".", "log10", "(", "size", ")", "/", "Math", ...
Converts a given file size into a readable file size including unit @param size The size in bytes to convert @return Readable files size, e.g. 24 MB
[ "Converts", "a", "given", "file", "size", "into", "a", "readable", "file", "size", "including", "unit" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/utils/MangooUtils.java#L103-L110
jcuda/jcusparse
JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java
JCusparse.cusparseXcsric02_zeroPivot
public static int cusparseXcsric02_zeroPivot( cusparseHandle handle, csric02Info info, Pointer position) { """ <pre> Description: Compute the incomplete-Cholesky factorization with 0 fill-in (IC0) of the matrix A stored in CSR format based on the information in the opaque structure ...
java
public static int cusparseXcsric02_zeroPivot( cusparseHandle handle, csric02Info info, Pointer position) { return checkResult(cusparseXcsric02_zeroPivotNative(handle, info, position)); }
[ "public", "static", "int", "cusparseXcsric02_zeroPivot", "(", "cusparseHandle", "handle", ",", "csric02Info", "info", ",", "Pointer", "position", ")", "{", "return", "checkResult", "(", "cusparseXcsric02_zeroPivotNative", "(", "handle", ",", "info", ",", "position", ...
<pre> Description: Compute the incomplete-Cholesky factorization with 0 fill-in (IC0) of the matrix A stored in CSR format based on the information in the opaque structure info that was obtained from the analysis phase (csrsv2_analysis). This routine implements algorithm 2 for this problem. </pre>
[ "<pre", ">", "Description", ":", "Compute", "the", "incomplete", "-", "Cholesky", "factorization", "with", "0", "fill", "-", "in", "(", "IC0", ")", "of", "the", "matrix", "A", "stored", "in", "CSR", "format", "based", "on", "the", "information", "in", "t...
train
https://github.com/jcuda/jcusparse/blob/7687a62a4ef6b76cb91cf7da93d4cf5ade96a791/JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java#L7062-L7068
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/Criteria.java
Criteria.addGroupBy
public void addGroupBy(String fieldName) { """ Adds a groupby fieldName for ReportQueries. @param fieldName The groupby to set @deprecated use QueryByCriteria#addGroupBy """ if (fieldName != null) { _getGroupby().add(new FieldHelper(fieldName, false)); } }
java
public void addGroupBy(String fieldName) { if (fieldName != null) { _getGroupby().add(new FieldHelper(fieldName, false)); } }
[ "public", "void", "addGroupBy", "(", "String", "fieldName", ")", "{", "if", "(", "fieldName", "!=", "null", ")", "{", "_getGroupby", "(", ")", ".", "add", "(", "new", "FieldHelper", "(", "fieldName", ",", "false", ")", ")", ";", "}", "}" ]
Adds a groupby fieldName for ReportQueries. @param fieldName The groupby to set @deprecated use QueryByCriteria#addGroupBy
[ "Adds", "a", "groupby", "fieldName", "for", "ReportQueries", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/Criteria.java#L962-L968
steveash/jopenfst
src/main/java/com/github/steveash/jopenfst/semiring/UnionSemiring.java
UnionSemiring.makeForNaturalOrdering
public static <W extends Comparable<W>, S extends GenericSemiring<W>> UnionSemiring<W, S> makeForNaturalOrdering( S weightSemiring) { """ Creates a union semiring for the given semiring (that has naturally comparable weights where the default merge strategy will work just fine) @param weightSemiring underl...
java
public static <W extends Comparable<W>, S extends GenericSemiring<W>> UnionSemiring<W, S> makeForNaturalOrdering( S weightSemiring) { return makeForOrdering(weightSemiring, Ordering.natural(), defaultMerge()); }
[ "public", "static", "<", "W", "extends", "Comparable", "<", "W", ">", ",", "S", "extends", "GenericSemiring", "<", "W", ">", ">", "UnionSemiring", "<", "W", ",", "S", ">", "makeForNaturalOrdering", "(", "S", "weightSemiring", ")", "{", "return", "makeForOr...
Creates a union semiring for the given semiring (that has naturally comparable weights where the default merge strategy will work just fine) @param weightSemiring underlying weight semiring, this will use the natural ordering and the default merge @param <W> the underlying weight type @param <S> ...
[ "Creates", "a", "union", "semiring", "for", "the", "given", "semiring", "(", "that", "has", "naturally", "comparable", "weights", "where", "the", "default", "merge", "strategy", "will", "work", "just", "fine", ")" ]
train
https://github.com/steveash/jopenfst/blob/4c675203015c1cfad2072556cb532b6edc73261d/src/main/java/com/github/steveash/jopenfst/semiring/UnionSemiring.java#L68-L71
xiancloud/xian
xian-message/src/main/java/info/xiancloud/message/short_msg/yunpian/JavaSmsApi.java
JavaSmsApi.sendVoice
public static Single<String> sendVoice(String apikey, String mobile, String code) { """ 通过接口发送语音验证码 @param apikey apikey @param mobile 接收的手机号 @param code 验证码 @return the http result """ Map<String, String> params = new HashMap<>(); params.put("apikey", apikey); params.put("mobil...
java
public static Single<String> sendVoice(String apikey, String mobile, String code) { Map<String, String> params = new HashMap<>(); params.put("apikey", apikey); params.put("mobile", mobile); params.put("code", code); return post(URI_SEND_VOICE, params); }
[ "public", "static", "Single", "<", "String", ">", "sendVoice", "(", "String", "apikey", ",", "String", "mobile", ",", "String", "code", ")", "{", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "HashMap", "<>", "(", ")", ";", "params", ...
通过接口发送语音验证码 @param apikey apikey @param mobile 接收的手机号 @param code 验证码 @return the http result
[ "通过接口发送语音验证码" ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-message/src/main/java/info/xiancloud/message/short_msg/yunpian/JavaSmsApi.java#L126-L132
deeplearning4j/deeplearning4j
datavec/datavec-spark/src/main/java/org/datavec/spark/transform/AnalyzeSpark.java
AnalyzeSpark.sampleInvalidFromColumn
public static List<Writable> sampleInvalidFromColumn(int numToSample, String columnName, Schema schema, JavaRDD<List<Writable>> data, boolean ignoreMissing) { """ Randomly sample a set of invalid values from a specified column. Values are considered invalid according to the Schema / ColumnMeta...
java
public static List<Writable> sampleInvalidFromColumn(int numToSample, String columnName, Schema schema, JavaRDD<List<Writable>> data, boolean ignoreMissing) { //First: filter out all valid entries, to leave only invalid entries int colIdx = schema.getIndexOfColumn(columnName); ...
[ "public", "static", "List", "<", "Writable", ">", "sampleInvalidFromColumn", "(", "int", "numToSample", ",", "String", "columnName", ",", "Schema", "schema", ",", "JavaRDD", "<", "List", "<", "Writable", ">", ">", "data", ",", "boolean", "ignoreMissing", ")", ...
Randomly sample a set of invalid values from a specified column. Values are considered invalid according to the Schema / ColumnMetaData @param numToSample Maximum number of invalid values to sample @param columnName Same of the column from which to sample invalid values @param schema Data schema @param ...
[ "Randomly", "sample", "a", "set", "of", "invalid", "values", "from", "a", "specified", "column", ".", "Values", "are", "considered", "invalid", "according", "to", "the", "Schema", "/", "ColumnMetaData" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-spark/src/main/java/org/datavec/spark/transform/AnalyzeSpark.java#L328-L339
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.cart_cartId_checkout_POST
public OvhOrder cart_cartId_checkout_POST(String cartId, Boolean autoPayWithPreferredPaymentMethod, Boolean waiveRetractationPeriod) throws IOException { """ Validate your shopping and create order REST: POST /order/cart/{cartId}/checkout @param cartId [required] Cart identifier @param autoPayWithPreferredPay...
java
public OvhOrder cart_cartId_checkout_POST(String cartId, Boolean autoPayWithPreferredPaymentMethod, Boolean waiveRetractationPeriod) throws IOException { String qPath = "/order/cart/{cartId}/checkout"; StringBuilder sb = path(qPath, cartId); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "...
[ "public", "OvhOrder", "cart_cartId_checkout_POST", "(", "String", "cartId", ",", "Boolean", "autoPayWithPreferredPaymentMethod", ",", "Boolean", "waiveRetractationPeriod", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/cart/{cartId}/checkout\"", ";", "...
Validate your shopping and create order REST: POST /order/cart/{cartId}/checkout @param cartId [required] Cart identifier @param autoPayWithPreferredPaymentMethod [required] Indicates that order will be automatically paid with preferred payment method @param waiveRetractationPeriod [required] Indicates that order will...
[ "Validate", "your", "shopping", "and", "create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L9195-L9203
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PacketCapturesInner.java
PacketCapturesInner.beginGetStatus
public PacketCaptureQueryStatusResultInner beginGetStatus(String resourceGroupName, String networkWatcherName, String packetCaptureName) { """ Query the status of a running packet capture session. @param resourceGroupName The name of the resource group. @param networkWatcherName The name of the Network Watcher...
java
public PacketCaptureQueryStatusResultInner beginGetStatus(String resourceGroupName, String networkWatcherName, String packetCaptureName) { return beginGetStatusWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName).toBlocking().single().body(); }
[ "public", "PacketCaptureQueryStatusResultInner", "beginGetStatus", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "String", "packetCaptureName", ")", "{", "return", "beginGetStatusWithServiceResponseAsync", "(", "resourceGroupName", ",", "networkW...
Query the status of a running packet capture session. @param resourceGroupName The name of the resource group. @param networkWatcherName The name of the Network Watcher resource. @param packetCaptureName The name given to the packet capture session. @throws IllegalArgumentException thrown if parameters fail the valida...
[ "Query", "the", "status", "of", "a", "running", "packet", "capture", "session", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PacketCapturesInner.java#L791-L793
spring-projects/spring-ldap
odm/src/main/java/org/springframework/ldap/odm/tools/SchemaToJava.java
SchemaToJava.makeOutputFile
private static File makeOutputFile(String outputDir, String packageName, String className) throws IOException { """ Create the output file for the generated code along with all intervening directories """ // Convert the package name to a path Pattern pattern=Pattern.compile("\\...
java
private static File makeOutputFile(String outputDir, String packageName, String className) throws IOException { // Convert the package name to a path Pattern pattern=Pattern.compile("\\."); Matcher matcher=pattern.matcher(packageName); String sepToUse=File.separator; ...
[ "private", "static", "File", "makeOutputFile", "(", "String", "outputDir", ",", "String", "packageName", ",", "String", "className", ")", "throws", "IOException", "{", "// Convert the package name to a path", "Pattern", "pattern", "=", "Pattern", ".", "compile", "(", ...
Create the output file for the generated code along with all intervening directories
[ "Create", "the", "output", "file", "for", "the", "generated", "code", "along", "with", "all", "intervening", "directories" ]
train
https://github.com/spring-projects/spring-ldap/blob/15142d4ae18a9dc6b363a1ebf085e2bda9d9a4c0/odm/src/main/java/org/springframework/ldap/odm/tools/SchemaToJava.java#L296-L324
joniles/mpxj
src/main/java/net/sf/mpxj/common/DateHelper.java
DateHelper.max
public static Date max(Date d1, Date d2) { """ Returns the later of two dates, handling null values. A non-null Date is always considered to be later than a null Date. @param d1 Date instance @param d2 Date instance @return Date latest date """ Date result; if (d1 == null) { re...
java
public static Date max(Date d1, Date d2) { Date result; if (d1 == null) { result = d2; } else if (d2 == null) { result = d1; } else { result = (d1.compareTo(d2) > 0) ? d1 : d2; } return result; ...
[ "public", "static", "Date", "max", "(", "Date", "d1", ",", "Date", "d2", ")", "{", "Date", "result", ";", "if", "(", "d1", "==", "null", ")", "{", "result", "=", "d2", ";", "}", "else", "if", "(", "d2", "==", "null", ")", "{", "result", "=", ...
Returns the later of two dates, handling null values. A non-null Date is always considered to be later than a null Date. @param d1 Date instance @param d2 Date instance @return Date latest date
[ "Returns", "the", "later", "of", "two", "dates", "handling", "null", "values", ".", "A", "non", "-", "null", "Date", "is", "always", "considered", "to", "be", "later", "than", "a", "null", "Date", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/DateHelper.java#L218-L235
graknlabs/grakn
server/src/graql/reasoner/atom/Atom.java
Atom.semanticDifference
public SemanticDifference semanticDifference(Atom parentAtom, Unifier unifier) { """ Calculates the semantic difference between the parent and this (child) atom, that needs to be applied on A(P) to find the subset belonging to A(C). @param parentAtom parent atom @param unifier child->parent unifier @retur...
java
public SemanticDifference semanticDifference(Atom parentAtom, Unifier unifier) { Set<VariableDefinition> diff = new HashSet<>(); ImmutableMap<Variable, Type> childVarTypeMap = this.getParentQuery().getVarTypeMap(false); ImmutableMap<Variable, Type> parentVarTypeMap = parentAtom.getParentQuery()....
[ "public", "SemanticDifference", "semanticDifference", "(", "Atom", "parentAtom", ",", "Unifier", "unifier", ")", "{", "Set", "<", "VariableDefinition", ">", "diff", "=", "new", "HashSet", "<>", "(", ")", ";", "ImmutableMap", "<", "Variable", ",", "Type", ">", ...
Calculates the semantic difference between the parent and this (child) atom, that needs to be applied on A(P) to find the subset belonging to A(C). @param parentAtom parent atom @param unifier child->parent unifier @return semantic difference between child and parent
[ "Calculates", "the", "semantic", "difference", "between", "the", "parent", "and", "this", "(", "child", ")", "atom", "that", "needs", "to", "be", "applied", "on", "A", "(", "P", ")", "to", "find", "the", "subset", "belonging", "to", "A", "(", "C", ")",...
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/graql/reasoner/atom/Atom.java#L466-L491
fcrepo3/fcrepo
fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/ExistPolicyIndex.java
ExistPolicyIndex.nameToId
protected static String nameToId(String name) { """ utility methods to convert between a document name and a form that eXist accepts (ie URL-encoded) """ try { return URLEncoder.encode(name, "UTF-8"); } catch (UnsupportedEncodingException e) { // should not happen ...
java
protected static String nameToId(String name) { try { return URLEncoder.encode(name, "UTF-8"); } catch (UnsupportedEncodingException e) { // should not happen throw new RuntimeException("Unsupported encoding", e); } }
[ "protected", "static", "String", "nameToId", "(", "String", "name", ")", "{", "try", "{", "return", "URLEncoder", ".", "encode", "(", "name", ",", "\"UTF-8\"", ")", ";", "}", "catch", "(", "UnsupportedEncodingException", "e", ")", "{", "// should not happen", ...
utility methods to convert between a document name and a form that eXist accepts (ie URL-encoded)
[ "utility", "methods", "to", "convert", "between", "a", "document", "name", "and", "a", "form", "that", "eXist", "accepts", "(", "ie", "URL", "-", "encoded", ")" ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/ExistPolicyIndex.java#L319-L326
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/functions/FunctionUtils.java
FunctionUtils.resolveFunction
public static String resolveFunction(String functionString, TestContext context) { """ This method resolves a custom function to its respective result. @param functionString to evaluate. @throws com.consol.citrus.exceptions.CitrusRuntimeException @return evaluated result """ String functionExpressio...
java
public static String resolveFunction(String functionString, TestContext context) { String functionExpression = VariableUtils.cutOffVariablesPrefix(functionString); if (!functionExpression.contains("(") || !functionExpression.endsWith(")") || !functionExpression.contains(":")) { throw new In...
[ "public", "static", "String", "resolveFunction", "(", "String", "functionString", ",", "TestContext", "context", ")", "{", "String", "functionExpression", "=", "VariableUtils", ".", "cutOffVariablesPrefix", "(", "functionString", ")", ";", "if", "(", "!", "functionE...
This method resolves a custom function to its respective result. @param functionString to evaluate. @throws com.consol.citrus.exceptions.CitrusRuntimeException @return evaluated result
[ "This", "method", "resolves", "a", "custom", "function", "to", "its", "respective", "result", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/functions/FunctionUtils.java#L127-L150
dbracewell/mango
src/main/java/com/davidbracewell/DynamicEnum.java
DynamicEnum.isDefined
public static boolean isDefined(@NonNull Class<? extends EnumValue> enumClass, @NonNull String name) { """ <p>Determines if the specified name is a defined value of the specified {@link EnumValue} class}.</p> @param enumClass Class information for the EnumValue that we will check. @param name the name of ...
java
public static boolean isDefined(@NonNull Class<? extends EnumValue> enumClass, @NonNull String name) { return GLOBAL_REPOSITORY.containsKey(toKey(enumClass, name)); }
[ "public", "static", "boolean", "isDefined", "(", "@", "NonNull", "Class", "<", "?", "extends", "EnumValue", ">", "enumClass", ",", "@", "NonNull", "String", "name", ")", "{", "return", "GLOBAL_REPOSITORY", ".", "containsKey", "(", "toKey", "(", "enumClass", ...
<p>Determines if the specified name is a defined value of the specified {@link EnumValue} class}.</p> @param enumClass Class information for the EnumValue that we will check. @param name the name of the specified value @return True if the specified value has been defined for the given EnumValue class @throws Null...
[ "<p", ">", "Determines", "if", "the", "specified", "name", "is", "a", "defined", "value", "of", "the", "specified", "{", "@link", "EnumValue", "}", "class", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/DynamicEnum.java#L82-L84
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java
ElementMatchers.takesArgument
public static <T extends MethodDescription> ElementMatcher.Junction<T> takesArgument(int index, Class<?> type) { """ Matches {@link MethodDescription}s that define a given generic type as a parameter at the given index. @param index The index of the parameter. @param type The erasure of the type the matched m...
java
public static <T extends MethodDescription> ElementMatcher.Junction<T> takesArgument(int index, Class<?> type) { return takesArgument(index, TypeDescription.ForLoadedType.of(type)); }
[ "public", "static", "<", "T", "extends", "MethodDescription", ">", "ElementMatcher", ".", "Junction", "<", "T", ">", "takesArgument", "(", "int", "index", ",", "Class", "<", "?", ">", "type", ")", "{", "return", "takesArgument", "(", "index", ",", "TypeDes...
Matches {@link MethodDescription}s that define a given generic type as a parameter at the given index. @param index The index of the parameter. @param type The erasure of the type the matched method is expected to define as a parameter type. @param <T> The type of the matched object. @return An element matcher that...
[ "Matches", "{", "@link", "MethodDescription", "}", "s", "that", "define", "a", "given", "generic", "type", "as", "a", "parameter", "at", "the", "given", "index", "." ]
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1242-L1244
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/MultipleObjectsBundle.java
MultipleObjectsBundle.appendColumn
public MultipleObjectsBundle appendColumn(SimpleTypeInformation<?> type, List<?> data) { """ Helper to add a single column to the bundle. @param type Type information @param data Data to add @return This object, for chaining. """ meta.add(type); columns.add(data); return this; }
java
public MultipleObjectsBundle appendColumn(SimpleTypeInformation<?> type, List<?> data) { meta.add(type); columns.add(data); return this; }
[ "public", "MultipleObjectsBundle", "appendColumn", "(", "SimpleTypeInformation", "<", "?", ">", "type", ",", "List", "<", "?", ">", "data", ")", "{", "meta", ".", "add", "(", "type", ")", ";", "columns", ".", "add", "(", "data", ")", ";", "return", "th...
Helper to add a single column to the bundle. @param type Type information @param data Data to add @return This object, for chaining.
[ "Helper", "to", "add", "a", "single", "column", "to", "the", "bundle", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/MultipleObjectsBundle.java#L133-L137
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java
CategoryUrl.getChildCategoriesUrl
public static MozuUrl getChildCategoriesUrl(Integer categoryId, String responseFields) { """ Get Resource Url for GetChildCategories @param categoryId Unique identifier of the category to modify. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned in...
java
public static MozuUrl getChildCategoriesUrl(Integer categoryId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}/children?responseFields={responseFields}"); formatter.formatUrl("categoryId", categoryId); formatter.formatUrl("responseField...
[ "public", "static", "MozuUrl", "getChildCategoriesUrl", "(", "Integer", "categoryId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/categories/{categoryId}/children?responseFields={responseF...
Get Resource Url for GetChildCategories @param categoryId Unique identifier of the category to modify. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data u...
[ "Get", "Resource", "Url", "for", "GetChildCategories" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java#L42-L48
jamel/dbf
dbf-reader/src/main/java/org/jamel/dbf/utils/DbfUtils.java
DbfUtils.parseInt
public static int parseInt(byte[] bytes, int from, int to) { """ parses only positive numbers @param bytes bytes of string value @param from index to start from @param to index to end at @return integer value """ int result = 0; for (int i = from; i < to && i < bytes.length; i++...
java
public static int parseInt(byte[] bytes, int from, int to) { int result = 0; for (int i = from; i < to && i < bytes.length; i++) { result *= 10; result += (bytes[i] - (byte) '0'); } return result; }
[ "public", "static", "int", "parseInt", "(", "byte", "[", "]", "bytes", ",", "int", "from", ",", "int", "to", ")", "{", "int", "result", "=", "0", ";", "for", "(", "int", "i", "=", "from", ";", "i", "<", "to", "&&", "i", "<", "bytes", ".", "le...
parses only positive numbers @param bytes bytes of string value @param from index to start from @param to index to end at @return integer value
[ "parses", "only", "positive", "numbers" ]
train
https://github.com/jamel/dbf/blob/5f065f8a13d9a4ffe27c617e7ec321771c95da7f/dbf-reader/src/main/java/org/jamel/dbf/utils/DbfUtils.java#L70-L77
finmath/finmath-lib
src/main/java/net/finmath/time/ScheduleGenerator.java
ScheduleGenerator.createScheduleFromConventions
public static Schedule createScheduleFromConventions( LocalDate referenceDate, LocalDate startDate, LocalDate maturityDate, Frequency frequency, DaycountConvention daycountConvention, ShortPeriodConvention shortPeriodConvention, DateRollConvention dateRollConvention, BusinessdayCalendar business...
java
public static Schedule createScheduleFromConventions( LocalDate referenceDate, LocalDate startDate, LocalDate maturityDate, Frequency frequency, DaycountConvention daycountConvention, ShortPeriodConvention shortPeriodConvention, DateRollConvention dateRollConvention, BusinessdayCalendar business...
[ "public", "static", "Schedule", "createScheduleFromConventions", "(", "LocalDate", "referenceDate", ",", "LocalDate", "startDate", ",", "LocalDate", "maturityDate", ",", "Frequency", "frequency", ",", "DaycountConvention", "daycountConvention", ",", "ShortPeriodConvention", ...
ScheduleFromPeriods generation for given {referenceDate,startDate,maturityDate}. Generates a schedule based on some meta data. <ul> <li>The schedule generation considers short stub periods at beginning or at the end.</li> <li>Date rolling is performed using the provided businessdayCalendar.</li> </ul> The reference d...
[ "ScheduleFromPeriods", "generation", "for", "given", "{", "referenceDate", "startDate", "maturityDate", "}", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/time/ScheduleGenerator.java#L385-L399
apache/incubator-gobblin
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/orc/HiveOrcSerDeManager.java
HiveOrcSerDeManager.addSerDeProperties
@Override public void addSerDeProperties(Path path, HiveRegistrationUnit hiveUnit) throws IOException { """ Add ORC SerDe attributes into HiveUnit @param path @param hiveUnit @throws IOException """ hiveUnit.setSerDeType(this.serDeWrapper.getSerDe().getClass().getName()); hiveUnit.setInput...
java
@Override public void addSerDeProperties(Path path, HiveRegistrationUnit hiveUnit) throws IOException { hiveUnit.setSerDeType(this.serDeWrapper.getSerDe().getClass().getName()); hiveUnit.setInputFormat(this.serDeWrapper.getInputFormatClassName()); hiveUnit.setOutputFormat(this.serDeWrapper.getOutput...
[ "@", "Override", "public", "void", "addSerDeProperties", "(", "Path", "path", ",", "HiveRegistrationUnit", "hiveUnit", ")", "throws", "IOException", "{", "hiveUnit", ".", "setSerDeType", "(", "this", ".", "serDeWrapper", ".", "getSerDe", "(", ")", ".", "getClass...
Add ORC SerDe attributes into HiveUnit @param path @param hiveUnit @throws IOException
[ "Add", "ORC", "SerDe", "attributes", "into", "HiveUnit" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/orc/HiveOrcSerDeManager.java#L128-L136
skyscreamer/JSONassert
src/main/java/org/skyscreamer/jsonassert/JSONAssert.java
JSONAssert.assertNotEquals
public static void assertNotEquals(JSONObject expected, JSONObject actual, JSONCompareMode compareMode) throws JSONException { """ Asserts that the JSONObject provided does not match the expected JSONObject. If it is it throws an {@link AssertionError}. @param expected Expected JSONObject @param ...
java
public static void assertNotEquals(JSONObject expected, JSONObject actual, JSONCompareMode compareMode) throws JSONException { assertNotEquals("", expected, actual, compareMode); }
[ "public", "static", "void", "assertNotEquals", "(", "JSONObject", "expected", ",", "JSONObject", "actual", ",", "JSONCompareMode", "compareMode", ")", "throws", "JSONException", "{", "assertNotEquals", "(", "\"\"", ",", "expected", ",", "actual", ",", "compareMode",...
Asserts that the JSONObject provided does not match the expected JSONObject. If it is it throws an {@link AssertionError}. @param expected Expected JSONObject @param actual JSONObject to compare @param compareMode Specifies which comparison mode to use @throws JSONException JSON parsing error
[ "Asserts", "that", "the", "JSONObject", "provided", "does", "not", "match", "the", "expected", "JSONObject", ".", "If", "it", "is", "it", "throws", "an", "{", "@link", "AssertionError", "}", "." ]
train
https://github.com/skyscreamer/JSONassert/blob/830efcf546d07f955d8a213cc5c8a1db34d78f04/src/main/java/org/skyscreamer/jsonassert/JSONAssert.java#L617-L620
fuinorg/event-store-commons
jpa/src/main/java/org/fuin/esc/jpa/AbstractJpaEventStore.java
AbstractJpaEventStore.createJpqlStreamSelect
protected final String createJpqlStreamSelect(final StreamId streamId) { """ Creates the JPQL to select the stream itself. @param streamId Unique stream identifier. @return JPQL that selects the stream with the given identifier. """ if (streamId.isProjection()) { throw new Illega...
java
protected final String createJpqlStreamSelect(final StreamId streamId) { if (streamId.isProjection()) { throw new IllegalArgumentException("Projections do not have a stream table : " + streamId); } final List<KeyValue> params = new ArrayList<>(streamId.getParameters()); ...
[ "protected", "final", "String", "createJpqlStreamSelect", "(", "final", "StreamId", "streamId", ")", "{", "if", "(", "streamId", ".", "isProjection", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Projections do not have a stream table : \"", ...
Creates the JPQL to select the stream itself. @param streamId Unique stream identifier. @return JPQL that selects the stream with the given identifier.
[ "Creates", "the", "JPQL", "to", "select", "the", "stream", "itself", "." ]
train
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/jpa/src/main/java/org/fuin/esc/jpa/AbstractJpaEventStore.java#L388-L409
jbundle/jbundle
thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java
BaseMessageFilter.updateFilterTree
public final void updateFilterTree(String strKey, Object objValue) { """ Update this object's filter with this new tree information. @param strKey The tree key to add or change. @param objValue Changes to the property tree key. """ Object[][] mxProperties = this.cloneMatrix(this.getNameValueTree()); ...
java
public final void updateFilterTree(String strKey, Object objValue) { Object[][] mxProperties = this.cloneMatrix(this.getNameValueTree()); mxProperties = this.addNameValue(mxProperties, strKey, objValue); // Add/replace this property this.setFilterTree(mxProperties); // Update any remote co...
[ "public", "final", "void", "updateFilterTree", "(", "String", "strKey", ",", "Object", "objValue", ")", "{", "Object", "[", "]", "[", "]", "mxProperties", "=", "this", ".", "cloneMatrix", "(", "this", ".", "getNameValueTree", "(", ")", ")", ";", "mxPropert...
Update this object's filter with this new tree information. @param strKey The tree key to add or change. @param objValue Changes to the property tree key.
[ "Update", "this", "object", "s", "filter", "with", "this", "new", "tree", "information", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java#L457-L462
vakinge/jeesuite-libs
jeesuite-common2/src/main/java/com/jeesuite/common2/excel/ExcelReader.java
ExcelReader.getCellValue
public String getCellValue(int rowNumber, int cellNumber) { """ 获取指定单元格的值 @param rowNumber 行数,从1开始 @param cellNumber 列数,从1开始 @return 该单元格的值 """ String result; checkRowAndCell(rowNumber, cellNumber); Sheet sheet = this.workbook.getSheet(this.sheetName); Row row = sheet.getR...
java
public String getCellValue(int rowNumber, int cellNumber) { String result; checkRowAndCell(rowNumber, cellNumber); Sheet sheet = this.workbook.getSheet(this.sheetName); Row row = sheet.getRow(--rowNumber); Cell cell = row.getCell(--cellNumber); switch (cell.getCellTypeEnu...
[ "public", "String", "getCellValue", "(", "int", "rowNumber", ",", "int", "cellNumber", ")", "{", "String", "result", ";", "checkRowAndCell", "(", "rowNumber", ",", "cellNumber", ")", ";", "Sheet", "sheet", "=", "this", ".", "workbook", ".", "getSheet", "(", ...
获取指定单元格的值 @param rowNumber 行数,从1开始 @param cellNumber 列数,从1开始 @return 该单元格的值
[ "获取指定单元格的值" ]
train
https://github.com/vakinge/jeesuite-libs/blob/c48fe2c7fbd294892cf4030dbec96e744dd3e386/jeesuite-common2/src/main/java/com/jeesuite/common2/excel/ExcelReader.java#L270-L304
googleapis/google-cloud-java
google-cloud-clients/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/JobServiceClient.java
JobServiceClient.batchDeleteJobs
public final void batchDeleteJobs(String parent, String filter) { """ Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter. <p>Sample code: <pre><code> try (JobServiceClient jobServiceClient = JobServiceClient.create()) { TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]"); ...
java
public final void batchDeleteJobs(String parent, String filter) { BatchDeleteJobsRequest request = BatchDeleteJobsRequest.newBuilder().setParent(parent).setFilter(filter).build(); batchDeleteJobs(request); }
[ "public", "final", "void", "batchDeleteJobs", "(", "String", "parent", ",", "String", "filter", ")", "{", "BatchDeleteJobsRequest", "request", "=", "BatchDeleteJobsRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", ")", ".", "setFilter", "("...
Deletes a list of [Job][google.cloud.talent.v4beta1.Job]s by filter. <p>Sample code: <pre><code> try (JobServiceClient jobServiceClient = JobServiceClient.create()) { TenantOrProjectName parent = TenantName.of("[PROJECT]", "[TENANT]"); String filter = ""; jobServiceClient.batchDeleteJobs(parent.toString(), filter); }...
[ "Deletes", "a", "list", "of", "[", "Job", "]", "[", "google", ".", "cloud", ".", "talent", ".", "v4beta1", ".", "Job", "]", "s", "by", "filter", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/JobServiceClient.java#L802-L807
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/RendererUtils.java
RendererUtils.findUISelectManyConverter
public static Converter findUISelectManyConverter( FacesContext facesContext, UISelectMany component) { """ Calls findUISelectManyConverter with considerValueType = false. @param facesContext @param component @return """ return findUISelectManyConverter(facesContext, component, false); ...
java
public static Converter findUISelectManyConverter( FacesContext facesContext, UISelectMany component) { return findUISelectManyConverter(facesContext, component, false); }
[ "public", "static", "Converter", "findUISelectManyConverter", "(", "FacesContext", "facesContext", ",", "UISelectMany", "component", ")", "{", "return", "findUISelectManyConverter", "(", "facesContext", ",", "component", ",", "false", ")", ";", "}" ]
Calls findUISelectManyConverter with considerValueType = false. @param facesContext @param component @return
[ "Calls", "findUISelectManyConverter", "with", "considerValueType", "=", "false", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/RendererUtils.java#L553-L557
google/Accessibility-Test-Framework-for-Android
src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java
AccessibilityNodeInfoUtils.isAutoScrollEdgeListItem
public static boolean isAutoScrollEdgeListItem( Context context, AccessibilityNodeInfoCompat node, int direction) { """ Convenience method determining if the current item is at the edge of a list and suitable autoscroll. Calls {@code isEdgeListItem} with {@code FILTER_AUTO_SCROLL}. @param context ...
java
public static boolean isAutoScrollEdgeListItem( Context context, AccessibilityNodeInfoCompat node, int direction) { return isEdgeListItem(context, node, direction, FILTER_AUTO_SCROLL); }
[ "public", "static", "boolean", "isAutoScrollEdgeListItem", "(", "Context", "context", ",", "AccessibilityNodeInfoCompat", "node", ",", "int", "direction", ")", "{", "return", "isEdgeListItem", "(", "context", ",", "node", ",", "direction", ",", "FILTER_AUTO_SCROLL", ...
Convenience method determining if the current item is at the edge of a list and suitable autoscroll. Calls {@code isEdgeListItem} with {@code FILTER_AUTO_SCROLL}. @param context The parent context. @param node The node to check. @param direction The direction in which to check, one of: <ul> <li>{@code -1} to check bac...
[ "Convenience", "method", "determining", "if", "the", "current", "item", "is", "at", "the", "edge", "of", "a", "list", "and", "suitable", "autoscroll", ".", "Calls", "{", "@code", "isEdgeListItem", "}", "with", "{", "@code", "FILTER_AUTO_SCROLL", "}", "." ]
train
https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java#L610-L613
kiegroup/drools
drools-decisiontables/src/main/java/org/drools/decisiontable/SpreadsheetCompiler.java
SpreadsheetCompiler.compile
public String compile(boolean showPackage, final InputStream xlsStream, final InputType type) { """ Generates DRL from the input stream containing the spreadsheet. @param showPackage tells it to print or not print any package statements in the spreadsheet. @...
java
public String compile(boolean showPackage, final InputStream xlsStream, final InputType type) { return compile( xlsStream, type, new DefaultRuleSheetListener( showPackage, trimCell ) ); }
[ "public", "String", "compile", "(", "boolean", "showPackage", ",", "final", "InputStream", "xlsStream", ",", "final", "InputType", "type", ")", "{", "return", "compile", "(", "xlsStream", ",", "type", ",", "new", "DefaultRuleSheetListener", "(", "showPackage", "...
Generates DRL from the input stream containing the spreadsheet. @param showPackage tells it to print or not print any package statements in the spreadsheet. @param xlsStream The stream to the spreadsheet. Uses the first worksheet found for the decision tables, ignores others. @return DRL xml, ready for use in drools.
[ "Generates", "DRL", "from", "the", "input", "stream", "containing", "the", "spreadsheet", "." ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-decisiontables/src/main/java/org/drools/decisiontable/SpreadsheetCompiler.java#L68-L74
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCaseProps.java
UCaseProps.isFollowedByCasedLetter
private final boolean isFollowedByCasedLetter(ContextIterator iter, int dir) { """ /* Is followed by {case-ignorable}* cased ? (dir determines looking forward/backward) """ int c; if(iter==null) { return false; } for(iter.reset(dir); (c=iter.next())>=0;) { ...
java
private final boolean isFollowedByCasedLetter(ContextIterator iter, int dir) { int c; if(iter==null) { return false; } for(iter.reset(dir); (c=iter.next())>=0;) { int type=getTypeOrIgnorable(c); if((type&4)!=0) { /* case-ignorable, co...
[ "private", "final", "boolean", "isFollowedByCasedLetter", "(", "ContextIterator", "iter", ",", "int", "dir", ")", "{", "int", "c", ";", "if", "(", "iter", "==", "null", ")", "{", "return", "false", ";", "}", "for", "(", "iter", ".", "reset", "(", "dir"...
/* Is followed by {case-ignorable}* cased ? (dir determines looking forward/backward)
[ "/", "*", "Is", "followed", "by", "{", "case", "-", "ignorable", "}", "*", "cased", "?", "(", "dir", "determines", "looking", "forward", "/", "backward", ")" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCaseProps.java#L660-L679
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/core/ServerParams.java
ServerParams.parseCommandLineArgs
private void parseCommandLineArgs(String[] args) throws ConfigurationException { """ Overrides the loaded/default settings by command line arguments. """ if (args == null || args.length == 0) { return; } logger.info("Parsing command line arguments"); m_commandLi...
java
private void parseCommandLineArgs(String[] args) throws ConfigurationException { if (args == null || args.length == 0) { return; } logger.info("Parsing command line arguments"); m_commandLineArgs = args; try { for (int inx = 0; inx < args....
[ "private", "void", "parseCommandLineArgs", "(", "String", "[", "]", "args", ")", "throws", "ConfigurationException", "{", "if", "(", "args", "==", "null", "||", "args", ".", "length", "==", "0", ")", "{", "return", ";", "}", "logger", ".", "info", "(", ...
Overrides the loaded/default settings by command line arguments.
[ "Overrides", "the", "loaded", "/", "default", "settings", "by", "command", "line", "arguments", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/ServerParams.java#L551-L575
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java
DateUtil.isSameDay
public static boolean isSameDay(final Date date1, final Date date2) { """ 比较两个日期是否为同一天 @param date1 日期1 @param date2 日期2 @return 是否为同一天 @since 4.1.13 """ if (date1 == null || date2 == null) { throw new IllegalArgumentException("The date must not be null"); } return isSameDay(calendar(date1),...
java
public static boolean isSameDay(final Date date1, final Date date2) { if (date1 == null || date2 == null) { throw new IllegalArgumentException("The date must not be null"); } return isSameDay(calendar(date1), calendar(date2)); }
[ "public", "static", "boolean", "isSameDay", "(", "final", "Date", "date1", ",", "final", "Date", "date2", ")", "{", "if", "(", "date1", "==", "null", "||", "date2", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The date must not...
比较两个日期是否为同一天 @param date1 日期1 @param date2 日期2 @return 是否为同一天 @since 4.1.13
[ "比较两个日期是否为同一天" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L1394-L1399
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/OffsetTime.java
OffsetTime.withOffsetSameLocal
public OffsetTime withOffsetSameLocal(ZoneOffset offset) { """ Returns a copy of this {@code OffsetTime} with the specified offset ensuring that the result has the same local time. <p> This method returns an object with the same {@code LocalTime} and the specified {@code ZoneOffset}. No calculation is needed o...
java
public OffsetTime withOffsetSameLocal(ZoneOffset offset) { return offset != null && offset.equals(this.offset) ? this : new OffsetTime(time, offset); }
[ "public", "OffsetTime", "withOffsetSameLocal", "(", "ZoneOffset", "offset", ")", "{", "return", "offset", "!=", "null", "&&", "offset", ".", "equals", "(", "this", ".", "offset", ")", "?", "this", ":", "new", "OffsetTime", "(", "time", ",", "offset", ")", ...
Returns a copy of this {@code OffsetTime} with the specified offset ensuring that the result has the same local time. <p> This method returns an object with the same {@code LocalTime} and the specified {@code ZoneOffset}. No calculation is needed or performed. For example, if this time represents {@code 10:30+02:00} an...
[ "Returns", "a", "copy", "of", "this", "{", "@code", "OffsetTime", "}", "with", "the", "specified", "offset", "ensuring", "that", "the", "result", "has", "the", "same", "local", "time", ".", "<p", ">", "This", "method", "returns", "an", "object", "with", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/OffsetTime.java#L562-L564
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/GrammaticalStructure.java
GrammaticalStructure.printDependencies
public static void printDependencies(GrammaticalStructure gs, Collection<TypedDependency> deps, Tree tree, boolean conllx, boolean extraSep) { """ Print typed dependencies in either the Stanford dependency representation or in the conllx format. @param deps Typed dependencies to print @param tree Tree corre...
java
public static void printDependencies(GrammaticalStructure gs, Collection<TypedDependency> deps, Tree tree, boolean conllx, boolean extraSep) { System.out.println(dependenciesToString(gs, deps, tree, conllx, extraSep)); }
[ "public", "static", "void", "printDependencies", "(", "GrammaticalStructure", "gs", ",", "Collection", "<", "TypedDependency", ">", "deps", ",", "Tree", "tree", ",", "boolean", "conllx", ",", "boolean", "extraSep", ")", "{", "System", ".", "out", ".", "println...
Print typed dependencies in either the Stanford dependency representation or in the conllx format. @param deps Typed dependencies to print @param tree Tree corresponding to typed dependencies (only necessary if conllx == true) @param conllx If true use conllx format, otherwise use Stanford representation @param extraS...
[ "Print", "typed", "dependencies", "in", "either", "the", "Stanford", "dependency", "representation", "or", "in", "the", "conllx", "format", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/GrammaticalStructure.java#L861-L863
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java
XLogPDescriptor.getDoubleBondedCarbonsCount
private int getDoubleBondedCarbonsCount(IAtomContainer ac, IAtom atom) { """ Gets the doubleBondedCarbonsCount attribute of the XLogPDescriptor object. @param ac Description of the Parameter @param atom Description of the Parameter @return The doubleBondedCarbonsCount value """ List<IA...
java
private int getDoubleBondedCarbonsCount(IAtomContainer ac, IAtom atom) { List<IAtom> neighbours = ac.getConnectedAtomsList(atom); IBond bond; int cdbcounter = 0; for (IAtom neighbour : neighbours) { if (neighbour.getSymbol().equals("C")) { bond = ac.getBond(ne...
[ "private", "int", "getDoubleBondedCarbonsCount", "(", "IAtomContainer", "ac", ",", "IAtom", "atom", ")", "{", "List", "<", "IAtom", ">", "neighbours", "=", "ac", ".", "getConnectedAtomsList", "(", "atom", ")", ";", "IBond", "bond", ";", "int", "cdbcounter", ...
Gets the doubleBondedCarbonsCount attribute of the XLogPDescriptor object. @param ac Description of the Parameter @param atom Description of the Parameter @return The doubleBondedCarbonsCount value
[ "Gets", "the", "doubleBondedCarbonsCount", "attribute", "of", "the", "XLogPDescriptor", "object", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1132-L1145
alkacon/opencms-core
src/org/opencms/ade/contenteditor/A_CmsXmlContentEditorChangeHandler.java
A_CmsXmlContentEditorChangeHandler.resolveRelativePath
public String resolveRelativePath(String source, String target) { """ Resolves a relative content value path to an absolute one.<p> @param source the source path @param target the target path @return the resolved path """ String result = null; if (target.startsWith(".")) { i...
java
public String resolveRelativePath(String source, String target) { String result = null; if (target.startsWith(".")) { if (target.startsWith("./")) { target = target.substring(2); } while (target.startsWith("../")) { source = CmsResourc...
[ "public", "String", "resolveRelativePath", "(", "String", "source", ",", "String", "target", ")", "{", "String", "result", "=", "null", ";", "if", "(", "target", ".", "startsWith", "(", "\".\"", ")", ")", "{", "if", "(", "target", ".", "startsWith", "(",...
Resolves a relative content value path to an absolute one.<p> @param source the source path @param target the target path @return the resolved path
[ "Resolves", "a", "relative", "content", "value", "path", "to", "an", "absolute", "one", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/contenteditor/A_CmsXmlContentEditorChangeHandler.java#L69-L85
googleads/googleads-java-lib
modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/Streams.java
Streams.readAll
@Deprecated public static String readAll(final InputStream inputStream) throws IOException { """ Reads all input into memory, close the steam, and return as a String. Reads the input in the default charset: Charset.defaultCharset(). @param inputStream InputStream to read from. @return String contents of the...
java
@Deprecated public static String readAll(final InputStream inputStream) throws IOException { return readAll(inputStream, Charset.defaultCharset()); }
[ "@", "Deprecated", "public", "static", "String", "readAll", "(", "final", "InputStream", "inputStream", ")", "throws", "IOException", "{", "return", "readAll", "(", "inputStream", ",", "Charset", ".", "defaultCharset", "(", ")", ")", ";", "}" ]
Reads all input into memory, close the steam, and return as a String. Reads the input in the default charset: Charset.defaultCharset(). @param inputStream InputStream to read from. @return String contents of the stream. @throws IOException if there is an problem reading from the stream. @deprecated it is always safer ...
[ "Reads", "all", "input", "into", "memory", "close", "the", "steam", "and", "return", "as", "a", "String", ".", "Reads", "the", "input", "in", "the", "default", "charset", ":", "Charset", ".", "defaultCharset", "()", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/Streams.java#L71-L74
kuali/ojb-1.0.4
src/java/org/apache/ojb/odmg/TransactionImpl.java
TransactionImpl.afterMaterialization
public void afterMaterialization(IndirectionHandler handler, Object materializedObject) { """ this callback is invoked after an Object is materialized within an IndirectionHandler. this callback allows to defer registration of objects until it's really neccessary. @param handler the invoking handler @param ma...
java
public void afterMaterialization(IndirectionHandler handler, Object materializedObject) { try { Identity oid = handler.getIdentity(); if (log.isDebugEnabled()) log.debug("deferred registration: " + oid); if(!isOpen()) { ...
[ "public", "void", "afterMaterialization", "(", "IndirectionHandler", "handler", ",", "Object", "materializedObject", ")", "{", "try", "{", "Identity", "oid", "=", "handler", ".", "getIdentity", "(", ")", ";", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ...
this callback is invoked after an Object is materialized within an IndirectionHandler. this callback allows to defer registration of objects until it's really neccessary. @param handler the invoking handler @param materializedObject the materialized Object
[ "this", "callback", "is", "invoked", "after", "an", "Object", "is", "materialized", "within", "an", "IndirectionHandler", ".", "this", "callback", "allows", "to", "defer", "registration", "of", "objects", "until", "it", "s", "really", "neccessary", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/odmg/TransactionImpl.java#L1091-L1116
MorphiaOrg/morphia
morphia/src/main/java/dev/morphia/mapping/Mapper.java
Mapper.addMappedClass
private MappedClass addMappedClass(final MappedClass mc, final boolean validate) { """ Add MappedClass to internal cache, possibly validating first. """ addConverters(mc); if (validate && !mc.isInterface()) { mc.validate(this); } mappedClasses.put(mc.getClazz().get...
java
private MappedClass addMappedClass(final MappedClass mc, final boolean validate) { addConverters(mc); if (validate && !mc.isInterface()) { mc.validate(this); } mappedClasses.put(mc.getClazz().getName(), mc); Set<MappedClass> mcs = mappedClassesByCollection.get(mc.g...
[ "private", "MappedClass", "addMappedClass", "(", "final", "MappedClass", "mc", ",", "final", "boolean", "validate", ")", "{", "addConverters", "(", "mc", ")", ";", "if", "(", "validate", "&&", "!", "mc", ".", "isInterface", "(", ")", ")", "{", "mc", ".",...
Add MappedClass to internal cache, possibly validating first.
[ "Add", "MappedClass", "to", "internal", "cache", "possibly", "validating", "first", "." ]
train
https://github.com/MorphiaOrg/morphia/blob/667c30bdc7c6f1d9f2e2eb8774835d6137b52d12/morphia/src/main/java/dev/morphia/mapping/Mapper.java#L813-L834
cdk/cdk
base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java
BondManipulator.getMaximumBondOrder
public static IBond.Order getMaximumBondOrder(IBond firstBond, IBond secondBond) { """ Returns the maximum bond order for the two bonds. @param firstBond first bond to compare @param secondBond second bond to compare @return The maximum bond order found """ if (firstBond == null || s...
java
public static IBond.Order getMaximumBondOrder(IBond firstBond, IBond secondBond) { if (firstBond == null || secondBond == null) throw new IllegalArgumentException("null instance of IBond provided"); return getMaximumBondOrder(firstBond.getOrder(), secondBond.getOrder()); }
[ "public", "static", "IBond", ".", "Order", "getMaximumBondOrder", "(", "IBond", "firstBond", ",", "IBond", "secondBond", ")", "{", "if", "(", "firstBond", "==", "null", "||", "secondBond", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"...
Returns the maximum bond order for the two bonds. @param firstBond first bond to compare @param secondBond second bond to compare @return The maximum bond order found
[ "Returns", "the", "maximum", "bond", "order", "for", "the", "two", "bonds", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java#L234-L238
TNG/JGiven
jgiven-core/src/main/java/com/tngtech/jgiven/report/analysis/CaseArgumentAnalyser.java
CaseArgumentAnalyser.attachmentsAreStructurallyDifferent
boolean attachmentsAreStructurallyDifferent( List<AttachmentModel> firstAttachments, List<AttachmentModel> otherAttachments ) { """ Attachments are only structurally different if one step has an inline attachment and the other step either has no inline attachment or the inline attachment is different. """ ...
java
boolean attachmentsAreStructurallyDifferent( List<AttachmentModel> firstAttachments, List<AttachmentModel> otherAttachments ) { if( firstAttachments.size() != otherAttachments.size() ) { return true; } for( int i = 0; i < firstAttachments.size(); i++ ) { if( attachmentIs...
[ "boolean", "attachmentsAreStructurallyDifferent", "(", "List", "<", "AttachmentModel", ">", "firstAttachments", ",", "List", "<", "AttachmentModel", ">", "otherAttachments", ")", "{", "if", "(", "firstAttachments", ".", "size", "(", ")", "!=", "otherAttachments", "....
Attachments are only structurally different if one step has an inline attachment and the other step either has no inline attachment or the inline attachment is different.
[ "Attachments", "are", "only", "structurally", "different", "if", "one", "step", "has", "an", "inline", "attachment", "and", "the", "other", "step", "either", "has", "no", "inline", "attachment", "or", "the", "inline", "attachment", "is", "different", "." ]
train
https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/report/analysis/CaseArgumentAnalyser.java#L281-L292
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/core/QueryReferenceBroker.java
QueryReferenceBroker.getFKQuery
private Query getFKQuery(Object obj, ClassDescriptor cld, CollectionDescriptor cds) { """ Answer the foreign key query to retrieve the collection defined by CollectionDescriptor """ Query fkQuery; QueryByCriteria fkQueryCrit; if (cds.isMtoNRelation()) { fkQue...
java
private Query getFKQuery(Object obj, ClassDescriptor cld, CollectionDescriptor cds) { Query fkQuery; QueryByCriteria fkQueryCrit; if (cds.isMtoNRelation()) { fkQueryCrit = getFKQueryMtoN(obj, cld, cds); } else { fkQueryCrit ...
[ "private", "Query", "getFKQuery", "(", "Object", "obj", ",", "ClassDescriptor", "cld", ",", "CollectionDescriptor", "cds", ")", "{", "Query", "fkQuery", ";", "QueryByCriteria", "fkQueryCrit", ";", "if", "(", "cds", ".", "isMtoNRelation", "(", ")", ")", "{", ...
Answer the foreign key query to retrieve the collection defined by CollectionDescriptor
[ "Answer", "the", "foreign", "key", "query", "to", "retrieve", "the", "collection", "defined", "by", "CollectionDescriptor" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/QueryReferenceBroker.java#L820-L855
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/CheckReturnValue.java
CheckReturnValue.matchMethod
@Override public Description matchMethod(MethodTree tree, VisitorState state) { """ Validate {@code @CheckReturnValue} and {@link CanIgnoreReturnValue} usage on methods. <p>The annotations should not both be appled to the same method. <p>The annotations should not be applied to void-returning methods. Doin...
java
@Override public Description matchMethod(MethodTree tree, VisitorState state) { MethodSymbol method = ASTHelpers.getSymbol(tree); boolean checkReturn = hasDirectAnnotationWithSimpleName(method, CHECK_RETURN_VALUE); boolean canIgnore = hasDirectAnnotationWithSimpleName(method, CAN_IGNORE_RETURN_VALUE); ...
[ "@", "Override", "public", "Description", "matchMethod", "(", "MethodTree", "tree", ",", "VisitorState", "state", ")", "{", "MethodSymbol", "method", "=", "ASTHelpers", ".", "getSymbol", "(", "tree", ")", ";", "boolean", "checkReturn", "=", "hasDirectAnnotationWit...
Validate {@code @CheckReturnValue} and {@link CanIgnoreReturnValue} usage on methods. <p>The annotations should not both be appled to the same method. <p>The annotations should not be applied to void-returning methods. Doing so makes no sense, because there is no return value to check.
[ "Validate", "{", "@code", "@CheckReturnValue", "}", "and", "{", "@link", "CanIgnoreReturnValue", "}", "usage", "on", "methods", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/CheckReturnValue.java#L127-L156
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/util/AuthConfigFactory.java
AuthConfigFactory.extendedAuthentication
private AuthConfig extendedAuthentication(AuthConfig standardAuthConfig, String registry) throws IOException, MojoExecutionException { """ Try various extended authentication method. Currently only supports amazon ECR @param standardAuthConfig The locally stored credentials. @param registry The registry to au...
java
private AuthConfig extendedAuthentication(AuthConfig standardAuthConfig, String registry) throws IOException, MojoExecutionException { EcrExtendedAuth ecr = new EcrExtendedAuth(log, registry); if (ecr.isAwsRegistry()) { return ecr.extendedAuth(standardAuthConfig); } return st...
[ "private", "AuthConfig", "extendedAuthentication", "(", "AuthConfig", "standardAuthConfig", ",", "String", "registry", ")", "throws", "IOException", ",", "MojoExecutionException", "{", "EcrExtendedAuth", "ecr", "=", "new", "EcrExtendedAuth", "(", "log", ",", "registry",...
Try various extended authentication method. Currently only supports amazon ECR @param standardAuthConfig The locally stored credentials. @param registry The registry to authenticated against. @return The given credentials, if registry does not need extended authentication; else, the credentials after authentication. ...
[ "Try", "various", "extended", "authentication", "method", ".", "Currently", "only", "supports", "amazon", "ECR" ]
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/util/AuthConfigFactory.java#L157-L163
vincentbrison/dualcache
dualcache-library/src/main/java/com/vincentbrison/openlibraries/android/dualcache/Builder.java
Builder.useSerializerInDisk
public Builder<T> useSerializerInDisk( int maxDiskSizeBytes, boolean usePrivateFiles, CacheSerializer<T> serializer, Context context ) { """ Use custom serialization/deserialization to store and retrieve objects from disk cache. @param maxDiskSizeBytes is the max size of disk...
java
public Builder<T> useSerializerInDisk( int maxDiskSizeBytes, boolean usePrivateFiles, CacheSerializer<T> serializer, Context context ) { File folder = getDefaultDiskCacheFolder(usePrivateFiles, context); return useSerializerInDisk(maxDiskSizeBytes, folder, serializer)...
[ "public", "Builder", "<", "T", ">", "useSerializerInDisk", "(", "int", "maxDiskSizeBytes", ",", "boolean", "usePrivateFiles", ",", "CacheSerializer", "<", "T", ">", "serializer", ",", "Context", "context", ")", "{", "File", "folder", "=", "getDefaultDiskCacheFolde...
Use custom serialization/deserialization to store and retrieve objects from disk cache. @param maxDiskSizeBytes is the max size of disk in bytes which an be used by the disk cache layer. @param usePrivateFiles is true if you want to use {@link Context#MODE_PRIVATE} with the default disk cache folder. @param serialize...
[ "Use", "custom", "serialization", "/", "deserialization", "to", "store", "and", "retrieve", "objects", "from", "disk", "cache", "." ]
train
https://github.com/vincentbrison/dualcache/blob/76ec6e08d5b8b17aca97d01e5fb5f36cb4beff5f/dualcache-library/src/main/java/com/vincentbrison/openlibraries/android/dualcache/Builder.java#L154-L162
Axway/Grapes
commons/src/main/java/org/axway/grapes/commons/datamodel/DataModelFactory.java
DataModelFactory.createArtifact
public static Artifact createArtifact(final String groupId, final String artifactId, final String version, final String classifier, final String type, final String extension, final String origin) { """ Generates an artifact regarding the parameters. <P> <b>WARNING:</b> The parameters grId/arId/version should be...
java
public static Artifact createArtifact(final String groupId, final String artifactId, final String version, final String classifier, final String type, final String extension, final String origin){ final Artifact artifact = new Artifact(); artifact.setGroupId(groupId); artifact.setArtifactId(artifactId); artifa...
[ "public", "static", "Artifact", "createArtifact", "(", "final", "String", "groupId", ",", "final", "String", "artifactId", ",", "final", "String", "version", ",", "final", "String", "classifier", ",", "final", "String", "type", ",", "final", "String", "extension...
Generates an artifact regarding the parameters. <P> <b>WARNING:</b> The parameters grId/arId/version should be filled!!! Only classifier and type are not mandatory. @param groupId String @param artifactId String @param version String @param classifier String @param type String @param extension String @return Artifact
[ "Generates", "an", "artifact", "regarding", "the", "parameters", "." ]
train
https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/commons/src/main/java/org/axway/grapes/commons/datamodel/DataModelFactory.java#L90-L112
buschmais/jqa-maven3-plugin
src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java
MavenModelScannerPlugin.addParent
private void addParent(MavenPomDescriptor pomDescriptor, Model model, ScannerContext context) { """ Adds information about parent POM. @param pomDescriptor The descriptor for the current POM. @param model The Maven Model. @param context The scanner context. """ Parent parent = model.getParent()...
java
private void addParent(MavenPomDescriptor pomDescriptor, Model model, ScannerContext context) { Parent parent = model.getParent(); if (null != parent) { ArtifactResolver resolver = getArtifactResolver(context); MavenArtifactDescriptor parentDescriptor = resolver.resolve(new Paren...
[ "private", "void", "addParent", "(", "MavenPomDescriptor", "pomDescriptor", ",", "Model", "model", ",", "ScannerContext", "context", ")", "{", "Parent", "parent", "=", "model", ".", "getParent", "(", ")", ";", "if", "(", "null", "!=", "parent", ")", "{", "...
Adds information about parent POM. @param pomDescriptor The descriptor for the current POM. @param model The Maven Model. @param context The scanner context.
[ "Adds", "information", "about", "parent", "POM", "." ]
train
https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L481-L488
loldevs/riotapi
rtmp/src/main/java/net/boreeas/riotapi/rtmp/services/LcdsGameInvitationService.java
LcdsGameInvitationService.createArrangedBotTeamLobby
@Deprecated public LobbyStatus createArrangedBotTeamLobby(long queueId, String difficulty) { """ Create a premade team lobby for bot games @param queueId The target queue @param difficulty The difficulty of the bots @return The lobby status @deprecated Use {@link #createArrangedBotTeamLobby(long, net.boree...
java
@Deprecated public LobbyStatus createArrangedBotTeamLobby(long queueId, String difficulty) { return client.sendRpcAndWait(SERVICE, "createArrangedBotTeamLobby", queueId, difficulty); }
[ "@", "Deprecated", "public", "LobbyStatus", "createArrangedBotTeamLobby", "(", "long", "queueId", ",", "String", "difficulty", ")", "{", "return", "client", ".", "sendRpcAndWait", "(", "SERVICE", ",", "\"createArrangedBotTeamLobby\"", ",", "queueId", ",", "difficulty"...
Create a premade team lobby for bot games @param queueId The target queue @param difficulty The difficulty of the bots @return The lobby status @deprecated Use {@link #createArrangedBotTeamLobby(long, net.boreeas.riotapi.constants.BotDifficulty)}
[ "Create", "a", "premade", "team", "lobby", "for", "bot", "games" ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rtmp/src/main/java/net/boreeas/riotapi/rtmp/services/LcdsGameInvitationService.java#L60-L63
Netflix/conductor
core/src/main/java/com/netflix/conductor/core/orchestration/ExecutionDAOFacade.java
ExecutionDAOFacade.getWorkflowById
public Workflow getWorkflowById(String workflowId, boolean includeTasks) { """ Fetches the {@link Workflow} object from the data store given the id. Attempts to fetch from {@link ExecutionDAO} first, if not found, attempts to fetch from {@link IndexDAO}. @param workflowId the id of the workflow to be fetche...
java
public Workflow getWorkflowById(String workflowId, boolean includeTasks) { Workflow workflow = executionDAO.getWorkflow(workflowId, includeTasks); if (workflow == null) { LOGGER.debug("Workflow {} not found in executionDAO, checking indexDAO", workflowId); String json = indexDAO....
[ "public", "Workflow", "getWorkflowById", "(", "String", "workflowId", ",", "boolean", "includeTasks", ")", "{", "Workflow", "workflow", "=", "executionDAO", ".", "getWorkflow", "(", "workflowId", ",", "includeTasks", ")", ";", "if", "(", "workflow", "==", "null"...
Fetches the {@link Workflow} object from the data store given the id. Attempts to fetch from {@link ExecutionDAO} first, if not found, attempts to fetch from {@link IndexDAO}. @param workflowId the id of the workflow to be fetched @param includeTasks if true, fetches the {@link Task} data in the workflow. @return th...
[ "Fetches", "the", "{", "@link", "Workflow", "}", "object", "from", "the", "data", "store", "given", "the", "id", ".", "Attempts", "to", "fetch", "from", "{", "@link", "ExecutionDAO", "}", "first", "if", "not", "found", "attempts", "to", "fetch", "from", ...
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/core/orchestration/ExecutionDAOFacade.java#L71-L94
box/box-java-sdk
src/main/java/com/box/sdk/BoxTrash.java
BoxTrash.getFolderInfo
public BoxFolder.Info getFolderInfo(String folderID) { """ Gets information about a trashed folder. @param folderID the ID of the trashed folder. @return info about the trashed folder. """ URL url = FOLDER_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), folderID); BoxAPIRequest reque...
java
public BoxFolder.Info getFolderInfo(String folderID) { URL url = FOLDER_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), folderID); BoxAPIRequest request = new BoxAPIRequest(this.api, url, "GET"); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject jsonObject = JsonObje...
[ "public", "BoxFolder", ".", "Info", "getFolderInfo", "(", "String", "folderID", ")", "{", "URL", "url", "=", "FOLDER_INFO_URL_TEMPLATE", ".", "build", "(", "this", ".", "api", ".", "getBaseURL", "(", ")", ",", "folderID", ")", ";", "BoxAPIRequest", "request"...
Gets information about a trashed folder. @param folderID the ID of the trashed folder. @return info about the trashed folder.
[ "Gets", "information", "about", "a", "trashed", "folder", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTrash.java#L65-L73
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/FilterSupportStatus.java
FilterSupportStatus.newCompositeNotSupported
public static FilterSupportStatus newCompositeNotSupported( List<FilterSupportStatus> unsupportedSubfilters) { """ Static constructor for a not supported status caused by sub-filters not being supported. @param unsupportedSubfilters a {@link java.util.List} object. @return a {@link com.google.cloud.bigta...
java
public static FilterSupportStatus newCompositeNotSupported( List<FilterSupportStatus> unsupportedSubfilters) { StringBuilder builder = new StringBuilder(); for (FilterSupportStatus subStatus: unsupportedSubfilters) { builder.append(subStatus.getReason()); builder.append("\n"); } return...
[ "public", "static", "FilterSupportStatus", "newCompositeNotSupported", "(", "List", "<", "FilterSupportStatus", ">", "unsupportedSubfilters", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "FilterSupportStatus", "subStatus"...
Static constructor for a not supported status caused by sub-filters not being supported. @param unsupportedSubfilters a {@link java.util.List} object. @return a {@link com.google.cloud.bigtable.hbase.adapters.filters.FilterSupportStatus} object.
[ "Static", "constructor", "for", "a", "not", "supported", "status", "caused", "by", "sub", "-", "filters", "not", "being", "supported", "." ]
train
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/FilterSupportStatus.java#L75-L83
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
ResourceGroovyMethods.withReader
public static <T> T withReader(URL url, @ClosureParams(value = SimpleType.class, options = "java.io.Reader") Closure<T> closure) throws IOException { """ Helper method to create a new BufferedReader for a URL and then passes it to the closure. The reader is closed after the closure returns. @param url a U...
java
public static <T> T withReader(URL url, @ClosureParams(value = SimpleType.class, options = "java.io.Reader") Closure<T> closure) throws IOException { return IOGroovyMethods.withReader(url.openConnection().getInputStream(), closure); }
[ "public", "static", "<", "T", ">", "T", "withReader", "(", "URL", "url", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"java.io.Reader\"", ")", "Closure", "<", "T", ">", "closure", ")", "throws", "IOExce...
Helper method to create a new BufferedReader for a URL and then passes it to the closure. The reader is closed after the closure returns. @param url a URL @param closure the closure to invoke with the reader @return the value returned by the closure @throws IOException if an IOException occurs. @since 1.5.2
[ "Helper", "method", "to", "create", "a", "new", "BufferedReader", "for", "a", "URL", "and", "then", "passes", "it", "to", "the", "closure", ".", "The", "reader", "is", "closed", "after", "the", "closure", "returns", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L2111-L2113
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/calib/CalibrationDetectorSquareGrid.java
CalibrationDetectorSquareGrid.createLayout
public static List<Point2D_F64> createLayout(int numRows, int numCols, double squareWidth, double spaceWidth) { """ Creates a target that is composed of squares. The squares are spaced out and each corner provides a calibration point. @param numRows Number of rows in calibration target. Must be odd. @param n...
java
public static List<Point2D_F64> createLayout(int numRows, int numCols, double squareWidth, double spaceWidth) { List<Point2D_F64> all = new ArrayList<>(); double width = (numCols*squareWidth + (numCols-1)*spaceWidth); double height = (numRows*squareWidth + (numRows-1)*spaceWidth); double startX = -width/2; ...
[ "public", "static", "List", "<", "Point2D_F64", ">", "createLayout", "(", "int", "numRows", ",", "int", "numCols", ",", "double", "squareWidth", ",", "double", "spaceWidth", ")", "{", "List", "<", "Point2D_F64", ">", "all", "=", "new", "ArrayList", "<>", "...
Creates a target that is composed of squares. The squares are spaced out and each corner provides a calibration point. @param numRows Number of rows in calibration target. Must be odd. @param numCols Number of column in each calibration target. Must be odd. @param squareWidth How wide each square is. Units are targe...
[ "Creates", "a", "target", "that", "is", "composed", "of", "squares", ".", "The", "squares", "are", "spaced", "out", "and", "each", "corner", "provides", "a", "calibration", "point", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/calib/CalibrationDetectorSquareGrid.java#L92-L123
undertow-io/undertow
core/src/main/java/io/undertow/util/HttpString.java
HttpString.copyTo
public void copyTo(int srcOffs, byte[] dst, int offs, int len) { """ Copy {@code len} bytes from this string at offset {@code srcOffs} to the given array at the given offset. @param srcOffs the source offset @param dst the destination @param offs the destination offset @param len the number of byt...
java
public void copyTo(int srcOffs, byte[] dst, int offs, int len) { arraycopy(bytes, srcOffs, dst, offs, len); }
[ "public", "void", "copyTo", "(", "int", "srcOffs", ",", "byte", "[", "]", "dst", ",", "int", "offs", ",", "int", "len", ")", "{", "arraycopy", "(", "bytes", ",", "srcOffs", ",", "dst", ",", "offs", ",", "len", ")", ";", "}" ]
Copy {@code len} bytes from this string at offset {@code srcOffs} to the given array at the given offset. @param srcOffs the source offset @param dst the destination @param offs the destination offset @param len the number of bytes to copy
[ "Copy", "{", "@code", "len", "}", "bytes", "from", "this", "string", "at", "offset", "{", "@code", "srcOffs", "}", "to", "the", "given", "array", "at", "the", "given", "offset", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/HttpString.java#L192-L194
Activiti/Activiti
activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/CallActivityBehavior.java
CallActivityBehavior.findProcessDefinition
protected ProcessDefinition findProcessDefinition(String processDefinitionKey, String tenantId) { """ Allow subclass to determine which version of a process to start. """ if (tenantId == null || ProcessEngineConfiguration.NO_TENANT_ID.equals(tenantId)) { return Context.getProcessEngineConfiguration()...
java
protected ProcessDefinition findProcessDefinition(String processDefinitionKey, String tenantId) { if (tenantId == null || ProcessEngineConfiguration.NO_TENANT_ID.equals(tenantId)) { return Context.getProcessEngineConfiguration().getDeploymentManager().findDeployedLatestProcessDefinitionByKey(processDefinition...
[ "protected", "ProcessDefinition", "findProcessDefinition", "(", "String", "processDefinitionKey", ",", "String", "tenantId", ")", "{", "if", "(", "tenantId", "==", "null", "||", "ProcessEngineConfiguration", ".", "NO_TENANT_ID", ".", "equals", "(", "tenantId", ")", ...
Allow subclass to determine which version of a process to start.
[ "Allow", "subclass", "to", "determine", "which", "version", "of", "a", "process", "to", "start", "." ]
train
https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/CallActivityBehavior.java#L175-L181
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WRadioButtonSelectExample.java
WRadioButtonSelectExample.addInsideAFieldLayoutExample
private void addInsideAFieldLayoutExample() { """ When a WRadioButtonSelect is added to a WFieldLayout the legend is moved. The first CheckBoxSelect has a frame, the second doesn't """ add(new WHeading(HeadingLevel.H3, "WRadioButtonSelect inside a WFieldLayout")); add(new ExplanatoryText( "When a WRad...
java
private void addInsideAFieldLayoutExample() { add(new WHeading(HeadingLevel.H3, "WRadioButtonSelect inside a WFieldLayout")); add(new ExplanatoryText( "When a WRadioButtonSelect is inside a WField its label is exposed in a way which appears and behaves like a regular HTML label." + " This allows WRadioButto...
[ "private", "void", "addInsideAFieldLayoutExample", "(", ")", "{", "add", "(", "new", "WHeading", "(", "HeadingLevel", ".", "H3", ",", "\"WRadioButtonSelect inside a WFieldLayout\"", ")", ")", ";", "add", "(", "new", "ExplanatoryText", "(", "\"When a WRadioButtonSelect...
When a WRadioButtonSelect is added to a WFieldLayout the legend is moved. The first CheckBoxSelect has a frame, the second doesn't
[ "When", "a", "WRadioButtonSelect", "is", "added", "to", "a", "WFieldLayout", "the", "legend", "is", "moved", ".", "The", "first", "CheckBoxSelect", "has", "a", "frame", "the", "second", "doesn", "t" ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WRadioButtonSelectExample.java#L123-L173
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/rest/MethodResource.java
MethodResource.getAllObjectMethods
@GET @Produces( { """ Lists all Service Definitions methods that can be invoked on a digital object. GET /objects/{pid}/methods ? format asOfDateTime """ HTML, XML }) public Response getAllObjectMethods( @PathParam(RestParam.PID) String pid, @QueryParam(RestParam...
java
@GET @Produces({ HTML, XML }) public Response getAllObjectMethods( @PathParam(RestParam.PID) String pid, @QueryParam(RestParam.AS_OF_DATE_TIME) String dTime, @QueryParam(RestParam.FORMAT) @DefaultValue(HTML) String format, ...
[ "@", "GET", "@", "Produces", "(", "{", "HTML", ",", "XML", "}", ")", "public", "Response", "getAllObjectMethods", "(", "@", "PathParam", "(", "RestParam", ".", "PID", ")", "String", "pid", ",", "@", "QueryParam", "(", "RestParam", ".", "AS_OF_DATE_TIME", ...
Lists all Service Definitions methods that can be invoked on a digital object. GET /objects/{pid}/methods ? format asOfDateTime
[ "Lists", "all", "Service", "Definitions", "methods", "that", "can", "be", "invoked", "on", "a", "digital", "object", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/rest/MethodResource.java#L51-L65
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/ZKDatabase.java
ZKDatabase.statNode
public Stat statNode(String path, ServerCnxn serverCnxn) throws KeeperException.NoNodeException { """ stat the path @param path the path for which stat is to be done @param serverCnxn the servercnxn attached to this request @return the stat of this node @throws KeeperException.NoNodeException """ r...
java
public Stat statNode(String path, ServerCnxn serverCnxn) throws KeeperException.NoNodeException { return dataTree.statNode(path, serverCnxn); }
[ "public", "Stat", "statNode", "(", "String", "path", ",", "ServerCnxn", "serverCnxn", ")", "throws", "KeeperException", ".", "NoNodeException", "{", "return", "dataTree", ".", "statNode", "(", "path", ",", "serverCnxn", ")", ";", "}" ]
stat the path @param path the path for which stat is to be done @param serverCnxn the servercnxn attached to this request @return the stat of this node @throws KeeperException.NoNodeException
[ "stat", "the", "path" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/ZKDatabase.java#L187-L189
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.setGeometry
private void setGeometry(JsonParser jp, Object[] values) throws IOException, SQLException { """ Sets the parsed geometry to the table * @param jp @throws IOException @throws SQLException """ if(jp.nextToken()!=JsonToken.VALUE_NULL){//START_OBJECT { in case of null geometry jp.nextToken...
java
private void setGeometry(JsonParser jp, Object[] values) throws IOException, SQLException { if(jp.nextToken()!=JsonToken.VALUE_NULL){//START_OBJECT { in case of null geometry jp.nextToken(); // FIELD_NAME type jp.nextToken(); //VALUE_STRING Point String geometryType = jp.getText(); ...
[ "private", "void", "setGeometry", "(", "JsonParser", "jp", ",", "Object", "[", "]", "values", ")", "throws", "IOException", ",", "SQLException", "{", "if", "(", "jp", ".", "nextToken", "(", ")", "!=", "JsonToken", ".", "VALUE_NULL", ")", "{", "//START_OBJE...
Sets the parsed geometry to the table * @param jp @throws IOException @throws SQLException
[ "Sets", "the", "parsed", "geometry", "to", "the", "table", "*" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L796-L803
alkacon/opencms-core
src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java
CmsDefaultXmlContentHandler.initModelFolder
protected void initModelFolder(Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException { """ Initializes the folder containing the model file(s) for this content handler.<p> @param root the "modelfolder" element from the appinfo node of the XML content definition @param contentDefinitio...
java
protected void initModelFolder(Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException { String master = root.attributeValue(APPINFO_ATTR_URI); if (master == null) { throw new CmsXmlException( Messages.get().container( Messages.ERR...
[ "protected", "void", "initModelFolder", "(", "Element", "root", ",", "CmsXmlContentDefinition", "contentDefinition", ")", "throws", "CmsXmlException", "{", "String", "master", "=", "root", ".", "attributeValue", "(", "APPINFO_ATTR_URI", ")", ";", "if", "(", "master"...
Initializes the folder containing the model file(s) for this content handler.<p> @param root the "modelfolder" element from the appinfo node of the XML content definition @param contentDefinition the content definition the model folder belongs to @throws CmsXmlException if something goes wrong
[ "Initializes", "the", "folder", "containing", "the", "model", "file", "(", "s", ")", "for", "this", "content", "handler", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java#L2761-L2772
attribyte/wpdb
src/main/java/org/attribyte/wp/db/DB.java
DB.updateUserMeta
public void updateUserMeta(final long userId, final String key, final String value) throws SQLException { """ Updates a user metadata value, replacing the value of the first existing match, or creating if none exists. <p> Note that there is not a unique key, e.g. (user_id, meta_key), so users may have multiple m...
java
public void updateUserMeta(final long userId, final String key, final String value) throws SQLException { Connection conn = null; PreparedStatement stmt = null; ResultSet rs = null; try { conn = connectionSupplier.getConnection(); stmt = conn.prepareStatement(firstUserMetaIdSQL...
[ "public", "void", "updateUserMeta", "(", "final", "long", "userId", ",", "final", "String", "key", ",", "final", "String", "value", ")", "throws", "SQLException", "{", "Connection", "conn", "=", "null", ";", "PreparedStatement", "stmt", "=", "null", ";", "Re...
Updates a user metadata value, replacing the value of the first existing match, or creating if none exists. <p> Note that there is not a unique key, e.g. (user_id, meta_key), so users may have multiple metadata with the same name. </p> @param userId The user id. @param key The metadata key. @param value The metadata va...
[ "Updates", "a", "user", "metadata", "value", "replacing", "the", "value", "of", "the", "first", "existing", "match", "or", "creating", "if", "none", "exists", ".", "<p", ">", "Note", "that", "there", "is", "not", "a", "unique", "key", "e", ".", "g", "....
train
https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/db/DB.java#L624-L656
Wikidata/Wikidata-Toolkit
wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/TermStatementUpdate.java
TermStatementUpdate.addAlias
protected void addAlias(MonolingualTextValue alias) { """ Adds an individual alias. It will be merged with the current list of aliases, or added as a label if there is no label for this item in this language yet. @param alias the alias to add """ String lang = alias.getLanguageCode(); Ali...
java
protected void addAlias(MonolingualTextValue alias) { String lang = alias.getLanguageCode(); AliasesWithUpdate currentAliasesUpdate = newAliases.get(lang); NameWithUpdate currentLabel = newLabels.get(lang); // If there isn't any label for that language, put the alias there ...
[ "protected", "void", "addAlias", "(", "MonolingualTextValue", "alias", ")", "{", "String", "lang", "=", "alias", ".", "getLanguageCode", "(", ")", ";", "AliasesWithUpdate", "currentAliasesUpdate", "=", "newAliases", ".", "get", "(", "lang", ")", ";", "NameWithUp...
Adds an individual alias. It will be merged with the current list of aliases, or added as a label if there is no label for this item in this language yet. @param alias the alias to add
[ "Adds", "an", "individual", "alias", ".", "It", "will", "be", "merged", "with", "the", "current", "list", "of", "aliases", "or", "added", "as", "a", "label", "if", "there", "is", "no", "label", "for", "this", "item", "in", "this", "language", "yet", "....
train
https://github.com/Wikidata/Wikidata-Toolkit/blob/7732851dda47e1febff406fba27bfec023f4786e/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/TermStatementUpdate.java#L203-L224
prestodb/presto
presto-raptor/src/main/java/com/facebook/presto/raptor/metadata/ShardIterator.java
ShardIterator.computeMerged
private BucketShards computeMerged() throws SQLException { """ Compute split-per-bucket (single split for all shards in a bucket). """ if (resultSet.isAfterLast()) { return endOfData(); } if (first) { first = false; if (!resultSet.next()) ...
java
private BucketShards computeMerged() throws SQLException { if (resultSet.isAfterLast()) { return endOfData(); } if (first) { first = false; if (!resultSet.next()) { return endOfData(); } } int bucket...
[ "private", "BucketShards", "computeMerged", "(", ")", "throws", "SQLException", "{", "if", "(", "resultSet", ".", "isAfterLast", "(", ")", ")", "{", "return", "endOfData", "(", ")", ";", "}", "if", "(", "first", ")", "{", "first", "=", "false", ";", "i...
Compute split-per-bucket (single split for all shards in a bucket).
[ "Compute", "split", "-", "per", "-", "bucket", "(", "single", "split", "for", "all", "shards", "in", "a", "bucket", ")", "." ]
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-raptor/src/main/java/com/facebook/presto/raptor/metadata/ShardIterator.java#L161-L187
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/util/ModelSerializer.java
ModelSerializer.restoreMultiLayerNetwork
public static MultiLayerNetwork restoreMultiLayerNetwork(@NonNull String path, boolean loadUpdater) throws IOException { """ Load a MultilayerNetwork model from a file @param path path to the model file, to get the computation graph from @return the loaded computation graph @throws IOException ...
java
public static MultiLayerNetwork restoreMultiLayerNetwork(@NonNull String path, boolean loadUpdater) throws IOException { return restoreMultiLayerNetwork(new File(path), loadUpdater); }
[ "public", "static", "MultiLayerNetwork", "restoreMultiLayerNetwork", "(", "@", "NonNull", "String", "path", ",", "boolean", "loadUpdater", ")", "throws", "IOException", "{", "return", "restoreMultiLayerNetwork", "(", "new", "File", "(", "path", ")", ",", "loadUpdate...
Load a MultilayerNetwork model from a file @param path path to the model file, to get the computation graph from @return the loaded computation graph @throws IOException
[ "Load", "a", "MultilayerNetwork", "model", "from", "a", "file", "@param", "path", "path", "to", "the", "model", "file", "to", "get", "the", "computation", "graph", "from", "@return", "the", "loaded", "computation", "graph" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/util/ModelSerializer.java#L389-L392
paypal/SeLion
client/src/main/java/com/paypal/selion/internal/reports/services/ReporterDateFormatter.java
ReporterDateFormatter.getISO8601StringWithSpecificTimeZone
public static String getISO8601StringWithSpecificTimeZone(Date date, TimeZone zone) { """ Return an ISO 8601 combined date and time string for specified date/time. The returned date and time format is compatible with JavaScript on Internet Explorer. @param date Date @param zone Time zone to be used. @retur...
java
public static String getISO8601StringWithSpecificTimeZone(Date date, TimeZone zone) { DateFormat formatter = getFormatter(); formatter.setTimeZone(zone); return formatter.format(date); }
[ "public", "static", "String", "getISO8601StringWithSpecificTimeZone", "(", "Date", "date", ",", "TimeZone", "zone", ")", "{", "DateFormat", "formatter", "=", "getFormatter", "(", ")", ";", "formatter", ".", "setTimeZone", "(", "zone", ")", ";", "return", "format...
Return an ISO 8601 combined date and time string for specified date/time. The returned date and time format is compatible with JavaScript on Internet Explorer. @param date Date @param zone Time zone to be used. @return String with format "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" where XXX corresponds to the input time zone. exam...
[ "Return", "an", "ISO", "8601", "combined", "date", "and", "time", "string", "for", "specified", "date", "/", "time", ".", "The", "returned", "date", "and", "time", "format", "is", "compatible", "with", "JavaScript", "on", "Internet", "Explorer", "." ]
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/services/ReporterDateFormatter.java#L69-L73
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java
Check.instanceOf
@ArgumentsChecked @Throws( { """ Ensures that a passed argument is a member of a specific type. @param type class that the given object is a member of @param obj the object reference that should be a member of a specific {@code type} @return the given object cast to type @throws IllegalInstanceOfArgumen...
java
@ArgumentsChecked @Throws({ IllegalNullArgumentException.class, IllegalInstanceOfArgumentException.class }) @SuppressWarnings("unchecked") public static <T> T instanceOf(@Nonnull final Class<?> type, @Nonnull final Object obj) { return (T) instanceOf(type, obj, EMPTY_ARGUMENT_NAME); }
[ "@", "ArgumentsChecked", "@", "Throws", "(", "{", "IllegalNullArgumentException", ".", "class", ",", "IllegalInstanceOfArgumentException", ".", "class", "}", ")", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "instance...
Ensures that a passed argument is a member of a specific type. @param type class that the given object is a member of @param obj the object reference that should be a member of a specific {@code type} @return the given object cast to type @throws IllegalInstanceOfArgumentException if the given argument {@code obj} is...
[ "Ensures", "that", "a", "passed", "argument", "is", "a", "member", "of", "a", "specific", "type", "." ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1141-L1146
SonarSource/sonarqube
sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java
JsonWriter.propDateTime
public JsonWriter propDateTime(String name, @Nullable Date value) { """ Encodes the property name and datetime value (ISO format). Output is for example <code>"theDate":"2013-01-24T13:12:45+01"</code>. @throws org.sonar.api.utils.text.WriterException on any failure """ return name(name).valueDateTime(v...
java
public JsonWriter propDateTime(String name, @Nullable Date value) { return name(name).valueDateTime(value); }
[ "public", "JsonWriter", "propDateTime", "(", "String", "name", ",", "@", "Nullable", "Date", "value", ")", "{", "return", "name", "(", "name", ")", ".", "valueDateTime", "(", "value", ")", ";", "}" ]
Encodes the property name and datetime value (ISO format). Output is for example <code>"theDate":"2013-01-24T13:12:45+01"</code>. @throws org.sonar.api.utils.text.WriterException on any failure
[ "Encodes", "the", "property", "name", "and", "datetime", "value", "(", "ISO", "format", ")", ".", "Output", "is", "for", "example", "<code", ">", "theDate", ":", "2013", "-", "01", "-", "24T13", ":", "12", ":", "45", "+", "01", "<", "/", "code", ">...
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java#L351-L353
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java
AbstractJcrNode.createJcrProperty
private final AbstractJcrProperty createJcrProperty( Property property, Name primaryTypeName, Set<Name> mixinTypeNames ) throws ConstraintViolationException { """ Create a new JCR Property instance giv...
java
private final AbstractJcrProperty createJcrProperty( Property property, Name primaryTypeName, Set<Name> mixinTypeNames ) throws ConstraintViolationException { NodeTypes nodeTypes = session.nodeTypes...
[ "private", "final", "AbstractJcrProperty", "createJcrProperty", "(", "Property", "property", ",", "Name", "primaryTypeName", ",", "Set", "<", "Name", ">", "mixinTypeNames", ")", "throws", "ConstraintViolationException", "{", "NodeTypes", "nodeTypes", "=", "session", "...
Create a new JCR Property instance given the supplied information. Note that this does not alter the node in any way, since it does not store a reference to this property (the caller must do that if needed). @param property the cached node property; may not be null @param primaryTypeName the name of the node's primary...
[ "Create", "a", "new", "JCR", "Property", "instance", "given", "the", "supplied", "information", ".", "Note", "that", "this", "does", "not", "alter", "the", "node", "in", "any", "way", "since", "it", "does", "not", "store", "a", "reference", "to", "this", ...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java#L393-L408
grpc/grpc-java
core/src/main/java/io/grpc/internal/Http2Ping.java
Http2Ping.doExecute
private static void doExecute(Executor executor, Runnable runnable) { """ Executes the given runnable. This prevents exceptions from propagating so that an exception thrown by one callback won't prevent subsequent callbacks from being executed. """ try { executor.execute(runnable); } catch (Thro...
java
private static void doExecute(Executor executor, Runnable runnable) { try { executor.execute(runnable); } catch (Throwable th) { log.log(Level.SEVERE, "Failed to execute PingCallback", th); } }
[ "private", "static", "void", "doExecute", "(", "Executor", "executor", ",", "Runnable", "runnable", ")", "{", "try", "{", "executor", ".", "execute", "(", "runnable", ")", ";", "}", "catch", "(", "Throwable", "th", ")", "{", "log", ".", "log", "(", "Le...
Executes the given runnable. This prevents exceptions from propagating so that an exception thrown by one callback won't prevent subsequent callbacks from being executed.
[ "Executes", "the", "given", "runnable", ".", "This", "prevents", "exceptions", "from", "propagating", "so", "that", "an", "exception", "thrown", "by", "one", "callback", "won", "t", "prevent", "subsequent", "callbacks", "from", "being", "executed", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/core/src/main/java/io/grpc/internal/Http2Ping.java#L178-L184
cloudinary/cloudinary_java
cloudinary-core/src/main/java/com/cloudinary/utils/ObjectUtils.java
ObjectUtils.toISO8601
public static String toISO8601(Date date) { """ Formats a Date as an ISO-8601 string representation. @param date Date to format @return The date formatted as ISO-8601 string """ DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.US); dateFormat.setTimeZone(TimeZon...
java
public static String toISO8601(Date date){ DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.US); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); return dateFormat.format(date); }
[ "public", "static", "String", "toISO8601", "(", "Date", "date", ")", "{", "DateFormat", "dateFormat", "=", "new", "SimpleDateFormat", "(", "\"yyyy-MM-dd'T'HH:mm:ssXXX\"", ",", "Locale", ".", "US", ")", ";", "dateFormat", ".", "setTimeZone", "(", "TimeZone", ".",...
Formats a Date as an ISO-8601 string representation. @param date Date to format @return The date formatted as ISO-8601 string
[ "Formats", "a", "Date", "as", "an", "ISO", "-", "8601", "string", "representation", "." ]
train
https://github.com/cloudinary/cloudinary_java/blob/58ee1823180da2dea6a2eb7e5cf00d5a760f8aef/cloudinary-core/src/main/java/com/cloudinary/utils/ObjectUtils.java#L19-L23
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java
DiagnosticsInner.getSiteDetectorResponse
public DetectorResponseInner getSiteDetectorResponse(String resourceGroupName, String siteName, String detectorName) { """ Get site detector response. Get site detector response. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Site Name @param detectorName D...
java
public DetectorResponseInner getSiteDetectorResponse(String resourceGroupName, String siteName, String detectorName) { return getSiteDetectorResponseWithServiceResponseAsync(resourceGroupName, siteName, detectorName).toBlocking().single().body(); }
[ "public", "DetectorResponseInner", "getSiteDetectorResponse", "(", "String", "resourceGroupName", ",", "String", "siteName", ",", "String", "detectorName", ")", "{", "return", "getSiteDetectorResponseWithServiceResponseAsync", "(", "resourceGroupName", ",", "siteName", ",", ...
Get site detector response. Get site detector response. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Site Name @param detectorName Detector Resource Name @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the ...
[ "Get", "site", "detector", "response", ".", "Get", "site", "detector", "response", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java#L666-L668