repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
aws/aws-sdk-java
aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/waiters/AmazonIdentityManagementWaiters.java
AmazonIdentityManagementWaiters.instanceProfileExists
public Waiter<GetInstanceProfileRequest> instanceProfileExists() { """ Builds a InstanceProfileExists waiter by using custom parameters waiterParameters and other parameters defined in the waiters specification, and then polls until it determines whether the resource entered the desired state or not, where polli...
java
public Waiter<GetInstanceProfileRequest> instanceProfileExists() { return new WaiterBuilder<GetInstanceProfileRequest, GetInstanceProfileResult>().withSdkFunction(new GetInstanceProfileFunction(client)) .withAcceptors(new HttpSuccessStatusAcceptor(WaiterState.SUCCESS), new HttpFailureStatusAcce...
[ "public", "Waiter", "<", "GetInstanceProfileRequest", ">", "instanceProfileExists", "(", ")", "{", "return", "new", "WaiterBuilder", "<", "GetInstanceProfileRequest", ",", "GetInstanceProfileResult", ">", "(", ")", ".", "withSdkFunction", "(", "new", "GetInstanceProfile...
Builds a InstanceProfileExists waiter by using custom parameters waiterParameters and other parameters defined in the waiters specification, and then polls until it determines whether the resource entered the desired state or not, where polling criteria is bound by either default polling strategy or custom polling stra...
[ "Builds", "a", "InstanceProfileExists", "waiter", "by", "using", "custom", "parameters", "waiterParameters", "and", "other", "parameters", "defined", "in", "the", "waiters", "specification", "and", "then", "polls", "until", "it", "determines", "whether", "the", "res...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/waiters/AmazonIdentityManagementWaiters.java#L64-L70
vdurmont/emoji-java
src/main/java/com/vdurmont/emoji/EmojiParser.java
EmojiParser.removeAllEmojisExcept
public static String removeAllEmojisExcept( String str, final Collection<Emoji> emojisToKeep ) { """ Removes all the emojis in a String except a provided set @param str the string to process @param emojisToKeep the emojis to keep in this string @return the string without the emojis that w...
java
public static String removeAllEmojisExcept( String str, final Collection<Emoji> emojisToKeep ) { EmojiTransformer emojiTransformer = new EmojiTransformer() { public String transform(UnicodeCandidate unicodeCandidate) { if (emojisToKeep.contains(unicodeCandidate.getEmoji())) { retur...
[ "public", "static", "String", "removeAllEmojisExcept", "(", "String", "str", ",", "final", "Collection", "<", "Emoji", ">", "emojisToKeep", ")", "{", "EmojiTransformer", "emojiTransformer", "=", "new", "EmojiTransformer", "(", ")", "{", "public", "String", "transf...
Removes all the emojis in a String except a provided set @param str the string to process @param emojisToKeep the emojis to keep in this string @return the string without the emojis that were removed
[ "Removes", "all", "the", "emojis", "in", "a", "String", "except", "a", "provided", "set" ]
train
https://github.com/vdurmont/emoji-java/blob/8cf5fbe0d7c1020b926791f2b342a263ed07bb0f/src/main/java/com/vdurmont/emoji/EmojiParser.java#L333-L348
steveash/jopenfst
src/main/java/com/github/steveash/jopenfst/FstInputOutput.java
FstInputOutput.writeFstToBinaryStream
public static void writeFstToBinaryStream(Fst fst, ObjectOutput out) throws IOException { """ Serializes the current Fst instance to an ObjectOutput @param out the ObjectOutput. It should be already be initialized by the caller. """ out.writeInt(CURRENT_VERSION); writeStringMap(fst.getInputSymbols()...
java
public static void writeFstToBinaryStream(Fst fst, ObjectOutput out) throws IOException { out.writeInt(CURRENT_VERSION); writeStringMap(fst.getInputSymbols(), out); writeStringMap(fst.getOutputSymbols(), out); out.writeBoolean(fst.isUsingStateSymbols()); // whether or not we used a state symbol table ...
[ "public", "static", "void", "writeFstToBinaryStream", "(", "Fst", "fst", ",", "ObjectOutput", "out", ")", "throws", "IOException", "{", "out", ".", "writeInt", "(", "CURRENT_VERSION", ")", ";", "writeStringMap", "(", "fst", ".", "getInputSymbols", "(", ")", ",...
Serializes the current Fst instance to an ObjectOutput @param out the ObjectOutput. It should be already be initialized by the caller.
[ "Serializes", "the", "current", "Fst", "instance", "to", "an", "ObjectOutput" ]
train
https://github.com/steveash/jopenfst/blob/4c675203015c1cfad2072556cb532b6edc73261d/src/main/java/com/github/steveash/jopenfst/FstInputOutput.java#L186-L220
cycorp/api-suite
core-api/src/main/java/com/cyc/kb/exception/KbObjectNotFoundException.java
KbObjectNotFoundException.fromThrowable
public static KbObjectNotFoundException fromThrowable(String message, Throwable cause) { """ Converts a Throwable to a KbObjectNotFoundException with the specified detail message. If the Throwable is a KbObjectNotFoundException and if the Throwable's message is identical to the one supplied, the Throwable will b...
java
public static KbObjectNotFoundException fromThrowable(String message, Throwable cause) { return (cause instanceof KbObjectNotFoundException && Objects.equals(message, cause.getMessage())) ? (KbObjectNotFoundException) cause : new KbObjectNotFoundException(message, cause); }
[ "public", "static", "KbObjectNotFoundException", "fromThrowable", "(", "String", "message", ",", "Throwable", "cause", ")", "{", "return", "(", "cause", "instanceof", "KbObjectNotFoundException", "&&", "Objects", ".", "equals", "(", "message", ",", "cause", ".", "...
Converts a Throwable to a KbObjectNotFoundException with the specified detail message. If the Throwable is a KbObjectNotFoundException and if the Throwable's message is identical to the one supplied, the Throwable will be passed through unmodified; otherwise, it will be wrapped in a new KbObjectNotFoundException with t...
[ "Converts", "a", "Throwable", "to", "a", "KbObjectNotFoundException", "with", "the", "specified", "detail", "message", ".", "If", "the", "Throwable", "is", "a", "KbObjectNotFoundException", "and", "if", "the", "Throwable", "s", "message", "is", "identical", "to", ...
train
https://github.com/cycorp/api-suite/blob/1d52affabc4635e3715a059e38741712cbdbf2d5/core-api/src/main/java/com/cyc/kb/exception/KbObjectNotFoundException.java#L65-L69
Netflix/spectator
spectator-api/src/main/java/com/netflix/spectator/api/Utils.java
Utils.getTagValue
public static String getTagValue(Id id, String k) { """ Returns the value associated with with a given key or null if no such key is present in the set of tags. @param id Identifier with a set of tags to search. @param k Key to search for. @return Value for the key or null if the key is not present. "...
java
public static String getTagValue(Id id, String k) { Preconditions.checkNotNull(id, "id"); return getTagValue(id.tags(), k); }
[ "public", "static", "String", "getTagValue", "(", "Id", "id", ",", "String", "k", ")", "{", "Preconditions", ".", "checkNotNull", "(", "id", ",", "\"id\"", ")", ";", "return", "getTagValue", "(", "id", ".", "tags", "(", ")", ",", "k", ")", ";", "}" ]
Returns the value associated with with a given key or null if no such key is present in the set of tags. @param id Identifier with a set of tags to search. @param k Key to search for. @return Value for the key or null if the key is not present.
[ "Returns", "the", "value", "associated", "with", "with", "a", "given", "key", "or", "null", "if", "no", "such", "key", "is", "present", "in", "the", "set", "of", "tags", "." ]
train
https://github.com/Netflix/spectator/blob/259318252770de3bad581b85adff187d8f2c6537/spectator-api/src/main/java/com/netflix/spectator/api/Utils.java#L97-L100
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/ra/inbound/impl/SibRaStringGenerator.java
SibRaStringGenerator.addField
void addField(final String name, final long value) throws IllegalStateException { """ Adds a string representation of the given long field. @param name the name of the field @param value the value of the field @throws IllegalStateException if the string representation has already been completed...
java
void addField(final String name, final long value) throws IllegalStateException { addField(name, Long.toString(value)); }
[ "void", "addField", "(", "final", "String", "name", ",", "final", "long", "value", ")", "throws", "IllegalStateException", "{", "addField", "(", "name", ",", "Long", ".", "toString", "(", "value", ")", ")", ";", "}" ]
Adds a string representation of the given long field. @param name the name of the field @param value the value of the field @throws IllegalStateException if the string representation has already been completed
[ "Adds", "a", "string", "representation", "of", "the", "given", "long", "field", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/ra/inbound/impl/SibRaStringGenerator.java#L131-L136
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/responder/responderpolicylabel_stats.java
responderpolicylabel_stats.get
public static responderpolicylabel_stats get(nitro_service service, String labelname) throws Exception { """ Use this API to fetch statistics of responderpolicylabel_stats resource of given name . """ responderpolicylabel_stats obj = new responderpolicylabel_stats(); obj.set_labelname(labelname); respond...
java
public static responderpolicylabel_stats get(nitro_service service, String labelname) throws Exception{ responderpolicylabel_stats obj = new responderpolicylabel_stats(); obj.set_labelname(labelname); responderpolicylabel_stats response = (responderpolicylabel_stats) obj.stat_resource(service); return response;...
[ "public", "static", "responderpolicylabel_stats", "get", "(", "nitro_service", "service", ",", "String", "labelname", ")", "throws", "Exception", "{", "responderpolicylabel_stats", "obj", "=", "new", "responderpolicylabel_stats", "(", ")", ";", "obj", ".", "set_labeln...
Use this API to fetch statistics of responderpolicylabel_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "responderpolicylabel_stats", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/responder/responderpolicylabel_stats.java#L149-L154
FitLayout/tools
src/main/java/org/fit/layout/tools/io/HTMLOutputOperator.java
HTMLOutputOperator.dumpTo
public void dumpTo(AreaTree tree, PrintWriter out) { """ Formats the complete area tree to an output stream. @param tree the area tree to be printed @param out a writer to be used for output """ if (produceHeader) { out.println("<!DOCTYPE html>"); out.println("<html>")...
java
public void dumpTo(AreaTree tree, PrintWriter out) { if (produceHeader) { out.println("<!DOCTYPE html>"); out.println("<html>"); out.println("<head>"); out.println("<title>" + tree.getRoot().getPage().getTitle() + "</title>"); out.println("...
[ "public", "void", "dumpTo", "(", "AreaTree", "tree", ",", "PrintWriter", "out", ")", "{", "if", "(", "produceHeader", ")", "{", "out", ".", "println", "(", "\"<!DOCTYPE html>\"", ")", ";", "out", ".", "println", "(", "\"<html>\"", ")", ";", "out", ".", ...
Formats the complete area tree to an output stream. @param tree the area tree to be printed @param out a writer to be used for output
[ "Formats", "the", "complete", "area", "tree", "to", "an", "output", "stream", "." ]
train
https://github.com/FitLayout/tools/blob/43a8e3f4ddf21a031d3ab7247b8d37310bda4856/src/main/java/org/fit/layout/tools/io/HTMLOutputOperator.java#L158-L177
Azure/azure-sdk-for-java
storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java
BlobContainersInner.deleteImmutabilityPolicyAsync
public Observable<ImmutabilityPolicyInner> deleteImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { """ Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this...
java
public Observable<ImmutabilityPolicyInner> deleteImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { return deleteImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).map(new Func1<ServiceResponseWithHeaders<...
[ "public", "Observable", "<", "ImmutabilityPolicyInner", ">", "deleteImmutabilityPolicyAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "containerName", ",", "String", "ifMatch", ")", "{", "return", "deleteImmutabilityPolicyWithService...
Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, only way is to delete the container after deleting all blobs inside the container. @param resourceGro...
[ "Aborts", "an", "unlocked", "immutability", "policy", ".", "The", "response", "of", "delete", "has", "immutabilityPeriodSinceCreationInDays", "set", "to", "0", ".", "ETag", "in", "If", "-", "Match", "is", "required", "for", "this", "operation", ".", "Deleting", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java#L1414-L1421
amaembo/streamex
src/main/java/one/util/streamex/StreamEx.java
StreamEx.intervalMap
public <U> StreamEx<U> intervalMap(BiPredicate<? super T, ? super T> sameInterval, BiFunction<? super T, ? super T, ? extends U> mapper) { """ Returns a stream consisting of results of applying the given function to the intervals created from the source elements. <p> This is a <a href="package-sum...
java
public <U> StreamEx<U> intervalMap(BiPredicate<? super T, ? super T> sameInterval, BiFunction<? super T, ? super T, ? extends U> mapper) { return collapseInternal(sameInterval, PairBox::single, (box, t) -> { box.b = t; return box; }, (left, right) -> { lef...
[ "public", "<", "U", ">", "StreamEx", "<", "U", ">", "intervalMap", "(", "BiPredicate", "<", "?", "super", "T", ",", "?", "super", "T", ">", "sameInterval", ",", "BiFunction", "<", "?", "super", "T", ",", "?", "super", "T", ",", "?", "extends", "U",...
Returns a stream consisting of results of applying the given function to the intervals created from the source elements. <p> This is a <a href="package-summary.html#StreamOps">quasi-intermediate</a> partial reduction operation. This operation is the same as {@code groupRuns(sameInterval).map(list -> mapper.apply(list....
[ "Returns", "a", "stream", "consisting", "of", "results", "of", "applying", "the", "given", "function", "to", "the", "intervals", "created", "from", "the", "source", "elements", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/StreamEx.java#L1741-L1750
alkacon/opencms-core
src/org/opencms/security/CmsRoleManager.java
CmsRoleManager.getManageableUsers
public List<CmsUser> getManageableUsers(CmsObject cms, String ouFqn, boolean includeSubOus) throws CmsException { """ Returns all users of organizational units for which the current user has the {@link CmsRole#ACCOUNT_MANAGER} role.<p> @param cms the current cms context @param ouFqn the fully qualified name o...
java
public List<CmsUser> getManageableUsers(CmsObject cms, String ouFqn, boolean includeSubOus) throws CmsException { return getManageableUsers(cms, ouFqn, includeSubOus, false); }
[ "public", "List", "<", "CmsUser", ">", "getManageableUsers", "(", "CmsObject", "cms", ",", "String", "ouFqn", ",", "boolean", "includeSubOus", ")", "throws", "CmsException", "{", "return", "getManageableUsers", "(", "cms", ",", "ouFqn", ",", "includeSubOus", ","...
Returns all users of organizational units for which the current user has the {@link CmsRole#ACCOUNT_MANAGER} role.<p> @param cms the current cms context @param ouFqn the fully qualified name of the organizational unit @param includeSubOus if sub organizational units should be included in the search @return a list of ...
[ "Returns", "all", "users", "of", "organizational", "units", "for", "which", "the", "current", "user", "has", "the", "{", "@link", "CmsRole#ACCOUNT_MANAGER", "}", "role", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/security/CmsRoleManager.java#L202-L205
jqm4gwt/jqm4gwt
library/src/main/java/com/sksamuel/jqm4gwt/toolbar/JQMHeader.java
JQMHeader.setRightButton
public JQMButton setRightButton(String text) { """ Creates a new {@link JQMButton} with the given text and then sets that button in the right slot. Any existing right button will be replaced. This button will not link to a page by default and therefore will only react if a click handler is registered. This is...
java
public JQMButton setRightButton(String text) { return setRightButton(text, (String) null, (DataIcon) null); }
[ "public", "JQMButton", "setRightButton", "(", "String", "text", ")", "{", "return", "setRightButton", "(", "text", ",", "(", "String", ")", "null", ",", "(", "DataIcon", ")", "null", ")", ";", "}" ]
Creates a new {@link JQMButton} with the given text and then sets that button in the right slot. Any existing right button will be replaced. This button will not link to a page by default and therefore will only react if a click handler is registered. This is useful if you want the button to do something other than na...
[ "Creates", "a", "new", "{", "@link", "JQMButton", "}", "with", "the", "given", "text", "and", "then", "sets", "that", "button", "in", "the", "right", "slot", ".", "Any", "existing", "right", "button", "will", "be", "replaced", "." ]
train
https://github.com/jqm4gwt/jqm4gwt/blob/cf59958e9ba6d4b70f42507b2c77f10c2465085b/library/src/main/java/com/sksamuel/jqm4gwt/toolbar/JQMHeader.java#L273-L275
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.subParse
private int subParse(String text, int start, char ch, int count, boolean obeyCount, boolean allowNegative, boolean[] ambiguousYear, Calendar cal, MessageFormat numericLeapMonthFormatter, Output<TimeType> tzTimeType) { """ Overloading to provide default argument (null) for day pe...
java
private int subParse(String text, int start, char ch, int count, boolean obeyCount, boolean allowNegative, boolean[] ambiguousYear, Calendar cal, MessageFormat numericLeapMonthFormatter, Output<TimeType> tzTimeType) { return subParse(text, start, ch, count, obeyCount, allowNe...
[ "private", "int", "subParse", "(", "String", "text", ",", "int", "start", ",", "char", "ch", ",", "int", "count", ",", "boolean", "obeyCount", ",", "boolean", "allowNegative", ",", "boolean", "[", "]", "ambiguousYear", ",", "Calendar", "cal", ",", "Message...
Overloading to provide default argument (null) for day period.
[ "Overloading", "to", "provide", "default", "argument", "(", "null", ")", "for", "day", "period", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L3048-L3053
cqframework/clinical_quality_language
Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java
Cql2ElmVisitor.getPropertyPath
private String getPropertyPath(Expression reference, String alias) { """ Collapse a property path expression back to it's qualified form for use as the path attribute of the retrieve. @param reference the <code>Expression</code> to collapse @param alias the alias of the <code>Retrieve</code> in the query. ...
java
private String getPropertyPath(Expression reference, String alias) { if (reference instanceof Property) { Property property = (Property)reference; if (alias.equals(property.getScope())) { return property.getPath(); } else if (property.getSource() !...
[ "private", "String", "getPropertyPath", "(", "Expression", "reference", ",", "String", "alias", ")", "{", "if", "(", "reference", "instanceof", "Property", ")", "{", "Property", "property", "=", "(", "Property", ")", "reference", ";", "if", "(", "alias", "."...
Collapse a property path expression back to it's qualified form for use as the path attribute of the retrieve. @param reference the <code>Expression</code> to collapse @param alias the alias of the <code>Retrieve</code> in the query. @return The collapsed path operands (or sub-operands) were modified; <code>false</...
[ "Collapse", "a", "property", "path", "expression", "back", "to", "it", "s", "qualified", "form", "for", "use", "as", "the", "path", "attribute", "of", "the", "retrieve", "." ]
train
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java#L3058-L3073
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/service/QuickfixService.java
QuickfixService.getOrCreate
@SuppressWarnings("unchecked") public QuickfixModel getOrCreate(String name, QuickfixType type) { """ Tries to find a link with the specified description and href. If it cannot, then it will return a new one. """ Iterable<Vertex> results = (Iterable<Vertex>)getQuery().getRawTraversal().has(Quickfix...
java
@SuppressWarnings("unchecked") public QuickfixModel getOrCreate(String name, QuickfixType type) { Iterable<Vertex> results = (Iterable<Vertex>)getQuery().getRawTraversal().has(QuickfixModel.PROPERTY_TYPE, type).has(QuickfixModel.PROPERTY_DESCRIPTION, name).toList(); if (!results.iterator().hasNe...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "QuickfixModel", "getOrCreate", "(", "String", "name", ",", "QuickfixType", "type", ")", "{", "Iterable", "<", "Vertex", ">", "results", "=", "(", "Iterable", "<", "Vertex", ">", ")", "getQuery", ...
Tries to find a link with the specified description and href. If it cannot, then it will return a new one.
[ "Tries", "to", "find", "a", "link", "with", "the", "specified", "description", "and", "href", ".", "If", "it", "cannot", "then", "it", "will", "return", "a", "new", "one", "." ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/service/QuickfixService.java#L27-L39
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/IteratorExtensions.java
IteratorExtensions.forall
public static <T> boolean forall(Iterator<T> iterator, Function1<? super T, Boolean> predicate) { """ Returns {@code true} if every element in {@code iterator} satisfies the predicate. If {@code iterator} is empty, {@code true} is returned. In other words, <code>false</code> is returned if at least one element fa...
java
public static <T> boolean forall(Iterator<T> iterator, Function1<? super T, Boolean> predicate) { if (predicate == null) throw new NullPointerException("predicate"); while(iterator.hasNext()) { if (!predicate.apply(iterator.next())) return false; } return true; }
[ "public", "static", "<", "T", ">", "boolean", "forall", "(", "Iterator", "<", "T", ">", "iterator", ",", "Function1", "<", "?", "super", "T", ",", "Boolean", ">", "predicate", ")", "{", "if", "(", "predicate", "==", "null", ")", "throw", "new", "Null...
Returns {@code true} if every element in {@code iterator} satisfies the predicate. If {@code iterator} is empty, {@code true} is returned. In other words, <code>false</code> is returned if at least one element fails to fulfill the predicate. @param iterator the iterator. May not be <code>null</code>. @param predicate ...
[ "Returns", "{", "@code", "true", "}", "if", "every", "element", "in", "{", "@code", "iterator", "}", "satisfies", "the", "predicate", ".", "If", "{", "@code", "iterator", "}", "is", "empty", "{", "@code", "true", "}", "is", "returned", ".", "In", "othe...
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/IteratorExtensions.java#L280-L288
apollographql/apollo-android
apollo-gradle-plugin/src/main/java/com/apollographql/apollo/gradle/CodegenGenerationTaskCommandArgsBuilder.java
CodegenGenerationTaskCommandArgsBuilder.getSchemaFilesFrom
private List<File> getSchemaFilesFrom(Set<File> files) { """ Returns "schema.json" files and sorts them based on their source set priorities. @return - schema files sorted by priority based on source set priority """ return FluentIterable.from(files).filter(new Predicate<File>() { @Override public...
java
private List<File> getSchemaFilesFrom(Set<File> files) { return FluentIterable.from(files).filter(new Predicate<File>() { @Override public boolean apply(@Nullable File file) { return file != null && file.getName().equals(GraphQLSourceDirectorySet.SCHEMA_FILE_NAME); } }).toSortedList(new Comp...
[ "private", "List", "<", "File", ">", "getSchemaFilesFrom", "(", "Set", "<", "File", ">", "files", ")", "{", "return", "FluentIterable", ".", "from", "(", "files", ")", ".", "filter", "(", "new", "Predicate", "<", "File", ">", "(", ")", "{", "@", "Ove...
Returns "schema.json" files and sorts them based on their source set priorities. @return - schema files sorted by priority based on source set priority
[ "Returns", "schema", ".", "json", "files", "and", "sorts", "them", "based", "on", "their", "source", "set", "priorities", "." ]
train
https://github.com/apollographql/apollo-android/blob/a78869a76e17f77e42c7a88f0099914fe7ffa5b6/apollo-gradle-plugin/src/main/java/com/apollographql/apollo/gradle/CodegenGenerationTaskCommandArgsBuilder.java#L155-L168
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcertkey_binding.java
sslcertkey_binding.get
public static sslcertkey_binding get(nitro_service service, String certkey) throws Exception { """ Use this API to fetch sslcertkey_binding resource of given name . """ sslcertkey_binding obj = new sslcertkey_binding(); obj.set_certkey(certkey); sslcertkey_binding response = (sslcertkey_binding) obj.get_...
java
public static sslcertkey_binding get(nitro_service service, String certkey) throws Exception{ sslcertkey_binding obj = new sslcertkey_binding(); obj.set_certkey(certkey); sslcertkey_binding response = (sslcertkey_binding) obj.get_resource(service); return response; }
[ "public", "static", "sslcertkey_binding", "get", "(", "nitro_service", "service", ",", "String", "certkey", ")", "throws", "Exception", "{", "sslcertkey_binding", "obj", "=", "new", "sslcertkey_binding", "(", ")", ";", "obj", ".", "set_certkey", "(", "certkey", ...
Use this API to fetch sslcertkey_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "sslcertkey_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcertkey_binding.java#L136-L141
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/factory/feature/describe/FactoryDescribeRegionPoint.java
FactoryDescribeRegionPoint.surfStable
public static <T extends ImageGray<T>, II extends ImageGray<II>> DescribeRegionPoint<T,BrightFeature> surfStable(@Nullable ConfigSurfDescribe.Stability config, Class<T> imageType) { """ <p> Creates a SURF descriptor. SURF descriptors are invariant to illumination, orientation, and scale. BoofCV provides two va...
java
public static <T extends ImageGray<T>, II extends ImageGray<II>> DescribeRegionPoint<T,BrightFeature> surfStable(@Nullable ConfigSurfDescribe.Stability config, Class<T> imageType) { Class<II> integralType = GIntegralImageOps.getIntegralType(imageType); DescribePointSurf<II> alg = FactoryDescribePointAlgs.surfSta...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ",", "II", "extends", "ImageGray", "<", "II", ">", ">", "DescribeRegionPoint", "<", "T", ",", "BrightFeature", ">", "surfStable", "(", "@", "Nullable", "ConfigSurfDescribe", ".", "Stability...
<p> Creates a SURF descriptor. SURF descriptors are invariant to illumination, orientation, and scale. BoofCV provides two variants. The SURF variant created here is designed for stability. Different descriptors are produced for gray-scale and color images. </p> @see DescribePointSurf @param config SURF configurati...
[ "<p", ">", "Creates", "a", "SURF", "descriptor", ".", "SURF", "descriptors", "are", "invariant", "to", "illumination", "orientation", "and", "scale", ".", "BoofCV", "provides", "two", "variants", ".", "The", "SURF", "variant", "created", "here", "is", "designe...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/describe/FactoryDescribeRegionPoint.java#L108-L116
citrusframework/citrus
modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java
MailMessageConverter.handleBinaryPart
protected BodyPart handleBinaryPart(MimePart mediaPart, String contentType) throws IOException, MessagingException { """ Construct simple body part from binary data just adding file name as content. @param mediaPart @param contentType @return @throws IOException """ String contentId = mediaPart.get...
java
protected BodyPart handleBinaryPart(MimePart mediaPart, String contentType) throws IOException, MessagingException { String contentId = mediaPart.getContentID() != null ? "(" + mediaPart.getContentID() + ")" : ""; return new BodyPart(mediaPart.getFileName() + contentId, contentType); }
[ "protected", "BodyPart", "handleBinaryPart", "(", "MimePart", "mediaPart", ",", "String", "contentType", ")", "throws", "IOException", ",", "MessagingException", "{", "String", "contentId", "=", "mediaPart", ".", "getContentID", "(", ")", "!=", "null", "?", "\"(\"...
Construct simple body part from binary data just adding file name as content. @param mediaPart @param contentType @return @throws IOException
[ "Construct", "simple", "body", "part", "from", "binary", "data", "just", "adding", "file", "name", "as", "content", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java#L250-L253
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_ovhPabx_serviceName_hunting_agent_POST
public OvhOvhPabxHuntingAgent billingAccount_ovhPabx_serviceName_hunting_agent_POST(String billingAccount, String serviceName, String description, String number, Long simultaneousLines, OvhOvhPabxHuntingAgentStatusEnum status, Long timeout, Long wrapUpTime) throws IOException { """ Create a new agent REST: POST...
java
public OvhOvhPabxHuntingAgent billingAccount_ovhPabx_serviceName_hunting_agent_POST(String billingAccount, String serviceName, String description, String number, Long simultaneousLines, OvhOvhPabxHuntingAgentStatusEnum status, Long timeout, Long wrapUpTime) throws IOException { String qPath = "/telephony/{billingAcco...
[ "public", "OvhOvhPabxHuntingAgent", "billingAccount_ovhPabx_serviceName_hunting_agent_POST", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "String", "description", ",", "String", "number", ",", "Long", "simultaneousLines", ",", "OvhOvhPabxHuntingAgentStatu...
Create a new agent REST: POST /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent @param number [required] The number of the agent @param simultaneousLines [required] The maximum of simultaneous calls that the agent will receive from the hunting @param description [required] The agent's description @param ...
[ "Create", "a", "new", "agent" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L6043-L6055
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/dataformats/json/jackson/GeometrySerializer.java
GeometrySerializer.writeBbox
protected void writeBbox(JsonGenerator jgen, T shape, SerializerProvider provider) throws IOException { """ Adds the bbox parameter to the geojson string, as defined by the <a href="http://geojson.org/geojson-spec.html"> GeoJSON specification</a> @param jgen the jsongenerator used for the geojson ...
java
protected void writeBbox(JsonGenerator jgen, T shape, SerializerProvider provider) throws IOException { double[] coordinates = getBboxCoordinates(jgen, shape, provider); if (coordinates != null) { jgen.writeFieldName("bbox"); jgen.writeObject(coordinates); } ...
[ "protected", "void", "writeBbox", "(", "JsonGenerator", "jgen", ",", "T", "shape", ",", "SerializerProvider", "provider", ")", "throws", "IOException", "{", "double", "[", "]", "coordinates", "=", "getBboxCoordinates", "(", "jgen", ",", "shape", ",", "provider",...
Adds the bbox parameter to the geojson string, as defined by the <a href="http://geojson.org/geojson-spec.html"> GeoJSON specification</a> @param jgen the jsongenerator used for the geojson construction @param shape the geometry for which the contents is to be retrieved @param provider provider to retrieve other seri...
[ "Adds", "the", "bbox", "parameter", "to", "the", "geojson", "string", "as", "defined", "by", "the", "<a", "href", "=", "http", ":", "//", "geojson", ".", "org", "/", "geojson", "-", "spec", ".", "html", ">", "GeoJSON", "specification<", "/", "a", ">" ]
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/dataformats/json/jackson/GeometrySerializer.java#L156-L163
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/util/ArrayUtil.java
ArrayUtil.writeBytes
public static void writeBytes(byte b[], int offset, byte[] value) { """ Serializes a byte[] into a byte array at a specific offset @param b byte array in which to write a byte[] value. @param offset offset within byte array to start writing. @param value byte[] to write to byte array. """ System.array...
java
public static void writeBytes(byte b[], int offset, byte[] value) { System.arraycopy(value, 0, b, offset, value.length); }
[ "public", "static", "void", "writeBytes", "(", "byte", "b", "[", "]", ",", "int", "offset", ",", "byte", "[", "]", "value", ")", "{", "System", ".", "arraycopy", "(", "value", ",", "0", ",", "b", ",", "offset", ",", "value", ".", "length", ")", "...
Serializes a byte[] into a byte array at a specific offset @param b byte array in which to write a byte[] value. @param offset offset within byte array to start writing. @param value byte[] to write to byte array.
[ "Serializes", "a", "byte", "[]", "into", "a", "byte", "array", "at", "a", "specific", "offset" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/util/ArrayUtil.java#L160-L162
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/functions/DifferentialFunctionFactory.java
DifferentialFunctionFactory.maxPooling2d
public SDVariable maxPooling2d(SDVariable input, Pooling2DConfig pooling2DConfig) { """ Max pooling 2d operation. @param input the inputs to pooling @param pooling2DConfig the configuration @return """ MaxPooling2D maxPooling2D = MaxPooling2D.builder() .input(input) ...
java
public SDVariable maxPooling2d(SDVariable input, Pooling2DConfig pooling2DConfig) { MaxPooling2D maxPooling2D = MaxPooling2D.builder() .input(input) .sameDiff(sameDiff()) .config(pooling2DConfig) .build(); return maxPooling2D.outputVariabl...
[ "public", "SDVariable", "maxPooling2d", "(", "SDVariable", "input", ",", "Pooling2DConfig", "pooling2DConfig", ")", "{", "MaxPooling2D", "maxPooling2D", "=", "MaxPooling2D", ".", "builder", "(", ")", ".", "input", "(", "input", ")", ".", "sameDiff", "(", "sameDi...
Max pooling 2d operation. @param input the inputs to pooling @param pooling2DConfig the configuration @return
[ "Max", "pooling", "2d", "operation", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/functions/DifferentialFunctionFactory.java#L334-L342
UrielCh/ovh-java-sdk
ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/ApiOvhPrice.java
ApiOvhPrice.vps_2018v1_cloud_option_optionName_GET
public OvhPrice vps_2018v1_cloud_option_optionName_GET(net.minidev.ovh.api.price.vps._2018v1.cloud.OvhOptionEnum optionName) throws IOException { """ Get price of VPS Cloud Options 2015/2016 REST: GET /price/vps/2018v1/cloud/option/{optionName} @param optionName [required] Option """ String qPath = "/pri...
java
public OvhPrice vps_2018v1_cloud_option_optionName_GET(net.minidev.ovh.api.price.vps._2018v1.cloud.OvhOptionEnum optionName) throws IOException { String qPath = "/price/vps/2018v1/cloud/option/{optionName}"; StringBuilder sb = path(qPath, optionName); String resp = exec(qPath, "GET", sb.toString(), null); retur...
[ "public", "OvhPrice", "vps_2018v1_cloud_option_optionName_GET", "(", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "price", ".", "vps", ".", "_2018v1", ".", "cloud", ".", "OvhOptionEnum", "optionName", ")", "throws", "IOException", "{", "String", "qPath", ...
Get price of VPS Cloud Options 2015/2016 REST: GET /price/vps/2018v1/cloud/option/{optionName} @param optionName [required] Option
[ "Get", "price", "of", "VPS", "Cloud", "Options", "2015", "/", "2016" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/ApiOvhPrice.java#L6823-L6828
JRebirth/JRebirth
org.jrebirth.af/showcase/analyzer/src/main/java/org/jrebirth/af/showcase/analyzer/ui/controls/ControlsModel.java
ControlsModel.doEventsLoaded
public void doEventsLoaded(final List<JRebirthEvent> eventList, final Wave wave) { """ Call when event are loaded. @param eventList the list of events loaded @param wave the wave received """ view().activateButtons(!eventList.isEmpty()); }
java
public void doEventsLoaded(final List<JRebirthEvent> eventList, final Wave wave) { view().activateButtons(!eventList.isEmpty()); }
[ "public", "void", "doEventsLoaded", "(", "final", "List", "<", "JRebirthEvent", ">", "eventList", ",", "final", "Wave", "wave", ")", "{", "view", "(", ")", ".", "activateButtons", "(", "!", "eventList", ".", "isEmpty", "(", ")", ")", ";", "}" ]
Call when event are loaded. @param eventList the list of events loaded @param wave the wave received
[ "Call", "when", "event", "are", "loaded", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/showcase/analyzer/src/main/java/org/jrebirth/af/showcase/analyzer/ui/controls/ControlsModel.java#L51-L53
BioPAX/Paxtools
paxtools-core/src/main/java/org/biopax/paxtools/converter/LevelUpgrader.java
LevelUpgrader.filter
public Model filter(Model model) { """ Converts a BioPAX Model, Level 1 or 2, to the Level 3. @param model BioPAX model to upgrade @return new Level3 model """ if(model == null || model.getLevel() != BioPAXLevel.L2) return model; // nothing to do preparePep2PEIDMap(model); final Model newModel =...
java
public Model filter(Model model) { if(model == null || model.getLevel() != BioPAXLevel.L2) return model; // nothing to do preparePep2PEIDMap(model); final Model newModel = factory.createModel(); newModel.getNameSpacePrefixMap().putAll(model.getNameSpacePrefixMap()); newModel.setXmlBase(model.getXmlBase()...
[ "public", "Model", "filter", "(", "Model", "model", ")", "{", "if", "(", "model", "==", "null", "||", "model", ".", "getLevel", "(", ")", "!=", "BioPAXLevel", ".", "L2", ")", "return", "model", ";", "// nothing to do", "preparePep2PEIDMap", "(", "model", ...
Converts a BioPAX Model, Level 1 or 2, to the Level 3. @param model BioPAX model to upgrade @return new Level3 model
[ "Converts", "a", "BioPAX", "Model", "Level", "1", "or", "2", "to", "the", "Level", "3", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/converter/LevelUpgrader.java#L106-L149
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/utility/MeshUtils.java
MeshUtils.createQuad
public static GVRMesh createQuad(GVRContext gvrContext, float width, float height) { """ Creates a quad consisting of two triangles, with the specified width and height. @param gvrContext current {@link GVRContext} @param width the quad's width @param height the quad's height @return A 2D, rectangular m...
java
public static GVRMesh createQuad(GVRContext gvrContext, float width, float height) { GVRMesh mesh = new GVRMesh(gvrContext); float[] vertices = { width * -0.5f, height * 0.5f, 0.0f, width * -0.5f, height * -0.5f, 0.0f, width * 0.5f, height * 0.5f, 0.0f, width * 0.5f, hei...
[ "public", "static", "GVRMesh", "createQuad", "(", "GVRContext", "gvrContext", ",", "float", "width", ",", "float", "height", ")", "{", "GVRMesh", "mesh", "=", "new", "GVRMesh", "(", "gvrContext", ")", ";", "float", "[", "]", "vertices", "=", "{", "width", ...
Creates a quad consisting of two triangles, with the specified width and height. @param gvrContext current {@link GVRContext} @param width the quad's width @param height the quad's height @return A 2D, rectangular mesh with four vertices and two triangles
[ "Creates", "a", "quad", "consisting", "of", "two", "triangles", "with", "the", "specified", "width", "and", "height", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/utility/MeshUtils.java#L148-L168
Azure/azure-sdk-for-java
storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java
BlobContainersInner.getImmutabilityPolicy
public ImmutabilityPolicyInner getImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, String ifMatch) { """ Gets the existing immutability policy along with the corresponding ETag in response headers and body. @param resourceGroupName The name of the resource group within the ...
java
public ImmutabilityPolicyInner getImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, String ifMatch) { return getImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).toBlocking().single().body(); }
[ "public", "ImmutabilityPolicyInner", "getImmutabilityPolicy", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "containerName", ",", "String", "ifMatch", ")", "{", "return", "getImmutabilityPolicyWithServiceResponseAsync", "(", "resourceGroupNa...
Gets the existing immutability policy along with the corresponding ETag in response headers and body. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. @param accountName The name of the storage account within the specified resource group. Storage acc...
[ "Gets", "the", "existing", "immutability", "policy", "along", "with", "the", "corresponding", "ETag", "in", "response", "headers", "and", "body", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java#L1287-L1289
Stratio/stratio-connector-commons
connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java
TableMetadataBuilder.withClusterKey
@TimerJ public TableMetadataBuilder withClusterKey(String... fields) { """ Set the cluster key. @param fields the fields @return the table metadata builder """ for (String field : fields) { clusterKey.add(new ColumnName(tableName, field)); } return this; }
java
@TimerJ public TableMetadataBuilder withClusterKey(String... fields) { for (String field : fields) { clusterKey.add(new ColumnName(tableName, field)); } return this; }
[ "@", "TimerJ", "public", "TableMetadataBuilder", "withClusterKey", "(", "String", "...", "fields", ")", "{", "for", "(", "String", "field", ":", "fields", ")", "{", "clusterKey", ".", "add", "(", "new", "ColumnName", "(", "tableName", ",", "field", ")", ")...
Set the cluster key. @param fields the fields @return the table metadata builder
[ "Set", "the", "cluster", "key", "." ]
train
https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java#L208-L214
line/armeria
saml/src/main/java/com/linecorp/armeria/server/saml/KeyStoreCredentialResolverBuilder.java
KeyStoreCredentialResolverBuilder.addKeyPasswords
public KeyStoreCredentialResolverBuilder addKeyPasswords(Map<String, String> keyPasswords) { """ Adds all key names and their passwords which are specified by the {@code keyPasswords}. """ requireNonNull(keyPasswords, "keyPasswords"); keyPasswords.forEach(this::addKeyPassword); return t...
java
public KeyStoreCredentialResolverBuilder addKeyPasswords(Map<String, String> keyPasswords) { requireNonNull(keyPasswords, "keyPasswords"); keyPasswords.forEach(this::addKeyPassword); return this; }
[ "public", "KeyStoreCredentialResolverBuilder", "addKeyPasswords", "(", "Map", "<", "String", ",", "String", ">", "keyPasswords", ")", "{", "requireNonNull", "(", "keyPasswords", ",", "\"keyPasswords\"", ")", ";", "keyPasswords", ".", "forEach", "(", "this", "::", ...
Adds all key names and their passwords which are specified by the {@code keyPasswords}.
[ "Adds", "all", "key", "names", "and", "their", "passwords", "which", "are", "specified", "by", "the", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/saml/src/main/java/com/linecorp/armeria/server/saml/KeyStoreCredentialResolverBuilder.java#L108-L112
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java
DescriptorRepository.put
public void put(String classname, ClassDescriptor cld) { """ Add a ClassDescriptor to the internal Hashtable<br> Set the Repository for ClassDescriptor """ cld.setRepository(this); // BRJ synchronized (descriptorTable) { descriptorTable.put(classname, cld); ...
java
public void put(String classname, ClassDescriptor cld) { cld.setRepository(this); // BRJ synchronized (descriptorTable) { descriptorTable.put(classname, cld); List extentClasses = cld.getExtentClasses(); for (int i = 0; i < extentClasses.size(); ++i...
[ "public", "void", "put", "(", "String", "classname", ",", "ClassDescriptor", "cld", ")", "{", "cld", ".", "setRepository", "(", "this", ")", ";", "// BRJ\r", "synchronized", "(", "descriptorTable", ")", "{", "descriptorTable", ".", "put", "(", "classname", "...
Add a ClassDescriptor to the internal Hashtable<br> Set the Repository for ClassDescriptor
[ "Add", "a", "ClassDescriptor", "to", "the", "internal", "Hashtable<br", ">", "Set", "the", "Repository", "for", "ClassDescriptor" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java#L446-L459
LearnLib/automatalib
util/src/main/java/net/automatalib/util/minimizer/TransitionLabel.java
TransitionLabel.addToSet
public boolean addToSet(State<S, EP> state) { """ Adds a state to the associated state set. Note that a state can be in the sets of various transition labels. @param state the state to be added. @return <code>true</code> if this was the first state to be added to the set, <code>false</code> otherwise. "...
java
public boolean addToSet(State<S, EP> state) { boolean first = list.isEmpty(); if (first || !setContents.get(state.getId())) { list.add(state); setContents.set(state.getId()); } return first; }
[ "public", "boolean", "addToSet", "(", "State", "<", "S", ",", "EP", ">", "state", ")", "{", "boolean", "first", "=", "list", ".", "isEmpty", "(", ")", ";", "if", "(", "first", "||", "!", "setContents", ".", "get", "(", "state", ".", "getId", "(", ...
Adds a state to the associated state set. Note that a state can be in the sets of various transition labels. @param state the state to be added. @return <code>true</code> if this was the first state to be added to the set, <code>false</code> otherwise.
[ "Adds", "a", "state", "to", "the", "associated", "state", "set", ".", "Note", "that", "a", "state", "can", "be", "in", "the", "sets", "of", "various", "transition", "labels", "." ]
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/util/src/main/java/net/automatalib/util/minimizer/TransitionLabel.java#L111-L118
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.createPattern
public PdfPatternPainter createPattern(float width, float height, float xstep, float ystep, Color color) { """ Create a new uncolored tiling pattern. @param width the width of the pattern @param height the height of the pattern @param xstep the desired horizontal spacing between pattern cells. May be either ...
java
public PdfPatternPainter createPattern(float width, float height, float xstep, float ystep, Color color) { checkWriter(); if ( xstep == 0.0f || ystep == 0.0f ) throw new RuntimeException("XStep or YStep can not be ZERO."); PdfPatternPainter painter = new PdfPatternPainter(writer, col...
[ "public", "PdfPatternPainter", "createPattern", "(", "float", "width", ",", "float", "height", ",", "float", "xstep", ",", "float", "ystep", ",", "Color", "color", ")", "{", "checkWriter", "(", ")", ";", "if", "(", "xstep", "==", "0.0f", "||", "ystep", "...
Create a new uncolored tiling pattern. @param width the width of the pattern @param height the height of the pattern @param xstep the desired horizontal spacing between pattern cells. May be either positive or negative, but not zero. @param ystep the desired vertical spacing between pattern cells. May be either positi...
[ "Create", "a", "new", "uncolored", "tiling", "pattern", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L1954-L1965
azkaban/azkaban
azkaban-common/src/main/java/azkaban/project/ProjectManager.java
ProjectManager.getProjectFileHandler
public ProjectFileHandler getProjectFileHandler(final Project project, final int version) throws ProjectManagerException { """ This method retrieves the uploaded project zip file from DB. A temporary file is created to hold the content of the uploaded zip file. This temporary file is provided in the Projec...
java
public ProjectFileHandler getProjectFileHandler(final Project project, final int version) throws ProjectManagerException { return this.azkabanProjectLoader.getProjectFile(project, version); }
[ "public", "ProjectFileHandler", "getProjectFileHandler", "(", "final", "Project", "project", ",", "final", "int", "version", ")", "throws", "ProjectManagerException", "{", "return", "this", ".", "azkabanProjectLoader", ".", "getProjectFile", "(", "project", ",", "vers...
This method retrieves the uploaded project zip file from DB. A temporary file is created to hold the content of the uploaded zip file. This temporary file is provided in the ProjectFileHandler instance and the caller of this method should call method {@ProjectFileHandler.deleteLocalFile} to delete the temporary file. ...
[ "This", "method", "retrieves", "the", "uploaded", "project", "zip", "file", "from", "DB", ".", "A", "temporary", "file", "is", "created", "to", "hold", "the", "content", "of", "the", "uploaded", "zip", "file", ".", "This", "temporary", "file", "is", "provi...
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/project/ProjectManager.java#L503-L506
phax/ph-css
ph-css/src/main/java/com/helger/css/utils/CSSURLHelper.java
CSSURLHelper.getAsCSSURL
@Nonnull @Nonempty public static String getAsCSSURL (@Nonnull final ISimpleURL aURL, final boolean bQuoteURL) { """ Surround the passed URL with the CSS "url(...)" @param aURL URL to be wrapped. May not be <code>null</code>. @param bQuoteURL if <code>true</code> single quotes are added around the URL @r...
java
@Nonnull @Nonempty public static String getAsCSSURL (@Nonnull final ISimpleURL aURL, final boolean bQuoteURL) { ValueEnforcer.notNull (aURL, "URL"); return getAsCSSURL (aURL.getAsStringWithEncodedParameters (), bQuoteURL); }
[ "@", "Nonnull", "@", "Nonempty", "public", "static", "String", "getAsCSSURL", "(", "@", "Nonnull", "final", "ISimpleURL", "aURL", ",", "final", "boolean", "bQuoteURL", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aURL", ",", "\"URL\"", ")", ";", "return"...
Surround the passed URL with the CSS "url(...)" @param aURL URL to be wrapped. May not be <code>null</code>. @param bQuoteURL if <code>true</code> single quotes are added around the URL @return <code>url(<i>sURL</i>)</code> or <code>url('<i>sURL</i>')</code>
[ "Surround", "the", "passed", "URL", "with", "the", "CSS", "url", "(", "...", ")" ]
train
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/utils/CSSURLHelper.java#L99-L106
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/utility/Exceptions.java
Exceptions.RuntimeAssertion
public static RuntimeAssertion RuntimeAssertion(String pattern, Object... parameters) { """ Generate a {@link RuntimeAssertion} @param pattern {@link String#format(String, Object...) String.format()} pattern @param parameters {@code String.format()} parameters @return A new {@code IllegalArgume...
java
public static RuntimeAssertion RuntimeAssertion(String pattern, Object... parameters) { return strip(new RuntimeAssertion(String.format(pattern, parameters))); }
[ "public", "static", "RuntimeAssertion", "RuntimeAssertion", "(", "String", "pattern", ",", "Object", "...", "parameters", ")", "{", "return", "strip", "(", "new", "RuntimeAssertion", "(", "String", ".", "format", "(", "pattern", ",", "parameters", ")", ")", ")...
Generate a {@link RuntimeAssertion} @param pattern {@link String#format(String, Object...) String.format()} pattern @param parameters {@code String.format()} parameters @return A new {@code IllegalArgumentException}
[ "Generate", "a", "{", "@link", "RuntimeAssertion", "}" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/utility/Exceptions.java#L71-L74
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/StringUtils.java
StringUtils.makeAsciiTable
public static String makeAsciiTable(Object[][] table, Object[] rowLabels, Object[] colLabels, int padLeft, int padRight, boolean tsv) { """ Returns an text table containing the matrix of Strings passed in. The first dimension of the matrix should represent the rows, and the second dimension the columns. """ ...
java
public static String makeAsciiTable(Object[][] table, Object[] rowLabels, Object[] colLabels, int padLeft, int padRight, boolean tsv) { StringBuilder buff = new StringBuilder(); // top row buff.append(makeAsciiTableCell("", padLeft, padRight, tsv)); // the top left cell for (int j = 0; j < table[0]....
[ "public", "static", "String", "makeAsciiTable", "(", "Object", "[", "]", "[", "]", "table", ",", "Object", "[", "]", "rowLabels", ",", "Object", "[", "]", "colLabels", ",", "int", "padLeft", ",", "int", "padRight", ",", "boolean", "tsv", ")", "{", "Str...
Returns an text table containing the matrix of Strings passed in. The first dimension of the matrix should represent the rows, and the second dimension the columns.
[ "Returns", "an", "text", "table", "containing", "the", "matrix", "of", "Strings", "passed", "in", ".", "The", "first", "dimension", "of", "the", "matrix", "should", "represent", "the", "rows", "and", "the", "second", "dimension", "the", "columns", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/StringUtils.java#L1476-L1494
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/parameters/Parameters.java
Parameters.getSymbolList
public List<Symbol> getSymbolList(final String param) { """ Gets a parameter whose value is a (possibly empty) comma-separated list of Symbols. """ return get(param, new StringToSymbolList(","), new AlwaysValid<List<Symbol>>(), "comma-separated list of strings"); }
java
public List<Symbol> getSymbolList(final String param) { return get(param, new StringToSymbolList(","), new AlwaysValid<List<Symbol>>(), "comma-separated list of strings"); }
[ "public", "List", "<", "Symbol", ">", "getSymbolList", "(", "final", "String", "param", ")", "{", "return", "get", "(", "param", ",", "new", "StringToSymbolList", "(", "\",\"", ")", ",", "new", "AlwaysValid", "<", "List", "<", "Symbol", ">", ">", "(", ...
Gets a parameter whose value is a (possibly empty) comma-separated list of Symbols.
[ "Gets", "a", "parameter", "whose", "value", "is", "a", "(", "possibly", "empty", ")", "comma", "-", "separated", "list", "of", "Symbols", "." ]
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/parameters/Parameters.java#L921-L925
j256/ormlite-core
src/main/java/com/j256/ormlite/logger/LocalLog.java
LocalLog.openLogFile
public static void openLogFile(String logPath) { """ Reopen the associated static logging stream. Set to null to redirect to System.out. """ if (logPath == null) { printStream = System.out; } else { try { printStream = new PrintStream(new File(logPath)); } catch (FileNotFoundException e) { ...
java
public static void openLogFile(String logPath) { if (logPath == null) { printStream = System.out; } else { try { printStream = new PrintStream(new File(logPath)); } catch (FileNotFoundException e) { throw new IllegalArgumentException("Log file " + logPath + " was not found", e); } } }
[ "public", "static", "void", "openLogFile", "(", "String", "logPath", ")", "{", "if", "(", "logPath", "==", "null", ")", "{", "printStream", "=", "System", ".", "out", ";", "}", "else", "{", "try", "{", "printStream", "=", "new", "PrintStream", "(", "ne...
Reopen the associated static logging stream. Set to null to redirect to System.out.
[ "Reopen", "the", "associated", "static", "logging", "stream", ".", "Set", "to", "null", "to", "redirect", "to", "System", ".", "out", "." ]
train
https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/logger/LocalLog.java#L120-L130
wildfly/wildfly-core
domain-http/interface/src/main/java/org/jboss/as/domain/http/server/DomainUtil.java
DomainUtil.constructUrl
public static String constructUrl(final HttpServerExchange exchange, final String path) { """ Based on the current request represented by the HttpExchange construct a complete URL for the supplied path. @param exchange - The current HttpExchange @param path - The path to include in the constructed URL @return...
java
public static String constructUrl(final HttpServerExchange exchange, final String path) { final HeaderMap headers = exchange.getRequestHeaders(); String host = headers.getFirst(HOST); String protocol = exchange.getConnection().getSslSessionInfo() != null ? "https" : "http"; return proto...
[ "public", "static", "String", "constructUrl", "(", "final", "HttpServerExchange", "exchange", ",", "final", "String", "path", ")", "{", "final", "HeaderMap", "headers", "=", "exchange", ".", "getRequestHeaders", "(", ")", ";", "String", "host", "=", "headers", ...
Based on the current request represented by the HttpExchange construct a complete URL for the supplied path. @param exchange - The current HttpExchange @param path - The path to include in the constructed URL @return The constructed URL
[ "Based", "on", "the", "current", "request", "represented", "by", "the", "HttpExchange", "construct", "a", "complete", "URL", "for", "the", "supplied", "path", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/domain-http/interface/src/main/java/org/jboss/as/domain/http/server/DomainUtil.java#L205-L211
voldemort/voldemort
src/java/voldemort/client/ClientConfig.java
ClientConfig.setThreadIdleTime
@Deprecated public ClientConfig setThreadIdleTime(long threadIdleTime, TimeUnit unit) { """ The amount of time to keep an idle client thread alive @param threadIdleTime """ this.threadIdleMs = unit.toMillis(threadIdleTime); return this; }
java
@Deprecated public ClientConfig setThreadIdleTime(long threadIdleTime, TimeUnit unit) { this.threadIdleMs = unit.toMillis(threadIdleTime); return this; }
[ "@", "Deprecated", "public", "ClientConfig", "setThreadIdleTime", "(", "long", "threadIdleTime", ",", "TimeUnit", "unit", ")", "{", "this", ".", "threadIdleMs", "=", "unit", ".", "toMillis", "(", "threadIdleTime", ")", ";", "return", "this", ";", "}" ]
The amount of time to keep an idle client thread alive @param threadIdleTime
[ "The", "amount", "of", "time", "to", "keep", "an", "idle", "client", "thread", "alive" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/client/ClientConfig.java#L862-L866
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/DiscussionCommentResourcesImpl.java
DiscussionCommentResourcesImpl.addCommentWithAttachment
public Comment addCommentWithAttachment(long sheetId, long discussionId, Comment comment, File file, String contentType) throws SmartsheetException, IOException { """ Add a comment to a discussion with an attachment. It mirrors to the following Smartsheet REST API method: POST /discussion/{discussionId}/comment...
java
public Comment addCommentWithAttachment(long sheetId, long discussionId, Comment comment, File file, String contentType) throws SmartsheetException, IOException{ String path = "sheets/" + sheetId + "/discussions/" + discussionId + "/comments"; Util.throwIfNull(sheetId, comment, file, contentType); ...
[ "public", "Comment", "addCommentWithAttachment", "(", "long", "sheetId", ",", "long", "discussionId", ",", "Comment", "comment", ",", "File", "file", ",", "String", "contentType", ")", "throws", "SmartsheetException", ",", "IOException", "{", "String", "path", "="...
Add a comment to a discussion with an attachment. It mirrors to the following Smartsheet REST API method: POST /discussion/{discussionId}/comments @param sheetId the sheet id @param discussionId the dicussion id @param comment the comment to add @param file the file to be attached @param contentType the type of file ...
[ "Add", "a", "comment", "to", "a", "discussion", "with", "an", "attachment", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/DiscussionCommentResourcesImpl.java#L86-L91
ecclesia/kipeto
kipeto-core/src/main/java/de/ecclesia/kipeto/repository/WritingRepositoryStrategy.java
WritingRepositoryStrategy.storeStream
public void storeStream(String id, InputStream inputStream, ByteTransferListener listener) throws IOException { """ Speichert den übergebenen InputStream unter der angegebenen Id. Per Definition ist die Id der Hash des InputStreams. Falls unter der angegebenen Id also bereits ein Objekt anderer Länge gepeichert ...
java
public void storeStream(String id, InputStream inputStream, ByteTransferListener listener) throws IOException { Assert.isNotNull(id); Assert.isNotNull(inputStream); CountingInputStream countingInputStream = new CountingInputStream(inputStream); countingInputStream.addByteTransferListener(new ByteTransferListen...
[ "public", "void", "storeStream", "(", "String", "id", ",", "InputStream", "inputStream", ",", "ByteTransferListener", "listener", ")", "throws", "IOException", "{", "Assert", ".", "isNotNull", "(", "id", ")", ";", "Assert", ".", "isNotNull", "(", "inputStream", ...
Speichert den übergebenen InputStream unter der angegebenen Id. Per Definition ist die Id der Hash des InputStreams. Falls unter der angegebenen Id also bereits ein Objekt anderer Länge gepeichert ist, schlägt das Speichern fehl. @param id Id des Objektes, unter der es abgelegt wird @param inputStream des zu speichern...
[ "Speichert", "den", "übergebenen", "InputStream", "unter", "der", "angegebenen", "Id", ".", "Per", "Definition", "ist", "die", "Id", "der", "Hash", "des", "InputStreams", ".", "Falls", "unter", "der", "angegebenen", "Id", "also", "bereits", "ein", "Objekt", "a...
train
https://github.com/ecclesia/kipeto/blob/ea39a10ae4eaa550f71a856ab2f2845270a64913/kipeto-core/src/main/java/de/ecclesia/kipeto/repository/WritingRepositoryStrategy.java#L51-L68
OpenLiberty/open-liberty
dev/com.ibm.ws.cdi.weld/src/com/ibm/ws/cdi/impl/weld/WebSphereCDIDeploymentImpl.java
WebSphereCDIDeploymentImpl.makeWiring
private void makeWiring(WebSphereBeanDeploymentArchive wireFromBda, WebSphereBeanDeploymentArchive wireToBda, ClassLoader wireToBdaCL, ClassLoader wireFromBdaCL) { """ Make a wiring from the wireFromBda to the wireToBda if the wireFromBda's classloader is the descendant of the wireToBda's classloader @param wir...
java
private void makeWiring(WebSphereBeanDeploymentArchive wireFromBda, WebSphereBeanDeploymentArchive wireToBda, ClassLoader wireToBdaCL, ClassLoader wireFromBdaCL) { while (wireFromBdaCL != null) { if (wireFromBdaCL == wireToBdaCL) { wireFromBda.addBeanDeploymentArchive(wireToBda); ...
[ "private", "void", "makeWiring", "(", "WebSphereBeanDeploymentArchive", "wireFromBda", ",", "WebSphereBeanDeploymentArchive", "wireToBda", ",", "ClassLoader", "wireToBdaCL", ",", "ClassLoader", "wireFromBdaCL", ")", "{", "while", "(", "wireFromBdaCL", "!=", "null", ")", ...
Make a wiring from the wireFromBda to the wireToBda if the wireFromBda's classloader is the descendant of the wireToBda's classloader @param wireFromBda @param wireToBda @param wireToBdaCL @param wireFromBdaCL
[ "Make", "a", "wiring", "from", "the", "wireFromBda", "to", "the", "wireToBda", "if", "the", "wireFromBda", "s", "classloader", "is", "the", "descendant", "of", "the", "wireToBda", "s", "classloader" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.cdi.weld/src/com/ibm/ws/cdi/impl/weld/WebSphereCDIDeploymentImpl.java#L428-L441
rFlex/SCJavaTools
src/main/java/me/corsin/javatools/task/TaskQueue.java
TaskQueue.executeSyncTimed
public <T extends Runnable> T executeSyncTimed(T runnable, long inMs) { """ Add a Task to the queue and wait until it's run. The Task will be executed after "inMs" milliseconds. It is guaranteed that the Runnable will be processed when this method returns. @param the runnable to be executed @param inMs The time...
java
public <T extends Runnable> T executeSyncTimed(T runnable, long inMs) { try { Thread.sleep(inMs); this.executeSync(runnable); } catch (InterruptedException e) { e.printStackTrace(); } return runnable; }
[ "public", "<", "T", "extends", "Runnable", ">", "T", "executeSyncTimed", "(", "T", "runnable", ",", "long", "inMs", ")", "{", "try", "{", "Thread", ".", "sleep", "(", "inMs", ")", ";", "this", ".", "executeSync", "(", "runnable", ")", ";", "}", "catc...
Add a Task to the queue and wait until it's run. The Task will be executed after "inMs" milliseconds. It is guaranteed that the Runnable will be processed when this method returns. @param the runnable to be executed @param inMs The time after which the task should be processed @return the runnable, as a convenience met...
[ "Add", "a", "Task", "to", "the", "queue", "and", "wait", "until", "it", "s", "run", ".", "The", "Task", "will", "be", "executed", "after", "inMs", "milliseconds", ".", "It", "is", "guaranteed", "that", "the", "Runnable", "will", "be", "processed", "when"...
train
https://github.com/rFlex/SCJavaTools/blob/6bafee99f12a6ad73265db64776edac2bab71f67/src/main/java/me/corsin/javatools/task/TaskQueue.java#L179-L188
marklogic/marklogic-contentpump
mapreduce/src/main/java/com/marklogic/mapreduce/utilities/StatisticalAssignmentPolicy.java
StatisticalAssignmentPolicy.updateStats
public void updateStats(int fIdx, long count) { """ add count to forest with index fIdx, which may not be the forest with minimum frmtCount. Used by fragment count rollback. @param fIdx @param count """ synchronized (pq) { frmtCount[fIdx] += count; Stats tmp = new Stats(fId...
java
public void updateStats(int fIdx, long count) { synchronized (pq) { frmtCount[fIdx] += count; Stats tmp = new Stats(fIdx, frmtCount[fIdx]); // remove the stats object with the same fIdx pq.remove(tmp); pq.offer(tmp); } if (LOG.isTraceEn...
[ "public", "void", "updateStats", "(", "int", "fIdx", ",", "long", "count", ")", "{", "synchronized", "(", "pq", ")", "{", "frmtCount", "[", "fIdx", "]", "+=", "count", ";", "Stats", "tmp", "=", "new", "Stats", "(", "fIdx", ",", "frmtCount", "[", "fId...
add count to forest with index fIdx, which may not be the forest with minimum frmtCount. Used by fragment count rollback. @param fIdx @param count
[ "add", "count", "to", "forest", "with", "index", "fIdx", "which", "may", "not", "be", "the", "forest", "with", "minimum", "frmtCount", ".", "Used", "by", "fragment", "count", "rollback", "." ]
train
https://github.com/marklogic/marklogic-contentpump/blob/4c41e4a953301f81a4c655efb2a847603dee8afc/mapreduce/src/main/java/com/marklogic/mapreduce/utilities/StatisticalAssignmentPolicy.java#L76-L87
mgm-tp/jfunk
jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedFile.java
ExtendedFile.copy
public void copy(final File source) throws IOException { """ Copies the specified file. If this object is a directory the file will be copied to this directory. If this object represents a file it will be overwritten with the specified file. """ if (!source.exists()) { LOG.warn("File " + source + " can...
java
public void copy(final File source) throws IOException { if (!source.exists()) { LOG.warn("File " + source + " cannot be copied as it does not exist"); return; } if (equals(source)) { LOG.info("Skipping copying of " + source + " as it matches the target"); return; } File target = isDirect...
[ "public", "void", "copy", "(", "final", "File", "source", ")", "throws", "IOException", "{", "if", "(", "!", "source", ".", "exists", "(", ")", ")", "{", "LOG", ".", "warn", "(", "\"File \"", "+", "source", "+", "\" cannot be copied as it does not exist\"", ...
Copies the specified file. If this object is a directory the file will be copied to this directory. If this object represents a file it will be overwritten with the specified file.
[ "Copies", "the", "specified", "file", ".", "If", "this", "object", "is", "a", "directory", "the", "file", "will", "be", "copied", "to", "this", "directory", ".", "If", "this", "object", "represents", "a", "file", "it", "will", "be", "overwritten", "with", ...
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedFile.java#L101-L112
Azure/azure-sdk-for-java
datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsInner.java
AccountsInner.beginCreate
public DataLakeStoreAccountInner beginCreate(String resourceGroupName, String name, DataLakeStoreAccountInner parameters) { """ Creates the specified Data Lake Store account. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. @param name The name of the Dat...
java
public DataLakeStoreAccountInner beginCreate(String resourceGroupName, String name, DataLakeStoreAccountInner parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().body(); }
[ "public", "DataLakeStoreAccountInner", "beginCreate", "(", "String", "resourceGroupName", ",", "String", "name", ",", "DataLakeStoreAccountInner", "parameters", ")", "{", "return", "beginCreateWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ",", "parameter...
Creates the specified Data Lake Store account. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. @param name The name of the Data Lake Store account to create. @param parameters Parameters supplied to create the Data Lake Store account. @throws IllegalArgumentExce...
[ "Creates", "the", "specified", "Data", "Lake", "Store", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsInner.java#L637-L639
graphql-java/java-dataloader
src/main/java/org/dataloader/DataLoader.java
DataLoader.newDataLoader
public static <K, V> DataLoader<K, V> newDataLoader(BatchLoaderWithContext<K, V> batchLoadFunction) { """ Creates new DataLoader with the specified batch loader function and default options (batching, caching and unlimited batch size). @param batchLoadFunction the batch load function to use @param <K> ...
java
public static <K, V> DataLoader<K, V> newDataLoader(BatchLoaderWithContext<K, V> batchLoadFunction) { return newDataLoader(batchLoadFunction, null); }
[ "public", "static", "<", "K", ",", "V", ">", "DataLoader", "<", "K", ",", "V", ">", "newDataLoader", "(", "BatchLoaderWithContext", "<", "K", ",", "V", ">", "batchLoadFunction", ")", "{", "return", "newDataLoader", "(", "batchLoadFunction", ",", "null", ")...
Creates new DataLoader with the specified batch loader function and default options (batching, caching and unlimited batch size). @param batchLoadFunction the batch load function to use @param <K> the key type @param <V> the value type @return a new DataLoader
[ "Creates", "new", "DataLoader", "with", "the", "specified", "batch", "loader", "function", "and", "default", "options", "(", "batching", "caching", "and", "unlimited", "batch", "size", ")", "." ]
train
https://github.com/graphql-java/java-dataloader/blob/dfdc8133ead10aa723f896b4a1fa4a1cec9a6fbc/src/main/java/org/dataloader/DataLoader.java#L142-L144
grandstaish/paperparcel
paperparcel-compiler/src/main/java/paperparcel/Utils.java
Utils.isSingleton
static boolean isSingleton(Types types, TypeElement element) { """ A singleton is defined by a class with a public static final field named "INSTANCE" with a type assignable from itself. """ return isSingleton(types, element, element.asType()); }
java
static boolean isSingleton(Types types, TypeElement element) { return isSingleton(types, element, element.asType()); }
[ "static", "boolean", "isSingleton", "(", "Types", "types", ",", "TypeElement", "element", ")", "{", "return", "isSingleton", "(", "types", ",", "element", ",", "element", ".", "asType", "(", ")", ")", ";", "}" ]
A singleton is defined by a class with a public static final field named "INSTANCE" with a type assignable from itself.
[ "A", "singleton", "is", "defined", "by", "a", "class", "with", "a", "public", "static", "final", "field", "named", "INSTANCE", "with", "a", "type", "assignable", "from", "itself", "." ]
train
https://github.com/grandstaish/paperparcel/blob/917686ced81b335b6708d81d6cc0e3e496f7280d/paperparcel-compiler/src/main/java/paperparcel/Utils.java#L334-L336
playn/playn
scene/src/playn/scene/LayerUtil.java
LayerUtil.parentToLayer
public static Point parentToLayer(Layer layer, XY point, Point into) { """ Converts the supplied point from coordinates relative to its parent to coordinates relative to the specified layer. The results are stored into {@code into}, which is returned for convenience. """ layer.transform().inverseTransfor...
java
public static Point parentToLayer(Layer layer, XY point, Point into) { layer.transform().inverseTransform(into.set(point), into); into.x += layer.originX(); into.y += layer.originY(); return into; }
[ "public", "static", "Point", "parentToLayer", "(", "Layer", "layer", ",", "XY", "point", ",", "Point", "into", ")", "{", "layer", ".", "transform", "(", ")", ".", "inverseTransform", "(", "into", ".", "set", "(", "point", ")", ",", "into", ")", ";", ...
Converts the supplied point from coordinates relative to its parent to coordinates relative to the specified layer. The results are stored into {@code into}, which is returned for convenience.
[ "Converts", "the", "supplied", "point", "from", "coordinates", "relative", "to", "its", "parent", "to", "coordinates", "relative", "to", "the", "specified", "layer", ".", "The", "results", "are", "stored", "into", "{" ]
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/scene/src/playn/scene/LayerUtil.java#L104-L109
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.hasCommonAtom
private static boolean hasCommonAtom(IBond bondA, IBond bondB) { """ Determines if two bonds have at least one atom in common. @param atom first bondA1 @param bondB second bondA1 @return the symbol of the common atom or "" if the 2 bonds have no common atom """ return bondA.contains(bondB....
java
private static boolean hasCommonAtom(IBond bondA, IBond bondB) { return bondA.contains(bondB.getBegin()) || bondA.contains(bondB.getEnd()); }
[ "private", "static", "boolean", "hasCommonAtom", "(", "IBond", "bondA", ",", "IBond", "bondB", ")", "{", "return", "bondA", ".", "contains", "(", "bondB", ".", "getBegin", "(", ")", ")", "||", "bondA", ".", "contains", "(", "bondB", ".", "getEnd", "(", ...
Determines if two bonds have at least one atom in common. @param atom first bondA1 @param bondB second bondA1 @return the symbol of the common atom or "" if the 2 bonds have no common atom
[ "Determines", "if", "two", "bonds", "have", "at", "least", "one", "atom", "in", "common", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L908-L910
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/EventsRequest.java
EventsRequest.withBatchItem
public EventsRequest withBatchItem(java.util.Map<String, EventsBatch> batchItem) { """ A batch of events to process. Each BatchItem consists of an endpoint ID as the key, and an EventsBatch object as the value. @param batchItem A batch of events to process. Each BatchItem consists of an endpoint ID as the key...
java
public EventsRequest withBatchItem(java.util.Map<String, EventsBatch> batchItem) { setBatchItem(batchItem); return this; }
[ "public", "EventsRequest", "withBatchItem", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "EventsBatch", ">", "batchItem", ")", "{", "setBatchItem", "(", "batchItem", ")", ";", "return", "this", ";", "}" ]
A batch of events to process. Each BatchItem consists of an endpoint ID as the key, and an EventsBatch object as the value. @param batchItem A batch of events to process. Each BatchItem consists of an endpoint ID as the key, and an EventsBatch object as the value. @return Returns a reference to this object so that met...
[ "A", "batch", "of", "events", "to", "process", ".", "Each", "BatchItem", "consists", "of", "an", "endpoint", "ID", "as", "the", "key", "and", "an", "EventsBatch", "object", "as", "the", "value", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/EventsRequest.java#L70-L73
citrusframework/citrus
modules/citrus-zookeeper/src/main/java/com/consol/citrus/zookeeper/server/ZooServer.java
ZooServer.getServerFactory
public ServerCnxnFactory getServerFactory() { """ Gets the value of the serverFactory property. @return the serverFactory """ if (serverFactory == null) { try { serverFactory = new NIOServerCnxnFactory(); serverFactory.configure(new InetSocketAddress(port)...
java
public ServerCnxnFactory getServerFactory() { if (serverFactory == null) { try { serverFactory = new NIOServerCnxnFactory(); serverFactory.configure(new InetSocketAddress(port), 5000); } catch (IOException e) { throw new CitrusRuntimeExcept...
[ "public", "ServerCnxnFactory", "getServerFactory", "(", ")", "{", "if", "(", "serverFactory", "==", "null", ")", "{", "try", "{", "serverFactory", "=", "new", "NIOServerCnxnFactory", "(", ")", ";", "serverFactory", ".", "configure", "(", "new", "InetSocketAddres...
Gets the value of the serverFactory property. @return the serverFactory
[ "Gets", "the", "value", "of", "the", "serverFactory", "property", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-zookeeper/src/main/java/com/consol/citrus/zookeeper/server/ZooServer.java#L58-L69
stevespringett/Alpine
alpine/src/main/java/alpine/persistence/AbstractAlpineQueryManager.java
AbstractAlpineQueryManager.getObjectByUuid
@SuppressWarnings("unchecked") public <T> T getObjectByUuid(Class<T> clazz, UUID uuid) { """ Retrieves an object by its UUID. @param <T> A type parameter. This type will be returned @param clazz the persistence class to retrive the ID for @param uuid the uuid of the object to retrieve @return an object of ...
java
@SuppressWarnings("unchecked") public <T> T getObjectByUuid(Class<T> clazz, UUID uuid) { final Query query = pm.newQuery(clazz, "uuid == :uuid"); final List<T> result = (List<T>) query.execute(uuid); return Collections.isEmpty(result) ? null : result.get(0); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "getObjectByUuid", "(", "Class", "<", "T", ">", "clazz", ",", "UUID", "uuid", ")", "{", "final", "Query", "query", "=", "pm", ".", "newQuery", "(", "clazz", ",", "\"uuid ...
Retrieves an object by its UUID. @param <T> A type parameter. This type will be returned @param clazz the persistence class to retrive the ID for @param uuid the uuid of the object to retrieve @return an object of the specified type @since 1.0.0
[ "Retrieves", "an", "object", "by", "its", "UUID", "." ]
train
https://github.com/stevespringett/Alpine/blob/6c5ef5e1ba4f38922096f1307d3950c09edb3093/alpine/src/main/java/alpine/persistence/AbstractAlpineQueryManager.java#L515-L520
nextreports/nextreports-server
src/ro/nextreports/server/api/StorageWebService.java
StorageWebService.getEntities
@GET @Path("getEntities") public List<EntityMetaData> getEntities(@QueryParam("path") String path) { """ Path is relative to nextserver root ('/nextServer'). Ex: '/reports/test' <=> '/nextServer/reports/test' @param path path @return list of entities from path """ String absolutePath = StorageConstants...
java
@GET @Path("getEntities") public List<EntityMetaData> getEntities(@QueryParam("path") String path) { String absolutePath = StorageConstants.NEXT_SERVER_ROOT + path; List<EntityMetaData> result = new ArrayList<EntityMetaData>(); Entity[] entities = new Entity[0]; try { entities = storageService.getEntityChi...
[ "@", "GET", "@", "Path", "(", "\"getEntities\"", ")", "public", "List", "<", "EntityMetaData", ">", "getEntities", "(", "@", "QueryParam", "(", "\"path\"", ")", "String", "path", ")", "{", "String", "absolutePath", "=", "StorageConstants", ".", "NEXT_SERVER_RO...
Path is relative to nextserver root ('/nextServer'). Ex: '/reports/test' <=> '/nextServer/reports/test' @param path path @return list of entities from path
[ "Path", "is", "relative", "to", "nextserver", "root", "(", "/", "nextServer", ")", ".", "Ex", ":", "/", "reports", "/", "test", "<", "=", ">", "/", "nextServer", "/", "reports", "/", "test" ]
train
https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/api/StorageWebService.java#L262-L299
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/setting/session/ValidationSessionComponent.java
ValidationSessionComponent.checkAuth
public ValidationSessionInfo checkAuth(ValidationLoginInfo info, HttpServletRequest req, HttpServletResponse res) { """ Check auth validation session info. @param info the info @param req the req @param res the res @return the validation session info """ if (info.getToken() == null || info.get...
java
public ValidationSessionInfo checkAuth(ValidationLoginInfo info, HttpServletRequest req, HttpServletResponse res) { if (info.getToken() == null || info.getToken().isEmpty()) { throw new ValidationLibException("UnAuthorization", HttpStatus.UNAUTHORIZED); } if (this.validationConfig.g...
[ "public", "ValidationSessionInfo", "checkAuth", "(", "ValidationLoginInfo", "info", ",", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ")", "{", "if", "(", "info", ".", "getToken", "(", ")", "==", "null", "||", "info", ".", "getToken", "(", "...
Check auth validation session info. @param info the info @param req the req @param res the res @return the validation session info
[ "Check", "auth", "validation", "session", "info", "." ]
train
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/setting/session/ValidationSessionComponent.java#L84-L103
UrielCh/ovh-java-sdk
ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/ApiOvhPrice.java
ApiOvhPrice.dedicatedCloud_2016v7_sbg1a_enterprise_host_monthly_hostProfile_GET
public OvhPrice dedicatedCloud_2016v7_sbg1a_enterprise_host_monthly_hostProfile_GET(net.minidev.ovh.api.price.dedicatedcloud._2016v7.sbg1a.enterprise.host.OvhMonthlyEnum hostProfile) throws IOException { """ Get price of dedicated Cloud monthly host ressources REST: GET /price/dedicatedCloud/2016v7/sbg1a/enterp...
java
public OvhPrice dedicatedCloud_2016v7_sbg1a_enterprise_host_monthly_hostProfile_GET(net.minidev.ovh.api.price.dedicatedcloud._2016v7.sbg1a.enterprise.host.OvhMonthlyEnum hostProfile) throws IOException { String qPath = "/price/dedicatedCloud/2016v7/sbg1a/enterprise/host/monthly/{hostProfile}"; StringBuilder sb = pa...
[ "public", "OvhPrice", "dedicatedCloud_2016v7_sbg1a_enterprise_host_monthly_hostProfile_GET", "(", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "price", ".", "dedicatedcloud", ".", "_2016v7", ".", "sbg1a", ".", "enterprise", ".", "host", ".", "OvhMonthlyEnum", ...
Get price of dedicated Cloud monthly host ressources REST: GET /price/dedicatedCloud/2016v7/sbg1a/enterprise/host/monthly/{hostProfile} @param hostProfile [required] type of the monthly ressources you want to order
[ "Get", "price", "of", "dedicated", "Cloud", "monthly", "host", "ressources" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/ApiOvhPrice.java#L4353-L4358
aerogear/aerogear-android-pipe
library/src/main/java/org/jboss/aerogear/android/pipe/PipeManager.java
PipeManager.getPipe
public static LoaderPipe getPipe(String name, Activity activity) { """ Look up for a pipe object. This will wrap the Pipe in a Loader. @param name the name of the actual pipe @param activity the activity whose lifecycle the loader will follow @return the new created Pipe object """ Pipe pipe = pip...
java
public static LoaderPipe getPipe(String name, Activity activity) { Pipe pipe = pipes.get(name); LoaderAdapter adapter = new LoaderAdapter(activity, pipe, name); adapter.setLoaderIds(loaderIdsForNamed); return adapter; }
[ "public", "static", "LoaderPipe", "getPipe", "(", "String", "name", ",", "Activity", "activity", ")", "{", "Pipe", "pipe", "=", "pipes", ".", "get", "(", "name", ")", ";", "LoaderAdapter", "adapter", "=", "new", "LoaderAdapter", "(", "activity", ",", "pipe...
Look up for a pipe object. This will wrap the Pipe in a Loader. @param name the name of the actual pipe @param activity the activity whose lifecycle the loader will follow @return the new created Pipe object
[ "Look", "up", "for", "a", "pipe", "object", ".", "This", "will", "wrap", "the", "Pipe", "in", "a", "Loader", "." ]
train
https://github.com/aerogear/aerogear-android-pipe/blob/ac747965c2d06d6ad46dd8abfbabf3d793f06fa5/library/src/main/java/org/jboss/aerogear/android/pipe/PipeManager.java#L118-L123
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BetterCFGBuilder2.java
BetterCFGBuilder2.inlineAll
private CFG inlineAll() throws CFGBuilderException { """ Inline all JSR subroutines into the top-level subroutine. This produces a complete CFG for the entire method, in which all JSR subroutines are inlined. @return the CFG for the method """ CFG result = new CFG(); Context rootContext =...
java
private CFG inlineAll() throws CFGBuilderException { CFG result = new CFG(); Context rootContext = new Context(null, topLevelSubroutine, result); rootContext.mapBlock(topLevelSubroutine.getEntry(), result.getEntry()); rootContext.mapBlock(topLevelSubroutine.getExit(), result.getExit());...
[ "private", "CFG", "inlineAll", "(", ")", "throws", "CFGBuilderException", "{", "CFG", "result", "=", "new", "CFG", "(", ")", ";", "Context", "rootContext", "=", "new", "Context", "(", "null", ",", "topLevelSubroutine", ",", "result", ")", ";", "rootContext",...
Inline all JSR subroutines into the top-level subroutine. This produces a complete CFG for the entire method, in which all JSR subroutines are inlined. @return the CFG for the method
[ "Inline", "all", "JSR", "subroutines", "into", "the", "top", "-", "level", "subroutine", ".", "This", "produces", "a", "complete", "CFG", "for", "the", "entire", "method", "in", "which", "all", "JSR", "subroutines", "are", "inlined", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/BetterCFGBuilder2.java#L1098-L1111
aoindustries/semanticcms-openfile-servlet
src/main/java/com/semanticcms/openfile/servlet/OpenFile.java
OpenFile.removeFileOpener
public static void removeFileOpener(ServletContext servletContext, String ... extensions) { """ Removes file openers. @param extensions The simple extensions, in lowercase, not including the dot, such as "dia" """ synchronized(fileOpenersLock) { @SuppressWarnings("unchecked") Map<String,FileOpener...
java
public static void removeFileOpener(ServletContext servletContext, String ... extensions) { synchronized(fileOpenersLock) { @SuppressWarnings("unchecked") Map<String,FileOpener> fileOpeners = (Map<String,FileOpener>)servletContext.getAttribute(FILE_OPENERS_REQUEST_ATTRIBUTE_NAME); if(fileOpeners != null) { ...
[ "public", "static", "void", "removeFileOpener", "(", "ServletContext", "servletContext", ",", "String", "...", "extensions", ")", "{", "synchronized", "(", "fileOpenersLock", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "Map", "<", "String", ",", ...
Removes file openers. @param extensions The simple extensions, in lowercase, not including the dot, such as "dia"
[ "Removes", "file", "openers", "." ]
train
https://github.com/aoindustries/semanticcms-openfile-servlet/blob/d22b2580b57708311949ac1088e3275355774921/src/main/java/com/semanticcms/openfile/servlet/OpenFile.java#L135-L148
innoq/LiQID
ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java
LdapHelper.getEntry
public Node getEntry(final String cn, final String owner) { """ Returns an Sub-Entry of an LDAP User/LDAP Group. @param cn of that Entry. @param owner DN of Parent Node. @return a new Entry. """ // TODO implement me! Node entry = new LdapEntry(cn, owner); return entry; }
java
public Node getEntry(final String cn, final String owner) { // TODO implement me! Node entry = new LdapEntry(cn, owner); return entry; }
[ "public", "Node", "getEntry", "(", "final", "String", "cn", ",", "final", "String", "owner", ")", "{", "// TODO implement me!", "Node", "entry", "=", "new", "LdapEntry", "(", "cn", ",", "owner", ")", ";", "return", "entry", ";", "}" ]
Returns an Sub-Entry of an LDAP User/LDAP Group. @param cn of that Entry. @param owner DN of Parent Node. @return a new Entry.
[ "Returns", "an", "Sub", "-", "Entry", "of", "an", "LDAP", "User", "/", "LDAP", "Group", "." ]
train
https://github.com/innoq/LiQID/blob/ae3de2c1fd78c40219780d510eba57c931901279/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java#L275-L279
micronaut-projects/micronaut-core
cli/src/main/groovy/io/micronaut/cli/io/support/ResourceUtils.java
ResourceUtils.getFile
public static File getFile(URL resourceUrl, String description) throws FileNotFoundException { """ Resolve the given resource URL to a <code>java.io.File</code>, i.e. to a file in the file system. @param resourceUrl the resource URL to resolve @param description a description of the original resource that th...
java
public static File getFile(URL resourceUrl, String description) throws FileNotFoundException { if (!URL_PROTOCOL_FILE.equals(resourceUrl.getProtocol())) { throw new FileNotFoundException( description + " cannot be resolved to absolute file path " + "because it doe...
[ "public", "static", "File", "getFile", "(", "URL", "resourceUrl", ",", "String", "description", ")", "throws", "FileNotFoundException", "{", "if", "(", "!", "URL_PROTOCOL_FILE", ".", "equals", "(", "resourceUrl", ".", "getProtocol", "(", ")", ")", ")", "{", ...
Resolve the given resource URL to a <code>java.io.File</code>, i.e. to a file in the file system. @param resourceUrl the resource URL to resolve @param description a description of the original resource that the URL was created for (for example, a class path location) @return a corresponding File object @throws java.i...
[ "Resolve", "the", "given", "resource", "URL", "to", "a", "<code", ">", "java", ".", "io", ".", "File<", "/", "code", ">", "i", ".", "e", ".", "to", "a", "file", "in", "the", "file", "system", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/io/support/ResourceUtils.java#L208-L220
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/dataformats/json/jackson/JsonMapper.java
JsonMapper.fromJson
public synchronized <T> T fromJson(String jsonString, Class<T> clazz) throws JsonException { """ Converts a given string into an object of the given class. @param clazz The class to which the returned object should belong @param jsonString the jsonstring representing the object to be parsed @...
java
public synchronized <T> T fromJson(String jsonString, Class<T> clazz) throws JsonException { if (jsonString == null) { return null; } Reader reader = new StringReader(jsonString); try { return mapper.readValue(reader, clazz); } catch (JsonParse...
[ "public", "synchronized", "<", "T", ">", "T", "fromJson", "(", "String", "jsonString", ",", "Class", "<", "T", ">", "clazz", ")", "throws", "JsonException", "{", "if", "(", "jsonString", "==", "null", ")", "{", "return", "null", ";", "}", "Reader", "re...
Converts a given string into an object of the given class. @param clazz The class to which the returned object should belong @param jsonString the jsonstring representing the object to be parsed @param <T> the type of the returned object @return an instantiated object of class T corresponding to the given ...
[ "Converts", "a", "given", "string", "into", "an", "object", "of", "the", "given", "class", "." ]
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/dataformats/json/jackson/JsonMapper.java#L150-L165
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/Request.java
Request.newGraphPathRequest
public static Request newGraphPathRequest(Session session, String graphPath, Callback callback) { """ Creates a new Request configured to retrieve a particular graph path. @param session the Session to use, or null; if non-null, the session must be in an opened state @param graphPath the graph path to retrie...
java
public static Request newGraphPathRequest(Session session, String graphPath, Callback callback) { return new Request(session, graphPath, null, null, callback); }
[ "public", "static", "Request", "newGraphPathRequest", "(", "Session", "session", ",", "String", "graphPath", ",", "Callback", "callback", ")", "{", "return", "new", "Request", "(", "session", ",", "graphPath", ",", "null", ",", "null", ",", "callback", ")", ...
Creates a new Request configured to retrieve a particular graph path. @param session the Session to use, or null; if non-null, the session must be in an opened state @param graphPath the graph path to retrieve @param callback a callback that will be called when the request is completed to handle success or error condi...
[ "Creates", "a", "new", "Request", "configured", "to", "retrieve", "a", "particular", "graph", "path", "." ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Request.java#L373-L375
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java
RuntimeExceptionsFactory.newIndexOutOfBoundsException
public static IndexOutOfBoundsException newIndexOutOfBoundsException(String message, Object... args) { """ Constructs and initializes a new {@link IndexOutOfBoundsException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {...
java
public static IndexOutOfBoundsException newIndexOutOfBoundsException(String message, Object... args) { return newIndexOutOfBoundsException(null, message, args); }
[ "public", "static", "IndexOutOfBoundsException", "newIndexOutOfBoundsException", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "newIndexOutOfBoundsException", "(", "null", ",", "message", ",", "args", ")", ";", "}" ]
Constructs and initializes a new {@link IndexOutOfBoundsException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link IndexOutOfBoundsException exception}. @param args {@link Object[] arguments} used to replace format placehold...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "IndexOutOfBoundsException", "}", "with", "the", "given", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object", "[]", "arguments", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java#L104-L106
line/armeria
grpc/src/main/java/com/linecorp/armeria/unsafe/grpc/GrpcUnsafeBufferUtil.java
GrpcUnsafeBufferUtil.storeBuffer
public static void storeBuffer(ByteBuf buf, Object message, RequestContext ctx) { """ Stores the {@link ByteBuf} backing {@link Message} to be released later using {@link #releaseBuffer(Object, RequestContext)}. """ IdentityHashMap<Object, ByteBuf> buffers = ctx.attr(BUFFERS).get(); if (buffer...
java
public static void storeBuffer(ByteBuf buf, Object message, RequestContext ctx) { IdentityHashMap<Object, ByteBuf> buffers = ctx.attr(BUFFERS).get(); if (buffers == null) { buffers = new IdentityHashMap<>(); ctx.attr(BUFFERS).set(buffers); } buffers.put(message, b...
[ "public", "static", "void", "storeBuffer", "(", "ByteBuf", "buf", ",", "Object", "message", ",", "RequestContext", "ctx", ")", "{", "IdentityHashMap", "<", "Object", ",", "ByteBuf", ">", "buffers", "=", "ctx", ".", "attr", "(", "BUFFERS", ")", ".", "get", ...
Stores the {@link ByteBuf} backing {@link Message} to be released later using {@link #releaseBuffer(Object, RequestContext)}.
[ "Stores", "the", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/grpc/src/main/java/com/linecorp/armeria/unsafe/grpc/GrpcUnsafeBufferUtil.java#L41-L48
liferay/com-liferay-commerce
commerce-payment-service/src/main/java/com/liferay/commerce/payment/service/persistence/impl/CommercePaymentMethodGroupRelPersistenceImpl.java
CommercePaymentMethodGroupRelPersistenceImpl.findAll
@Override public List<CommercePaymentMethodGroupRel> findAll() { """ Returns all the commerce payment method group rels. @return the commerce payment method group rels """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommercePaymentMethodGroupRel> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommercePaymentMethodGroupRel", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce payment method group rels. @return the commerce payment method group rels
[ "Returns", "all", "the", "commerce", "payment", "method", "group", "rels", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-payment-service/src/main/java/com/liferay/commerce/payment/service/persistence/impl/CommercePaymentMethodGroupRelPersistenceImpl.java#L2041-L2044
grails/grails-core
grails-core/src/main/groovy/grails/util/GrailsMetaClassUtils.java
GrailsMetaClassUtils.invokeMethodIfExists
public static Object invokeMethodIfExists(Object instance, String methodName) { """ Invokes a method if it exists otherwise returns null @param instance The instance @param methodName The method name @return The result of the method call or null """ return invokeMethodIfExists(instance, methodName...
java
public static Object invokeMethodIfExists(Object instance, String methodName) { return invokeMethodIfExists(instance, methodName, NO_ARGS); }
[ "public", "static", "Object", "invokeMethodIfExists", "(", "Object", "instance", ",", "String", "methodName", ")", "{", "return", "invokeMethodIfExists", "(", "instance", ",", "methodName", ",", "NO_ARGS", ")", ";", "}" ]
Invokes a method if it exists otherwise returns null @param instance The instance @param methodName The method name @return The result of the method call or null
[ "Invokes", "a", "method", "if", "it", "exists", "otherwise", "returns", "null" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsMetaClassUtils.java#L228-L230
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/base/Preconditions.java
Preconditions.checkNotNull
@CanIgnoreReturnValue public static <T> T checkNotNull( T reference, @Nullable String errorMessageTemplate, @Nullable Object... errorMessageArgs) { """ Ensures that an object reference passed as a parameter to the calling method is not null. @param reference an object reference @param errorMessageTempl...
java
@CanIgnoreReturnValue public static <T> T checkNotNull( T reference, @Nullable String errorMessageTemplate, @Nullable Object... errorMessageArgs) { if (reference == null) { // If either of these parameters is null, the right thing happens anyway throw new NullPointerException(format(errorMessage...
[ "@", "CanIgnoreReturnValue", "public", "static", "<", "T", ">", "T", "checkNotNull", "(", "T", "reference", ",", "@", "Nullable", "String", "errorMessageTemplate", ",", "@", "Nullable", "Object", "...", "errorMessageArgs", ")", "{", "if", "(", "reference", "==...
Ensures that an object reference passed as a parameter to the calling method is not null. @param reference an object reference @param errorMessageTemplate a template for the exception message should the check fail. The message is formed by replacing each {@code %s} placeholder in the template with an argument. These a...
[ "Ensures", "that", "an", "object", "reference", "passed", "as", "a", "parameter", "to", "the", "calling", "method", "is", "not", "null", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/base/Preconditions.java#L806-L814
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/HarFileSystem.java
HarFileSystem.makeQualified
@Override public Path makeQualified(Path path) { """ /* this makes a path qualified in the har filesystem (non-Javadoc) @see org.apache.hadoop.fs.FilterFileSystem#makeQualified( org.apache.hadoop.fs.Path) """ // make sure that we just get the // path component Path fsPath = path; if (!path...
java
@Override public Path makeQualified(Path path) { // make sure that we just get the // path component Path fsPath = path; if (!path.isAbsolute()) { fsPath = new Path(archivePath, path); } URI tmpURI = fsPath.toUri(); //change this to Har uri return new Path(uri.getScheme(), harAu...
[ "@", "Override", "public", "Path", "makeQualified", "(", "Path", "path", ")", "{", "// make sure that we just get the", "// path component", "Path", "fsPath", "=", "path", ";", "if", "(", "!", "path", ".", "isAbsolute", "(", ")", ")", "{", "fsPath", "=", "ne...
/* this makes a path qualified in the har filesystem (non-Javadoc) @see org.apache.hadoop.fs.FilterFileSystem#makeQualified( org.apache.hadoop.fs.Path)
[ "/", "*", "this", "makes", "a", "path", "qualified", "in", "the", "har", "filesystem", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/HarFileSystem.java#L374-L386
BotMill/fb-botmill
src/main/java/co/aurasphere/botmill/fb/FbBot.java
FbBot.addActionFrame
public void addActionFrame(FbBotMillEvent event, AutoReply reply) { """ Adds an {@link ActionFrame} to this bot. @param event the {@link FbBotMillEvent} to handle. @param reply the {@link AutoReply} which should handle the event. """ ActionFrame frame = new ActionFrame(event, reply); this.actionFrame...
java
public void addActionFrame(FbBotMillEvent event, AutoReply reply) { ActionFrame frame = new ActionFrame(event, reply); this.actionFrameList.add(frame); }
[ "public", "void", "addActionFrame", "(", "FbBotMillEvent", "event", ",", "AutoReply", "reply", ")", "{", "ActionFrame", "frame", "=", "new", "ActionFrame", "(", "event", ",", "reply", ")", ";", "this", ".", "actionFrameList", ".", "add", "(", "frame", ")", ...
Adds an {@link ActionFrame} to this bot. @param event the {@link FbBotMillEvent} to handle. @param reply the {@link AutoReply} which should handle the event.
[ "Adds", "an", "{", "@link", "ActionFrame", "}", "to", "this", "bot", "." ]
train
https://github.com/BotMill/fb-botmill/blob/d94da3615a7339822c137ef75c92a03d791ee969/src/main/java/co/aurasphere/botmill/fb/FbBot.java#L154-L157
offbynull/coroutines
instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/asm/SearchUtils.java
SearchUtils.findLineNumberForInstruction
public static LineNumberNode findLineNumberForInstruction(InsnList insnList, AbstractInsnNode insnNode) { """ Find line number associated with an instruction. @param insnList instruction list for method @param insnNode instruction within method being searched against @throws NullPointerException if any argument...
java
public static LineNumberNode findLineNumberForInstruction(InsnList insnList, AbstractInsnNode insnNode) { Validate.notNull(insnList); Validate.notNull(insnNode); int idx = insnList.indexOf(insnNode); Validate.isTrue(idx != -1); // Get index of labels and insnNod...
[ "public", "static", "LineNumberNode", "findLineNumberForInstruction", "(", "InsnList", "insnList", ",", "AbstractInsnNode", "insnNode", ")", "{", "Validate", ".", "notNull", "(", "insnList", ")", ";", "Validate", ".", "notNull", "(", "insnNode", ")", ";", "int", ...
Find line number associated with an instruction. @param insnList instruction list for method @param insnNode instruction within method being searched against @throws NullPointerException if any argument is {@code null} or contains {@code null} @throws IllegalArgumentException if arguments aren't all from the same metho...
[ "Find", "line", "number", "associated", "with", "an", "instruction", "." ]
train
https://github.com/offbynull/coroutines/blob/b1b83c293945f53a2f63fca8f15a53e88b796bf5/instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/asm/SearchUtils.java#L394-L412
deeplearning4j/deeplearning4j
datavec/datavec-spark/src/main/java/org/datavec/spark/transform/utils/SparkUtils.java
SparkUtils.writeAnalysisHTMLToFile
public static void writeAnalysisHTMLToFile(String outputPath, DataAnalysis dataAnalysis, JavaSparkContext sc) { """ Write a DataAnalysis to HDFS (or locally) as a HTML file @param outputPath Output path @param dataAnalysis Analysis to generate HTML file for @param sc Spark context """...
java
public static void writeAnalysisHTMLToFile(String outputPath, DataAnalysis dataAnalysis, JavaSparkContext sc) { try { String analysisAsHtml = HtmlAnalysis.createHtmlAnalysisString(dataAnalysis); writeStringToFile(outputPath, analysisAsHtml, sc); } catch (Exception e) { ...
[ "public", "static", "void", "writeAnalysisHTMLToFile", "(", "String", "outputPath", ",", "DataAnalysis", "dataAnalysis", ",", "JavaSparkContext", "sc", ")", "{", "try", "{", "String", "analysisAsHtml", "=", "HtmlAnalysis", ".", "createHtmlAnalysisString", "(", "dataAn...
Write a DataAnalysis to HDFS (or locally) as a HTML file @param outputPath Output path @param dataAnalysis Analysis to generate HTML file for @param sc Spark context
[ "Write", "a", "DataAnalysis", "to", "HDFS", "(", "or", "locally", ")", "as", "a", "HTML", "file" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-spark/src/main/java/org/datavec/spark/transform/utils/SparkUtils.java#L238-L245
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TreeUtil.java
TreeUtil.getComponentWithContextForId
public static ComponentWithContext getComponentWithContextForId(final WComponent root, final String id) { """ Retrieves the context for the component with the given Id. <p> Searches visible and not visible components. </p> @param root the root component to search from. @param id the id to search for. @r...
java
public static ComponentWithContext getComponentWithContextForId(final WComponent root, final String id) { return getComponentWithContextForId(root, id, false); }
[ "public", "static", "ComponentWithContext", "getComponentWithContextForId", "(", "final", "WComponent", "root", ",", "final", "String", "id", ")", "{", "return", "getComponentWithContextForId", "(", "root", ",", "id", ",", "false", ")", ";", "}" ]
Retrieves the context for the component with the given Id. <p> Searches visible and not visible components. </p> @param root the root component to search from. @param id the id to search for. @return the context for the component with the given id, or null if not found.
[ "Retrieves", "the", "context", "for", "the", "component", "with", "the", "given", "Id", ".", "<p", ">", "Searches", "visible", "and", "not", "visible", "components", ".", "<", "/", "p", ">" ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TreeUtil.java#L183-L186
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/servlet/ServletUtil.java
ServletUtil.addCookie
public final static void addCookie(HttpServletResponse response, String name, String value, int maxAgeInSeconds, String path, String domain) { """ 设定返回给客户端的Cookie @param response 响应对象{@link HttpServletResponse} @param name cookie名 @param value cookie值 @param maxAgeInSeconds -1: 关闭浏览器清除Cookie. 0: 立即清除Cookie. ...
java
public final static void addCookie(HttpServletResponse response, String name, String value, int maxAgeInSeconds, String path, String domain) { Cookie cookie = new Cookie(name, value); if (domain != null) { cookie.setDomain(domain); } cookie.setMaxAge(maxAgeInSeconds); cookie.setPath(path); addCook...
[ "public", "final", "static", "void", "addCookie", "(", "HttpServletResponse", "response", ",", "String", "name", ",", "String", "value", ",", "int", "maxAgeInSeconds", ",", "String", "path", ",", "String", "domain", ")", "{", "Cookie", "cookie", "=", "new", ...
设定返回给客户端的Cookie @param response 响应对象{@link HttpServletResponse} @param name cookie名 @param value cookie值 @param maxAgeInSeconds -1: 关闭浏览器清除Cookie. 0: 立即清除Cookie. &gt;0 : Cookie存在的秒数. @param path Cookie的有效路径 @param domain the domain name within which this cookie is visible; form is according to RFC 2109
[ "设定返回给客户端的Cookie" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/servlet/ServletUtil.java#L432-L440
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/ExpressionHandling.java
ExpressionHandling.updateExpression
public void updateExpression(String expr, Object value, PageContext pageContext) throws ExpressionUpdateException, JspException { """ This method will update the object identified by the <code>expr</code> parameter with the value. If the @param expr @param value @throws org.apache.beehive.netui.sc...
java
public void updateExpression(String expr, Object value, PageContext pageContext) throws ExpressionUpdateException, JspException { if (isExpression(expr)) { VariableResolver vr = ImplicitObjectUtil.getUpdateVariableResolver(pageContext.getRequest(), pageContext.getResponse(), false);...
[ "public", "void", "updateExpression", "(", "String", "expr", ",", "Object", "value", ",", "PageContext", "pageContext", ")", "throws", "ExpressionUpdateException", ",", "JspException", "{", "if", "(", "isExpression", "(", "expr", ")", ")", "{", "VariableResolver",...
This method will update the object identified by the <code>expr</code> parameter with the value. If the @param expr @param value @throws org.apache.beehive.netui.script.ExpressionUpdateException
[ "This", "method", "will", "update", "the", "object", "identified", "by", "the", "<code", ">", "expr<", "/", "code", ">", "parameter", "with", "the", "value", ".", "If", "the", "@param", "expr", "@param", "value", "@throws", "org", ".", "apache", ".", "be...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/ExpressionHandling.java#L115-L127
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspUtil.java
JspUtil.createURL
public static String createURL(String href, String action, String location, String scope, Map params, JspContext jspContext) throws URISyntaxException { """ <p> Utility method used by data grid related classes to create URLs. If both an action name and href are provided, the action name will be used...
java
public static String createURL(String href, String action, String location, String scope, Map params, JspContext jspContext) throws URISyntaxException { PageContext pageContext = getPageContext(jspContext); /* add the jpfScopeID parameter, if the scope attribute is present. */ if(sc...
[ "public", "static", "String", "createURL", "(", "String", "href", ",", "String", "action", ",", "String", "location", ",", "String", "scope", ",", "Map", "params", ",", "JspContext", "jspContext", ")", "throws", "URISyntaxException", "{", "PageContext", "pageCon...
<p> Utility method used by data grid related classes to create URLs. If both an action name and href are provided, the action name will be used to construct the URL string. </p> @param href the href @param action the action @param location the intra page location @param scope the scope into which to create the URL @pa...
[ "<p", ">", "Utility", "method", "used", "by", "data", "grid", "related", "classes", "to", "create", "URLs", ".", "If", "both", "an", "action", "name", "and", "href", "are", "provided", "the", "action", "name", "will", "be", "used", "to", "construct", "th...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspUtil.java#L84-L108
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/CeCPMain.java
CeCPMain.alignRight
private AFPChain alignRight(Atom[] ca1, Atom[] ca2, CECPParameters cpparams) throws StructureException { """ Aligns the structures, duplicating ca2 regardless of {@link CECPParameters.getDuplicationHint() param.getDuplicationHint}. @param ca1 @param ca2 @param cpparams @return @throws StructureException ...
java
private AFPChain alignRight(Atom[] ca1, Atom[] ca2, CECPParameters cpparams) throws StructureException { long startTime = System.currentTimeMillis(); Atom[] ca2m = StructureTools.duplicateCA2(ca2); if(debug) { System.out.format("Duplicating ca2 took %s ms\n",System.currentTimeMillis()-startTime); start...
[ "private", "AFPChain", "alignRight", "(", "Atom", "[", "]", "ca1", ",", "Atom", "[", "]", "ca2", ",", "CECPParameters", "cpparams", ")", "throws", "StructureException", "{", "long", "startTime", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "Atom",...
Aligns the structures, duplicating ca2 regardless of {@link CECPParameters.getDuplicationHint() param.getDuplicationHint}. @param ca1 @param ca2 @param cpparams @return @throws StructureException
[ "Aligns", "the", "structures", "duplicating", "ca2", "regardless", "of", "{" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/CeCPMain.java#L148-L179
protostuff/protostuff
protostuff-core/src/main/java/io/protostuff/GraphIOUtil.java
GraphIOUtil.optMergeDelimitedFrom
public static <T> boolean optMergeDelimitedFrom(InputStream in, T message, Schema<T> schema, LinkedBuffer buffer) throws IOException { """ Optimal/Optional mergeDelimitedFrom - If the message does not fit the buffer, no merge is done and this method will return false. <p> This is strictl...
java
public static <T> boolean optMergeDelimitedFrom(InputStream in, T message, Schema<T> schema, LinkedBuffer buffer) throws IOException { return optMergeDelimitedFrom(in, message, schema, true, buffer); }
[ "public", "static", "<", "T", ">", "boolean", "optMergeDelimitedFrom", "(", "InputStream", "in", ",", "T", "message", ",", "Schema", "<", "T", ">", "schema", ",", "LinkedBuffer", "buffer", ")", "throws", "IOException", "{", "return", "optMergeDelimitedFrom", "...
Optimal/Optional mergeDelimitedFrom - If the message does not fit the buffer, no merge is done and this method will return false. <p> This is strictly for reading a single message from the stream because the buffer is aggressively filled when reading the delimited size (which could result into reading more bytes than i...
[ "Optimal", "/", "Optional", "mergeDelimitedFrom", "-", "If", "the", "message", "does", "not", "fit", "the", "buffer", "no", "merge", "is", "done", "and", "this", "method", "will", "return", "false", ".", "<p", ">", "This", "is", "strictly", "for", "reading...
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-core/src/main/java/io/protostuff/GraphIOUtil.java#L361-L366
pwheel/spring-security-oauth2-client
src/main/java/com/racquettrack/security/oauth/OAuth2AuthenticationFilter.java
OAuth2AuthenticationFilter.setDetails
protected void setDetails(HttpServletRequest request, OAuth2AuthenticationToken authRequest) { """ Provided so that subclasses may configure what is put into the authentication request's details property. @param request that an authentication request is being created for @param authRequest the authentication ...
java
protected void setDetails(HttpServletRequest request, OAuth2AuthenticationToken authRequest) { authRequest.setDetails(authenticationDetailsSource.buildDetails(request)); }
[ "protected", "void", "setDetails", "(", "HttpServletRequest", "request", ",", "OAuth2AuthenticationToken", "authRequest", ")", "{", "authRequest", ".", "setDetails", "(", "authenticationDetailsSource", ".", "buildDetails", "(", "request", ")", ")", ";", "}" ]
Provided so that subclasses may configure what is put into the authentication request's details property. @param request that an authentication request is being created for @param authRequest the authentication request object that should have its details set
[ "Provided", "so", "that", "subclasses", "may", "configure", "what", "is", "put", "into", "the", "authentication", "request", "s", "details", "property", "." ]
train
https://github.com/pwheel/spring-security-oauth2-client/blob/c0258823493e268495c9752c5d752f74c6809c6b/src/main/java/com/racquettrack/security/oauth/OAuth2AuthenticationFilter.java#L154-L156
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/schema/SchemaService.java
SchemaService.verifyStorageServiceOption
private StorageService verifyStorageServiceOption(ApplicationDefinition currAppDef, ApplicationDefinition appDef) { """ change, ensure it hasn't changed. Return the application's StorageService object. """ // Verify or assign StorageService String ssName = getStorageServiceOption(appDef); ...
java
private StorageService verifyStorageServiceOption(ApplicationDefinition currAppDef, ApplicationDefinition appDef) { // Verify or assign StorageService String ssName = getStorageServiceOption(appDef); StorageService storageService = getStorageService(appDef); Utils.require(storageServ...
[ "private", "StorageService", "verifyStorageServiceOption", "(", "ApplicationDefinition", "currAppDef", ",", "ApplicationDefinition", "appDef", ")", "{", "// Verify or assign StorageService\r", "String", "ssName", "=", "getStorageServiceOption", "(", "appDef", ")", ";", "Stora...
change, ensure it hasn't changed. Return the application's StorageService object.
[ "change", "ensure", "it", "hasn", "t", "changed", ".", "Return", "the", "application", "s", "StorageService", "object", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/schema/SchemaService.java#L369-L381
pravega/pravega
common/src/main/java/io/pravega/common/function/Callbacks.java
Callbacks.invokeSafely
public static <T> void invokeSafely(Consumer<T> consumer, T argument, Consumer<Throwable> failureHandler) { """ Invokes the given Consumer with the given argument, and catches any exceptions that it may throw. @param consumer The consumer to invoke. @param argument The argument to pass to the consu...
java
public static <T> void invokeSafely(Consumer<T> consumer, T argument, Consumer<Throwable> failureHandler) { Preconditions.checkNotNull(consumer, "consumer"); try { consumer.accept(argument); } catch (Exception ex) { if (failureHandler != null) { invokeSaf...
[ "public", "static", "<", "T", ">", "void", "invokeSafely", "(", "Consumer", "<", "T", ">", "consumer", ",", "T", "argument", ",", "Consumer", "<", "Throwable", ">", "failureHandler", ")", "{", "Preconditions", ".", "checkNotNull", "(", "consumer", ",", "\"...
Invokes the given Consumer with the given argument, and catches any exceptions that it may throw. @param consumer The consumer to invoke. @param argument The argument to pass to the consumer. @param failureHandler An optional callback to invoke if the consumer threw any exceptions. @param <T> Th...
[ "Invokes", "the", "given", "Consumer", "with", "the", "given", "argument", "and", "catches", "any", "exceptions", "that", "it", "may", "throw", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/function/Callbacks.java#L50-L60
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy/GroovyScript2RestLoader.java
GroovyScript2RestLoader.addScript
@POST @Consumes( { """ This method is useful for clients that can send script in request body without form-data. At required to set specific Content-type header 'script/groovy'. @param stream the stream that contains groovy source code @param uriInfo see javax.ws.rs.core.UriInfo @param repository reposit...
java
@POST @Consumes({"script/groovy"}) @Path("add/{repository}/{workspace}/{path:.*}") public Response addScript(InputStream stream, @Context UriInfo uriInfo, @PathParam("repository") String repository, @PathParam("workspace") String workspace, @PathParam("path") String path) { Session ses = null; ...
[ "@", "POST", "@", "Consumes", "(", "{", "\"script/groovy\"", "}", ")", "@", "Path", "(", "\"add/{repository}/{workspace}/{path:.*}\"", ")", "public", "Response", "addScript", "(", "InputStream", "stream", ",", "@", "Context", "UriInfo", "uriInfo", ",", "@", "Pat...
This method is useful for clients that can send script in request body without form-data. At required to set specific Content-type header 'script/groovy'. @param stream the stream that contains groovy source code @param uriInfo see javax.ws.rs.core.UriInfo @param repository repository name @param workspace workspace n...
[ "This", "method", "is", "useful", "for", "clients", "that", "can", "send", "script", "in", "request", "body", "without", "form", "-", "data", ".", "At", "required", "to", "set", "specific", "Content", "-", "type", "header", "script", "/", "groovy", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy/GroovyScript2RestLoader.java#L742-L779
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/IHEAuditor.java
IHEAuditor.auditNodeAuthenticationFailure
public void auditNodeAuthenticationFailure(boolean mitigationSuccessful, String reportingActor, String reportingProcess, String failedActor, String failedUri, String failureDescription) { """ Sends a DICOM Security Alert / Node Authentication event message for node authentication failures. Based on ...
java
public void auditNodeAuthenticationFailure(boolean mitigationSuccessful, String reportingActor, String reportingProcess, String failedActor, String failedUri, String failureDescription) { if (!isAuditorEnabled()) { return; } RFC3881EventOutcomeCodes eventOutcome; if (mitigationSuccessful) { ...
[ "public", "void", "auditNodeAuthenticationFailure", "(", "boolean", "mitigationSuccessful", ",", "String", "reportingActor", ",", "String", "reportingProcess", ",", "String", "failedActor", ",", "String", "failedUri", ",", "String", "failureDescription", ")", "{", "if",...
Sends a DICOM Security Alert / Node Authentication event message for node authentication failures. Based on DICOM Supplement 95 specifications, if the security successfully mitigated a PHI leak, then an event outcome indicator of "SERIOUS FAILURE" is sent. Otherwise, an event outcome indicator of "MAJOR FAILURE" is s...
[ "Sends", "a", "DICOM", "Security", "Alert", "/", "Node", "Authentication", "event", "message", "for", "node", "authentication", "failures", ".", "Based", "on", "DICOM", "Supplement", "95", "specifications", "if", "the", "security", "successfully", "mitigated", "a"...
train
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/IHEAuditor.java#L653-L680
sawano/java-commons
src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java
AbstractValidate.validIndex
public <T extends Collection<?>> T validIndex(final T collection, final int index) { """ <p>Validates that the index is within the bounds of the argument collection; otherwise throwing an exception.</p> <pre>Validate.validIndex(myCollection, 2);</pre> <p>If the index is invalid, then the message of the exception...
java
public <T extends Collection<?>> T validIndex(final T collection, final int index) { return validIndex(collection, index, DEFAULT_VALID_INDEX_COLLECTION_EX_MESSAGE, index); }
[ "public", "<", "T", "extends", "Collection", "<", "?", ">", ">", "T", "validIndex", "(", "final", "T", "collection", ",", "final", "int", "index", ")", "{", "return", "validIndex", "(", "collection", ",", "index", ",", "DEFAULT_VALID_INDEX_COLLECTION_EX_MESSAG...
<p>Validates that the index is within the bounds of the argument collection; otherwise throwing an exception.</p> <pre>Validate.validIndex(myCollection, 2);</pre> <p>If the index is invalid, then the message of the exception is &quot;The validated collection index is invalid: &quot; followed by the index.</p> @param <...
[ "<p", ">", "Validates", "that", "the", "index", "is", "within", "the", "bounds", "of", "the", "argument", "collection", ";", "otherwise", "throwing", "an", "exception", ".", "<", "/", "p", ">", "<pre", ">", "Validate", ".", "validIndex", "(", "myCollection...
train
https://github.com/sawano/java-commons/blob/6f219c9e8dec4401dbe528d17ae6ec1ef9c0d284/src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java#L1040-L1042
icode/ameba
src/main/java/ameba/mvc/template/internal/TemplateHelper.java
TemplateHelper.getStringExtends
public static String getStringExtends(Configuration config, String module) { """ <p>getStringExtends.</p> @param config a {@link javax.ws.rs.core.Configuration} object. @param module a {@link java.lang.String} object. @return a {@link java.lang.String} object. """ Map<String, Object> map = config....
java
public static String getStringExtends(Configuration config, String module) { Map<String, Object> map = config.getProperties(); String extension = (String) map.get(AbstractTemplateProcessor.TEMPLATE_CONF_PREFIX + module + ".suffix"); if (StringUtils.isNotBlank(extension)) { extension ...
[ "public", "static", "String", "getStringExtends", "(", "Configuration", "config", ",", "String", "module", ")", "{", "Map", "<", "String", ",", "Object", ">", "map", "=", "config", ".", "getProperties", "(", ")", ";", "String", "extension", "=", "(", "Stri...
<p>getStringExtends.</p> @param config a {@link javax.ws.rs.core.Configuration} object. @param module a {@link java.lang.String} object. @return a {@link java.lang.String} object.
[ "<p", ">", "getStringExtends", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/mvc/template/internal/TemplateHelper.java#L207-L222
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/WikipediaInfo.java
WikipediaInfo.getDistributionOfArticlesByCategory
public Map<Integer,Integer> getDistributionOfArticlesByCategory(Wikipedia pWiki, CategoryGraph catGraph) throws WikiPageNotFoundException { """ Computes the distribution of the number of articles per category. If the return value has been already computed, it is returned, else it is computed at retrieval time. @...
java
public Map<Integer,Integer> getDistributionOfArticlesByCategory(Wikipedia pWiki, CategoryGraph catGraph) throws WikiPageNotFoundException { if (degreeDistribution == null) { // has not been initialized yet iterateCategoriesGetArticles(pWiki, catGraph); } return degreeDistribution; ...
[ "public", "Map", "<", "Integer", ",", "Integer", ">", "getDistributionOfArticlesByCategory", "(", "Wikipedia", "pWiki", ",", "CategoryGraph", "catGraph", ")", "throws", "WikiPageNotFoundException", "{", "if", "(", "degreeDistribution", "==", "null", ")", "{", "// ha...
Computes the distribution of the number of articles per category. If the return value has been already computed, it is returned, else it is computed at retrieval time. @param pWiki The wikipedia object. @param catGraph The category graph. @return A map containing the distribution mapping from a degree to the number of ...
[ "Computes", "the", "distribution", "of", "the", "number", "of", "articles", "per", "category", ".", "If", "the", "return", "value", "has", "been", "already", "computed", "it", "is", "returned", "else", "it", "is", "computed", "at", "retrieval", "time", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/WikipediaInfo.java#L302-L307
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/application/exceptionhandling/DelegatingExceptionHandler.java
DelegatingExceptionHandler.uncaughtException
public void uncaughtException(Thread thread, Throwable throwable) { """ Delegates the throwable to the appropriate delegate exception handler. @param thread the thread in which the throwable occurred @param throwable the thrown throwable """ if (exceptionPurger != null) { throwable = exce...
java
public void uncaughtException(Thread thread, Throwable throwable) { if (exceptionPurger != null) { throwable = exceptionPurger.purge(throwable); } for (ExceptionHandlerDelegate delegate : delegateList) { if (delegate.hasAppropriateHandler(throwable)) { del...
[ "public", "void", "uncaughtException", "(", "Thread", "thread", ",", "Throwable", "throwable", ")", "{", "if", "(", "exceptionPurger", "!=", "null", ")", "{", "throwable", "=", "exceptionPurger", ".", "purge", "(", "throwable", ")", ";", "}", "for", "(", "...
Delegates the throwable to the appropriate delegate exception handler. @param thread the thread in which the throwable occurred @param throwable the thrown throwable
[ "Delegates", "the", "throwable", "to", "the", "appropriate", "delegate", "exception", "handler", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/application/exceptionhandling/DelegatingExceptionHandler.java#L96-L108
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/xen/xen_health_monitor_fan_speed.java
xen_health_monitor_fan_speed.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ xen_health_monitor_fan_speed_responses result = (xen_health_monitor_fan...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { xen_health_monitor_fan_speed_responses result = (xen_health_monitor_fan_speed_responses) service.get_payload_formatter().string_to_resource(xen_health_monitor_fan_speed_responses.class, response); if(res...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "xen_health_monitor_fan_speed_responses", "result", "=", "(", "xen_health_monitor_fan_speed_responses", ")", "serv...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/xen/xen_health_monitor_fan_speed.java#L173-L190
gallandarakhneorg/afc
core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d1/Transform1D.java
Transform1D.setTranslation
public void setTranslation(List<? extends S> path, Direction1D direction, double curvilineCoord, double shiftCoord) { """ Set the position. @param path the path to follow. @param direction is the direction to follow on the path if the path contains only one segment. @param curvilineCoord the curviline transla...
java
public void setTranslation(List<? extends S> path, Direction1D direction, double curvilineCoord, double shiftCoord) { this.path = path == null || path.isEmpty() ? null : new ArrayList<>(path); this.firstSegmentDirection = detectFirstSegmentDirection(direction); this.curvilineTranslation = curvilineCoord; this.s...
[ "public", "void", "setTranslation", "(", "List", "<", "?", "extends", "S", ">", "path", ",", "Direction1D", "direction", ",", "double", "curvilineCoord", ",", "double", "shiftCoord", ")", "{", "this", ".", "path", "=", "path", "==", "null", "||", "path", ...
Set the position. @param path the path to follow. @param direction is the direction to follow on the path if the path contains only one segment. @param curvilineCoord the curviline translation. @param shiftCoord the shifting translation.
[ "Set", "the", "position", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d1/Transform1D.java#L314-L320
jbundle/jbundle
base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java
BaseSession.doRemoteAction
public Object doRemoteAction(String strCommand, Map<String, Object> properties) throws DBException, RemoteException { """ Do a remote action. @param strCommand Command to perform remotely. @param properties Properties for this command (optional). @return boolean success. """ synchronized (this.getTa...
java
public Object doRemoteAction(String strCommand, Map<String, Object> properties) throws DBException, RemoteException { synchronized (this.getTask()) { // Just being careful (in case the user decides to do some data access) // Don't override this, override doRemoteCommand(xxx); ...
[ "public", "Object", "doRemoteAction", "(", "String", "strCommand", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "throws", "DBException", ",", "RemoteException", "{", "synchronized", "(", "this", ".", "getTask", "(", ")", ")", "{", "// Ju...
Do a remote action. @param strCommand Command to perform remotely. @param properties Properties for this command (optional). @return boolean success.
[ "Do", "a", "remote", "action", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java#L155-L162
deeplearning4j/deeplearning4j
datavec/datavec-data/datavec-data-image/src/main/java/org/datavec/image/transform/CropImageTransform.java
CropImageTransform.doTransform
@Override protected ImageWritable doTransform(ImageWritable image, Random random) { """ Takes an image and returns a transformed image. Uses the random object in the case of random transformations. @param image to transform, null == end of stream @param random object to use (or null for deterministic) @...
java
@Override protected ImageWritable doTransform(ImageWritable image, Random random) { if (image == null) { return null; } Mat mat = converter.convert(image.getFrame()); int top = random != null ? random.nextInt(cropTop + 1) : cropTop; int left = random != null ? ran...
[ "@", "Override", "protected", "ImageWritable", "doTransform", "(", "ImageWritable", "image", ",", "Random", "random", ")", "{", "if", "(", "image", "==", "null", ")", "{", "return", "null", ";", "}", "Mat", "mat", "=", "converter", ".", "convert", "(", "...
Takes an image and returns a transformed image. Uses the random object in the case of random transformations. @param image to transform, null == end of stream @param random object to use (or null for deterministic) @return transformed image
[ "Takes", "an", "image", "and", "returns", "a", "transformed", "image", ".", "Uses", "the", "random", "object", "in", "the", "case", "of", "random", "transformations", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-data/datavec-data-image/src/main/java/org/datavec/image/transform/CropImageTransform.java#L89-L107
reactor/reactor-netty
src/main/java/reactor/netty/udp/UdpServer.java
UdpServer.doOnBound
public final UdpServer doOnBound(Consumer<? super Connection> doOnBound) { """ Setup a callback called when {@link io.netty.channel.Channel} is bound. @param doOnBound a consumer observing server started event @return a new {@link UdpServer} """ Objects.requireNonNull(doOnBound, "doOnBound"); return...
java
public final UdpServer doOnBound(Consumer<? super Connection> doOnBound) { Objects.requireNonNull(doOnBound, "doOnBound"); return new UdpServerDoOn(this, null, doOnBound, null); }
[ "public", "final", "UdpServer", "doOnBound", "(", "Consumer", "<", "?", "super", "Connection", ">", "doOnBound", ")", "{", "Objects", ".", "requireNonNull", "(", "doOnBound", ",", "\"doOnBound\"", ")", ";", "return", "new", "UdpServerDoOn", "(", "this", ",", ...
Setup a callback called when {@link io.netty.channel.Channel} is bound. @param doOnBound a consumer observing server started event @return a new {@link UdpServer}
[ "Setup", "a", "callback", "called", "when", "{", "@link", "io", ".", "netty", ".", "channel", ".", "Channel", "}", "is", "bound", "." ]
train
https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/udp/UdpServer.java#L194-L197
marklogic/java-client-api
marklogic-client-api/src/main/java/com/marklogic/client/impl/TransformExtensionsImpl.java
TransformExtensionsImpl.writeTextHandleTransformAs
private void writeTextHandleTransformAs(String transformName, ExtensionMetadata metadata, Object source, String transformType) throws ResourceNotFoundException, ResourceNotResendableException, ForbiddenUserException, FailedRequestException { """ This method used by writeJavascriptTransformAs and writeXQueryTra...
java
private void writeTextHandleTransformAs(String transformName, ExtensionMetadata metadata, Object source, String transformType) throws ResourceNotFoundException, ResourceNotResendableException, ForbiddenUserException, FailedRequestException { if (source == null) { throw new IllegalArgumentException("no sou...
[ "private", "void", "writeTextHandleTransformAs", "(", "String", "transformName", ",", "ExtensionMetadata", "metadata", ",", "Object", "source", ",", "String", "transformType", ")", "throws", "ResourceNotFoundException", ",", "ResourceNotResendableException", ",", "Forbidden...
This method used by writeJavascriptTransformAs and writeXQueryTransformAs
[ "This", "method", "used", "by", "writeJavascriptTransformAs", "and", "writeXQueryTransformAs" ]
train
https://github.com/marklogic/java-client-api/blob/acf60229a928abd4a8cc4b21b641d56957467da7/marklogic-client-api/src/main/java/com/marklogic/client/impl/TransformExtensionsImpl.java#L270-L299
sagiegurari/fax4j
src/main/java/org/fax4j/spi/email/MailConnectionFactoryImpl.java
MailConnectionFactoryImpl.createTransport
protected Transport createTransport(Session session) { """ This function returns a transport for the provided session. @param session The mail session @return The mail transport """ Transport transport=null; try { //get the transport transport=session.get...
java
protected Transport createTransport(Session session) { Transport transport=null; try { //get the transport transport=session.getTransport(this.transportProtocol); //connect if(this.transportPort>0) { transport.conne...
[ "protected", "Transport", "createTransport", "(", "Session", "session", ")", "{", "Transport", "transport", "=", "null", ";", "try", "{", "//get the transport", "transport", "=", "session", ".", "getTransport", "(", "this", ".", "transportProtocol", ")", ";", "/...
This function returns a transport for the provided session. @param session The mail session @return The mail transport
[ "This", "function", "returns", "a", "transport", "for", "the", "provided", "session", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/email/MailConnectionFactoryImpl.java#L59-L83
cuba-platform/yarg
core/modules/core/src/com/haulmont/yarg/util/db/QueryRunner.java
QueryRunner.fillStatement
protected void fillStatement(PreparedStatement stmt, Object[] params) throws SQLException { """ Fill the <code>PreparedStatement</code> replacement parameters with the given objects. @param stmt PreparedStatement to fill @param params Query replacement parameters; <code>null</code> is a valid value to ...
java
protected void fillStatement(PreparedStatement stmt, Object[] params) throws SQLException { fillStatement(stmt, params, null); }
[ "protected", "void", "fillStatement", "(", "PreparedStatement", "stmt", ",", "Object", "[", "]", "params", ")", "throws", "SQLException", "{", "fillStatement", "(", "stmt", ",", "params", ",", "null", ")", ";", "}" ]
Fill the <code>PreparedStatement</code> replacement parameters with the given objects. @param stmt PreparedStatement to fill @param params Query replacement parameters; <code>null</code> is a valid value to pass in. @throws java.sql.SQLException if a database access error occurs
[ "Fill", "the", "<code", ">", "PreparedStatement<", "/", "code", ">", "replacement", "parameters", "with", "the", "given", "objects", "." ]
train
https://github.com/cuba-platform/yarg/blob/d157286cbe29448f3e1f445e8c5dd88808351da0/core/modules/core/src/com/haulmont/yarg/util/db/QueryRunner.java#L157-L161
voldemort/voldemort
src/java/voldemort/rest/coordinator/config/ClientConfigUtil.java
ClientConfigUtil.compareMultipleClientConfigAvro
public static Boolean compareMultipleClientConfigAvro(String configAvro1, String configAvro2) { """ Compares two avro strings which contains multiple store configs @param configAvro1 @param configAvro2 @return true if two config avro strings have same content """ Map<String, Properties> mapStoreTo...
java
public static Boolean compareMultipleClientConfigAvro(String configAvro1, String configAvro2) { Map<String, Properties> mapStoreToProps1 = readMultipleClientConfigAvro(configAvro1); Map<String, Properties> mapStoreToProps2 = readMultipleClientConfigAvro(configAvro2); Set<String> keySet1 = mapSto...
[ "public", "static", "Boolean", "compareMultipleClientConfigAvro", "(", "String", "configAvro1", ",", "String", "configAvro2", ")", "{", "Map", "<", "String", ",", "Properties", ">", "mapStoreToProps1", "=", "readMultipleClientConfigAvro", "(", "configAvro1", ")", ";",...
Compares two avro strings which contains multiple store configs @param configAvro1 @param configAvro2 @return true if two config avro strings have same content
[ "Compares", "two", "avro", "strings", "which", "contains", "multiple", "store", "configs" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/rest/coordinator/config/ClientConfigUtil.java#L162-L178
alkacon/opencms-core
src/org/opencms/ui/apps/lists/CmsResultFacets.java
CmsResultFacets.prepareFolderFacets
private Component prepareFolderFacets(CmsSolrResultList solrResultList, CmsSearchResultWrapper resultWrapper) { """ Prepares the folder facets for the given search result.<p> @param solrResultList the search result list @param resultWrapper the result wrapper @return the folder facets component """ ...
java
private Component prepareFolderFacets(CmsSolrResultList solrResultList, CmsSearchResultWrapper resultWrapper) { FacetField folderFacets = solrResultList.getFacetField(CmsListManager.FIELD_PARENT_FOLDERS); I_CmsSearchControllerFacetField facetController = resultWrapper.getController().getFieldFacets().g...
[ "private", "Component", "prepareFolderFacets", "(", "CmsSolrResultList", "solrResultList", ",", "CmsSearchResultWrapper", "resultWrapper", ")", "{", "FacetField", "folderFacets", "=", "solrResultList", ".", "getFacetField", "(", "CmsListManager", ".", "FIELD_PARENT_FOLDERS", ...
Prepares the folder facets for the given search result.<p> @param solrResultList the search result list @param resultWrapper the result wrapper @return the folder facets component
[ "Prepares", "the", "folder", "facets", "for", "the", "given", "search", "result", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/lists/CmsResultFacets.java#L437-L473