repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
204
func_name
stringlengths
5
103
whole_func_string
stringlengths
87
3.44k
language
stringclasses
1 value
func_code_string
stringlengths
87
3.44k
func_code_tokens
listlengths
21
714
func_documentation_string
stringlengths
61
1.95k
func_documentation_tokens
listlengths
1
482
split_name
stringclasses
1 value
func_code_url
stringlengths
102
309
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/EcKey.java
EcKey.fromJsonWebKey
public static EcKey fromJsonWebKey(JsonWebKey jwk) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeySpecException, NoSuchProviderException { return fromJsonWebKey(jwk, false, null); }
java
public static EcKey fromJsonWebKey(JsonWebKey jwk) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeySpecException, NoSuchProviderException { return fromJsonWebKey(jwk, false, null); }
[ "public", "static", "EcKey", "fromJsonWebKey", "(", "JsonWebKey", "jwk", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidAlgorithmParameterException", ",", "InvalidKeySpecException", ",", "NoSuchProviderException", "{", "return", "fromJsonWebKey", "(", "jwk", ",", ...
Converts JSON web key to EC key pair, does not include the private key. @param jwk @return EcKey @throws NoSuchAlgorithmException @throws InvalidAlgorithmParameterException @throws InvalidKeySpecException @throws NoSuchProviderException
[ "Converts", "JSON", "web", "key", "to", "EC", "key", "pair", "does", "not", "include", "the", "private", "key", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/EcKey.java#L197-L199
mguymon/model-citizen
core/src/main/java/com/tobedevoured/modelcitizen/ModelFactory.java
ModelFactory.createModel
@SuppressWarnings({"rawtypes", "unchecked"}) public <T> T createModel(T referenceModel, boolean withPolicies) throws CreateModelException { Erector erector = erectors.get(referenceModel.getClass()); if (erector == null) { throw new CreateModelException("Unregistered class: " + reference...
java
@SuppressWarnings({"rawtypes", "unchecked"}) public <T> T createModel(T referenceModel, boolean withPolicies) throws CreateModelException { Erector erector = erectors.get(referenceModel.getClass()); if (erector == null) { throw new CreateModelException("Unregistered class: " + reference...
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "public", "<", "T", ">", "T", "createModel", "(", "T", "referenceModel", ",", "boolean", "withPolicies", ")", "throws", "CreateModelException", "{", "Erector", "erector", "=", "...
Create a Model for a registered Blueprint. Values set in the model will not be overridden by defaults in the Blueprint. @param <T> model Class @param referenceModel Object @param withPolicies boolean if Policies should be applied to the create @return Model @throws CreateModelException model failed to create
[ "Create", "a", "Model", "for", "a", "registered", "Blueprint", ".", "Values", "set", "in", "the", "model", "will", "not", "be", "overridden", "by", "defaults", "in", "the", "Blueprint", "." ]
train
https://github.com/mguymon/model-citizen/blob/9078ab4121897a21e598dd4f0efa6996b46e4dea/core/src/main/java/com/tobedevoured/modelcitizen/ModelFactory.java#L497-L506
cesarferreira/AndroidQuickUtils
library/src/main/java/quickutils/core/categories/security.java
security.privateBase64Encoder
private static String privateBase64Encoder(String toEncode, int flags) { byte[] data = null; try { data = toEncode.getBytes("UTF-8"); } catch (UnsupportedEncodingException e1) { e1.printStackTrace(); } if (flags == -1) { flags = Base64.DEFAULT; } return Base64.encodeToString(data, f...
java
private static String privateBase64Encoder(String toEncode, int flags) { byte[] data = null; try { data = toEncode.getBytes("UTF-8"); } catch (UnsupportedEncodingException e1) { e1.printStackTrace(); } if (flags == -1) { flags = Base64.DEFAULT; } return Base64.encodeToString(data, f...
[ "private", "static", "String", "privateBase64Encoder", "(", "String", "toEncode", ",", "int", "flags", ")", "{", "byte", "[", "]", "data", "=", "null", ";", "try", "{", "data", "=", "toEncode", ".", "getBytes", "(", "\"UTF-8\"", ")", ";", "}", "catch", ...
private Encoder in base64 @param toEncode String to be encoded @param flags flags to encode the String @return encoded String in base64
[ "private", "Encoder", "in", "base64" ]
train
https://github.com/cesarferreira/AndroidQuickUtils/blob/73a91daedbb9f7be7986ea786fbc441c9e5a881c/library/src/main/java/quickutils/core/categories/security.java#L53-L66
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.sumRows
public static DMatrixRMaj sumRows(DMatrixSparseCSC input , @Nullable DMatrixRMaj output ) { if( output == null ) { output = new DMatrixRMaj(input.numRows,1); } else { output.reshape(input.numRows,1); } Arrays.fill(output.data,0,input.numRows,0); for (int...
java
public static DMatrixRMaj sumRows(DMatrixSparseCSC input , @Nullable DMatrixRMaj output ) { if( output == null ) { output = new DMatrixRMaj(input.numRows,1); } else { output.reshape(input.numRows,1); } Arrays.fill(output.data,0,input.numRows,0); for (int...
[ "public", "static", "DMatrixRMaj", "sumRows", "(", "DMatrixSparseCSC", "input", ",", "@", "Nullable", "DMatrixRMaj", "output", ")", "{", "if", "(", "output", "==", "null", ")", "{", "output", "=", "new", "DMatrixRMaj", "(", "input", ".", "numRows", ",", "1...
<p> Computes the sum of each row in the input matrix and returns the results in a vector:<br> <br> b<sub>j</sub> = sum(i=1:n ; a<sub>ji</sub>) </p> @param input Input matrix @param output Optional storage for output. Reshaped into a column vector. Modified. @return Vector containing the sum of each row
[ "<p", ">", "Computes", "the", "sum", "of", "each", "row", "in", "the", "input", "matrix", "and", "returns", "the", "results", "in", "a", "vector", ":", "<br", ">", "<br", ">", "b<sub", ">", "j<", "/", "sub", ">", "=", "sum", "(", "i", "=", "1", ...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L1393-L1412
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java
StandardRoadConnection.addConnectedSegment
void addConnectedSegment(RoadPolyline segment, boolean attachToStartPoint) { if (segment == null) { return; } if (this.connectedSegments.isEmpty()) { this.connectedSegments.add(new Connection(segment, attachToStartPoint)); } else { // Compute the angle to the unit vector for the new segment final do...
java
void addConnectedSegment(RoadPolyline segment, boolean attachToStartPoint) { if (segment == null) { return; } if (this.connectedSegments.isEmpty()) { this.connectedSegments.add(new Connection(segment, attachToStartPoint)); } else { // Compute the angle to the unit vector for the new segment final do...
[ "void", "addConnectedSegment", "(", "RoadPolyline", "segment", ",", "boolean", "attachToStartPoint", ")", "{", "if", "(", "segment", "==", "null", ")", "{", "return", ";", "}", "if", "(", "this", ".", "connectedSegments", ".", "isEmpty", "(", ")", ")", "{"...
Add a segment to this connection point. <p>The segments are ordered according to there geo-localization along a trigonometric cicle. The first segment has the nearest angle to the vector (1,0), and the following segments are ordered according to the positive value of there angles to this unity vector (counterclockwise...
[ "Add", "a", "segment", "to", "this", "connection", "point", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java#L310-L326
jmxtrans/embedded-jmxtrans
src/main/java/org/jmxtrans/embedded/util/Preconditions.java
Preconditions.checkNotEmpty
public static String checkNotEmpty(String reference, @Nullable String message) throws IllegalArgumentException { if (reference == null || reference.isEmpty()) { throw new IllegalArgumentException(message == null ? "Null or empty value" : message); } return reference; }
java
public static String checkNotEmpty(String reference, @Nullable String message) throws IllegalArgumentException { if (reference == null || reference.isEmpty()) { throw new IllegalArgumentException(message == null ? "Null or empty value" : message); } return reference; }
[ "public", "static", "String", "checkNotEmpty", "(", "String", "reference", ",", "@", "Nullable", "String", "message", ")", "throws", "IllegalArgumentException", "{", "if", "(", "reference", "==", "null", "||", "reference", ".", "isEmpty", "(", ")", ")", "{", ...
Check the nullity and emptiness of the given <code>reference</code>. @param reference reference to check @param message exception message, can be <code>null</code> @return the given <code>reference</code> @throws IllegalArgumentException if the given <code>reference</code> is <code>null</code>
[ "Check", "the", "nullity", "and", "emptiness", "of", "the", "given", "<code", ">", "reference<", "/", "code", ">", "." ]
train
https://github.com/jmxtrans/embedded-jmxtrans/blob/17224389e7d8323284cabc2a5167fc03bed6d223/src/main/java/org/jmxtrans/embedded/util/Preconditions.java#L82-L87
heroku/heroku.jar
heroku-api/src/main/java/com/heroku/api/HerokuAPI.java
HerokuAPI.createBuild
public Build createBuild(String appName, Build build) { return connection.execute(new BuildCreate(appName, build), apiKey); }
java
public Build createBuild(String appName, Build build) { return connection.execute(new BuildCreate(appName, build), apiKey); }
[ "public", "Build", "createBuild", "(", "String", "appName", ",", "Build", "build", ")", "{", "return", "connection", ".", "execute", "(", "new", "BuildCreate", "(", "appName", ",", "build", ")", ",", "apiKey", ")", ";", "}" ]
Creates a build @param appName See {@link #listApps} for a list of apps that can be used. @param build the build information
[ "Creates", "a", "build" ]
train
https://github.com/heroku/heroku.jar/blob/d9e52991293159498c10c498c6f91fcdd637378e/heroku-api/src/main/java/com/heroku/api/HerokuAPI.java#L441-L443
powermock/powermock
powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java
PowerMock.createPartialMockForAllMethodsExcept
public static synchronized <T> T createPartialMockForAllMethodsExcept(Class<T> type, String methodNameToExclude, Class<?> firstArgumentType, Class<?>... moreTypes) { /* * The reason why we've split the first and "additional typ...
java
public static synchronized <T> T createPartialMockForAllMethodsExcept(Class<T> type, String methodNameToExclude, Class<?> firstArgumentType, Class<?>... moreTypes) { /* * The reason why we've split the first and "additional typ...
[ "public", "static", "synchronized", "<", "T", ">", "T", "createPartialMockForAllMethodsExcept", "(", "Class", "<", "T", ">", "type", ",", "String", "methodNameToExclude", ",", "Class", "<", "?", ">", "firstArgumentType", ",", "Class", "<", "?", ">", "...", "...
Mock all methods of a class except for a specific one. Use this method only if you have several overloaded methods. @param <T> The type of the mock. @param type The type that'll be used to create a mock instance. @param methodNameToExclude The name of the method not to mock. @param first...
[ "Mock", "all", "methods", "of", "a", "class", "except", "for", "a", "specific", "one", ".", "Use", "this", "method", "only", "if", "you", "have", "several", "overloaded", "methods", "." ]
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java#L396-L406
js-lib-com/commons
src/main/java/js/util/Classes.java
Classes.getResourceAsStream
private static InputStream getResourceAsStream(String name, ClassLoader[] classLoaders) { // Java standard class loader require resource name to be an absolute path without leading path separator // at this point <name> argument is guaranteed to not start with leading path separator for(ClassLoader ...
java
private static InputStream getResourceAsStream(String name, ClassLoader[] classLoaders) { // Java standard class loader require resource name to be an absolute path without leading path separator // at this point <name> argument is guaranteed to not start with leading path separator for(ClassLoader ...
[ "private", "static", "InputStream", "getResourceAsStream", "(", "String", "name", ",", "ClassLoader", "[", "]", "classLoaders", ")", "{", "// Java standard class loader require resource name to be an absolute path without leading path separator\r", "// at this point <name> argument is ...
Get named resource input stream from a list of class loaders. Traverses class loaders in given order searching for requested resource. Return first resource found or null if none found. @param name resource name with syntax as required by Java ClassLoader, @param classLoaders target class loaders. @return found resour...
[ "Get", "named", "resource", "input", "stream", "from", "a", "list", "of", "class", "loaders", ".", "Traverses", "class", "loaders", "in", "given", "order", "searching", "for", "requested", "resource", ".", "Return", "first", "resource", "found", "or", "null", ...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L1061-L1078
apache/groovy
src/main/java/org/codehaus/groovy/runtime/dgmimpl/NumberNumberPlus.java
NumberNumberPlus.plus
public static Number plus(Number left, Number right) { return NumberMath.add(left, right); }
java
public static Number plus(Number left, Number right) { return NumberMath.add(left, right); }
[ "public", "static", "Number", "plus", "(", "Number", "left", ",", "Number", "right", ")", "{", "return", "NumberMath", ".", "add", "(", "left", ",", "right", ")", ";", "}" ]
Add two numbers and return the result. @param left a Number @param right another Number to add @return the addition of both Numbers
[ "Add", "two", "numbers", "and", "return", "the", "result", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/dgmimpl/NumberNumberPlus.java#L42-L44
GoogleCloudPlatform/appengine-pipelines
java/src/main/java/com/google/appengine/tools/pipeline/Job.java
Job.futureCall
public <T, T1, T2> FutureValue<T> futureCall(Job2<T, T1, T2> jobInstance, Value<? extends T1> v1, Value<? extends T2> v2, JobSetting... settings) { return futureCallUnchecked(settings, jobInstance, v1, v2); }
java
public <T, T1, T2> FutureValue<T> futureCall(Job2<T, T1, T2> jobInstance, Value<? extends T1> v1, Value<? extends T2> v2, JobSetting... settings) { return futureCallUnchecked(settings, jobInstance, v1, v2); }
[ "public", "<", "T", ",", "T1", ",", "T2", ">", "FutureValue", "<", "T", ">", "futureCall", "(", "Job2", "<", "T", ",", "T1", ",", "T2", ">", "jobInstance", ",", "Value", "<", "?", "extends", "T1", ">", "v1", ",", "Value", "<", "?", "extends", "...
Invoke this method from within the {@code run} method of a <b>generator job</b> in order to specify a job node in the generated child job graph. This version of the method is for child jobs that take two arguments. @param <T> The return type of the child job being specified @param <T1> The type of the first input to t...
[ "Invoke", "this", "method", "from", "within", "the", "{", "@code", "run", "}", "method", "of", "a", "<b", ">", "generator", "job<", "/", "b", ">", "in", "order", "to", "specify", "a", "job", "node", "in", "the", "generated", "child", "job", "graph", ...
train
https://github.com/GoogleCloudPlatform/appengine-pipelines/blob/277394648dac3e8214677af898935d07399ac8e1/java/src/main/java/com/google/appengine/tools/pipeline/Job.java#L240-L243
zalando-nakadi/fahrschein
fahrschein/src/main/java/org/zalando/fahrschein/NakadiClient.java
NakadiClient.subscribe
@Deprecated public Subscription subscribe(String applicationName, String eventName, String consumerGroup) throws IOException { return subscription(applicationName, eventName).withConsumerGroup(consumerGroup).subscribe(); }
java
@Deprecated public Subscription subscribe(String applicationName, String eventName, String consumerGroup) throws IOException { return subscription(applicationName, eventName).withConsumerGroup(consumerGroup).subscribe(); }
[ "@", "Deprecated", "public", "Subscription", "subscribe", "(", "String", "applicationName", ",", "String", "eventName", ",", "String", "consumerGroup", ")", "throws", "IOException", "{", "return", "subscription", "(", "applicationName", ",", "eventName", ")", ".", ...
Create a subscription for a single event type. @deprecated Use the {@link SubscriptionBuilder} and {@link NakadiClient#subscription(String, String)} instead.
[ "Create", "a", "subscription", "for", "a", "single", "event", "type", "." ]
train
https://github.com/zalando-nakadi/fahrschein/blob/b55ae0ff79aacb300548a88f3969fd11a0904804/fahrschein/src/main/java/org/zalando/fahrschein/NakadiClient.java#L82-L85
EvidentSolutions/dalesbred
dalesbred/src/main/java/org/dalesbred/Database.java
Database.findOptional
public @NotNull <T> Optional<T> findOptional(@NotNull Class<T> cl, @NotNull @SQL String sql, Object... args) { return findOptional(cl, SqlQuery.query(sql, args)); }
java
public @NotNull <T> Optional<T> findOptional(@NotNull Class<T> cl, @NotNull @SQL String sql, Object... args) { return findOptional(cl, SqlQuery.query(sql, args)); }
[ "public", "@", "NotNull", "<", "T", ">", "Optional", "<", "T", ">", "findOptional", "(", "@", "NotNull", "Class", "<", "T", ">", "cl", ",", "@", "NotNull", "@", "SQL", "String", "sql", ",", "Object", "...", "args", ")", "{", "return", "findOptional",...
Finds a unique result from database, converting the database row to given class using default mechanisms. Returns empty if there are no results or if single null result is returned. @throws NonUniqueResultException if there are multiple result rows
[ "Finds", "a", "unique", "result", "from", "database", "converting", "the", "database", "row", "to", "given", "class", "using", "default", "mechanisms", ".", "Returns", "empty", "if", "there", "are", "no", "results", "or", "if", "single", "null", "result", "i...
train
https://github.com/EvidentSolutions/dalesbred/blob/713f5b6e152d97e1672ca68b9ff9c7c6c288ceb1/dalesbred/src/main/java/org/dalesbred/Database.java#L402-L404
bbottema/simple-java-mail
modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageHelper.java
MimeMessageHelper.setTexts
static void setTexts(final Email email, final MimeMultipart multipartAlternativeMessages) throws MessagingException { if (email.getPlainText() != null) { final MimeBodyPart messagePart = new MimeBodyPart(); messagePart.setText(email.getPlainText(), CHARACTER_ENCODING); multipartAlternativeMessages.addBody...
java
static void setTexts(final Email email, final MimeMultipart multipartAlternativeMessages) throws MessagingException { if (email.getPlainText() != null) { final MimeBodyPart messagePart = new MimeBodyPart(); messagePart.setText(email.getPlainText(), CHARACTER_ENCODING); multipartAlternativeMessages.addBody...
[ "static", "void", "setTexts", "(", "final", "Email", "email", ",", "final", "MimeMultipart", "multipartAlternativeMessages", ")", "throws", "MessagingException", "{", "if", "(", "email", ".", "getPlainText", "(", ")", "!=", "null", ")", "{", "final", "MimeBodyPa...
Fills the {@link Message} instance with the content bodies (text, html and calendar). @param email The message in which the content is defined. @param multipartAlternativeMessages See {@link MimeMultipart#addBodyPart(BodyPart)} @throws MessagingException See {@link BodyPart#setText(String)}, {@l...
[ "Fills", "the", "{", "@link", "Message", "}", "instance", "with", "the", "content", "bodies", "(", "text", "html", "and", "calendar", ")", "." ]
train
https://github.com/bbottema/simple-java-mail/blob/b03635328aeecd525e35eddfef8f5b9a184559d8/modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageHelper.java#L97-L114
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/utils/DocBookBuildUtilities.java
DocBookBuildUtilities.convertDocumentToCDATAFormattedString
public static String convertDocumentToCDATAFormattedString(final Document doc, final XMLFormatProperties xmlFormatProperties) { return XMLUtilities.wrapStringInCDATA(convertDocumentToFormattedString(doc, xmlFormatProperties)); }
java
public static String convertDocumentToCDATAFormattedString(final Document doc, final XMLFormatProperties xmlFormatProperties) { return XMLUtilities.wrapStringInCDATA(convertDocumentToFormattedString(doc, xmlFormatProperties)); }
[ "public", "static", "String", "convertDocumentToCDATAFormattedString", "(", "final", "Document", "doc", ",", "final", "XMLFormatProperties", "xmlFormatProperties", ")", "{", "return", "XMLUtilities", ".", "wrapStringInCDATA", "(", "convertDocumentToFormattedString", "(", "d...
Convert a DOM Document to a Formatted String representation and wrap it in a CDATA element. @param doc The DOM Document to be converted and formatted. @param xmlFormatProperties The XML Formatting Properties. @return The converted XML String representation.
[ "Convert", "a", "DOM", "Document", "to", "a", "Formatted", "String", "representation", "and", "wrap", "it", "in", "a", "CDATA", "element", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/utils/DocBookBuildUtilities.java#L474-L476
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/github/lgooddatepicker/zinternaltools/InternalUtilities.java
InternalUtilities.getMostCommonElementInList
public static <T> T getMostCommonElementInList(List<T> sourceList) { if (sourceList == null || sourceList.isEmpty()) { return null; } Map<T, Integer> hashMap = new HashMap<T, Integer>(); for (T element : sourceList) { Integer countOrNull = hashMap.get(element); ...
java
public static <T> T getMostCommonElementInList(List<T> sourceList) { if (sourceList == null || sourceList.isEmpty()) { return null; } Map<T, Integer> hashMap = new HashMap<T, Integer>(); for (T element : sourceList) { Integer countOrNull = hashMap.get(element); ...
[ "public", "static", "<", "T", ">", "T", "getMostCommonElementInList", "(", "List", "<", "T", ">", "sourceList", ")", "{", "if", "(", "sourceList", "==", "null", "||", "sourceList", ".", "isEmpty", "(", ")", ")", "{", "return", "null", ";", "}", "Map", ...
getMostCommonElementInList, This returns the most common element in the supplied list. In the event of a tie, any element that is tied as the "largest element" may be returned. If the list has no elements, or if the list is null, then this will return null. This can also return null if null happens to be the most commo...
[ "getMostCommonElementInList", "This", "returns", "the", "most", "common", "element", "in", "the", "supplied", "list", ".", "In", "the", "event", "of", "a", "tie", "any", "element", "that", "is", "tied", "as", "the", "largest", "element", "may", "be", "return...
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/github/lgooddatepicker/zinternaltools/InternalUtilities.java#L100-L121
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/property/PropertyUtil.java
PropertyUtil.findSetter
public static Method findSetter(String methodName, Object instance, Class<?> valueClass) throws NoSuchMethodException { return findMethod(methodName, instance, valueClass, true); }
java
public static Method findSetter(String methodName, Object instance, Class<?> valueClass) throws NoSuchMethodException { return findMethod(methodName, instance, valueClass, true); }
[ "public", "static", "Method", "findSetter", "(", "String", "methodName", ",", "Object", "instance", ",", "Class", "<", "?", ">", "valueClass", ")", "throws", "NoSuchMethodException", "{", "return", "findMethod", "(", "methodName", ",", "instance", ",", "valueCla...
Returns the requested setter method from an object instance. @param methodName Name of the setter method. @param instance Object instance to search. @param valueClass The setter parameter type (null if don't care). @return The setter method. @throws NoSuchMethodException If method was not found.
[ "Returns", "the", "requested", "setter", "method", "from", "an", "object", "instance", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/property/PropertyUtil.java#L46-L48
nominanuda/zen-project
zen-rhino/src/main/java/org/mozilla/javascript/HtmlUnitRegExpProxy.java
HtmlUnitRegExpProxy.isEscaped
static boolean isEscaped(final String characters, final int position) { int p = position; int nbBackslash = 0; while (p > 0 && characters.charAt(--p) == '\\') { nbBackslash++; } return (nbBackslash % 2 == 1); }
java
static boolean isEscaped(final String characters, final int position) { int p = position; int nbBackslash = 0; while (p > 0 && characters.charAt(--p) == '\\') { nbBackslash++; } return (nbBackslash % 2 == 1); }
[ "static", "boolean", "isEscaped", "(", "final", "String", "characters", ",", "final", "int", "position", ")", "{", "int", "p", "=", "position", ";", "int", "nbBackslash", "=", "0", ";", "while", "(", "p", ">", "0", "&&", "characters", ".", "charAt", "(...
Indicates if the character at the given position is escaped or not. @param characters the characters to consider @param position the position @return <code>true</code> if escaped
[ "Indicates", "if", "the", "character", "at", "the", "given", "position", "is", "escaped", "or", "not", "." ]
train
https://github.com/nominanuda/zen-project/blob/fe48ae8da198eb7066c2b56bf2ffafe4cdfc451d/zen-rhino/src/main/java/org/mozilla/javascript/HtmlUnitRegExpProxy.java#L242-L249
Domo42/saga-lib
saga-lib/src/main/java/com/codebullets/sagalib/AbstractSaga.java
AbstractSaga.requestTimeout
protected TimeoutId requestTimeout(final long delay, final TimeUnit unit, @Nullable final Object data) { return requestTimeout(delay, unit, null, data); }
java
protected TimeoutId requestTimeout(final long delay, final TimeUnit unit, @Nullable final Object data) { return requestTimeout(delay, unit, null, data); }
[ "protected", "TimeoutId", "requestTimeout", "(", "final", "long", "delay", ",", "final", "TimeUnit", "unit", ",", "@", "Nullable", "final", "Object", "data", ")", "{", "return", "requestTimeout", "(", "delay", ",", "unit", ",", "null", ",", "data", ")", ";...
Requests a timeout event attaching specific timeout data. This data is returned with the timeout message received.
[ "Requests", "a", "timeout", "event", "attaching", "specific", "timeout", "data", ".", "This", "data", "is", "returned", "with", "the", "timeout", "message", "received", "." ]
train
https://github.com/Domo42/saga-lib/blob/c8f232e2a51fcb6a3fe0082cfbf105c1e6bf90ef/saga-lib/src/main/java/com/codebullets/sagalib/AbstractSaga.java#L102-L104
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java
WordVectorSerializer.writeVocabCache
public static void writeVocabCache(@NonNull VocabCache<VocabWord> vocabCache, @NonNull File file) throws IOException { try (FileOutputStream fos = new FileOutputStream(file)) { writeVocabCache(vocabCache, fos); } }
java
public static void writeVocabCache(@NonNull VocabCache<VocabWord> vocabCache, @NonNull File file) throws IOException { try (FileOutputStream fos = new FileOutputStream(file)) { writeVocabCache(vocabCache, fos); } }
[ "public", "static", "void", "writeVocabCache", "(", "@", "NonNull", "VocabCache", "<", "VocabWord", ">", "vocabCache", ",", "@", "NonNull", "File", "file", ")", "throws", "IOException", "{", "try", "(", "FileOutputStream", "fos", "=", "new", "FileOutputStream", ...
This method saves vocab cache to provided File. Please note: it saves only vocab content, so it's suitable mostly for BagOfWords/TF-IDF vectorizers @param vocabCache @param file @throws UnsupportedEncodingException
[ "This", "method", "saves", "vocab", "cache", "to", "provided", "File", ".", "Please", "note", ":", "it", "saves", "only", "vocab", "content", "so", "it", "s", "suitable", "mostly", "for", "BagOfWords", "/", "TF", "-", "IDF", "vectorizers" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java#L2186-L2191
Azure/azure-sdk-for-java
notificationhubs/resource-manager/v2014_09_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2014_09_01/implementation/NotificationHubsInner.java
NotificationHubsInner.getPnsCredentialsAsync
public Observable<NotificationHubResourceInner> getPnsCredentialsAsync(String resourceGroupName, String namespaceName, String notificationHubName) { return getPnsCredentialsWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName).map(new Func1<ServiceResponse<NotificationHubResourceInner>...
java
public Observable<NotificationHubResourceInner> getPnsCredentialsAsync(String resourceGroupName, String namespaceName, String notificationHubName) { return getPnsCredentialsWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName).map(new Func1<ServiceResponse<NotificationHubResourceInner>...
[ "public", "Observable", "<", "NotificationHubResourceInner", ">", "getPnsCredentialsAsync", "(", "String", "resourceGroupName", ",", "String", "namespaceName", ",", "String", "notificationHubName", ")", "{", "return", "getPnsCredentialsWithServiceResponseAsync", "(", "resourc...
Lists the PNS Credentials associated with a notification hub . @param resourceGroupName The name of the resource group. @param namespaceName The namespace name. @param notificationHubName The notification hub name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ...
[ "Lists", "the", "PNS", "Credentials", "associated", "with", "a", "notification", "hub", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/notificationhubs/resource-manager/v2014_09_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2014_09_01/implementation/NotificationHubsInner.java#L1203-L1210
dbracewell/mango
src/main/java/com/davidbracewell/conversion/Val.java
Val.asList
@SuppressWarnings("unchecked") public <T> List<T> asList(Class<T> itemType) { return asCollection(List.class, itemType); }
java
@SuppressWarnings("unchecked") public <T> List<T> asList(Class<T> itemType) { return asCollection(List.class, itemType); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "List", "<", "T", ">", "asList", "(", "Class", "<", "T", ">", "itemType", ")", "{", "return", "asCollection", "(", "List", ".", "class", ",", "itemType", ")", ";", "}" ]
Converts the object to a List @param <T> the type parameter @param itemType The class of the item in the List @return The object as a List
[ "Converts", "the", "object", "to", "a", "List" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/conversion/Val.java#L730-L733
hawkular/hawkular-agent
hawkular-agent-core/src/main/java/org/hawkular/agent/monitor/cmd/AbstractDMRResourcePathCommand.java
AbstractDMRResourcePathCommand.setServerRefreshIndicator
protected void setServerRefreshIndicator(OperationResult<?> opResults, RESP response) { Optional<String> processState = opResults.getOptionalProcessState(); if (processState.isPresent()) { try { response.setServerRefreshIndicator(ServerRefreshIndicator.fromValue(processState....
java
protected void setServerRefreshIndicator(OperationResult<?> opResults, RESP response) { Optional<String> processState = opResults.getOptionalProcessState(); if (processState.isPresent()) { try { response.setServerRefreshIndicator(ServerRefreshIndicator.fromValue(processState....
[ "protected", "void", "setServerRefreshIndicator", "(", "OperationResult", "<", "?", ">", "opResults", ",", "RESP", "response", ")", "{", "Optional", "<", "String", ">", "processState", "=", "opResults", ".", "getOptionalProcessState", "(", ")", ";", "if", "(", ...
Given the results of an operation, this will set the {@link ServerRefreshIndicator} found in those results in the given response. @param opResults contains the DMR results @param response the response message
[ "Given", "the", "results", "of", "an", "operation", "this", "will", "set", "the", "{", "@link", "ServerRefreshIndicator", "}", "found", "in", "those", "results", "in", "the", "given", "response", "." ]
train
https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-agent-core/src/main/java/org/hawkular/agent/monitor/cmd/AbstractDMRResourcePathCommand.java#L171-L180
j256/ormlite-core
src/main/java/com/j256/ormlite/stmt/StatementExecutor.java
StatementExecutor.callBatchTasks
public <CT> CT callBatchTasks(ConnectionSource connectionSource, Callable<CT> callable) throws SQLException { if (connectionSource.isSingleConnection(tableInfo.getTableName())) { synchronized (this) { return doCallBatchTasks(connectionSource, callable); } } else { return doCallBatchTasks(connectionSour...
java
public <CT> CT callBatchTasks(ConnectionSource connectionSource, Callable<CT> callable) throws SQLException { if (connectionSource.isSingleConnection(tableInfo.getTableName())) { synchronized (this) { return doCallBatchTasks(connectionSource, callable); } } else { return doCallBatchTasks(connectionSour...
[ "public", "<", "CT", ">", "CT", "callBatchTasks", "(", "ConnectionSource", "connectionSource", ",", "Callable", "<", "CT", ">", "callable", ")", "throws", "SQLException", "{", "if", "(", "connectionSource", ".", "isSingleConnection", "(", "tableInfo", ".", "getT...
Call batch tasks inside of a connection which may, or may not, have been "saved".
[ "Call", "batch", "tasks", "inside", "of", "a", "connection", "which", "may", "or", "may", "not", "have", "been", "saved", "." ]
train
https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/stmt/StatementExecutor.java#L594-L602
wso2/transport-http
components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/common/Util.java
Util.isKeepAlive
public static boolean isKeepAlive(KeepAliveConfig keepAliveConfig, HttpCarbonMessage outboundRequestMsg) throws ConfigurationException { switch (keepAliveConfig) { case AUTO: return Float.valueOf((String) outboundRequestMsg.getProperty(Constants.HTTP_VERSION)) > Constants.HTTP_1_...
java
public static boolean isKeepAlive(KeepAliveConfig keepAliveConfig, HttpCarbonMessage outboundRequestMsg) throws ConfigurationException { switch (keepAliveConfig) { case AUTO: return Float.valueOf((String) outboundRequestMsg.getProperty(Constants.HTTP_VERSION)) > Constants.HTTP_1_...
[ "public", "static", "boolean", "isKeepAlive", "(", "KeepAliveConfig", "keepAliveConfig", ",", "HttpCarbonMessage", "outboundRequestMsg", ")", "throws", "ConfigurationException", "{", "switch", "(", "keepAliveConfig", ")", "{", "case", "AUTO", ":", "return", "Float", "...
Check whether a connection should alive or not. @param keepAliveConfig of the connection @param outboundRequestMsg of this particular transaction @return true if the connection should be kept alive @throws ConfigurationException for invalid configurations
[ "Check", "whether", "a", "connection", "should", "alive", "or", "not", "." ]
train
https://github.com/wso2/transport-http/blob/c51aa715b473db6c1b82a7d7b22f6e65f74df4c9/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/common/Util.java#L771-L786
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/SparkLine.java
SparkLine.calcHiLoValues
private void calcHiLoValues(double y, int index) { if (y < lo) { lo = y; loIndex = index; } if (y > hi) { hi = y; hiIndex = index; } }
java
private void calcHiLoValues(double y, int index) { if (y < lo) { lo = y; loIndex = index; } if (y > hi) { hi = y; hiIndex = index; } }
[ "private", "void", "calcHiLoValues", "(", "double", "y", ",", "int", "index", ")", "{", "if", "(", "y", "<", "lo", ")", "{", "lo", "=", "y", ";", "loIndex", "=", "index", ";", "}", "if", "(", "y", ">", "hi", ")", "{", "hi", "=", "y", ";", "...
Calculates the max and min measured values and stores the index of the related values in in loIndex and hiIndex. @param y @param index
[ "Calculates", "the", "max", "and", "min", "measured", "values", "and", "stores", "the", "index", "of", "the", "related", "values", "in", "in", "loIndex", "and", "hiIndex", "." ]
train
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/SparkLine.java#L1036-L1046
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/TaskInProgress.java
TaskInProgress.getTaskToRun
public Task getTaskToRun(String taskTracker) { // Create the 'taskid'; do not count the 'killed' tasks against the job! TaskAttemptID taskid = null; if (nextTaskId < (MAX_TASK_EXECS + maxTaskAttempts + numKilledTasks)) { // Make sure that the attempts are unqiue across restarts int attemptId = ...
java
public Task getTaskToRun(String taskTracker) { // Create the 'taskid'; do not count the 'killed' tasks against the job! TaskAttemptID taskid = null; if (nextTaskId < (MAX_TASK_EXECS + maxTaskAttempts + numKilledTasks)) { // Make sure that the attempts are unqiue across restarts int attemptId = ...
[ "public", "Task", "getTaskToRun", "(", "String", "taskTracker", ")", "{", "// Create the 'taskid'; do not count the 'killed' tasks against the job!", "TaskAttemptID", "taskid", "=", "null", ";", "if", "(", "nextTaskId", "<", "(", "MAX_TASK_EXECS", "+", "maxTaskAttempts", ...
Return a Task that can be sent to a TaskTracker for execution.
[ "Return", "a", "Task", "that", "can", "be", "sent", "to", "a", "TaskTracker", "for", "execution", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java#L1223-L1246
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbLists.java
TmdbLists.deleteList
public StatusCode deleteList(String sessionId, String listId) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, listId); parameters.add(Param.SESSION_ID, sessionId); URL url = new ApiUrl(apiKey, MethodBase.LIST).buildUrl(parameters); ...
java
public StatusCode deleteList(String sessionId, String listId) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, listId); parameters.add(Param.SESSION_ID, sessionId); URL url = new ApiUrl(apiKey, MethodBase.LIST).buildUrl(parameters); ...
[ "public", "StatusCode", "deleteList", "(", "String", "sessionId", ",", "String", "listId", ")", "throws", "MovieDbException", "{", "TmdbParameters", "parameters", "=", "new", "TmdbParameters", "(", ")", ";", "parameters", ".", "add", "(", "Param", ".", "ID", "...
This method lets users delete a list that they created. A valid session id is required. @param sessionId @param listId @return @throws MovieDbException
[ "This", "method", "lets", "users", "delete", "a", "list", "that", "they", "created", ".", "A", "valid", "session", "id", "is", "required", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbLists.java#L140-L153
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/TransformingTreebank.java
TransformingTreebank.main
public static void main(String[] args) { Timing.startTime(); Treebank treebank = new DiskTreebank(new TreeReaderFactory() { public TreeReader newTreeReader(Reader in) { return new PennTreeReader(in); } }); Treebank treebank2 = new MemoryTreebank(new TreeReaderFactory() { ...
java
public static void main(String[] args) { Timing.startTime(); Treebank treebank = new DiskTreebank(new TreeReaderFactory() { public TreeReader newTreeReader(Reader in) { return new PennTreeReader(in); } }); Treebank treebank2 = new MemoryTreebank(new TreeReaderFactory() { ...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "Timing", ".", "startTime", "(", ")", ";", "Treebank", "treebank", "=", "new", "DiskTreebank", "(", "new", "TreeReaderFactory", "(", ")", "{", "public", "TreeReader", "newTreeRe...
Loads treebank grammar from first argument and prints it. Just a demonstration of functionality. <br> <code>usage: java MemoryTreebank treebankFilesPath</code> @param args array of command-line arguments
[ "Loads", "treebank", "grammar", "from", "first", "argument", "and", "prints", "it", ".", "Just", "a", "demonstration", "of", "functionality", ".", "<br", ">", "<code", ">", "usage", ":", "java", "MemoryTreebank", "treebankFilesPath<", "/", "code", ">" ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/TransformingTreebank.java#L127-L181
apache/fluo
modules/core/src/main/java/org/apache/fluo/core/impl/FluoConfigurationImpl.java
FluoConfigurationImpl.getTxIfoCacheTimeout
public static long getTxIfoCacheTimeout(FluoConfiguration conf, TimeUnit tu) { long millis = conf.getLong(TX_INFO_CACHE_TIMEOUT, TX_INFO_CACHE_TIMEOUT_DEFAULT); if (millis <= 0) { throw new IllegalArgumentException("Timeout must positive for " + TX_INFO_CACHE_TIMEOUT); } return tu.convert(millis, ...
java
public static long getTxIfoCacheTimeout(FluoConfiguration conf, TimeUnit tu) { long millis = conf.getLong(TX_INFO_CACHE_TIMEOUT, TX_INFO_CACHE_TIMEOUT_DEFAULT); if (millis <= 0) { throw new IllegalArgumentException("Timeout must positive for " + TX_INFO_CACHE_TIMEOUT); } return tu.convert(millis, ...
[ "public", "static", "long", "getTxIfoCacheTimeout", "(", "FluoConfiguration", "conf", ",", "TimeUnit", "tu", ")", "{", "long", "millis", "=", "conf", ".", "getLong", "(", "TX_INFO_CACHE_TIMEOUT", ",", "TX_INFO_CACHE_TIMEOUT_DEFAULT", ")", ";", "if", "(", "millis",...
Gets the time before stale entries in the cache are evicted based on age. This method returns a long representing the time converted from the TimeUnit passed in. @param conf The FluoConfiguration @param tu The TimeUnit desired to represent the cache timeout
[ "Gets", "the", "time", "before", "stale", "entries", "in", "the", "cache", "are", "evicted", "based", "on", "age", ".", "This", "method", "returns", "a", "long", "representing", "the", "time", "converted", "from", "the", "TimeUnit", "passed", "in", "." ]
train
https://github.com/apache/fluo/blob/8e06204d4167651e2d3b5219b8c1397644e6ba6e/modules/core/src/main/java/org/apache/fluo/core/impl/FluoConfigurationImpl.java#L138-L144
3pillarlabs/spring-data-simpledb
spring-data-simpledb-impl/src/main/java/org/springframework/data/simpledb/reflection/ReflectionUtils.java
ReflectionUtils.getDeclaredFieldInHierarchy
public static Field getDeclaredFieldInHierarchy(Class<?> clazz, String fieldName) throws NoSuchFieldException { Field field = null; for (Class<?> acls = clazz; acls != null; acls = acls.getSuperclass()) { try { field = acls.getDeclaredField(fieldName); break; } catch (NoSuchFieldException e) { ...
java
public static Field getDeclaredFieldInHierarchy(Class<?> clazz, String fieldName) throws NoSuchFieldException { Field field = null; for (Class<?> acls = clazz; acls != null; acls = acls.getSuperclass()) { try { field = acls.getDeclaredField(fieldName); break; } catch (NoSuchFieldException e) { ...
[ "public", "static", "Field", "getDeclaredFieldInHierarchy", "(", "Class", "<", "?", ">", "clazz", ",", "String", "fieldName", ")", "throws", "NoSuchFieldException", "{", "Field", "field", "=", "null", ";", "for", "(", "Class", "<", "?", ">", "acls", "=", "...
Finds a declared field in given <tt>clazz</tt> and continues to search up the superclass until no more super class is present. @param clazz @param fieldName @return @throws NoSuchFieldException
[ "Finds", "a", "declared", "field", "in", "given", "<tt", ">", "clazz<", "/", "tt", ">", "and", "continues", "to", "search", "up", "the", "superclass", "until", "no", "more", "super", "class", "is", "present", "." ]
train
https://github.com/3pillarlabs/spring-data-simpledb/blob/f1e0eb4e48ec4674d3966e8f5bc04c95031f93ae/spring-data-simpledb-impl/src/main/java/org/springframework/data/simpledb/reflection/ReflectionUtils.java#L300-L316
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java
ManagedDatabasesInner.updateAsync
public Observable<ManagedDatabaseInner> updateAsync(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters).map(new Func1<ServiceResponse<ManagedDatabase...
java
public Observable<ManagedDatabaseInner> updateAsync(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters).map(new Func1<ServiceResponse<ManagedDatabase...
[ "public", "Observable", "<", "ManagedDatabaseInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "managedInstanceName", ",", "String", "databaseName", ",", "ManagedDatabaseUpdate", "parameters", ")", "{", "return", "updateWithServiceResponseAsync"...
Updates an existing database. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param managedInstanceName The name of the managed instance. @param databaseName The name of the database. @param parameters The...
[ "Updates", "an", "existing", "database", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java#L900-L907
FlyingHe/UtilsMaven
src/main/java/com/github/flyinghe/tools/CommonUtils.java
CommonUtils.imgToBase64Str
public static String imgToBase64Str(BufferedImage image, String formatName) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); String base64Str = null; try { ImageIO.write(image, formatName == null ? "jpeg" : formatName, baos); byte[] bytes = baos.toByteArray(); ...
java
public static String imgToBase64Str(BufferedImage image, String formatName) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); String base64Str = null; try { ImageIO.write(image, formatName == null ? "jpeg" : formatName, baos); byte[] bytes = baos.toByteArray(); ...
[ "public", "static", "String", "imgToBase64Str", "(", "BufferedImage", "image", ",", "String", "formatName", ")", "{", "ByteArrayOutputStream", "baos", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "String", "base64Str", "=", "null", ";", "try", "{", "Image...
将一张图片转换成指定格式的Base64字符串编码 @param image 指定一张图片 @param formatName 图片格式名,如gif,png,jpg,jpeg等,默认为jpeg @return 返回编码好的字符串, 失败返回null
[ "将一张图片转换成指定格式的Base64字符串编码" ]
train
https://github.com/FlyingHe/UtilsMaven/blob/d9605b7bfe0c28a05289252e12d163e114080b4a/src/main/java/com/github/flyinghe/tools/CommonUtils.java#L181-L194
VoltDB/voltdb
src/frontend/org/voltdb/utils/PersistentBinaryDeque.java
PersistentBinaryDeque.quarantineSegment
private void quarantineSegment(Map.Entry<Long, PBDSegment> prevEntry) throws IOException { quarantineSegment(prevEntry, prevEntry.getValue(), prevEntry.getValue().getNumEntries()); }
java
private void quarantineSegment(Map.Entry<Long, PBDSegment> prevEntry) throws IOException { quarantineSegment(prevEntry, prevEntry.getValue(), prevEntry.getValue().getNumEntries()); }
[ "private", "void", "quarantineSegment", "(", "Map", ".", "Entry", "<", "Long", ",", "PBDSegment", ">", "prevEntry", ")", "throws", "IOException", "{", "quarantineSegment", "(", "prevEntry", ",", "prevEntry", ".", "getValue", "(", ")", ",", "prevEntry", ".", ...
Quarantine a segment which was already added to {@link #m_segments} @param prevEntry {@link Map.Entry} from {@link #m_segments} to quarantine @throws IOException
[ "Quarantine", "a", "segment", "which", "was", "already", "added", "to", "{", "@link", "#m_segments", "}" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/PersistentBinaryDeque.java#L618-L620
datasalt/pangool
core/src/main/java/com/datasalt/pangool/utils/InstancesDistributor.java
InstancesDistributor.loadInstance
public static <T> T loadInstance(Configuration conf, Class<T> objClass, String fileName, boolean callSetConf) throws IOException { Path path = InstancesDistributor.locateFileInCache(conf, fileName); T obj; ObjectInput in; if (path == null) { throw new IOException("Path is null"); } ...
java
public static <T> T loadInstance(Configuration conf, Class<T> objClass, String fileName, boolean callSetConf) throws IOException { Path path = InstancesDistributor.locateFileInCache(conf, fileName); T obj; ObjectInput in; if (path == null) { throw new IOException("Path is null"); } ...
[ "public", "static", "<", "T", ">", "T", "loadInstance", "(", "Configuration", "conf", ",", "Class", "<", "T", ">", "objClass", ",", "String", "fileName", ",", "boolean", "callSetConf", ")", "throws", "IOException", "{", "Path", "path", "=", "InstancesDistrib...
Given a Hadoop Configuration property and an Class, this method can re-instantiate an Object instance that was previously distributed using * {@link InstancesDistributor#distribute(Object, String, Configuration)}. @param <T> The object type. @param conf The Hadoop Configuration. @param objClass The object type class. ...
[ "Given", "a", "Hadoop", "Configuration", "property", "and", "an", "Class", "this", "method", "can", "re", "-", "instantiate", "an", "Object", "instance", "that", "was", "previously", "distributed", "using", "*", "{", "@link", "InstancesDistributor#distribute", "("...
train
https://github.com/datasalt/pangool/blob/bfd312dd78cba03febaf7988ae96a3d4bc585408/core/src/main/java/com/datasalt/pangool/utils/InstancesDistributor.java#L117-L138
LearnLib/learnlib
algorithms/active/ttt/src/main/java/de/learnlib/algorithms/ttt/base/AbstractTTTLearner.java
AbstractTTTLearner.link
protected static <I, D> void link(AbstractBaseDTNode<I, D> dtNode, TTTState<I, D> state) { assert dtNode.isLeaf(); dtNode.setData(state); state.dtLeaf = dtNode; }
java
protected static <I, D> void link(AbstractBaseDTNode<I, D> dtNode, TTTState<I, D> state) { assert dtNode.isLeaf(); dtNode.setData(state); state.dtLeaf = dtNode; }
[ "protected", "static", "<", "I", ",", "D", ">", "void", "link", "(", "AbstractBaseDTNode", "<", "I", ",", "D", ">", "dtNode", ",", "TTTState", "<", "I", ",", "D", ">", "state", ")", "{", "assert", "dtNode", ".", "isLeaf", "(", ")", ";", "dtNode", ...
Establish the connection between a node in the discrimination tree and a state of the hypothesis. @param dtNode the node in the discrimination tree @param state the state in the hypothesis
[ "Establish", "the", "connection", "between", "a", "node", "in", "the", "discrimination", "tree", "and", "a", "state", "of", "the", "hypothesis", "." ]
train
https://github.com/LearnLib/learnlib/blob/fa38a14adcc0664099f180d671ffa42480318d7b/algorithms/active/ttt/src/main/java/de/learnlib/algorithms/ttt/base/AbstractTTTLearner.java#L135-L140
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/utils/ThreadLocalProxyCopyOnWriteArrayList.java
ThreadLocalProxyCopyOnWriteArrayList.addAll
@Override public boolean addAll(int index, Collection<? extends E> c) { Object[] cs = c.toArray(); final ReentrantLock lock = this.lock; lock.lock(); try { Object[] elements = getArray(); int len = elements.length; if (index > len || index < 0) ...
java
@Override public boolean addAll(int index, Collection<? extends E> c) { Object[] cs = c.toArray(); final ReentrantLock lock = this.lock; lock.lock(); try { Object[] elements = getArray(); int len = elements.length; if (index > len || index < 0) ...
[ "@", "Override", "public", "boolean", "addAll", "(", "int", "index", ",", "Collection", "<", "?", "extends", "E", ">", "c", ")", "{", "Object", "[", "]", "cs", "=", "c", ".", "toArray", "(", ")", ";", "final", "ReentrantLock", "lock", "=", "this", ...
Inserts all of the elements in the specified collection into this list, starting at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in this list in the order that they are returned by the spec...
[ "Inserts", "all", "of", "the", "elements", "in", "the", "specified", "collection", "into", "this", "list", "starting", "at", "the", "specified", "position", ".", "Shifts", "the", "element", "currently", "at", "that", "position", "(", "if", "any", ")", "and",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/utils/ThreadLocalProxyCopyOnWriteArrayList.java#L756-L786
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java
DiagnosticsInner.executeSiteDetectorSlot
public DiagnosticDetectorResponseInner executeSiteDetectorSlot(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot, DateTime startTime, DateTime endTime, String timeGrain) { return executeSiteDetectorSlotWithServiceResponseAsync(resourceGroupName, siteName, det...
java
public DiagnosticDetectorResponseInner executeSiteDetectorSlot(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot, DateTime startTime, DateTime endTime, String timeGrain) { return executeSiteDetectorSlotWithServiceResponseAsync(resourceGroupName, siteName, det...
[ "public", "DiagnosticDetectorResponseInner", "executeSiteDetectorSlot", "(", "String", "resourceGroupName", ",", "String", "siteName", ",", "String", "detectorName", ",", "String", "diagnosticCategory", ",", "String", "slot", ",", "DateTime", "startTime", ",", "DateTime",...
Execute Detector. Execute Detector. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Site Name @param detectorName Detector Resource Name @param diagnosticCategory Category Name @param slot Slot Name @param startTime Start Time @param endTime End Time @param timeGrain ...
[ "Execute", "Detector", ".", "Execute", "Detector", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java#L2482-L2484
goldmansachs/reladomo
reladomo/src/main/java/com/gs/fw/common/mithra/connectionmanager/AbstractConnectionManager.java
AbstractConnectionManager.initialisePool
public void initialisePool() { Properties loginProperties = createLoginProperties(); if (logger.isDebugEnabled()) { logger.debug("about to create pool with user-id : " + this.getJdbcUser()); } ConnectionFactory connectionFactory = createConnectionFactor...
java
public void initialisePool() { Properties loginProperties = createLoginProperties(); if (logger.isDebugEnabled()) { logger.debug("about to create pool with user-id : " + this.getJdbcUser()); } ConnectionFactory connectionFactory = createConnectionFactor...
[ "public", "void", "initialisePool", "(", ")", "{", "Properties", "loginProperties", "=", "createLoginProperties", "(", ")", ";", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"about to create pool with user-id : \""...
This method must be called after all the connection pool properties have been set.
[ "This", "method", "must", "be", "called", "after", "all", "the", "connection", "pool", "properties", "have", "been", "set", "." ]
train
https://github.com/goldmansachs/reladomo/blob/e9a069452eece7a6ef9551caf81a69d3d9a3d990/reladomo/src/main/java/com/gs/fw/common/mithra/connectionmanager/AbstractConnectionManager.java#L107-L136
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/util/JavacMessages.java
JavacMessages.getLocalizedString
public String getLocalizedString(String key, Object... args) { return getLocalizedString(currentLocale, key, args); }
java
public String getLocalizedString(String key, Object... args) { return getLocalizedString(currentLocale, key, args); }
[ "public", "String", "getLocalizedString", "(", "String", "key", ",", "Object", "...", "args", ")", "{", "return", "getLocalizedString", "(", "currentLocale", ",", "key", ",", "args", ")", ";", "}" ]
Gets the localized string corresponding to a key, formatted with a set of args.
[ "Gets", "the", "localized", "string", "corresponding", "to", "a", "key", "formatted", "with", "a", "set", "of", "args", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JavacMessages.java#L139-L141
EsotericSoftware/kryo
src/com/esotericsoftware/kryo/unsafe/UnsafeOutput.java
UnsafeOutput.writeBytes
public void writeBytes (Object from, long offset, int count) throws KryoException { int copyCount = Math.min(capacity - position, count); while (true) { unsafe.copyMemory(from, offset, buffer, byteArrayBaseOffset + position, copyCount); position += copyCount; count -= copyCount; if (count == 0) break; ...
java
public void writeBytes (Object from, long offset, int count) throws KryoException { int copyCount = Math.min(capacity - position, count); while (true) { unsafe.copyMemory(from, offset, buffer, byteArrayBaseOffset + position, copyCount); position += copyCount; count -= copyCount; if (count == 0) break; ...
[ "public", "void", "writeBytes", "(", "Object", "from", ",", "long", "offset", ",", "int", "count", ")", "throws", "KryoException", "{", "int", "copyCount", "=", "Math", ".", "min", "(", "capacity", "-", "position", ",", "count", ")", ";", "while", "(", ...
Write count bytes to the byte buffer, reading from the given offset inside the in-memory representation of the object.
[ "Write", "count", "bytes", "to", "the", "byte", "buffer", "reading", "from", "the", "given", "offset", "inside", "the", "in", "-", "memory", "representation", "of", "the", "object", "." ]
train
https://github.com/EsotericSoftware/kryo/blob/a8be1ab26f347f299a3c3f7171d6447dd5390845/src/com/esotericsoftware/kryo/unsafe/UnsafeOutput.java#L170-L181
google/closure-compiler
src/com/google/javascript/jscomp/AstFactory.java
AstFactory.getVarNameType
private JSType getVarNameType(Scope scope, String name) { Var var = scope.getVar(name); JSType type = null; if (var != null) { Node nameDefinitionNode = var.getNode(); if (nameDefinitionNode != null) { type = nameDefinitionNode.getJSType(); } } if (type == null) { // ...
java
private JSType getVarNameType(Scope scope, String name) { Var var = scope.getVar(name); JSType type = null; if (var != null) { Node nameDefinitionNode = var.getNode(); if (nameDefinitionNode != null) { type = nameDefinitionNode.getJSType(); } } if (type == null) { // ...
[ "private", "JSType", "getVarNameType", "(", "Scope", "scope", ",", "String", "name", ")", "{", "Var", "var", "=", "scope", ".", "getVar", "(", "name", ")", ";", "JSType", "type", "=", "null", ";", "if", "(", "var", "!=", "null", ")", "{", "Node", "...
Look up the correct type for the given name in the given scope. <p>Returns the unknown type if no type can be found
[ "Look", "up", "the", "correct", "type", "for", "the", "given", "name", "in", "the", "given", "scope", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/AstFactory.java#L978-L992
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteTablesInner.java
RouteTablesInner.beginDelete
public void beginDelete(String resourceGroupName, String routeTableName) { beginDeleteWithServiceResponseAsync(resourceGroupName, routeTableName).toBlocking().single().body(); }
java
public void beginDelete(String resourceGroupName, String routeTableName) { beginDeleteWithServiceResponseAsync(resourceGroupName, routeTableName).toBlocking().single().body(); }
[ "public", "void", "beginDelete", "(", "String", "resourceGroupName", ",", "String", "routeTableName", ")", "{", "beginDeleteWithServiceResponseAsync", "(", "resourceGroupName", ",", "routeTableName", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")", ".", ...
Deletes the specified route table. @param resourceGroupName The name of the resource group. @param routeTableName The name of the route table. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException all other ...
[ "Deletes", "the", "specified", "route", "table", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteTablesInner.java#L191-L193
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/Director.java
Director.uninstallFeaturesByProductId
public void uninstallFeaturesByProductId(String productId, boolean exceptPlatformFeatures) throws InstallException { String[] productIds = new String[1]; productIds[0] = productId; uninstallFeaturesByProductId(productIds, exceptPlatformFeatures); }
java
public void uninstallFeaturesByProductId(String productId, boolean exceptPlatformFeatures) throws InstallException { String[] productIds = new String[1]; productIds[0] = productId; uninstallFeaturesByProductId(productIds, exceptPlatformFeatures); }
[ "public", "void", "uninstallFeaturesByProductId", "(", "String", "productId", ",", "boolean", "exceptPlatformFeatures", ")", "throws", "InstallException", "{", "String", "[", "]", "productIds", "=", "new", "String", "[", "1", "]", ";", "productIds", "[", "0", "]...
Calls below method to uninstall features by product id @param productId product id to uninstall @param exceptPlatformFeatures If platform features should be ignored @throws InstallException
[ "Calls", "below", "method", "to", "uninstall", "features", "by", "product", "id" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/Director.java#L1907-L1911
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/workflow/Process.java
Process.getTransition
public Transition getTransition(Long fromId, Integer eventType, String completionCode) { Transition ret = null; for (Transition transition : getTransitions()) { if (transition.getFromId().equals(fromId) && transition.match(eventType, completionCode)) { if ...
java
public Transition getTransition(Long fromId, Integer eventType, String completionCode) { Transition ret = null; for (Transition transition : getTransitions()) { if (transition.getFromId().equals(fromId) && transition.match(eventType, completionCode)) { if ...
[ "public", "Transition", "getTransition", "(", "Long", "fromId", ",", "Integer", "eventType", ",", "String", "completionCode", ")", "{", "Transition", "ret", "=", "null", ";", "for", "(", "Transition", "transition", ":", "getTransitions", "(", ")", ")", "{", ...
Finds one work transition for this process matching the specified parameters @param fromId @param eventType @param completionCode @return the work transition value object (or null if not found)
[ "Finds", "one", "work", "transition", "for", "this", "process", "matching", "the", "specified", "parameters" ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/workflow/Process.java#L313-L327
junit-team/junit4
src/main/java/org/junit/rules/ErrorCollector.java
ErrorCollector.checkThrows
public void checkThrows(Class<? extends Throwable> expectedThrowable, ThrowingRunnable runnable) { try { assertThrows(expectedThrowable, runnable); } catch (AssertionError e) { addError(e); } }
java
public void checkThrows(Class<? extends Throwable> expectedThrowable, ThrowingRunnable runnable) { try { assertThrows(expectedThrowable, runnable); } catch (AssertionError e) { addError(e); } }
[ "public", "void", "checkThrows", "(", "Class", "<", "?", "extends", "Throwable", ">", "expectedThrowable", ",", "ThrowingRunnable", "runnable", ")", "{", "try", "{", "assertThrows", "(", "expectedThrowable", ",", "runnable", ")", ";", "}", "catch", "(", "Asser...
Adds a failure to the table if {@code runnable} does not throw an exception of type {@code expectedThrowable} when executed. Execution continues, but the test will fail at the end if the runnable does not throw an exception, or if it throws a different exception. @param expectedThrowable the expected type of the excep...
[ "Adds", "a", "failure", "to", "the", "table", "if", "{", "@code", "runnable", "}", "does", "not", "throw", "an", "exception", "of", "type", "{", "@code", "expectedThrowable", "}", "when", "executed", ".", "Execution", "continues", "but", "the", "test", "wi...
train
https://github.com/junit-team/junit4/blob/d9861ecdb6e487f6c352437ee823879aca3b81d4/src/main/java/org/junit/rules/ErrorCollector.java#L118-L124
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java
NodeIndexer.addLongValue
protected void addLongValue(Document doc, String fieldName, Object internalValue) { long longVal = ((Long)internalValue).longValue(); doc.add(createFieldWithoutNorms(fieldName, LongField.longToString(longVal), PropertyType.LONG)); }
java
protected void addLongValue(Document doc, String fieldName, Object internalValue) { long longVal = ((Long)internalValue).longValue(); doc.add(createFieldWithoutNorms(fieldName, LongField.longToString(longVal), PropertyType.LONG)); }
[ "protected", "void", "addLongValue", "(", "Document", "doc", ",", "String", "fieldName", ",", "Object", "internalValue", ")", "{", "long", "longVal", "=", "(", "(", "Long", ")", "internalValue", ")", ".", "longValue", "(", ")", ";", "doc", ".", "add", "(...
Adds the long value to the document as the named field. The long value is converted to an indexable string value using the {@link LongField} class. @param doc The document to which to add the field @param fieldName The name of the field to add @param internalValue The value for the field to add to the do...
[ "Adds", "the", "long", "value", "to", "the", "document", "as", "the", "named", "field", ".", "The", "long", "value", "is", "converted", "to", "an", "indexable", "string", "value", "using", "the", "{", "@link", "LongField", "}", "class", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java#L775-L779
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getWorldInfo
public void getWorldInfo(int[] ids, Callback<List<World>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ids)); gw2API.getWorldsInfo(processIds(ids), GuildWars2.lang.getValue()).enqueue(callback); }
java
public void getWorldInfo(int[] ids, Callback<List<World>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ids)); gw2API.getWorldsInfo(processIds(ids), GuildWars2.lang.getValue()).enqueue(callback); }
[ "public", "void", "getWorldInfo", "(", "int", "[", "]", "ids", ",", "Callback", "<", "List", "<", "World", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "(", "ids", "...
For more info on World API go <a href="https://wiki.guildwars2.com/wiki/API:2/worlds">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param ids list of world id @param callback callback that is going...
[ "For", "more", "info", "on", "World", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "worlds", ">", "here<", "/", "a", ">", "<br", "/", ">", "Give", "user", "th...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L2553-L2556
LearnLib/automatalib
commons/util/src/main/java/net/automatalib/commons/util/comparison/CmpUtil.java
CmpUtil.canonicalCompare
public static <U extends Comparable<? super U>> int canonicalCompare(List<? extends U> o1, List<? extends U> o2) { int siz1 = o1.size(), siz2 = o2.size(); if (siz1 != siz2) { return siz1 - siz2; } return lexCompare(o1, o2); }
java
public static <U extends Comparable<? super U>> int canonicalCompare(List<? extends U> o1, List<? extends U> o2) { int siz1 = o1.size(), siz2 = o2.size(); if (siz1 != siz2) { return siz1 - siz2; } return lexCompare(o1, o2); }
[ "public", "static", "<", "U", "extends", "Comparable", "<", "?", "super", "U", ">", ">", "int", "canonicalCompare", "(", "List", "<", "?", "extends", "U", ">", "o1", ",", "List", "<", "?", "extends", "U", ">", "o2", ")", "{", "int", "siz1", "=", ...
Compares two {@link List}s of {@link Comparable} elements with respect to canonical ordering. <p> In canonical ordering, a sequence {@code o1} is less than a sequence {@code o2} if {@code o1} is shorter than {@code o2}, or if they have the same length and {@code o1} is lexicographically smaller than {@code o2}. @param...
[ "Compares", "two", "{", "@link", "List", "}", "s", "of", "{", "@link", "Comparable", "}", "elements", "with", "respect", "to", "canonical", "ordering", ".", "<p", ">", "In", "canonical", "ordering", "a", "sequence", "{", "@code", "o1", "}", "is", "less",...
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/commons/util/src/main/java/net/automatalib/commons/util/comparison/CmpUtil.java#L80-L87
Jasig/uPortal
uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java
PropertiesManager.getPropertyAsBoolean
public static boolean getPropertyAsBoolean(final String name, final boolean defaultValue) { if (PropertiesManager.props == null) loadProps(); boolean returnValue = defaultValue; try { returnValue = getPropertyAsBoolean(name); } catch (MissingPropertyException mpe) { ...
java
public static boolean getPropertyAsBoolean(final String name, final boolean defaultValue) { if (PropertiesManager.props == null) loadProps(); boolean returnValue = defaultValue; try { returnValue = getPropertyAsBoolean(name); } catch (MissingPropertyException mpe) { ...
[ "public", "static", "boolean", "getPropertyAsBoolean", "(", "final", "String", "name", ",", "final", "boolean", "defaultValue", ")", "{", "if", "(", "PropertiesManager", ".", "props", "==", "null", ")", "loadProps", "(", ")", ";", "boolean", "returnValue", "="...
Get a property as a boolean, specifying a default value. If for any reason we are unable to lookup the desired property, this method returns the supplied default value. This error handling behavior makes this method suitable for calling from static initializers. @param name - the name of the property to be accessed @p...
[ "Get", "a", "property", "as", "a", "boolean", "specifying", "a", "default", "value", ".", "If", "for", "any", "reason", "we", "are", "unable", "to", "lookup", "the", "desired", "property", "this", "method", "returns", "the", "supplied", "default", "value", ...
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java#L350-L359
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java
OrderItemUrl.updateItemProductPriceUrl
public static MozuUrl updateItemProductPriceUrl(String orderId, String orderItemId, Double price, String responseFields, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/items/{orderItemId}/price/{price}?updatemode={updateMode}&version={version}&respons...
java
public static MozuUrl updateItemProductPriceUrl(String orderId, String orderItemId, Double price, String responseFields, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/items/{orderItemId}/price/{price}?updatemode={updateMode}&version={version}&respons...
[ "public", "static", "MozuUrl", "updateItemProductPriceUrl", "(", "String", "orderId", ",", "String", "orderItemId", ",", "Double", "price", ",", "String", "responseFields", ",", "String", "updateMode", ",", "String", "version", ")", "{", "UrlFormatter", "formatter",...
Get Resource Url for UpdateItemProductPrice @param orderId Unique identifier of the order. @param orderItemId Unique identifier of the item to remove from the order. @param price The override price to specify for this item in the specified order. @param responseFields Filtering syntax appended to an API call to increas...
[ "Get", "Resource", "Url", "for", "UpdateItemProductPrice" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java#L163-L173
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/util/LineInput.java
LineInput.readLine
public int readLine(byte[] b,int off,int len) throws IOException { len=fillLine(len); if (len<0) return -1; if (len==0) return 0; System.arraycopy(_buf,_mark, b, off, len); _mark=-1; return len; }
java
public int readLine(byte[] b,int off,int len) throws IOException { len=fillLine(len); if (len<0) return -1; if (len==0) return 0; System.arraycopy(_buf,_mark, b, off, len); _mark=-1; return len; }
[ "public", "int", "readLine", "(", "byte", "[", "]", "b", ",", "int", "off", ",", "int", "len", ")", "throws", "IOException", "{", "len", "=", "fillLine", "(", "len", ")", ";", "if", "(", "len", "<", "0", ")", "return", "-", "1", ";", "if", "(",...
Read a line ended by CR, LF or CRLF. @param b Byte array to place the line into. @param off Offset into the buffer. @param len Maximum length of line. @return The length of the line or -1 for EOF. @exception IOException
[ "Read", "a", "line", "ended", "by", "CR", "LF", "or", "CRLF", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/LineInput.java#L251-L265
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/BigIntegerExtensions.java
BigIntegerExtensions.operator_divide
@Inline(value="$1.divide($2)") @Pure public static BigInteger operator_divide(BigInteger a, BigInteger b) { return a.divide(b); }
java
@Inline(value="$1.divide($2)") @Pure public static BigInteger operator_divide(BigInteger a, BigInteger b) { return a.divide(b); }
[ "@", "Inline", "(", "value", "=", "\"$1.divide($2)\"", ")", "@", "Pure", "public", "static", "BigInteger", "operator_divide", "(", "BigInteger", "a", ",", "BigInteger", "b", ")", "{", "return", "a", ".", "divide", "(", "b", ")", ";", "}" ]
The binary <code>divide</code> operator. @param a a BigInteger. May not be <code>null</code>. @param b a BigInteger. May not be <code>null</code>. @return <code>a.divide(b)</code> @throws NullPointerException if {@code a} or {@code b} is <code>null</code>.
[ "The", "binary", "<code", ">", "divide<", "/", "code", ">", "operator", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/BigIntegerExtensions.java#L116-L120
code4everything/util
src/main/java/com/zhazhapan/util/Checker.java
Checker.checkNull
public static Float checkNull(Float value, Float elseValue) { return isNull(value) ? elseValue : value; }
java
public static Float checkNull(Float value, Float elseValue) { return isNull(value) ? elseValue : value; }
[ "public", "static", "Float", "checkNull", "(", "Float", "value", ",", "Float", "elseValue", ")", "{", "return", "isNull", "(", "value", ")", "?", "elseValue", ":", "value", ";", "}" ]
检查Float是否为null @param value 值 @param elseValue 为null返回的值 @return {@link Float} @since 1.0.8
[ "检查Float是否为null" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/Checker.java#L1294-L1296
dasein-cloud/dasein-cloud-aws
src/main/java/org/dasein/cloud/aws/AWSCloud.java
AWSCloud.getV4Authorization
public String getV4Authorization( String accessKey, String secretKey, String action, String url, String serviceId, Map<String, String> headers, String bodyHash ) throws InternalException { serviceId = serviceId.toLowerCase(); String regionId = "us-east-1"; // default for IAM // if( ctx != null &&...
java
public String getV4Authorization( String accessKey, String secretKey, String action, String url, String serviceId, Map<String, String> headers, String bodyHash ) throws InternalException { serviceId = serviceId.toLowerCase(); String regionId = "us-east-1"; // default for IAM // if( ctx != null &&...
[ "public", "String", "getV4Authorization", "(", "String", "accessKey", ",", "String", "secretKey", ",", "String", "action", ",", "String", "url", ",", "String", "serviceId", ",", "Map", "<", "String", ",", "String", ">", "headers", ",", "String", "bodyHash", ...
Generates an AWS v4 signature authorization string @param accessKey Amazon credential @param secretKey Amazon credential @param action the HTTP method (GET, POST, etc) @param url the full URL for the request, including any query parameters @param serviceId the canonical name of the service targeted in the req...
[ "Generates", "an", "AWS", "v4", "signature", "authorization", "string" ]
train
https://github.com/dasein-cloud/dasein-cloud-aws/blob/05098574197a1f573f77447cadc39a76bf00b99d/src/main/java/org/dasein/cloud/aws/AWSCloud.java#L1015-L1042
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRSkeletonAnimation.java
GVRSkeletonAnimation.addChannel
public void addChannel(String boneName, GVRAnimationChannel channel) { int boneId = mSkeleton.getBoneIndex(boneName); if (boneId >= 0) { mBoneChannels[boneId] = channel; mSkeleton.setBoneOptions(boneId, GVRSkeleton.BONE_ANIMATE); Log.d("BONE", "Adding anim...
java
public void addChannel(String boneName, GVRAnimationChannel channel) { int boneId = mSkeleton.getBoneIndex(boneName); if (boneId >= 0) { mBoneChannels[boneId] = channel; mSkeleton.setBoneOptions(boneId, GVRSkeleton.BONE_ANIMATE); Log.d("BONE", "Adding anim...
[ "public", "void", "addChannel", "(", "String", "boneName", ",", "GVRAnimationChannel", "channel", ")", "{", "int", "boneId", "=", "mSkeleton", ".", "getBoneIndex", "(", "boneName", ")", ";", "if", "(", "boneId", ">=", "0", ")", "{", "mBoneChannels", "[", "...
Add a channel to the animation to animate the named bone. @param boneName name of bone to animate. @param channel The animation channel.
[ "Add", "a", "channel", "to", "the", "animation", "to", "animate", "the", "named", "bone", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRSkeletonAnimation.java#L105-L114
sai-pullabhotla/catatumbo
src/main/java/com/jmethods/catatumbo/impl/DefaultDatastoreWriter.java
DefaultDatastoreWriter.updateWithOptimisticLock
public <E> List<E> updateWithOptimisticLock(List<E> entities) { if (entities == null || entities.isEmpty()) { return new ArrayList<>(); } Class<?> entityClass = entities.get(0).getClass(); PropertyMetadata versionMetadata = EntityIntrospector.getVersionMetadata(entityClass); if (versionMetadat...
java
public <E> List<E> updateWithOptimisticLock(List<E> entities) { if (entities == null || entities.isEmpty()) { return new ArrayList<>(); } Class<?> entityClass = entities.get(0).getClass(); PropertyMetadata versionMetadata = EntityIntrospector.getVersionMetadata(entityClass); if (versionMetadat...
[ "public", "<", "E", ">", "List", "<", "E", ">", "updateWithOptimisticLock", "(", "List", "<", "E", ">", "entities", ")", "{", "if", "(", "entities", "==", "null", "||", "entities", ".", "isEmpty", "(", ")", ")", "{", "return", "new", "ArrayList", "<>...
Updates the given list of entities using optimistic locking feature, if the entities are set up to support optimistic locking. Otherwise, a normal update is performed. @param entities the entities to update @return the updated entities
[ "Updates", "the", "given", "list", "of", "entities", "using", "optimistic", "locking", "feature", "if", "the", "entities", "are", "set", "up", "to", "support", "optimistic", "locking", ".", "Otherwise", "a", "normal", "update", "is", "performed", "." ]
train
https://github.com/sai-pullabhotla/catatumbo/blob/96d4c6dce3a5009624f7112a398406914dd19165/src/main/java/com/jmethods/catatumbo/impl/DefaultDatastoreWriter.java#L235-L246
hector-client/hector
core/src/main/java/me/prettyprint/cassandra/service/template/ColumnFamilyTemplate.java
ColumnFamilyTemplate.countColumns
public int countColumns(K key, N start, N end, int max) { CountQuery<K, N> query = HFactory.createCountQuery(keyspace, keySerializer, topSerializer); query.setKey(key); query.setColumnFamily(columnFamily); query.setRange(start, end, max); return query.execute().get(); }
java
public int countColumns(K key, N start, N end, int max) { CountQuery<K, N> query = HFactory.createCountQuery(keyspace, keySerializer, topSerializer); query.setKey(key); query.setColumnFamily(columnFamily); query.setRange(start, end, max); return query.execute().get(); }
[ "public", "int", "countColumns", "(", "K", "key", ",", "N", "start", ",", "N", "end", ",", "int", "max", ")", "{", "CountQuery", "<", "K", ",", "N", ">", "query", "=", "HFactory", ".", "createCountQuery", "(", "keyspace", ",", "keySerializer", ",", "...
Counts columns in the specified range of a standard column family @param key @param start @param end @param max @return
[ "Counts", "columns", "in", "the", "specified", "range", "of", "a", "standard", "column", "family" ]
train
https://github.com/hector-client/hector/blob/a302e68ca8d91b45d332e8c9afd7d98030b54de1/core/src/main/java/me/prettyprint/cassandra/service/template/ColumnFamilyTemplate.java#L103-L110
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.setCertificateIssuerAsync
public ServiceFuture<IssuerBundle> setCertificateIssuerAsync(String vaultBaseUrl, String issuerName, String provider, final ServiceCallback<IssuerBundle> serviceCallback) { return ServiceFuture.fromResponse(setCertificateIssuerWithServiceResponseAsync(vaultBaseUrl, issuerName, provider), serviceCallback); }
java
public ServiceFuture<IssuerBundle> setCertificateIssuerAsync(String vaultBaseUrl, String issuerName, String provider, final ServiceCallback<IssuerBundle> serviceCallback) { return ServiceFuture.fromResponse(setCertificateIssuerWithServiceResponseAsync(vaultBaseUrl, issuerName, provider), serviceCallback); }
[ "public", "ServiceFuture", "<", "IssuerBundle", ">", "setCertificateIssuerAsync", "(", "String", "vaultBaseUrl", ",", "String", "issuerName", ",", "String", "provider", ",", "final", "ServiceCallback", "<", "IssuerBundle", ">", "serviceCallback", ")", "{", "return", ...
Sets the specified certificate issuer. The SetCertificateIssuer operation adds or updates the specified certificate issuer. This operation requires the certificates/setissuers permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param issuerName The name of the issuer. @param p...
[ "Sets", "the", "specified", "certificate", "issuer", ".", "The", "SetCertificateIssuer", "operation", "adds", "or", "updates", "the", "specified", "certificate", "issuer", ".", "This", "operation", "requires", "the", "certificates", "/", "setissuers", "permission", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L5915-L5917
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/html/Button.java
Button.addParameter
public void addParameter(String name, Object value, String facet) throws JspException { assert(name != null) : "Parameter 'name' must not be null"; if (_params == null) { _params = new HashMap(); } ParamHelper.addParam(_params, name, value); }
java
public void addParameter(String name, Object value, String facet) throws JspException { assert(name != null) : "Parameter 'name' must not be null"; if (_params == null) { _params = new HashMap(); } ParamHelper.addParam(_params, name, value); }
[ "public", "void", "addParameter", "(", "String", "name", ",", "Object", "value", ",", "String", "facet", ")", "throws", "JspException", "{", "assert", "(", "name", "!=", "null", ")", ":", "\"Parameter 'name' must not be null\"", ";", "if", "(", "_params", "=="...
Adds a URL parameter to the generated hyperlink. @param name the name of the parameter to be added. @param value the value of the parameter to be added (a String or String[]). @param facet
[ "Adds", "a", "URL", "parameter", "to", "the", "generated", "hyperlink", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/html/Button.java#L281-L290
mapsforge/mapsforge
mapsforge-map-android/src/main/java/org/mapsforge/map/android/util/AndroidUtil.java
AndroidUtil.getMinimumCacheSize
public static int getMinimumCacheSize(int tileSize, double overdrawFactor, int width, int height) { // height * overdrawFactor / tileSize calculates the number of tiles that would cover // the view port, adding 1 is required since we can have part tiles on either side, // adding 2 adds another r...
java
public static int getMinimumCacheSize(int tileSize, double overdrawFactor, int width, int height) { // height * overdrawFactor / tileSize calculates the number of tiles that would cover // the view port, adding 1 is required since we can have part tiles on either side, // adding 2 adds another r...
[ "public", "static", "int", "getMinimumCacheSize", "(", "int", "tileSize", ",", "double", "overdrawFactor", ",", "int", "width", ",", "int", "height", ")", "{", "// height * overdrawFactor / tileSize calculates the number of tiles that would cover", "// the view port, adding 1 i...
Compute the minimum cache size for a view, using the size of the map view. For the view size we use the frame buffer calculated dimension. @param tileSize the tile size @param overdrawFactor the overdraw factor applied to the mapview @param width the width of the map view @param height the heigh...
[ "Compute", "the", "minimum", "cache", "size", "for", "a", "view", "using", "the", "size", "of", "the", "map", "view", ".", "For", "the", "view", "size", "we", "use", "the", "frame", "buffer", "calculated", "dimension", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map-android/src/main/java/org/mapsforge/map/android/util/AndroidUtil.java#L391-L401
passwordmaker/java-passwordmaker-lib
src/main/java/org/daveware/passwordmaker/PasswordMaker.java
PasswordMaker.makePassword
public SecureUTF8String makePassword(final SecureUTF8String masterPassword, final Account account, final String inputText) throws Exception { return makePassword(masterPassword, account, inputText, account.getUsername()); }
java
public SecureUTF8String makePassword(final SecureUTF8String masterPassword, final Account account, final String inputText) throws Exception { return makePassword(masterPassword, account, inputText, account.getUsername()); }
[ "public", "SecureUTF8String", "makePassword", "(", "final", "SecureUTF8String", "masterPassword", ",", "final", "Account", "account", ",", "final", "String", "inputText", ")", "throws", "Exception", "{", "return", "makePassword", "(", "masterPassword", ",", "account",...
Generates a hash of the master password with settings from the account. It will use the username assigned to the account. @param masterPassword The password to use as a key for the various algorithms. @param account The account with the specific settings for the hash. @param inputText The text to use as th...
[ "Generates", "a", "hash", "of", "the", "master", "password", "with", "settings", "from", "the", "account", ".", "It", "will", "use", "the", "username", "assigned", "to", "the", "account", "." ]
train
https://github.com/passwordmaker/java-passwordmaker-lib/blob/18c22fca7dd9a47f08161425b85a5bd257afbb2b/src/main/java/org/daveware/passwordmaker/PasswordMaker.java#L377-L381
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DisasterRecoveryConfigurationsInner.java
DisasterRecoveryConfigurationsInner.createOrUpdateAsync
public Observable<DisasterRecoveryConfigurationInner> createOrUpdateAsync(String resourceGroupName, String serverName, String disasterRecoveryConfigurationName) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, disasterRecoveryConfigurationName).map(new Func1<ServiceResponse<Disaste...
java
public Observable<DisasterRecoveryConfigurationInner> createOrUpdateAsync(String resourceGroupName, String serverName, String disasterRecoveryConfigurationName) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, disasterRecoveryConfigurationName).map(new Func1<ServiceResponse<Disaste...
[ "public", "Observable", "<", "DisasterRecoveryConfigurationInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "disasterRecoveryConfigurationName", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(",...
Creates or updates a disaster recovery configuration. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param disasterRecoveryConfigurationName The name of the disas...
[ "Creates", "or", "updates", "a", "disaster", "recovery", "configuration", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DisasterRecoveryConfigurationsInner.java#L398-L405
rhuss/jolokia
client/java/src/main/java/org/jolokia/client/request/J4pRequestHandler.java
J4pRequestHandler.getHttpRequest
public <T extends J4pRequest> HttpUriRequest getHttpRequest(List<T> pRequests,Map<J4pQueryParameter,String> pProcessingOptions) throws UnsupportedEncodingException, URISyntaxException { JSONArray bulkRequest = new JSONArray(); String queryParams = prepareQueryParameters(pProcessingOptions); ...
java
public <T extends J4pRequest> HttpUriRequest getHttpRequest(List<T> pRequests,Map<J4pQueryParameter,String> pProcessingOptions) throws UnsupportedEncodingException, URISyntaxException { JSONArray bulkRequest = new JSONArray(); String queryParams = prepareQueryParameters(pProcessingOptions); ...
[ "public", "<", "T", "extends", "J4pRequest", ">", "HttpUriRequest", "getHttpRequest", "(", "List", "<", "T", ">", "pRequests", ",", "Map", "<", "J4pQueryParameter", ",", "String", ">", "pProcessingOptions", ")", "throws", "UnsupportedEncodingException", ",", "URIS...
Get an HTTP Request for requesting multiples requests at once @param pRequests requests to put into a HTTP request @return HTTP request to send to the server
[ "Get", "an", "HTTP", "Request", "for", "requesting", "multiples", "requests", "at", "once" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/client/java/src/main/java/org/jolokia/client/request/J4pRequestHandler.java#L132-L143
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java
Wikipedia.getPages
public Set<Page> getPages(String title) throws WikiApiException { Set<Integer> ids = new HashSet<Integer>(getPageIdsCaseInsensitive(title)); Set<Page> pages = new HashSet<Page>(); for (Integer id : ids) { pages.add(new Page(this, id)); } return pages; }
java
public Set<Page> getPages(String title) throws WikiApiException { Set<Integer> ids = new HashSet<Integer>(getPageIdsCaseInsensitive(title)); Set<Page> pages = new HashSet<Page>(); for (Integer id : ids) { pages.add(new Page(this, id)); } return pages; }
[ "public", "Set", "<", "Page", ">", "getPages", "(", "String", "title", ")", "throws", "WikiApiException", "{", "Set", "<", "Integer", ">", "ids", "=", "new", "HashSet", "<", "Integer", ">", "(", "getPageIdsCaseInsensitive", "(", "title", ")", ")", ";", "...
Get all pages which match all lowercase/uppercase version of the given title.<br> If the title is a redirect, the corresponding page is returned.<br> Spaces in the title are converted to underscores, as this is a convention for Wikipedia article titles. @param title The title of the page. @return A set of page objects...
[ "Get", "all", "pages", "which", "match", "all", "lowercase", "/", "uppercase", "version", "of", "the", "given", "title", ".", "<br", ">", "If", "the", "title", "is", "a", "redirect", "the", "corresponding", "page", "is", "returned", ".", "<br", ">", "Spa...
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java#L146-L154
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.asType
@SuppressWarnings("unchecked") public static <T> T asType(Object[] ary, Class<T> clazz) { if (clazz == List.class) { return (T) new ArrayList(Arrays.asList(ary)); } if (clazz == Set.class) { return (T) new HashSet(Arrays.asList(ary)); } if (clazz == So...
java
@SuppressWarnings("unchecked") public static <T> T asType(Object[] ary, Class<T> clazz) { if (clazz == List.class) { return (T) new ArrayList(Arrays.asList(ary)); } if (clazz == Set.class) { return (T) new HashSet(Arrays.asList(ary)); } if (clazz == So...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "asType", "(", "Object", "[", "]", "ary", ",", "Class", "<", "T", ">", "clazz", ")", "{", "if", "(", "clazz", "==", "List", ".", "class", ")", "{", "return"...
Converts the given array to either a List, Set, or SortedSet. If the given class is something else, the call is deferred to {@link #asType(Object,Class)}. @param ary an array @param clazz the desired class @return the object resulting from this type conversion @see #asType(java.lang.Object, java.lang.Class) @since ...
[ "Converts", "the", "given", "array", "to", "either", "a", "List", "Set", "or", "SortedSet", ".", "If", "the", "given", "class", "is", "something", "else", "the", "call", "is", "deferred", "to", "{", "@link", "#asType", "(", "Object", "Class", ")", "}", ...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L11747-L11760
google/closure-compiler
src/com/google/javascript/jscomp/CheckGlobalNames.java
CheckGlobalNames.checkForBadModuleReference
private boolean checkForBadModuleReference(Name name, Ref ref) { JSModuleGraph moduleGraph = compiler.getModuleGraph(); if (name.getGlobalSets() == 0 || ref.type == Ref.Type.SET_FROM_GLOBAL) { // Back off if either 1) this name was never set, or 2) this reference /is/ a set. return false; } ...
java
private boolean checkForBadModuleReference(Name name, Ref ref) { JSModuleGraph moduleGraph = compiler.getModuleGraph(); if (name.getGlobalSets() == 0 || ref.type == Ref.Type.SET_FROM_GLOBAL) { // Back off if either 1) this name was never set, or 2) this reference /is/ a set. return false; } ...
[ "private", "boolean", "checkForBadModuleReference", "(", "Name", "name", ",", "Ref", "ref", ")", "{", "JSModuleGraph", "moduleGraph", "=", "compiler", ".", "getModuleGraph", "(", ")", ";", "if", "(", "name", ".", "getGlobalSets", "(", ")", "==", "0", "||", ...
Returns true if this name is potentially referenced before being defined in a different module <p>For example: <ul> <li>Module B depends on Module A. name is set in Module A and referenced in Module B. this is fine, and this method returns false. <li>Module A and Module B are unrelated. name is set in Module A and re...
[ "Returns", "true", "if", "this", "name", "is", "potentially", "referenced", "before", "being", "defined", "in", "a", "different", "module" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/CheckGlobalNames.java#L229-L249
jbundle/webapp
base/src/main/java/org/jbundle/util/webapp/base/BaseWebappServlet.java
BaseWebappServlet.getRequestParam
public String getRequestParam(HttpServletRequest request, String param, String defaultValue) { String value = request.getParameter(servicePid + '.' + param); if ((value == null) && (properties != null)) value = properties.get(servicePid + '.' + param); if (value == null) ...
java
public String getRequestParam(HttpServletRequest request, String param, String defaultValue) { String value = request.getParameter(servicePid + '.' + param); if ((value == null) && (properties != null)) value = properties.get(servicePid + '.' + param); if (value == null) ...
[ "public", "String", "getRequestParam", "(", "HttpServletRequest", "request", ",", "String", "param", ",", "String", "defaultValue", ")", "{", "String", "value", "=", "request", ".", "getParameter", "(", "servicePid", "+", "'", "'", "+", "param", ")", ";", "i...
Get this param from the request or from the servlet's properties. @param request @param param @param defaultValue @return
[ "Get", "this", "param", "from", "the", "request", "or", "from", "the", "servlet", "s", "properties", "." ]
train
https://github.com/jbundle/webapp/blob/af2cf32bd92254073052f1f9b4bcd47c2f76ba7d/base/src/main/java/org/jbundle/util/webapp/base/BaseWebappServlet.java#L124-L136
sporniket/core
sporniket-core-io/src/main/java/com/sporniket/libre/io/AbstractTextFileConverter.java
AbstractTextFileConverter.openOutputFile
private void openOutputFile(final String outputFileName) throws IOException { myOutputFile = new File(outputFileName); myOutputStream = new FileOutputStream(myOutputFile); myStreamWriter = new OutputStreamWriter(myOutputStream, getOutputEncodingCode()); myBufferedWriter = new BufferedWriter(myStreamWriter); }
java
private void openOutputFile(final String outputFileName) throws IOException { myOutputFile = new File(outputFileName); myOutputStream = new FileOutputStream(myOutputFile); myStreamWriter = new OutputStreamWriter(myOutputStream, getOutputEncodingCode()); myBufferedWriter = new BufferedWriter(myStreamWriter); }
[ "private", "void", "openOutputFile", "(", "final", "String", "outputFileName", ")", "throws", "IOException", "{", "myOutputFile", "=", "new", "File", "(", "outputFileName", ")", ";", "myOutputStream", "=", "new", "FileOutputStream", "(", "myOutputFile", ")", ";", ...
Prepare the output stream. @param outputFileName the file to write into. @throws IOException if a problem occurs.
[ "Prepare", "the", "output", "stream", "." ]
train
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-io/src/main/java/com/sporniket/libre/io/AbstractTextFileConverter.java#L420-L426
nguyenq/tess4j
src/main/java/net/sourceforge/tess4j/util/PdfGsUtilities.java
PdfGsUtilities.convertPdf2Png
public synchronized static File[] convertPdf2Png(File inputPdfFile) throws IOException { Path path = Files.createTempDirectory("tessimages"); File imageDir = path.toFile(); //get Ghostscript instance Ghostscript gs = Ghostscript.getInstance(); //prepare Ghostscript inter...
java
public synchronized static File[] convertPdf2Png(File inputPdfFile) throws IOException { Path path = Files.createTempDirectory("tessimages"); File imageDir = path.toFile(); //get Ghostscript instance Ghostscript gs = Ghostscript.getInstance(); //prepare Ghostscript inter...
[ "public", "synchronized", "static", "File", "[", "]", "convertPdf2Png", "(", "File", "inputPdfFile", ")", "throws", "IOException", "{", "Path", "path", "=", "Files", ".", "createTempDirectory", "(", "\"tessimages\"", ")", ";", "File", "imageDir", "=", "path", ...
Converts PDF to PNG format. @param inputPdfFile input file @return an array of PNG images @throws java.io.IOException
[ "Converts", "PDF", "to", "PNG", "format", "." ]
train
https://github.com/nguyenq/tess4j/blob/cfcd4a8a44042f150b4aaf7bdf5ffc485a2236e1/src/main/java/net/sourceforge/tess4j/util/PdfGsUtilities.java#L80-L147
jboss-integration/fuse-bxms-integ
switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/operation/KnowledgeOperations.java
KnowledgeOperations.setFaults
public static void setFaults(Message message, KnowledgeOperation operation, Map<String, Object> contextOverrides) { setOutputsOrFaults(message, operation.getFaultExpressionMappings(), contextOverrides, FAULT, false); }
java
public static void setFaults(Message message, KnowledgeOperation operation, Map<String, Object> contextOverrides) { setOutputsOrFaults(message, operation.getFaultExpressionMappings(), contextOverrides, FAULT, false); }
[ "public", "static", "void", "setFaults", "(", "Message", "message", ",", "KnowledgeOperation", "operation", ",", "Map", "<", "String", ",", "Object", ">", "contextOverrides", ")", "{", "setOutputsOrFaults", "(", "message", ",", "operation", ".", "getFaultExpressio...
Sets the faults. @param message the message @param operation the operation @param contextOverrides the context overrides
[ "Sets", "the", "faults", "." ]
train
https://github.com/jboss-integration/fuse-bxms-integ/blob/ca5c012bf867ea15d1250f0991af3cd7e708aaaf/switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/operation/KnowledgeOperations.java#L286-L288
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfSignatureAppearance.java
PdfSignatureAppearance.setCrypto
public void setCrypto(PrivateKey privKey, Certificate[] certChain, CRL[] crlList, PdfName filter) { this.privKey = privKey; this.certChain = certChain; this.crlList = crlList; this.filter = filter; }
java
public void setCrypto(PrivateKey privKey, Certificate[] certChain, CRL[] crlList, PdfName filter) { this.privKey = privKey; this.certChain = certChain; this.crlList = crlList; this.filter = filter; }
[ "public", "void", "setCrypto", "(", "PrivateKey", "privKey", ",", "Certificate", "[", "]", "certChain", ",", "CRL", "[", "]", "crlList", ",", "PdfName", "filter", ")", "{", "this", ".", "privKey", "=", "privKey", ";", "this", ".", "certChain", "=", "cert...
Sets the cryptographic parameters. @param privKey the private key @param certChain the certificate chain @param crlList the certificate revocation list. It may be <CODE>null</CODE> @param filter the crytographic filter type. It can be SELF_SIGNED, VERISIGN_SIGNED or WINCER_SIGNED
[ "Sets", "the", "cryptographic", "parameters", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfSignatureAppearance.java#L254-L259
VoltDB/voltdb
src/frontend/org/voltdb/iv2/Site.java
Site.handleUndoLog
private static void handleUndoLog(List<UndoAction> undoLog, boolean undo) { if (undoLog == null) { return; } if (undo) { undoLog = Lists.reverse(undoLog); } for (UndoAction action : undoLog) { if (undo) { action.undo(); ...
java
private static void handleUndoLog(List<UndoAction> undoLog, boolean undo) { if (undoLog == null) { return; } if (undo) { undoLog = Lists.reverse(undoLog); } for (UndoAction action : undoLog) { if (undo) { action.undo(); ...
[ "private", "static", "void", "handleUndoLog", "(", "List", "<", "UndoAction", ">", "undoLog", ",", "boolean", "undo", ")", "{", "if", "(", "undoLog", "==", "null", ")", "{", "return", ";", "}", "if", "(", "undo", ")", "{", "undoLog", "=", "Lists", "....
Java level related stuffs that are also needed to roll back @param undoLog @param undo
[ "Java", "level", "related", "stuffs", "that", "are", "also", "needed", "to", "roll", "back" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/Site.java#L1167-L1185
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/ColorNames.java
ColorNames.getColorFromName
@Pure public static int getColorFromName(String colorName, int defaultValue) { final Integer value = COLOR_MATCHES.get(Strings.nullToEmpty(colorName).toLowerCase()); if (value != null) { return value.intValue(); } return defaultValue; }
java
@Pure public static int getColorFromName(String colorName, int defaultValue) { final Integer value = COLOR_MATCHES.get(Strings.nullToEmpty(colorName).toLowerCase()); if (value != null) { return value.intValue(); } return defaultValue; }
[ "@", "Pure", "public", "static", "int", "getColorFromName", "(", "String", "colorName", ",", "int", "defaultValue", ")", "{", "final", "Integer", "value", "=", "COLOR_MATCHES", ".", "get", "(", "Strings", ".", "nullToEmpty", "(", "colorName", ")", ".", "toLo...
Replies the color value for the given color name. <p>See the documentation of the {@link #ColorNames} type for obtaining a list of the colors. @param colorName the color name. @param defaultValue if the given name does not corresponds to a known color, this value is replied. @return the color value.
[ "Replies", "the", "color", "value", "for", "the", "given", "color", "name", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/ColorNames.java#L541-L548
Coveros/selenified
src/main/java/com/coveros/selenified/application/App.java
App.newElement
public Element newElement(Locator type, String locator) { return new Element(driver, reporter, type, locator); }
java
public Element newElement(Locator type, String locator) { return new Element(driver, reporter, type, locator); }
[ "public", "Element", "newElement", "(", "Locator", "type", ",", "String", "locator", ")", "{", "return", "new", "Element", "(", "driver", ",", "reporter", ",", "type", ",", "locator", ")", ";", "}" ]
setups a new element which is located on the page @param type - the locator type e.g. Locator.id, Locator.xpath @param locator - the locator string e.g. login, //input[@id='login'] @return Element: a page element to interact with
[ "setups", "a", "new", "element", "which", "is", "located", "on", "the", "page" ]
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/application/App.java#L135-L137
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java
ComputeNodeOperations.deleteComputeNodeUser
public void deleteComputeNodeUser(String poolId, String nodeId, String userName) throws BatchErrorException, IOException { deleteComputeNodeUser(poolId, nodeId, userName, null); }
java
public void deleteComputeNodeUser(String poolId, String nodeId, String userName) throws BatchErrorException, IOException { deleteComputeNodeUser(poolId, nodeId, userName, null); }
[ "public", "void", "deleteComputeNodeUser", "(", "String", "poolId", ",", "String", "nodeId", ",", "String", "userName", ")", "throws", "BatchErrorException", ",", "IOException", "{", "deleteComputeNodeUser", "(", "poolId", ",", "nodeId", ",", "userName", ",", "nul...
Deletes the specified user account from the specified compute node. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node where the user account will be deleted. @param userName The name of the user account to be deleted. @throws BatchErrorException Exception thrown ...
[ "Deletes", "the", "specified", "user", "account", "from", "the", "specified", "compute", "node", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java#L113-L115
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/VoiceApi.java
VoiceApi.resumeRecording
public ApiSuccessResponse resumeRecording(String id, ResumeRecordingBody resumeRecordingBody) throws ApiException { ApiResponse<ApiSuccessResponse> resp = resumeRecordingWithHttpInfo(id, resumeRecordingBody); return resp.getData(); }
java
public ApiSuccessResponse resumeRecording(String id, ResumeRecordingBody resumeRecordingBody) throws ApiException { ApiResponse<ApiSuccessResponse> resp = resumeRecordingWithHttpInfo(id, resumeRecordingBody); return resp.getData(); }
[ "public", "ApiSuccessResponse", "resumeRecording", "(", "String", "id", ",", "ResumeRecordingBody", "resumeRecordingBody", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "resumeRecordingWithHttpInfo", "(", "id", ",", "res...
Resume recording a call Resume recording the specified call. @param id The connection ID of the call. (required) @param resumeRecordingBody Request parameters. (optional) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Resume", "recording", "a", "call", "Resume", "recording", "the", "specified", "call", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/VoiceApi.java#L3102-L3105
wcm-io/wcm-io-handler
media/src/main/java/io/wcm/handler/mediasource/dam/impl/DefaultRenditionHandler.java
DefaultRenditionHandler.addRendition
private void addRendition(Set<RenditionMetadata> candidates, Rendition rendition, MediaArgs mediaArgs) { // ignore AEM-generated thumbnail renditions unless allowed via mediaargs if (!mediaArgs.isIncludeAssetThumbnails() && AssetRendition.isThumbnailRendition(rendition)) { return; } // ignore AEM-...
java
private void addRendition(Set<RenditionMetadata> candidates, Rendition rendition, MediaArgs mediaArgs) { // ignore AEM-generated thumbnail renditions unless allowed via mediaargs if (!mediaArgs.isIncludeAssetThumbnails() && AssetRendition.isThumbnailRendition(rendition)) { return; } // ignore AEM-...
[ "private", "void", "addRendition", "(", "Set", "<", "RenditionMetadata", ">", "candidates", ",", "Rendition", "rendition", ",", "MediaArgs", "mediaArgs", ")", "{", "// ignore AEM-generated thumbnail renditions unless allowed via mediaargs", "if", "(", "!", "mediaArgs", "....
adds rendition to the list of candidates, if it should be available for resolving @param candidates @param rendition
[ "adds", "rendition", "to", "the", "list", "of", "candidates", "if", "it", "should", "be", "available", "for", "resolving" ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/mediasource/dam/impl/DefaultRenditionHandler.java#L94-L108
wwadge/bonecp
bonecp/src/main/java/com/jolbox/bonecp/StatementCache.java
StatementCache.calculateCacheKey
public String calculateCacheKey(String sql, int[] columnIndexes) { StringBuilder tmp = new StringBuilder(sql.length()+4); tmp.append(sql); for (int i=0; i < columnIndexes.length; i++){ tmp.append(columnIndexes[i]); tmp.append("CI,"); } return tmp.toString(); }
java
public String calculateCacheKey(String sql, int[] columnIndexes) { StringBuilder tmp = new StringBuilder(sql.length()+4); tmp.append(sql); for (int i=0; i < columnIndexes.length; i++){ tmp.append(columnIndexes[i]); tmp.append("CI,"); } return tmp.toString(); }
[ "public", "String", "calculateCacheKey", "(", "String", "sql", ",", "int", "[", "]", "columnIndexes", ")", "{", "StringBuilder", "tmp", "=", "new", "StringBuilder", "(", "sql", ".", "length", "(", ")", "+", "4", ")", ";", "tmp", ".", "append", "(", "sq...
Calculate a cache key. @param sql to use @param columnIndexes to use @return cache key to use.
[ "Calculate", "a", "cache", "key", "." ]
train
https://github.com/wwadge/bonecp/blob/74bc3287025fc137ca28909f0f7693edae37a15d/bonecp/src/main/java/com/jolbox/bonecp/StatementCache.java#L127-L135
UrielCh/ovh-java-sdk
ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/ApiOvhPrice.java
ApiOvhPrice.dedicated_server_antiDDoSPro_commercialRange_GET
public OvhPrice dedicated_server_antiDDoSPro_commercialRange_GET(net.minidev.ovh.api.price.dedicated.server.OvhAntiDDoSProEnum commercialRange) throws IOException { String qPath = "/price/dedicated/server/antiDDoSPro/{commercialRange}"; StringBuilder sb = path(qPath, commercialRange); String resp = exec(qPath, "G...
java
public OvhPrice dedicated_server_antiDDoSPro_commercialRange_GET(net.minidev.ovh.api.price.dedicated.server.OvhAntiDDoSProEnum commercialRange) throws IOException { String qPath = "/price/dedicated/server/antiDDoSPro/{commercialRange}"; StringBuilder sb = path(qPath, commercialRange); String resp = exec(qPath, "G...
[ "public", "OvhPrice", "dedicated_server_antiDDoSPro_commercialRange_GET", "(", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "price", ".", "dedicated", ".", "server", ".", "OvhAntiDDoSProEnum", "commercialRange", ")", "throws", "IOException", "{", "String", "q...
Get price of anti-DDos Pro option REST: GET /price/dedicated/server/antiDDoSPro/{commercialRange} @param commercialRange [required] commercial range of your dedicated server
[ "Get", "price", "of", "anti", "-", "DDos", "Pro", "option" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/ApiOvhPrice.java#L102-L107
duracloud/duracloud
durastore/src/main/java/org/duracloud/durastore/rest/StoreRest.java
StoreRest.getStores
@GET public Response getStores() { String msg = "getting stores."; try { return doGetStores(msg); } catch (StorageException se) { return responseBad(msg, se); } catch (Exception e) { return responseBad(msg, e); } }
java
@GET public Response getStores() { String msg = "getting stores."; try { return doGetStores(msg); } catch (StorageException se) { return responseBad(msg, se); } catch (Exception e) { return responseBad(msg, e); } }
[ "@", "GET", "public", "Response", "getStores", "(", ")", "{", "String", "msg", "=", "\"getting stores.\"", ";", "try", "{", "return", "doGetStores", "(", "msg", ")", ";", "}", "catch", "(", "StorageException", "se", ")", "{", "return", "responseBad", "(", ...
Provides a listing of all available storage provider accounts @return 200 response with XML file listing stores
[ "Provides", "a", "listing", "of", "all", "available", "storage", "provider", "accounts" ]
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/durastore/src/main/java/org/duracloud/durastore/rest/StoreRest.java#L49-L61
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/fastpath/Fastpath.java
Fastpath.getOID
public long getOID(String name, FastpathArg[] args) throws SQLException { long oid = getInteger(name, args); if (oid < 0) { oid += NUM_OIDS; } return oid; }
java
public long getOID(String name, FastpathArg[] args) throws SQLException { long oid = getInteger(name, args); if (oid < 0) { oid += NUM_OIDS; } return oid; }
[ "public", "long", "getOID", "(", "String", "name", ",", "FastpathArg", "[", "]", "args", ")", "throws", "SQLException", "{", "long", "oid", "=", "getInteger", "(", "name", ",", "args", ")", ";", "if", "(", "oid", "<", "0", ")", "{", "oid", "+=", "N...
This convenience method assumes that the return value is an oid. @param name Function name @param args Function arguments @return oid of the given call @throws SQLException if a database-access error occurs or no result
[ "This", "convenience", "method", "assumes", "that", "the", "return", "value", "is", "an", "oid", "." ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/fastpath/Fastpath.java#L208-L214
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java
Infer.reportBoundError
void reportBoundError(UndetVar uv, InferenceBound ib1, InferenceBound ib2) { reportInferenceError( String.format("incompatible.%s.%s.bounds", StringUtils.toLowerCase(ib1.name()), StringUtils.toLowerCase(ib2.name())), uv.qtype, ...
java
void reportBoundError(UndetVar uv, InferenceBound ib1, InferenceBound ib2) { reportInferenceError( String.format("incompatible.%s.%s.bounds", StringUtils.toLowerCase(ib1.name()), StringUtils.toLowerCase(ib2.name())), uv.qtype, ...
[ "void", "reportBoundError", "(", "UndetVar", "uv", ",", "InferenceBound", "ib1", ",", "InferenceBound", "ib2", ")", "{", "reportInferenceError", "(", "String", ".", "format", "(", "\"incompatible.%s.%s.bounds\"", ",", "StringUtils", ".", "toLowerCase", "(", "ib1", ...
Incorporation error: mismatch between two (or more) bounds of different kinds.
[ "Incorporation", "error", ":", "mismatch", "between", "two", "(", "or", "more", ")", "bounds", "of", "different", "kinds", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java#L1290-L1298
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/security/TokenProvider.java
TokenProvider.createAzureActiveDirectoryTokenProvider
public static TokenProvider createAzureActiveDirectoryTokenProvider(String authorityUrl, String clientId, String clientSecret) throws MalformedURLException { AuthenticationContext authContext = createAuthenticationContext(authorityUrl); return new AzureActiveDirectoryTokenProvider(authContext, new C...
java
public static TokenProvider createAzureActiveDirectoryTokenProvider(String authorityUrl, String clientId, String clientSecret) throws MalformedURLException { AuthenticationContext authContext = createAuthenticationContext(authorityUrl); return new AzureActiveDirectoryTokenProvider(authContext, new C...
[ "public", "static", "TokenProvider", "createAzureActiveDirectoryTokenProvider", "(", "String", "authorityUrl", ",", "String", "clientId", ",", "String", "clientSecret", ")", "throws", "MalformedURLException", "{", "AuthenticationContext", "authContext", "=", "createAuthentica...
Creates an Azure Active Directory token provider that acquires a token from the given active directory instance using the given clientId and client secret. This is a utility method. @param authorityUrl URL of the Azure Active Directory instance @param clientId client id of the application @param clientSecret client sec...
[ "Creates", "an", "Azure", "Active", "Directory", "token", "provider", "that", "acquires", "a", "token", "from", "the", "given", "active", "directory", "instance", "using", "the", "given", "clientId", "and", "client", "secret", ".", "This", "is", "a", "utility"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/security/TokenProvider.java#L75-L79
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/hashing/DataHasher.java
DataHasher.addData
public final DataHasher addData(InputStream inStream, int bufferSize) { Util.notNull(inStream, "Input stream"); try { byte[] buffer = new byte[bufferSize]; while (true) { int bytesRead = inStream.read(buffer); if (bytesRead == -1) { ...
java
public final DataHasher addData(InputStream inStream, int bufferSize) { Util.notNull(inStream, "Input stream"); try { byte[] buffer = new byte[bufferSize]; while (true) { int bytesRead = inStream.read(buffer); if (bytesRead == -1) { ...
[ "public", "final", "DataHasher", "addData", "(", "InputStream", "inStream", ",", "int", "bufferSize", ")", "{", "Util", ".", "notNull", "(", "inStream", ",", "\"Input stream\"", ")", ";", "try", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "...
Adds data to the digest using the specified input stream of bytes, starting at an offset of 0. @param inStream input stream of bytes. @param bufferSize maximum allowed buffer size for reading data. @return The same {@link DataHasher} object for chaining calls. @throws HashException when hash calculation fai...
[ "Adds", "data", "to", "the", "digest", "using", "the", "specified", "input", "stream", "of", "bytes", "starting", "at", "an", "offset", "of", "0", "." ]
train
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/hashing/DataHasher.java#L218-L233
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java
ClassesManager.fieldName
public static String fieldName(Class<?> aClass,String regex){ if(isNestedMapping(regex)) return regex; String result = null; for(Class<?> clazz: getAllsuperClasses(aClass)) if(!isNull(result = getFieldName(clazz, regex))) return result; return result; }
java
public static String fieldName(Class<?> aClass,String regex){ if(isNestedMapping(regex)) return regex; String result = null; for(Class<?> clazz: getAllsuperClasses(aClass)) if(!isNull(result = getFieldName(clazz, regex))) return result; return result; }
[ "public", "static", "String", "fieldName", "(", "Class", "<", "?", ">", "aClass", ",", "String", "regex", ")", "{", "if", "(", "isNestedMapping", "(", "regex", ")", ")", "return", "regex", ";", "String", "result", "=", "null", ";", "for", "(", "Class",...
This method returns the name of the field whose name matches with regex. @param aClass a class to control @param regex field name @return true if exists a field with this name in aClass, false otherwise
[ "This", "method", "returns", "the", "name", "of", "the", "field", "whose", "name", "matches", "with", "regex", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java#L393-L405
bbossgroups/bboss-elasticsearch
bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java
RestClientUtil.mgetDocuments
public <T> List<T> mgetDocuments(String index, Class<T> type, Object... ids) throws ElasticSearchException{ return mgetDocuments( index, _doc,type, ids); }
java
public <T> List<T> mgetDocuments(String index, Class<T> type, Object... ids) throws ElasticSearchException{ return mgetDocuments( index, _doc,type, ids); }
[ "public", "<", "T", ">", "List", "<", "T", ">", "mgetDocuments", "(", "String", "index", ",", "Class", "<", "T", ">", "type", ",", "Object", "...", "ids", ")", "throws", "ElasticSearchException", "{", "return", "mgetDocuments", "(", "index", ",", "_doc",...
For Elasticsearch 7 and 7+ https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html @param index _mget test/_mget test/type/_mget test/type/_mget?stored_fields=field1,field2 _mget?routing=key1 @param type @param ids @param <T> @return @throws ElasticSearchException
[ "For", "Elasticsearch", "7", "and", "7", "+", "https", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "docs", "-", "multi", "-", "get", ".", "html" ]
train
https://github.com/bbossgroups/bboss-elasticsearch/blob/31717c8aa2c4c880987be53aeeb8a0cf5183c3a7/bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java#L5085-L5087
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/FileSystem.java
FileSystem.globPathsLevel
private Path[] globPathsLevel(Path[] parents, String[] filePattern, int level, boolean[] hasGlob) throws IOException { if (level == filePattern.length - 1) return parents; if (parents == null || parents.length == 0) { return null; } GlobFilter fp = new GlobFilter(filePattern[level]); ...
java
private Path[] globPathsLevel(Path[] parents, String[] filePattern, int level, boolean[] hasGlob) throws IOException { if (level == filePattern.length - 1) return parents; if (parents == null || parents.length == 0) { return null; } GlobFilter fp = new GlobFilter(filePattern[level]); ...
[ "private", "Path", "[", "]", "globPathsLevel", "(", "Path", "[", "]", "parents", ",", "String", "[", "]", "filePattern", ",", "int", "level", ",", "boolean", "[", "]", "hasGlob", ")", "throws", "IOException", "{", "if", "(", "level", "==", "filePattern",...
/* For a path of N components, return a list of paths that match the components [<code>level</code>, <code>N-1</code>].
[ "/", "*", "For", "a", "path", "of", "N", "components", "return", "a", "list", "of", "paths", "that", "match", "the", "components", "[", "<code", ">", "level<", "/", "code", ">", "<code", ">", "N", "-", "1<", "/", "code", ">", "]", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/FileSystem.java#L1422-L1439
micronaut-projects/micronaut-core
inject/src/main/java/io/micronaut/inject/configuration/ConfigurationMetadataBuilder.java
ConfigurationMetadataBuilder.writeAttribute
static void writeAttribute(Writer out, String name, String value) throws IOException { out.write('"'); out.write(name); out.write("\":"); out.write(quote(value)); }
java
static void writeAttribute(Writer out, String name, String value) throws IOException { out.write('"'); out.write(name); out.write("\":"); out.write(quote(value)); }
[ "static", "void", "writeAttribute", "(", "Writer", "out", ",", "String", "name", ",", "String", "value", ")", "throws", "IOException", "{", "out", ".", "write", "(", "'", "'", ")", ";", "out", ".", "write", "(", "name", ")", ";", "out", ".", "write",...
Write a quoted attribute with a value to a writer. @param out The out writer @param name The name of the attribute @param value The value @throws IOException If an error occurred writing output
[ "Write", "a", "quoted", "attribute", "with", "a", "value", "to", "a", "writer", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/configuration/ConfigurationMetadataBuilder.java#L261-L266
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/flowidprocessor/FlowIdSoapCodec.java
FlowIdSoapCodec.writeFlowId
public static void writeFlowId(Message message, String flowId) { if (!(message instanceof SoapMessage)) { return; } SoapMessage soapMessage = (SoapMessage)message; Header hdFlowId = soapMessage.getHeader(FLOW_ID_QNAME); if (hdFlowId != null) { LOG.warning(...
java
public static void writeFlowId(Message message, String flowId) { if (!(message instanceof SoapMessage)) { return; } SoapMessage soapMessage = (SoapMessage)message; Header hdFlowId = soapMessage.getHeader(FLOW_ID_QNAME); if (hdFlowId != null) { LOG.warning(...
[ "public", "static", "void", "writeFlowId", "(", "Message", "message", ",", "String", "flowId", ")", "{", "if", "(", "!", "(", "message", "instanceof", "SoapMessage", ")", ")", "{", "return", ";", "}", "SoapMessage", "soapMessage", "=", "(", "SoapMessage", ...
Write flow id to message. @param message the message @param flowId the flow id
[ "Write", "flow", "id", "to", "message", "." ]
train
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/flowidprocessor/FlowIdSoapCodec.java#L81-L102
tzaeschke/zoodb
src/org/zoodb/jdo/spi/PersistenceCapableImpl.java
PersistenceCapableImpl.jdoCopyKeyFieldsFromObjectId
@Override public void jdoCopyKeyFieldsFromObjectId (ObjectIdFieldConsumer fc, Object oid) { fc.storeIntField (2, ((IntIdentity)oid).getKey()); }
java
@Override public void jdoCopyKeyFieldsFromObjectId (ObjectIdFieldConsumer fc, Object oid) { fc.storeIntField (2, ((IntIdentity)oid).getKey()); }
[ "@", "Override", "public", "void", "jdoCopyKeyFieldsFromObjectId", "(", "ObjectIdFieldConsumer", "fc", ",", "Object", "oid", ")", "{", "fc", ".", "storeIntField", "(", "2", ",", "(", "(", "IntIdentity", ")", "oid", ")", ".", "getKey", "(", ")", ")", ";", ...
The generated methods copy key fields from the object id instance to the PersistenceCapable instance or to the ObjectIdFieldConsumer.
[ "The", "generated", "methods", "copy", "key", "fields", "from", "the", "object", "id", "instance", "to", "the", "PersistenceCapable", "instance", "or", "to", "the", "ObjectIdFieldConsumer", "." ]
train
https://github.com/tzaeschke/zoodb/blob/058d0ff161a8ee9d53244c433aca97ee9c654410/src/org/zoodb/jdo/spi/PersistenceCapableImpl.java#L514-L517
landawn/AbacusUtil
src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java
PoolablePreparedStatement.setBlob
@Override public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException { internalStmt.setBlob(parameterIndex, inputStream, length); }
java
@Override public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException { internalStmt.setBlob(parameterIndex, inputStream, length); }
[ "@", "Override", "public", "void", "setBlob", "(", "int", "parameterIndex", ",", "InputStream", "inputStream", ",", "long", "length", ")", "throws", "SQLException", "{", "internalStmt", ".", "setBlob", "(", "parameterIndex", ",", "inputStream", ",", "length", ")...
Method setBlob. @param parameterIndex @param inputStream @param length @throws SQLException @see java.sql.PreparedStatement#setBlob(int, InputStream, long)
[ "Method", "setBlob", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java#L578-L581
pwheel/spring-security-oauth2-client
src/main/java/com/racquettrack/security/oauth/OAuth2AuthenticationFilter.java
OAuth2AuthenticationFilter.attemptAuthentication
@Override public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException, IOException, ServletException { String code = null; if (LOG.isDebugEnabled()) { String url = request.getRequestURI(); String query...
java
@Override public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException, IOException, ServletException { String code = null; if (LOG.isDebugEnabled()) { String url = request.getRequestURI(); String query...
[ "@", "Override", "public", "Authentication", "attemptAuthentication", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "AuthenticationException", ",", "IOException", ",", "ServletException", "{", "String", "code", "=", "null", ...
Performs actual authentication. <p> The implementation should do one of the following: <ol> <li>Return a populated authentication token for the authenticated user, indicating successful authentication</li> <li>Return null, indicating that the authentication process is still in progress. Before returning, the implementa...
[ "Performs", "actual", "authentication", ".", "<p", ">", "The", "implementation", "should", "do", "one", "of", "the", "following", ":", "<ol", ">", "<li", ">", "Return", "a", "populated", "authentication", "token", "for", "the", "authenticated", "user", "indica...
train
https://github.com/pwheel/spring-security-oauth2-client/blob/c0258823493e268495c9752c5d752f74c6809c6b/src/main/java/com/racquettrack/security/oauth/OAuth2AuthenticationFilter.java#L64-L97
grails/grails-core
grails-core/src/main/groovy/grails/util/GrailsClassUtils.java
GrailsClassUtils.getPropertyValueOfNewInstance
@SuppressWarnings({ "unchecked", "rawtypes" }) public static Object getPropertyValueOfNewInstance(Class clazz, String propertyName, Class<?> propertyType) { // validate if (clazz == null || !StringUtils.hasText(propertyName)) { return null; } try { return get...
java
@SuppressWarnings({ "unchecked", "rawtypes" }) public static Object getPropertyValueOfNewInstance(Class clazz, String propertyName, Class<?> propertyType) { // validate if (clazz == null || !StringUtils.hasText(propertyName)) { return null; } try { return get...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "public", "static", "Object", "getPropertyValueOfNewInstance", "(", "Class", "clazz", ",", "String", "propertyName", ",", "Class", "<", "?", ">", "propertyType", ")", "{", "// val...
Returns the value of the specified property and type from an instance of the specified Grails class @param clazz The name of the class which contains the property @param propertyName The property name @param propertyType The property type @return The value of the property or null if none exists
[ "Returns", "the", "value", "of", "the", "specified", "property", "and", "type", "from", "an", "instance", "of", "the", "specified", "Grails", "class" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java#L220-L233
mapcode-foundation/mapcode-java
src/main/java/com/mapcode/Mapcode.java
Mapcode.convertStringToAlphabet
@Nonnull static String convertStringToAlphabet(@Nonnull final String string, @Nullable final Alphabet alphabet) throws IllegalArgumentException { return (alphabet != null) ? Decoder.encodeUTF16(string.toUpperCase(), alphabet.getNumber()) : string.toUpperCase(); }
java
@Nonnull static String convertStringToAlphabet(@Nonnull final String string, @Nullable final Alphabet alphabet) throws IllegalArgumentException { return (alphabet != null) ? Decoder.encodeUTF16(string.toUpperCase(), alphabet.getNumber()) : string.toUpperCase(); }
[ "@", "Nonnull", "static", "String", "convertStringToAlphabet", "(", "@", "Nonnull", "final", "String", "string", ",", "@", "Nullable", "final", "Alphabet", "alphabet", ")", "throws", "IllegalArgumentException", "{", "return", "(", "alphabet", "!=", "null", ")", ...
Convert a string into the same string using a different (or the same) alphabet. @param string Any string. @param alphabet Alphabet to convert to, may contain Unicode characters. @return Converted mapcode. @throws IllegalArgumentException Thrown if string has incorrect syntax or if the string cannot be encoded in the...
[ "Convert", "a", "string", "into", "the", "same", "string", "using", "a", "different", "(", "or", "the", "same", ")", "alphabet", "." ]
train
https://github.com/mapcode-foundation/mapcode-java/blob/f12d4d9fbd460472ac0fff1f702f2ac716bc0ab8/src/main/java/com/mapcode/Mapcode.java#L393-L397
googleads/googleads-java-lib
modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/CsvFiles.java
CsvFiles.writeCsv
public static void writeCsv(List<String[]> csvData, String fileName) throws IOException { Preconditions.checkNotNull(csvData, "Null CSV data"); Preconditions.checkNotNull(fileName, "Null file name"); CSVWriter writer = null; try { writer = new CSVWriter(Files.newWriter(new File(fileName), Standar...
java
public static void writeCsv(List<String[]> csvData, String fileName) throws IOException { Preconditions.checkNotNull(csvData, "Null CSV data"); Preconditions.checkNotNull(fileName, "Null file name"); CSVWriter writer = null; try { writer = new CSVWriter(Files.newWriter(new File(fileName), Standar...
[ "public", "static", "void", "writeCsv", "(", "List", "<", "String", "[", "]", ">", "csvData", ",", "String", "fileName", ")", "throws", "IOException", "{", "Preconditions", ".", "checkNotNull", "(", "csvData", ",", "\"Null CSV data\"", ")", ";", "Preconditions...
Writes the CSV data located in {@code csvData} to the file located at {@code fileName}. @param csvData the CSV data including the header @param fileName the file to write the CSV data to @throws IOException if there was an error writing to the file @throws NullPointerException if {@code csvData == null} or {@code file...
[ "Writes", "the", "CSV", "data", "located", "in", "{", "@code", "csvData", "}", "to", "the", "file", "located", "at", "{", "@code", "fileName", "}", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/CsvFiles.java#L202-L217
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF6.java
CommonOps_DDF6.elementDiv
public static void elementDiv( DMatrix6x6 a , DMatrix6x6 b , DMatrix6x6 c ) { c.a11 = a.a11/b.a11; c.a12 = a.a12/b.a12; c.a13 = a.a13/b.a13; c.a14 = a.a14/b.a14; c.a15 = a.a15/b.a15; c.a16 = a.a16/b.a16; c.a21 = a.a21/b.a21; c.a22 = a.a22/b.a22; c.a23 = a.a23/b.a23; c.a24 = a.a24/b.a24; c.a25 = a.a25/b....
java
public static void elementDiv( DMatrix6x6 a , DMatrix6x6 b , DMatrix6x6 c ) { c.a11 = a.a11/b.a11; c.a12 = a.a12/b.a12; c.a13 = a.a13/b.a13; c.a14 = a.a14/b.a14; c.a15 = a.a15/b.a15; c.a16 = a.a16/b.a16; c.a21 = a.a21/b.a21; c.a22 = a.a22/b.a22; c.a23 = a.a23/b.a23; c.a24 = a.a24/b.a24; c.a25 = a.a25/b....
[ "public", "static", "void", "elementDiv", "(", "DMatrix6x6", "a", ",", "DMatrix6x6", "b", ",", "DMatrix6x6", "c", ")", "{", "c", ".", "a11", "=", "a", ".", "a11", "/", "b", ".", "a11", ";", "c", ".", "a12", "=", "a", ".", "a12", "/", "b", ".", ...
<p>Performs an element by element division operation:<br> <br> c<sub>ij</sub> = a<sub>ij</sub> / b<sub>ij</sub> <br> </p> @param a The left matrix in the division operation. Not modified. @param b The right matrix in the division operation. Not modified. @param c Where the results of the operation are stored. Modified.
[ "<p", ">", "Performs", "an", "element", "by", "element", "division", "operation", ":", "<br", ">", "<br", ">", "c<sub", ">", "ij<", "/", "sub", ">", "=", "a<sub", ">", "ij<", "/", "sub", ">", "/", "b<sub", ">", "ij<", "/", "sub", ">", "<br", ">",...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF6.java#L1883-L1890
Netflix/conductor
mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/MySQLMetadataDAO.java
MySQLMetadataDAO.getEventHandler
private EventHandler getEventHandler(Connection connection, String name) { final String READ_ONE_EVENT_HANDLER_QUERY = "SELECT json_data FROM meta_event_handler WHERE name = ?"; return query(connection, READ_ONE_EVENT_HANDLER_QUERY, q -> q.addParameter(name).executeAndFetchFirst(EventHa...
java
private EventHandler getEventHandler(Connection connection, String name) { final String READ_ONE_EVENT_HANDLER_QUERY = "SELECT json_data FROM meta_event_handler WHERE name = ?"; return query(connection, READ_ONE_EVENT_HANDLER_QUERY, q -> q.addParameter(name).executeAndFetchFirst(EventHa...
[ "private", "EventHandler", "getEventHandler", "(", "Connection", "connection", ",", "String", "name", ")", "{", "final", "String", "READ_ONE_EVENT_HANDLER_QUERY", "=", "\"SELECT json_data FROM meta_event_handler WHERE name = ?\"", ";", "return", "query", "(", "connection", ...
Retrieve a {@link EventHandler} by {@literal name}. @param connection The {@link Connection} to use for queries. @param name The {@code EventHandler} name to look for. @return {@literal null} if nothing is found, otherwise the {@code EventHandler}.
[ "Retrieve", "a", "{", "@link", "EventHandler", "}", "by", "{", "@literal", "name", "}", "." ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/MySQLMetadataDAO.java#L292-L297
kuali/kc-s2sgen
coeus-s2sgen-impl/src/main/java/org/kuali/coeus/s2sgen/impl/generate/support/RRBudget10V1_1Generator.java
RRBudget10V1_1Generator.setOthersForOtherDirectCosts
private void setOthersForOtherDirectCosts(OtherDirectCosts otherDirectCosts, BudgetPeriodDto periodInfo) { if (periodInfo != null && periodInfo.getOtherDirectCosts() != null) { for (OtherDirectCostInfoDto otherDirectCostInfo : periodInfo.getOtherDirectCosts()) { gov.grants.apply.form...
java
private void setOthersForOtherDirectCosts(OtherDirectCosts otherDirectCosts, BudgetPeriodDto periodInfo) { if (periodInfo != null && periodInfo.getOtherDirectCosts() != null) { for (OtherDirectCostInfoDto otherDirectCostInfo : periodInfo.getOtherDirectCosts()) { gov.grants.apply.form...
[ "private", "void", "setOthersForOtherDirectCosts", "(", "OtherDirectCosts", "otherDirectCosts", ",", "BudgetPeriodDto", "periodInfo", ")", "{", "if", "(", "periodInfo", "!=", "null", "&&", "periodInfo", ".", "getOtherDirectCosts", "(", ")", "!=", "null", ")", "{", ...
This method is to set Other type description and total cost OtherDirectCosts details in BudgetYearDataType based on BudgetPeriodInfo for the RRBudget10. @param otherDirectCosts otherDirectCosts xmlObject @param periodInfo (BudgetPeriodInfo) budget period entry.
[ "This", "method", "is", "to", "set", "Other", "type", "description", "and", "total", "cost", "OtherDirectCosts", "details", "in", "BudgetYearDataType", "based", "on", "BudgetPeriodInfo", "for", "the", "RRBudget10", "." ]
train
https://github.com/kuali/kc-s2sgen/blob/2886380e1e3cb8bdd732ba99b2afa6ffc630bb37/coeus-s2sgen-impl/src/main/java/org/kuali/coeus/s2sgen/impl/generate/support/RRBudget10V1_1Generator.java#L463-L477
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_user_userId_DELETE
public void project_serviceName_user_userId_DELETE(String serviceName, Long userId) throws IOException { String qPath = "/cloud/project/{serviceName}/user/{userId}"; StringBuilder sb = path(qPath, serviceName, userId); exec(qPath, "DELETE", sb.toString(), null); }
java
public void project_serviceName_user_userId_DELETE(String serviceName, Long userId) throws IOException { String qPath = "/cloud/project/{serviceName}/user/{userId}"; StringBuilder sb = path(qPath, serviceName, userId); exec(qPath, "DELETE", sb.toString(), null); }
[ "public", "void", "project_serviceName_user_userId_DELETE", "(", "String", "serviceName", ",", "Long", "userId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/user/{userId}\"", ";", "StringBuilder", "sb", "=", "path", "(", "q...
Delete user REST: DELETE /cloud/project/{serviceName}/user/{userId} @param serviceName [required] Service name @param userId [required] User id
[ "Delete", "user" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L432-L436