repository_name
stringlengths
7
54
func_path_in_repository
stringlengths
18
196
func_name
stringlengths
7
107
whole_func_string
stringlengths
76
3.82k
language
stringclasses
1 value
func_code_string
stringlengths
76
3.82k
func_code_tokens
listlengths
22
717
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
508
split_name
stringclasses
1 value
func_code_url
stringlengths
111
310
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/GetInstance.java
GetInstance.getInstance
public static Instance getInstance(String type, Class<?> clazz, String algorithm) throws NoSuchAlgorithmException { // in the almost all cases, the first service will work // avoid taking long path if so ProviderList list = Providers.getProviderList(); Service firstService = ...
java
public static Instance getInstance(String type, Class<?> clazz, String algorithm) throws NoSuchAlgorithmException { // in the almost all cases, the first service will work // avoid taking long path if so ProviderList list = Providers.getProviderList(); Service firstService = ...
[ "public", "static", "Instance", "getInstance", "(", "String", "type", ",", "Class", "<", "?", ">", "clazz", ",", "String", "algorithm", ")", "throws", "NoSuchAlgorithmException", "{", "// in the almost all cases, the first service will work", "// avoid taking long path if s...
/* For all the getInstance() methods below: @param type the type of engine (e.g. MessageDigest) @param clazz the Spi class that the implementation must subclass (e.g. MessageDigestSpi.class) or null if no superclass check is required @param algorithm the name of the algorithm (or alias), e.g. MD5 @param provider the pr...
[ "/", "*", "For", "all", "the", "getInstance", "()", "methods", "below", ":", "@param", "type", "the", "type", "of", "engine", "(", "e", ".", "g", ".", "MessageDigest", ")", "@param", "clazz", "the", "Spi", "class", "that", "the", "implementation", "must"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/GetInstance.java#L152-L182
wcm-io/wcm-io-wcm
ui/extjs/src/main/java/io/wcm/wcm/ui/extjs/provider/impl/servlets/TemplateFilterPageTreeProvider.java
TemplateFilterPageTreeProvider.searchNodesByTemplate
@SuppressWarnings("null") private NodeIterator searchNodesByTemplate(String[] templates, String rootPath, SlingHttpServletRequest request) throws RepositoryException { String queryString = "/jcr:root" + ISO9075.encodePath(rootPath) + "//*" + "[@cq:template='" + StringUtils.join(escapeXPathQueryExpressions...
java
@SuppressWarnings("null") private NodeIterator searchNodesByTemplate(String[] templates, String rootPath, SlingHttpServletRequest request) throws RepositoryException { String queryString = "/jcr:root" + ISO9075.encodePath(rootPath) + "//*" + "[@cq:template='" + StringUtils.join(escapeXPathQueryExpressions...
[ "@", "SuppressWarnings", "(", "\"null\"", ")", "private", "NodeIterator", "searchNodesByTemplate", "(", "String", "[", "]", "templates", ",", "String", "rootPath", ",", "SlingHttpServletRequest", "request", ")", "throws", "RepositoryException", "{", "String", "querySt...
Searches for page content nodes under the {@code pRootPath} with given template It uses a XPATH query and return the node iterator of results. @param templates @param rootPath @return results node iterator @throws RepositoryException
[ "Searches", "for", "page", "content", "nodes", "under", "the", "{", "@code", "pRootPath", "}", "with", "given", "template", "It", "uses", "a", "XPATH", "query", "and", "return", "the", "node", "iterator", "of", "results", "." ]
train
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/ui/extjs/src/main/java/io/wcm/wcm/ui/extjs/provider/impl/servlets/TemplateFilterPageTreeProvider.java#L128-L137
liferay/com-liferay-commerce
commerce-product-type-virtual-order-service/src/main/java/com/liferay/commerce/product/type/virtual/order/service/persistence/impl/CommerceVirtualOrderItemPersistenceImpl.java
CommerceVirtualOrderItemPersistenceImpl.removeByUuid_C
@Override public void removeByUuid_C(String uuid, long companyId) { for (CommerceVirtualOrderItem commerceVirtualOrderItem : findByUuid_C( uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceVirtualOrderItem); } }
java
@Override public void removeByUuid_C(String uuid, long companyId) { for (CommerceVirtualOrderItem commerceVirtualOrderItem : findByUuid_C( uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceVirtualOrderItem); } }
[ "@", "Override", "public", "void", "removeByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "for", "(", "CommerceVirtualOrderItem", "commerceVirtualOrderItem", ":", "findByUuid_C", "(", "uuid", ",", "companyId", ",", "QueryUtil", ".", "ALL_POS"...
Removes all the commerce virtual order items where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID
[ "Removes", "all", "the", "commerce", "virtual", "order", "items", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-type-virtual-order-service/src/main/java/com/liferay/commerce/product/type/virtual/order/service/persistence/impl/CommerceVirtualOrderItemPersistenceImpl.java#L1418-L1424
structurizr/java
structurizr-core/src/com/structurizr/model/Model.java
Model.addSoftwareSystem
@Nonnull public SoftwareSystem addSoftwareSystem(@Nullable Location location, @Nonnull String name, @Nullable String description) { if (getSoftwareSystemWithName(name) == null) { SoftwareSystem softwareSystem = new SoftwareSystem(); softwareSystem.setLocation(location); s...
java
@Nonnull public SoftwareSystem addSoftwareSystem(@Nullable Location location, @Nonnull String name, @Nullable String description) { if (getSoftwareSystemWithName(name) == null) { SoftwareSystem softwareSystem = new SoftwareSystem(); softwareSystem.setLocation(location); s...
[ "@", "Nonnull", "public", "SoftwareSystem", "addSoftwareSystem", "(", "@", "Nullable", "Location", "location", ",", "@", "Nonnull", "String", "name", ",", "@", "Nullable", "String", "description", ")", "{", "if", "(", "getSoftwareSystemWithName", "(", "name", ")...
Creates a software system and adds it to the model. @param location the location of the software system (e.g. internal, external, etc) @param name the name of the software system @param description a short description of the software system @return the SoftwareSystem instance created and added to the model (...
[ "Creates", "a", "software", "system", "and", "adds", "it", "to", "the", "model", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/Model.java#L68-L85
beanshell/beanshell
src/main/java/bsh/ExternalNameSpace.java
ExternalNameSpace.getVariableImpl
protected Variable getVariableImpl( String name, boolean recurse ) throws UtilEvalError { // check the external map for the variable name Object value = externalMap.get( name ); if ( value == null && externalMap.containsKey( name ) ) value = Primitive.NULL; Vari...
java
protected Variable getVariableImpl( String name, boolean recurse ) throws UtilEvalError { // check the external map for the variable name Object value = externalMap.get( name ); if ( value == null && externalMap.containsKey( name ) ) value = Primitive.NULL; Vari...
[ "protected", "Variable", "getVariableImpl", "(", "String", "name", ",", "boolean", "recurse", ")", "throws", "UtilEvalError", "{", "// check the external map for the variable name", "Object", "value", "=", "externalMap", ".", "get", "(", "name", ")", ";", "if", "(",...
/* Notes: This implementation of getVariableImpl handles the following cases: 1) var in map not in local scope - var was added through map 2) var in map and in local scope - var was added through namespace 3) var not in map but in local scope - var was removed via map 4) var not in map and not in local scope - non-exis...
[ "/", "*", "Notes", ":", "This", "implementation", "of", "getVariableImpl", "handles", "the", "following", "cases", ":", "1", ")", "var", "in", "map", "not", "in", "local", "scope", "-", "var", "was", "added", "through", "map", "2", ")", "var", "in", "m...
train
https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/ExternalNameSpace.java#L147-L182
datacleaner/DataCleaner
desktop/ui/src/main/java/org/datacleaner/widgets/tabs/Packer.java
Packer.fillboth
public Packer fillboth(final double wtx, final double wty) { gc.fill = GridBagConstraints.BOTH; gc.weightx = wtx; gc.weighty = wty; setConstraints(comp, gc); return this; }
java
public Packer fillboth(final double wtx, final double wty) { gc.fill = GridBagConstraints.BOTH; gc.weightx = wtx; gc.weighty = wty; setConstraints(comp, gc); return this; }
[ "public", "Packer", "fillboth", "(", "final", "double", "wtx", ",", "final", "double", "wty", ")", "{", "gc", ".", "fill", "=", "GridBagConstraints", ".", "BOTH", ";", "gc", ".", "weightx", "=", "wtx", ";", "gc", ".", "weighty", "=", "wty", ";", "set...
Add fill=BOTH, weighty=1, weightx=1 to the constraints for the current component.
[ "Add", "fill", "=", "BOTH", "weighty", "=", "1", "weightx", "=", "1", "to", "the", "constraints", "for", "the", "current", "component", "." ]
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/desktop/ui/src/main/java/org/datacleaner/widgets/tabs/Packer.java#L775-L781
google/closure-compiler
src/com/google/javascript/jscomp/parsing/TypeTransformationParser.java
TypeTransformationParser.validConditionalExpression
private boolean validConditionalExpression(Node expr) { // The expression must have four children: // - The cond keyword // - A boolean expression // - A type transformation expression with the 'if' branch // - A type transformation expression with the 'else' branch if (!checkParameterCount(expr...
java
private boolean validConditionalExpression(Node expr) { // The expression must have four children: // - The cond keyword // - A boolean expression // - A type transformation expression with the 'if' branch // - A type transformation expression with the 'else' branch if (!checkParameterCount(expr...
[ "private", "boolean", "validConditionalExpression", "(", "Node", "expr", ")", "{", "// The expression must have four children:", "// - The cond keyword", "// - A boolean expression", "// - A type transformation expression with the 'if' branch", "// - A type transformation expression with the...
A conditional type transformation expression must be of the form cond(BoolExp, TTLExp, TTLExp)
[ "A", "conditional", "type", "transformation", "expression", "must", "be", "of", "the", "form", "cond", "(", "BoolExp", "TTLExp", "TTLExp", ")" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/parsing/TypeTransformationParser.java#L605-L628
srikalyc/Sql4D
Sql4DCompiler/src/main/java/com/yahoo/sql4d/converter/druidGParser.java
druidGParser.anyValue
public final Object anyValue() throws RecognitionException { Object obj = null; Token a=null; Token b=null; try { // druidG.g:266:2: (a= SINGLE_QUOTE_STRING |b= ( LONG | FLOAT ) ) int alt128=2; int LA128_0 = input.LA(1); if ( (LA128_0==SINGLE_QUOTE_STRING) ) { alt128=1; } else if ( (LA1...
java
public final Object anyValue() throws RecognitionException { Object obj = null; Token a=null; Token b=null; try { // druidG.g:266:2: (a= SINGLE_QUOTE_STRING |b= ( LONG | FLOAT ) ) int alt128=2; int LA128_0 = input.LA(1); if ( (LA128_0==SINGLE_QUOTE_STRING) ) { alt128=1; } else if ( (LA1...
[ "public", "final", "Object", "anyValue", "(", ")", "throws", "RecognitionException", "{", "Object", "obj", "=", "null", ";", "Token", "a", "=", "null", ";", "Token", "b", "=", "null", ";", "try", "{", "// druidG.g:266:2: (a= SINGLE_QUOTE_STRING |b= ( LONG | FLOAT ...
druidG.g:265:1: anyValue returns [Object obj] : (a= SINGLE_QUOTE_STRING |b= ( LONG | FLOAT ) );
[ "druidG", ".", "g", ":", "265", ":", "1", ":", "anyValue", "returns", "[", "Object", "obj", "]", ":", "(", "a", "=", "SINGLE_QUOTE_STRING", "|b", "=", "(", "LONG", "|", "FLOAT", ")", ")", ";" ]
train
https://github.com/srikalyc/Sql4D/blob/2c052fe60ead5a16277c798a3440de7d4f6f24f6/Sql4DCompiler/src/main/java/com/yahoo/sql4d/converter/druidGParser.java#L3545-L3603
coursera/courier
android/generator/src/main/java/org/coursera/courier/android/JavaSyntax.java
JavaSyntax.toOptionalType
public String toOptionalType(ClassTemplateSpec spec, boolean optional) { return toType( spec, optional ? Optionality.REQUIRED_FIELDS_MAY_BE_ABSENT : androidProperties.optionality); }
java
public String toOptionalType(ClassTemplateSpec spec, boolean optional) { return toType( spec, optional ? Optionality.REQUIRED_FIELDS_MAY_BE_ABSENT : androidProperties.optionality); }
[ "public", "String", "toOptionalType", "(", "ClassTemplateSpec", "spec", ",", "boolean", "optional", ")", "{", "return", "toType", "(", "spec", ",", "optional", "?", "Optionality", ".", "REQUIRED_FIELDS_MAY_BE_ABSENT", ":", "androidProperties", ".", "optionality", ")...
Returns the Java type of an optional field for the given {@link ClassTemplateSpec} as a Java source code string. If the field is optional it is always represented as a {@link AndroidProperties.Optionality#REQUIRED_FIELDS_MAY_BE_ABSENT} type else it is represented using the {@link AndroidProperties.Optionality} for thi...
[ "Returns", "the", "Java", "type", "of", "an", "optional", "field", "for", "the", "given", "{", "@link", "ClassTemplateSpec", "}", "as", "a", "Java", "source", "code", "string", "." ]
train
https://github.com/coursera/courier/blob/749674fa7ee33804ad11b6c8ecb560f455cb4c22/android/generator/src/main/java/org/coursera/courier/android/JavaSyntax.java#L117-L121
HtmlUnit/htmlunit-cssparser
src/main/java/com/gargoylesoftware/css/parser/AbstractCSSParser.java
AbstractCSSParser.hexcolorInternal
protected LexicalUnit hexcolorInternal(final LexicalUnit prev, final Token t) { // Step past the hash at the beginning final int i = 1; int r = 0; int g = 0; int b = 0; final int len = t.image.length() - 1; try { if (len == 3) { r = Int...
java
protected LexicalUnit hexcolorInternal(final LexicalUnit prev, final Token t) { // Step past the hash at the beginning final int i = 1; int r = 0; int g = 0; int b = 0; final int len = t.image.length() - 1; try { if (len == 3) { r = Int...
[ "protected", "LexicalUnit", "hexcolorInternal", "(", "final", "LexicalUnit", "prev", ",", "final", "Token", "t", ")", "{", "// Step past the hash at the beginning", "final", "int", "i", "=", "1", ";", "int", "r", "=", "0", ";", "int", "g", "=", "0", ";", "...
Processes a hexadecimal color definition. @param prev the previous lexical unit @param t the token @return a new lexical unit
[ "Processes", "a", "hexadecimal", "color", "definition", "." ]
train
https://github.com/HtmlUnit/htmlunit-cssparser/blob/384e4170737169b5b4c87c5766495d9b8a6d3866/src/main/java/com/gargoylesoftware/css/parser/AbstractCSSParser.java#L698-L743
banq/jdonframework
src/main/java/com/jdon/container/annotation/type/ModelConsumerLoader.java
ModelConsumerLoader.loadMehtodAnnotations
public void loadMehtodAnnotations(Class cclass, ContainerWrapper containerWrapper) { try { for (Method method : ClassUtil.getAllDecaredMethods(cclass)) { if (method.isAnnotationPresent(OnCommand.class)) { addConsumerMethod(method, cclass, containerWrapper); } } } catch (Exception e) { ...
java
public void loadMehtodAnnotations(Class cclass, ContainerWrapper containerWrapper) { try { for (Method method : ClassUtil.getAllDecaredMethods(cclass)) { if (method.isAnnotationPresent(OnCommand.class)) { addConsumerMethod(method, cclass, containerWrapper); } } } catch (Exception e) { ...
[ "public", "void", "loadMehtodAnnotations", "(", "Class", "cclass", ",", "ContainerWrapper", "containerWrapper", ")", "{", "try", "{", "for", "(", "Method", "method", ":", "ClassUtil", ".", "getAllDecaredMethods", "(", "cclass", ")", ")", "{", "if", "(", "metho...
add the class to consumers annotated with @OnCommand @param cclass @param containerWrapper
[ "add", "the", "class", "to", "consumers", "annotated", "with", "@OnCommand" ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/annotation/type/ModelConsumerLoader.java#L58-L70
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/WebhooksInner.java
WebhooksInner.listEventsWithServiceResponseAsync
public Observable<ServiceResponse<Page<EventInner>>> listEventsWithServiceResponseAsync(final String resourceGroupName, final String registryName, final String webhookName) { return listEventsSinglePageAsync(resourceGroupName, registryName, webhookName) .concatMap(new Func1<ServiceResponse<Page<Even...
java
public Observable<ServiceResponse<Page<EventInner>>> listEventsWithServiceResponseAsync(final String resourceGroupName, final String registryName, final String webhookName) { return listEventsSinglePageAsync(resourceGroupName, registryName, webhookName) .concatMap(new Func1<ServiceResponse<Page<Even...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "EventInner", ">", ">", ">", "listEventsWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "registryName", ",", "final", "String", "webhookName", ")", "{",...
Lists recent events for the specified webhook. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param webhookName The name of the webhook. @throws IllegalArgumentException thrown if parameters fail the validation @...
[ "Lists", "recent", "events", "for", "the", "specified", "webhook", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/WebhooksInner.java#L1116-L1128
OpenTSDB/opentsdb
src/uid/UniqueId.java
UniqueId.uidToLong
public static long uidToLong(final byte[] uid, final short uid_length) { if (uid.length != uid_length) { throw new IllegalArgumentException("UID was " + uid.length + " bytes long but expected to be " + uid_length); } final byte[] uid_raw = new byte[8]; System.arraycopy(uid, 0, uid_...
java
public static long uidToLong(final byte[] uid, final short uid_length) { if (uid.length != uid_length) { throw new IllegalArgumentException("UID was " + uid.length + " bytes long but expected to be " + uid_length); } final byte[] uid_raw = new byte[8]; System.arraycopy(uid, 0, uid_...
[ "public", "static", "long", "uidToLong", "(", "final", "byte", "[", "]", "uid", ",", "final", "short", "uid_length", ")", "{", "if", "(", "uid", ".", "length", "!=", "uid_length", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"UID was \"", "...
Converts a UID to an integer value. The array must be the same length as uid_length or an exception will be thrown. @param uid The byte array to convert @param uid_length Length the array SHOULD be according to the UID config @return The UID converted to an integer @throws IllegalArgumentException if the length of the ...
[ "Converts", "a", "UID", "to", "an", "integer", "value", ".", "The", "array", "must", "be", "the", "same", "length", "as", "uid_length", "or", "an", "exception", "will", "be", "thrown", "." ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/uid/UniqueId.java#L1457-L1466
eduarddrenth/ConfigurableReports
src/main/java/com/vectorprint/report/itext/style/StyleHelper.java
StyleHelper.delayedStyle
public static void delayedStyle(Chunk c, String tag, Collection<? extends Advanced> stylers, EventHelper eventHelper, Image img) { // add to pagehelper and set generic tag eventHelper.addDelayedStyler(tag, stylers, c, img); c.setGenericTag(tag); }
java
public static void delayedStyle(Chunk c, String tag, Collection<? extends Advanced> stylers, EventHelper eventHelper, Image img) { // add to pagehelper and set generic tag eventHelper.addDelayedStyler(tag, stylers, c, img); c.setGenericTag(tag); }
[ "public", "static", "void", "delayedStyle", "(", "Chunk", "c", ",", "String", "tag", ",", "Collection", "<", "?", "extends", "Advanced", ">", "stylers", ",", "EventHelper", "eventHelper", ",", "Image", "img", ")", "{", "// add to pagehelper and set generic tag", ...
register advanced stylers with the EventHelper to do the styling later @param c @param tag @param stylers @param eventHelper @param img the value of rect @see EventHelper#onGenericTag(com.itextpdf.text.pdf.PdfWriter, com.itextpdf.text.Document, com.itextpdf.text.Rectangle, java.lang.String)
[ "register", "advanced", "stylers", "with", "the", "EventHelper", "to", "do", "the", "styling", "later" ]
train
https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/style/StyleHelper.java#L229-L233
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/utils/WidgetUtil.java
WidgetUtil.getWidgetBanner
public static String getWidgetBanner(String guildId, BannerType type) { Checks.notNull(guildId, "GuildId"); Checks.notNull(type, "BannerType"); return String.format(WIDGET_PNG, guildId, type.name().toLowerCase()); }
java
public static String getWidgetBanner(String guildId, BannerType type) { Checks.notNull(guildId, "GuildId"); Checks.notNull(type, "BannerType"); return String.format(WIDGET_PNG, guildId, type.name().toLowerCase()); }
[ "public", "static", "String", "getWidgetBanner", "(", "String", "guildId", ",", "BannerType", "type", ")", "{", "Checks", ".", "notNull", "(", "guildId", ",", "\"GuildId\"", ")", ";", "Checks", ".", "notNull", "(", "type", ",", "\"BannerType\"", ")", ";", ...
Gets the banner image for the specified guild of the specified type. <br>This banner will only be available if the guild in question has the Widget enabled. Additionally, this method can be used independently of being on the guild in question. @param guildId the guild ID @param type The type (visual style) of the ba...
[ "Gets", "the", "banner", "image", "for", "the", "specified", "guild", "of", "the", "specified", "type", ".", "<br", ">", "This", "banner", "will", "only", "be", "available", "if", "the", "guild", "in", "question", "has", "the", "Widget", "enabled", ".", ...
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/utils/WidgetUtil.java#L83-L88
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/Graphics.java
Graphics.fillRoundRect
public void fillRoundRect(float x, float y, float width, float height, int cornerRadius, int segs) { if (cornerRadius < 0) throw new IllegalArgumentException("corner radius must be > 0"); if (cornerRadius == 0) { fillRect(x, y, width, height); return; } int mr = (int) Math.min(width, heigh...
java
public void fillRoundRect(float x, float y, float width, float height, int cornerRadius, int segs) { if (cornerRadius < 0) throw new IllegalArgumentException("corner radius must be > 0"); if (cornerRadius == 0) { fillRect(x, y, width, height); return; } int mr = (int) Math.min(width, heigh...
[ "public", "void", "fillRoundRect", "(", "float", "x", ",", "float", "y", ",", "float", "width", ",", "float", "height", ",", "int", "cornerRadius", ",", "int", "segs", ")", "{", "if", "(", "cornerRadius", "<", "0", ")", "throw", "new", "IllegalArgumentEx...
Fill a rounded rectangle @param x The x coordinate of the top left corner of the rectangle @param y The y coordinate of the top left corner of the rectangle @param width The width of the rectangle @param height The height of the rectangle @param cornerRadius The radius of the rounded edges on the corners @param segs T...
[ "Fill", "a", "rounded", "rectangle" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/Graphics.java#L1255-L1288
sagiegurari/fax4j
src/main/java/org/fax4j/spi/windows/WindowsJNIFaxClientSpi.java
WindowsJNIFaxClientSpi.submitFaxJobImpl
@Override protected void submitFaxJobImpl(FaxJob faxJob) { //get fax job values String targetAddress=faxJob.getTargetAddress(); String targetName=faxJob.getTargetName(); if(targetName==null) { targetName=""; } String senderName=faxJob.getSender...
java
@Override protected void submitFaxJobImpl(FaxJob faxJob) { //get fax job values String targetAddress=faxJob.getTargetAddress(); String targetName=faxJob.getTargetName(); if(targetName==null) { targetName=""; } String senderName=faxJob.getSender...
[ "@", "Override", "protected", "void", "submitFaxJobImpl", "(", "FaxJob", "faxJob", ")", "{", "//get fax job values", "String", "targetAddress", "=", "faxJob", ".", "getTargetAddress", "(", ")", ";", "String", "targetName", "=", "faxJob", ".", "getTargetName", "(",...
This function will submit a new fax job.<br> The fax job ID may be populated by this method in the provided fax job object. @param faxJob The fax job object containing the needed information
[ "This", "function", "will", "submit", "a", "new", "fax", "job", ".", "<br", ">", "The", "fax", "job", "ID", "may", "be", "populated", "by", "this", "method", "in", "the", "provided", "fax", "job", "object", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/windows/WindowsJNIFaxClientSpi.java#L136-L172
JOML-CI/JOML
src/org/joml/Quaternionf.java
Quaternionf.lookAlong
public Quaternionf lookAlong(float dirX, float dirY, float dirZ, float upX, float upY, float upZ) { return lookAlong(dirX, dirY, dirZ, upX, upY, upZ, this); }
java
public Quaternionf lookAlong(float dirX, float dirY, float dirZ, float upX, float upY, float upZ) { return lookAlong(dirX, dirY, dirZ, upX, upY, upZ, this); }
[ "public", "Quaternionf", "lookAlong", "(", "float", "dirX", ",", "float", "dirY", ",", "float", "dirZ", ",", "float", "upX", ",", "float", "upY", ",", "float", "upZ", ")", "{", "return", "lookAlong", "(", "dirX", ",", "dirY", ",", "dirZ", ",", "upX", ...
Apply a rotation to this quaternion that maps the given direction to the positive Z axis. <p> Because there are multiple possibilities for such a rotation, this method will choose the one that ensures the given up direction to remain parallel to the plane spanned by the <code>up</code> and <code>dir</code> vectors. <p>...
[ "Apply", "a", "rotation", "to", "this", "quaternion", "that", "maps", "the", "given", "direction", "to", "the", "positive", "Z", "axis", ".", "<p", ">", "Because", "there", "are", "multiple", "possibilities", "for", "such", "a", "rotation", "this", "method",...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Quaternionf.java#L2131-L2133
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/support/pagefactory/AjaxElementLocator.java
AjaxElementLocator.findElements
@Override public List<WebElement> findElements() { SlowLoadingElementList list = new SlowLoadingElementList(clock, timeOutInSeconds); try { return list.get().getElements(); } catch (NoSuchElementError e) { return new ArrayList<>(); } }
java
@Override public List<WebElement> findElements() { SlowLoadingElementList list = new SlowLoadingElementList(clock, timeOutInSeconds); try { return list.get().getElements(); } catch (NoSuchElementError e) { return new ArrayList<>(); } }
[ "@", "Override", "public", "List", "<", "WebElement", ">", "findElements", "(", ")", "{", "SlowLoadingElementList", "list", "=", "new", "SlowLoadingElementList", "(", "clock", ",", "timeOutInSeconds", ")", ";", "try", "{", "return", "list", ".", "get", "(", ...
{@inheritDoc} Will poll the interface on a regular basis until at least one element is present.
[ "{", "@inheritDoc", "}" ]
train
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/support/pagefactory/AjaxElementLocator.java#L108-L116
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorIDParser.java
TransliteratorIDParser.specsToID
private static SingleID specsToID(Specs specs, int dir) { String canonID = ""; String basicID = ""; String basicPrefix = ""; if (specs != null) { StringBuilder buf = new StringBuilder(); if (dir == FORWARD) { if (specs.sawSource) { ...
java
private static SingleID specsToID(Specs specs, int dir) { String canonID = ""; String basicID = ""; String basicPrefix = ""; if (specs != null) { StringBuilder buf = new StringBuilder(); if (dir == FORWARD) { if (specs.sawSource) { ...
[ "private", "static", "SingleID", "specsToID", "(", "Specs", "specs", ",", "int", "dir", ")", "{", "String", "canonID", "=", "\"\"", ";", "String", "basicID", "=", "\"\"", ";", "String", "basicPrefix", "=", "\"\"", ";", "if", "(", "specs", "!=", "null", ...
Givens a Spec object, convert it to a SingleID object. The Spec object is a more unprocessed parse result. The SingleID object contains information about canonical and basic IDs. @return a SingleID; never returns null. Returned object always has 'filter' field of null.
[ "Givens", "a", "Spec", "object", "convert", "it", "to", "a", "SingleID", "object", ".", "The", "Spec", "object", "is", "a", "more", "unprocessed", "parse", "result", ".", "The", "SingleID", "object", "contains", "information", "about", "canonical", "and", "b...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorIDParser.java#L701-L727
alipay/sofa-rpc
core/api/src/main/java/com/alipay/sofa/rpc/client/ProviderInfo.java
ProviderInfo.setDynamicAttr
public ProviderInfo setDynamicAttr(String dynamicAttrKey, Object dynamicAttrValue) { if (dynamicAttrValue == null) { dynamicAttrs.remove(dynamicAttrKey); } else { dynamicAttrs.put(dynamicAttrKey, dynamicAttrValue); } return this; }
java
public ProviderInfo setDynamicAttr(String dynamicAttrKey, Object dynamicAttrValue) { if (dynamicAttrValue == null) { dynamicAttrs.remove(dynamicAttrKey); } else { dynamicAttrs.put(dynamicAttrKey, dynamicAttrValue); } return this; }
[ "public", "ProviderInfo", "setDynamicAttr", "(", "String", "dynamicAttrKey", ",", "Object", "dynamicAttrValue", ")", "{", "if", "(", "dynamicAttrValue", "==", "null", ")", "{", "dynamicAttrs", ".", "remove", "(", "dynamicAttrKey", ")", ";", "}", "else", "{", "...
Sets dynamic attribute. @param dynamicAttrKey the dynamic attribute key @param dynamicAttrValue the dynamic attribute value @return the dynamic attribute
[ "Sets", "dynamic", "attribute", "." ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/client/ProviderInfo.java#L482-L489
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_instance_group_groupId_GET
public OvhInstanceGroup project_serviceName_instance_group_groupId_GET(String serviceName, String groupId, String region) throws IOException { String qPath = "/cloud/project/{serviceName}/instance/group/{groupId}"; StringBuilder sb = path(qPath, serviceName, groupId); query(sb, "region", region); String resp = ...
java
public OvhInstanceGroup project_serviceName_instance_group_groupId_GET(String serviceName, String groupId, String region) throws IOException { String qPath = "/cloud/project/{serviceName}/instance/group/{groupId}"; StringBuilder sb = path(qPath, serviceName, groupId); query(sb, "region", region); String resp = ...
[ "public", "OvhInstanceGroup", "project_serviceName_instance_group_groupId_GET", "(", "String", "serviceName", ",", "String", "groupId", ",", "String", "region", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/instance/group/{groupId}\"...
Get all groups REST: GET /cloud/project/{serviceName}/instance/group/{groupId} @param groupId [required] Instance group id @param region [required] Instance region @param serviceName [required] Project id
[ "Get", "all", "groups" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L2166-L2172
RestComm/sip-servlets
containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/undertow/SipStandardService.java
SipStandardService.findSipConnector
private SipProtocolHandler findSipConnector(String ipAddress, int port, String transport) { SipConnector connectorToRemove = null; for (SipProtocolHandler protocolHandler : connectors) { if (protocolHandler.getIpAddress().equals(ipAddress) && protocolHandler.getPort() == port ...
java
private SipProtocolHandler findSipConnector(String ipAddress, int port, String transport) { SipConnector connectorToRemove = null; for (SipProtocolHandler protocolHandler : connectors) { if (protocolHandler.getIpAddress().equals(ipAddress) && protocolHandler.getPort() == port ...
[ "private", "SipProtocolHandler", "findSipConnector", "(", "String", "ipAddress", ",", "int", "port", ",", "String", "transport", ")", "{", "SipConnector", "connectorToRemove", "=", "null", ";", "for", "(", "SipProtocolHandler", "protocolHandler", ":", "connectors", ...
Find a sip Connector by it's ip address, port and transport @param ipAddress ip address of the connector to find @param port port of the connector to find @param transport transport of the connector to find @return the found sip connector or null if noting found
[ "Find", "a", "sip", "Connector", "by", "it", "s", "ip", "address", "port", "and", "transport" ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/undertow/SipStandardService.java#L735-L745
jhalterman/lyra
src/main/java/net/jodah/lyra/internal/RecurringPolicy.java
RecurringPolicy.withBackoff
@SuppressWarnings("unchecked") public T withBackoff(Duration interval, Duration maxInterval, int intervalMultiplier) { Assert.notNull(interval, "interval"); Assert.notNull(maxInterval, "maxInterval"); Assert.isTrue(interval.length > 0, "The interval must be greater than 0"); Assert.isTrue(interval.toN...
java
@SuppressWarnings("unchecked") public T withBackoff(Duration interval, Duration maxInterval, int intervalMultiplier) { Assert.notNull(interval, "interval"); Assert.notNull(maxInterval, "maxInterval"); Assert.isTrue(interval.length > 0, "The interval must be greater than 0"); Assert.isTrue(interval.toN...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "T", "withBackoff", "(", "Duration", "interval", ",", "Duration", "maxInterval", ",", "int", "intervalMultiplier", ")", "{", "Assert", ".", "notNull", "(", "interval", ",", "\"interval\"", ")", ";", ...
Sets the {@code interval} to pause for between attempts, exponentially backing of to the {@code maxInterval} multiplying successive intervals by the {@code intervalMultiplier}. @throws NullPointerException if {@code interval} or {@code maxInterval} are null @throws IllegalArgumentException if {@code interval} is <= 0,...
[ "Sets", "the", "{", "@code", "interval", "}", "to", "pause", "for", "between", "attempts", "exponentially", "backing", "of", "to", "the", "{", "@code", "maxInterval", "}", "multiplying", "successive", "intervals", "by", "the", "{", "@code", "intervalMultiplier",...
train
https://github.com/jhalterman/lyra/blob/ce347a69357fef1b34e92d92a4f9e68792d81255/src/main/java/net/jodah/lyra/internal/RecurringPolicy.java#L101-L113
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java
SubWriterHolderWriter.addIndexComment
protected void addIndexComment(Element member, Content contentTree) { List<? extends DocTree> tags = utils.getFirstSentenceTrees(member); addIndexComment(member, tags, contentTree); }
java
protected void addIndexComment(Element member, Content contentTree) { List<? extends DocTree> tags = utils.getFirstSentenceTrees(member); addIndexComment(member, tags, contentTree); }
[ "protected", "void", "addIndexComment", "(", "Element", "member", ",", "Content", "contentTree", ")", "{", "List", "<", "?", "extends", "DocTree", ">", "tags", "=", "utils", ".", "getFirstSentenceTrees", "(", "member", ")", ";", "addIndexComment", "(", "member...
Add the index comment. @param member the member being documented @param contentTree the content tree to which the comment will be added
[ "Add", "the", "index", "comment", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java#L173-L176
b3log/latke
latke-core/src/main/java/org/json/JSONArray.java
JSONArray.optEnum
public <E extends Enum<E>> E optEnum(Class<E> clazz, int index) { return this.optEnum(clazz, index, null); }
java
public <E extends Enum<E>> E optEnum(Class<E> clazz, int index) { return this.optEnum(clazz, index, null); }
[ "public", "<", "E", "extends", "Enum", "<", "E", ">", ">", "E", "optEnum", "(", "Class", "<", "E", ">", "clazz", ",", "int", "index", ")", "{", "return", "this", ".", "optEnum", "(", "clazz", ",", "index", ",", "null", ")", ";", "}" ]
Get the enum value associated with a key. @param <E> Enum Type @param clazz The type of enum to retrieve. @param index The index must be between 0 and length() - 1. @return The enum value at the index location or null if not found
[ "Get", "the", "enum", "value", "associated", "with", "a", "key", "." ]
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/json/JSONArray.java#L660-L662
haraldk/TwelveMonkeys
imageio/imageio-pict/src/main/java/com/twelvemonkeys/imageio/plugins/pict/QuickDrawContext.java
QuickDrawContext.frameRoundRect
public void frameRoundRect(final Rectangle2D pRectangle, int pArcW, int pArcH) { frameShape(toRoundRect(pRectangle, pArcW, pArcH)); }
java
public void frameRoundRect(final Rectangle2D pRectangle, int pArcW, int pArcH) { frameShape(toRoundRect(pRectangle, pArcW, pArcH)); }
[ "public", "void", "frameRoundRect", "(", "final", "Rectangle2D", "pRectangle", ",", "int", "pArcW", ",", "int", "pArcH", ")", "{", "frameShape", "(", "toRoundRect", "(", "pRectangle", ",", "pArcW", ",", "pArcH", ")", ")", ";", "}" ]
FrameRoundRect(r,int,int) // outline round rect with the size, pattern, and pattern mode of the graphics pen. @param pRectangle the rectangle to frame @param pArcW width of the oval defining the rounded corner. @param pArcH height of the oval defining the rounded corner.
[ "FrameRoundRect", "(", "r", "int", "int", ")", "//", "outline", "round", "rect", "with", "the", "size", "pattern", "and", "pattern", "mode", "of", "the", "graphics", "pen", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/imageio/imageio-pict/src/main/java/com/twelvemonkeys/imageio/plugins/pict/QuickDrawContext.java#L594-L596
hypercube1024/firefly
firefly-db/src/main/java/com/firefly/db/init/ScriptUtils.java
ScriptUtils.executeSqlScript
public static void executeSqlScript(Connection connection, Resource resource) throws ScriptException { executeSqlScript(connection, new EncodedResource(resource)); }
java
public static void executeSqlScript(Connection connection, Resource resource) throws ScriptException { executeSqlScript(connection, new EncodedResource(resource)); }
[ "public", "static", "void", "executeSqlScript", "(", "Connection", "connection", ",", "Resource", "resource", ")", "throws", "ScriptException", "{", "executeSqlScript", "(", "connection", ",", "new", "EncodedResource", "(", "resource", ")", ")", ";", "}" ]
Execute the given SQL script using default settings for statement separators, comment delimiters, and exception handling flags. <p> Statement separators and comments will be removed before executing individual statements within the supplied script. <p> <strong>Warning</strong>: this method does <em>not</em> release the...
[ "Execute", "the", "given", "SQL", "script", "using", "default", "settings", "for", "statement", "separators", "comment", "delimiters", "and", "exception", "handling", "flags", ".", "<p", ">", "Statement", "separators", "and", "comments", "will", "be", "removed", ...
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-db/src/main/java/com/firefly/db/init/ScriptUtils.java#L371-L373
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/message/MapMessage.java
MapMessage.with
@SuppressWarnings("unchecked") public M with(final String key, final String value) { put(key, value); return (M) this; }
java
@SuppressWarnings("unchecked") public M with(final String key, final String value) { put(key, value); return (M) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "M", "with", "(", "final", "String", "key", ",", "final", "String", "value", ")", "{", "put", "(", "key", ",", "value", ")", ";", "return", "(", "M", ")", "this", ";", "}" ]
Adds an item to the data Map in fluent style. @param key The name of the data item. @param value The value of the data item. @return {@code this}
[ "Adds", "an", "item", "to", "the", "data", "Map", "in", "fluent", "style", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/MapMessage.java#L665-L669
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/action/ActionableHelper.java
ActionableHelper.deleteFilePathOnExit
public static void deleteFilePathOnExit(FilePath workspace, String path) throws IOException, InterruptedException { FilePath filePath = new FilePath(workspace, path); deleteFilePathOnExit(filePath); }
java
public static void deleteFilePathOnExit(FilePath workspace, String path) throws IOException, InterruptedException { FilePath filePath = new FilePath(workspace, path); deleteFilePathOnExit(filePath); }
[ "public", "static", "void", "deleteFilePathOnExit", "(", "FilePath", "workspace", ",", "String", "path", ")", "throws", "IOException", ",", "InterruptedException", "{", "FilePath", "filePath", "=", "new", "FilePath", "(", "workspace", ",", "path", ")", ";", "del...
Deletes a FilePath file on exit. @param workspace The build workspace. @param path The path in the workspace. @throws IOException In case of a missing file.
[ "Deletes", "a", "FilePath", "file", "on", "exit", "." ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/action/ActionableHelper.java#L295-L298
apache/fluo
modules/core/src/main/java/org/apache/fluo/core/impl/TxInfo.java
TxInfo.getTransactionInfo
public static TxInfo getTransactionInfo(Environment env, Bytes prow, Column pcol, long startTs) { // TODO ensure primary is visible IteratorSetting is = new IteratorSetting(10, RollbackCheckIterator.class); RollbackCheckIterator.setLocktime(is, startTs); Entry<Key, Value> entry = ColumnUtil.checkColum...
java
public static TxInfo getTransactionInfo(Environment env, Bytes prow, Column pcol, long startTs) { // TODO ensure primary is visible IteratorSetting is = new IteratorSetting(10, RollbackCheckIterator.class); RollbackCheckIterator.setLocktime(is, startTs); Entry<Key, Value> entry = ColumnUtil.checkColum...
[ "public", "static", "TxInfo", "getTransactionInfo", "(", "Environment", "env", ",", "Bytes", "prow", ",", "Column", "pcol", ",", "long", "startTs", ")", "{", "// TODO ensure primary is visible", "IteratorSetting", "is", "=", "new", "IteratorSetting", "(", "10", ",...
determine the what state a transaction is in by inspecting the primary column
[ "determine", "the", "what", "state", "a", "transaction", "is", "in", "by", "inspecting", "the", "primary", "column" ]
train
https://github.com/apache/fluo/blob/8e06204d4167651e2d3b5219b8c1397644e6ba6e/modules/core/src/main/java/org/apache/fluo/core/impl/TxInfo.java#L40-L102
jcuda/jcuda
JCudaJava/src/main/java/jcuda/runtime/JCuda.java
JCuda.cudaGraphicsMapResources
public static int cudaGraphicsMapResources(int count, cudaGraphicsResource resources[], cudaStream_t stream) { return checkResult(cudaGraphicsMapResourcesNative(count, resources, stream)); }
java
public static int cudaGraphicsMapResources(int count, cudaGraphicsResource resources[], cudaStream_t stream) { return checkResult(cudaGraphicsMapResourcesNative(count, resources, stream)); }
[ "public", "static", "int", "cudaGraphicsMapResources", "(", "int", "count", ",", "cudaGraphicsResource", "resources", "[", "]", ",", "cudaStream_t", "stream", ")", "{", "return", "checkResult", "(", "cudaGraphicsMapResourcesNative", "(", "count", ",", "resources", "...
Map graphics resources for access by CUDA. <pre> cudaError_t cudaGraphicsMapResources ( int count, cudaGraphicsResource_t* resources, cudaStream_t stream = 0 ) </pre> <div> <p>Map graphics resources for access by CUDA. Maps the <tt>count</tt> graphics resources in <tt>resources</tt> for access by CUDA. </p> <p>The r...
[ "Map", "graphics", "resources", "for", "access", "by", "CUDA", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/runtime/JCuda.java#L11507-L11510
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSUtils.java
COSUtils.translateException
@SuppressWarnings("ThrowableInstanceNeverThrown") public static IOException translateException(String operation, String path, AmazonClientException exception) { String message = String.format("%s%s: %s", operation, path != null ? (" on " + path) : "", exception); if (!(exception instanceof Amazo...
java
@SuppressWarnings("ThrowableInstanceNeverThrown") public static IOException translateException(String operation, String path, AmazonClientException exception) { String message = String.format("%s%s: %s", operation, path != null ? (" on " + path) : "", exception); if (!(exception instanceof Amazo...
[ "@", "SuppressWarnings", "(", "\"ThrowableInstanceNeverThrown\"", ")", "public", "static", "IOException", "translateException", "(", "String", "operation", ",", "String", "path", ",", "AmazonClientException", "exception", ")", "{", "String", "message", "=", "String", ...
Translate an exception raised in an operation into an IOException. The specific type of IOException depends on the class of {@link AmazonClientException} passed in, and any status codes included in the operation. That is: HTTP error codes are examined and can be used to build a more specific response. @param operation...
[ "Translate", "an", "exception", "raised", "in", "an", "operation", "into", "an", "IOException", ".", "The", "specific", "type", "of", "IOException", "depends", "on", "the", "class", "of", "{", "@link", "AmazonClientException", "}", "passed", "in", "and", "any"...
train
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSUtils.java#L89-L154
Azure/azure-sdk-for-java
datamigration/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2017_11_15_preview/implementation/ServicesInner.java
ServicesInner.checkStatusAsync
public Observable<DataMigrationServiceStatusResponseInner> checkStatusAsync(String groupName, String serviceName) { return checkStatusWithServiceResponseAsync(groupName, serviceName).map(new Func1<ServiceResponse<DataMigrationServiceStatusResponseInner>, DataMigrationServiceStatusResponseInner>() { ...
java
public Observable<DataMigrationServiceStatusResponseInner> checkStatusAsync(String groupName, String serviceName) { return checkStatusWithServiceResponseAsync(groupName, serviceName).map(new Func1<ServiceResponse<DataMigrationServiceStatusResponseInner>, DataMigrationServiceStatusResponseInner>() { ...
[ "public", "Observable", "<", "DataMigrationServiceStatusResponseInner", ">", "checkStatusAsync", "(", "String", "groupName", ",", "String", "serviceName", ")", "{", "return", "checkStatusWithServiceResponseAsync", "(", "groupName", ",", "serviceName", ")", ".", "map", "...
Check service health status. The services resource is the top-level resource that represents the Data Migration Service. This action performs a health check and returns the status of the service and virtual machine size. @param groupName Name of the resource group @param serviceName Name of the service @throws Illegal...
[ "Check", "service", "health", "status", ".", "The", "services", "resource", "is", "the", "top", "-", "level", "resource", "that", "represents", "the", "Data", "Migration", "Service", ".", "This", "action", "performs", "a", "health", "check", "and", "returns", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datamigration/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2017_11_15_preview/implementation/ServicesInner.java#L967-L974
mgm-tp/jfunk
jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/data/FormData.java
FormData.getFormEntry
public FormEntry getFormEntry(final String entryKey, final int index) { return getFormEntry(entryKey + JFunkConstants.INDEXED_KEY_SEPARATOR + index); }
java
public FormEntry getFormEntry(final String entryKey, final int index) { return getFormEntry(entryKey + JFunkConstants.INDEXED_KEY_SEPARATOR + index); }
[ "public", "FormEntry", "getFormEntry", "(", "final", "String", "entryKey", ",", "final", "int", "index", ")", "{", "return", "getFormEntry", "(", "entryKey", "+", "JFunkConstants", ".", "INDEXED_KEY_SEPARATOR", "+", "index", ")", ";", "}" ]
Returns the FormEntry for the given entryKey and index. This is the same as calling getFormEntry(entryKey+index) @see #getFormEntry(String)
[ "Returns", "the", "FormEntry", "for", "the", "given", "entryKey", "and", "index", ".", "This", "is", "the", "same", "as", "calling", "getFormEntry", "(", "entryKey", "+", "index", ")" ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/data/FormData.java#L209-L211
graknlabs/grakn
server/src/graql/gremlin/sets/EquivalentFragmentSets.java
EquivalentFragmentSets.neq
public static EquivalentFragmentSet neq(VarProperty varProperty, Variable varA, Variable varB) { return new AutoValue_NeqFragmentSet(varProperty, varA, varB); }
java
public static EquivalentFragmentSet neq(VarProperty varProperty, Variable varA, Variable varB) { return new AutoValue_NeqFragmentSet(varProperty, varA, varB); }
[ "public", "static", "EquivalentFragmentSet", "neq", "(", "VarProperty", "varProperty", ",", "Variable", "varA", ",", "Variable", "varB", ")", "{", "return", "new", "AutoValue_NeqFragmentSet", "(", "varProperty", ",", "varA", ",", "varB", ")", ";", "}" ]
An {@link EquivalentFragmentSet} that indicates a variable is not equal to another variable.
[ "An", "{" ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/graql/gremlin/sets/EquivalentFragmentSets.java#L121-L123
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.serviceName_vlan_vlanId_GET
public OvhVlan serviceName_vlan_vlanId_GET(String serviceName, Long vlanId) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/vlan/{vlanId}"; StringBuilder sb = path(qPath, serviceName, vlanId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhVlan.class); }
java
public OvhVlan serviceName_vlan_vlanId_GET(String serviceName, Long vlanId) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/vlan/{vlanId}"; StringBuilder sb = path(qPath, serviceName, vlanId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhVlan.class); }
[ "public", "OvhVlan", "serviceName_vlan_vlanId_GET", "(", "String", "serviceName", ",", "Long", "vlanId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicatedCloud/{serviceName}/vlan/{vlanId}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ...
Get this object properties REST: GET /dedicatedCloud/{serviceName}/vlan/{vlanId} @param serviceName [required] Domain of the service @param vlanId [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L1229-L1234
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/workspace/VoiceApi.java
VoiceApi.retrieveCall
public void retrieveCall( String connId, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException { try { VoicecallsidanswerData retrieveData = new VoicecallsidanswerData(); retrieveData.setReasons(Util.toKVLi...
java
public void retrieveCall( String connId, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException { try { VoicecallsidanswerData retrieveData = new VoicecallsidanswerData(); retrieveData.setReasons(Util.toKVLi...
[ "public", "void", "retrieveCall", "(", "String", "connId", ",", "KeyValueCollection", "reasons", ",", "KeyValueCollection", "extensions", ")", "throws", "WorkspaceApiException", "{", "try", "{", "VoicecallsidanswerData", "retrieveData", "=", "new", "VoicecallsidanswerData...
Retrieve the specified call from hold. @param connId The connection ID of the call. @param reasons Information on causes for, and results of, actions taken by the user of the current DN. For details about reasons, refer to the [*Genesys Events and Models Reference Manual*](https://docs.genesys.com/Documentation/System/...
[ "Retrieve", "the", "specified", "call", "from", "hold", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/workspace/VoiceApi.java#L601-L619
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/TaskContext.java
TaskContext.getTaskPublisher
public TaskPublisher getTaskPublisher(TaskState taskState, TaskLevelPolicyCheckResults results) throws Exception { return TaskPublisherBuilderFactory.newTaskPublisherBuilder(taskState, results).build(); }
java
public TaskPublisher getTaskPublisher(TaskState taskState, TaskLevelPolicyCheckResults results) throws Exception { return TaskPublisherBuilderFactory.newTaskPublisherBuilder(taskState, results).build(); }
[ "public", "TaskPublisher", "getTaskPublisher", "(", "TaskState", "taskState", ",", "TaskLevelPolicyCheckResults", "results", ")", "throws", "Exception", "{", "return", "TaskPublisherBuilderFactory", ".", "newTaskPublisherBuilder", "(", "taskState", ",", "results", ")", "....
Get a post-fork {@link TaskPublisher} for publishing data in the given branch. @param taskState {@link TaskState} of a {@link Task} @param results Task-level policy checking results @return a {@link TaskPublisher}
[ "Get", "a", "post", "-", "fork", "{", "@link", "TaskPublisher", "}", "for", "publishing", "data", "in", "the", "given", "branch", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/TaskContext.java#L353-L355
cloudant/sync-android
cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryExecutor.java
QueryExecutor.sqlToSortIds
protected static SqlParts sqlToSortIds(Set<String> docIdSet, List<FieldSort> sortDocument, List<Index> indexes) throws QueryException { String chosenIndex = chooseIndexForSort(sortDocument, indexes); if (chosenIndex == null) { ...
java
protected static SqlParts sqlToSortIds(Set<String> docIdSet, List<FieldSort> sortDocument, List<Index> indexes) throws QueryException { String chosenIndex = chooseIndexForSort(sortDocument, indexes); if (chosenIndex == null) { ...
[ "protected", "static", "SqlParts", "sqlToSortIds", "(", "Set", "<", "String", ">", "docIdSet", ",", "List", "<", "FieldSort", ">", "sortDocument", ",", "List", "<", "Index", ">", "indexes", ")", "throws", "QueryException", "{", "String", "chosenIndex", "=", ...
Return SQL to get ordered list of docIds. Method assumes `sortDocument` is valid. @param docIdSet The original set of document IDs @param sortDocument Array of ordering definitions [ { "fieldName" : "asc" }, { "fieldName2", "desc" } ] @param indexes dictionary of indexes @return the SQL containing the order by clause
[ "Return", "SQL", "to", "get", "ordered", "list", "of", "docIds", "." ]
train
https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryExecutor.java#L340-L387
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceCountryPersistenceImpl.java
CommerceCountryPersistenceImpl.removeByUuid_C
@Override public void removeByUuid_C(String uuid, long companyId) { for (CommerceCountry commerceCountry : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceCountry); } }
java
@Override public void removeByUuid_C(String uuid, long companyId) { for (CommerceCountry commerceCountry : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceCountry); } }
[ "@", "Override", "public", "void", "removeByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "for", "(", "CommerceCountry", "commerceCountry", ":", "findByUuid_C", "(", "uuid", ",", "companyId", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryU...
Removes all the commerce countries where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID
[ "Removes", "all", "the", "commerce", "countries", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceCountryPersistenceImpl.java#L1402-L1408
kmi/iserve
iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ServiceManagerSparql.java
ServiceManagerSparql.listEntitiesByDataModel
private Set<URI> listEntitiesByDataModel(com.hp.hpl.jena.rdf.model.Resource entityType, Property dataPropertyType, URI modelReference) { if (modelReference == null) { return ImmutableSet.of(); } StringBuilder queryBuilder = new StringBuilder() .append("SELECT DISTIN...
java
private Set<URI> listEntitiesByDataModel(com.hp.hpl.jena.rdf.model.Resource entityType, Property dataPropertyType, URI modelReference) { if (modelReference == null) { return ImmutableSet.of(); } StringBuilder queryBuilder = new StringBuilder() .append("SELECT DISTIN...
[ "private", "Set", "<", "URI", ">", "listEntitiesByDataModel", "(", "com", ".", "hp", ".", "hpl", ".", "jena", ".", "rdf", ".", "model", ".", "Resource", "entityType", ",", "Property", "dataPropertyType", ",", "URI", "modelReference", ")", "{", "if", "(", ...
Given the URI of a type (i.e., a modelReference), this method figures out all the entities of a type (Service or Operation are the ones that are expected) that have this as part of their inputs or outputs. What data relationship should be used is also parameterised. @param entityType the type of entity we are lo...
[ "Given", "the", "URI", "of", "a", "type", "(", "i", ".", "e", ".", "a", "modelReference", ")", "this", "method", "figures", "out", "all", "the", "entities", "of", "a", "type", "(", "Service", "or", "Operation", "are", "the", "ones", "that", "are", "e...
train
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/ServiceManagerSparql.java#L831-L873
michel-kraemer/bson4jackson
src/main/java/de/undercouch/bson4jackson/BsonParser.java
BsonParser.readObjectId
protected ObjectId readObjectId() throws IOException { int time = ByteOrderUtil.flip(_in.readInt()); int machine = ByteOrderUtil.flip(_in.readInt()); int inc = ByteOrderUtil.flip(_in.readInt()); return new ObjectId(time, machine, inc); }
java
protected ObjectId readObjectId() throws IOException { int time = ByteOrderUtil.flip(_in.readInt()); int machine = ByteOrderUtil.flip(_in.readInt()); int inc = ByteOrderUtil.flip(_in.readInt()); return new ObjectId(time, machine, inc); }
[ "protected", "ObjectId", "readObjectId", "(", ")", "throws", "IOException", "{", "int", "time", "=", "ByteOrderUtil", ".", "flip", "(", "_in", ".", "readInt", "(", ")", ")", ";", "int", "machine", "=", "ByteOrderUtil", ".", "flip", "(", "_in", ".", "read...
Reads a ObjectID from the input stream @return the ObjectID @throws IOException if the ObjectID could not be read
[ "Reads", "a", "ObjectID", "from", "the", "input", "stream" ]
train
https://github.com/michel-kraemer/bson4jackson/blob/32d2ab3c516b3c07490fdfcf0c5e4ed0a2ee3979/src/main/java/de/undercouch/bson4jackson/BsonParser.java#L618-L623
attribyte/acp
src/main/java/org/attribyte/sql/pool/ConnectionPoolSegment.java
ConnectionPoolSegment.createRealConnection
private Connection createRealConnection(final long timeoutMillis) throws SQLException { if(timeoutMillis < 1L) { String usePassword = getPassword(); Connection conn = dbConnection.datasource == null ? DriverManager.getConnection(dbConnection.connectionString, dbConnection.use...
java
private Connection createRealConnection(final long timeoutMillis) throws SQLException { if(timeoutMillis < 1L) { String usePassword = getPassword(); Connection conn = dbConnection.datasource == null ? DriverManager.getConnection(dbConnection.connectionString, dbConnection.use...
[ "private", "Connection", "createRealConnection", "(", "final", "long", "timeoutMillis", ")", "throws", "SQLException", "{", "if", "(", "timeoutMillis", "<", "1L", ")", "{", "String", "usePassword", "=", "getPassword", "(", ")", ";", "Connection", "conn", "=", ...
Creates a real database connection, failing if one is not obtained in the specified time. @param timeoutMillis The timeout in milliseconds. @return The connection. @throws SQLException on connection problem or timeout waiting for connection.
[ "Creates", "a", "real", "database", "connection", "failing", "if", "one", "is", "not", "obtained", "in", "the", "specified", "time", "." ]
train
https://github.com/attribyte/acp/blob/dbee6ebb83fda4f19fbbbcb9d0ac2b527e3cb659/src/main/java/org/attribyte/sql/pool/ConnectionPoolSegment.java#L1179-L1204
playn/playn
core/src/playn/core/Platform.java
Platform.reportError
public void reportError (String message, Throwable cause) { errors.emit(new Error(message, cause)); log().warn(message, cause); }
java
public void reportError (String message, Throwable cause) { errors.emit(new Error(message, cause)); log().warn(message, cause); }
[ "public", "void", "reportError", "(", "String", "message", ",", "Throwable", "cause", ")", "{", "errors", ".", "emit", "(", "new", "Error", "(", "message", ",", "cause", ")", ")", ";", "log", "(", ")", ".", "warn", "(", "message", ",", "cause", ")", ...
Called when a backend (or other framework code) encounters an exception that it can recover from, but which it would like to report in some orderly fashion. <em>NOTE:</em> this method may be called from threads other than the main PlayN thread.
[ "Called", "when", "a", "backend", "(", "or", "other", "framework", "code", ")", "encounters", "an", "exception", "that", "it", "can", "recover", "from", "but", "which", "it", "would", "like", "to", "report", "in", "some", "orderly", "fashion", ".", "<em", ...
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/core/src/playn/core/Platform.java#L99-L102
mapsforge/mapsforge
sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteDatabase.java
SQLiteDatabase.insertOrThrow
public long insertOrThrow(String table, String nullColumnHack, ContentValues values) throws SQLException { return insertWithOnConflict(table, nullColumnHack, values, CONFLICT_NONE); }
java
public long insertOrThrow(String table, String nullColumnHack, ContentValues values) throws SQLException { return insertWithOnConflict(table, nullColumnHack, values, CONFLICT_NONE); }
[ "public", "long", "insertOrThrow", "(", "String", "table", ",", "String", "nullColumnHack", ",", "ContentValues", "values", ")", "throws", "SQLException", "{", "return", "insertWithOnConflict", "(", "table", ",", "nullColumnHack", ",", "values", ",", "CONFLICT_NONE"...
Convenience method for inserting a row into the database. @param table the table to insert the row into @param nullColumnHack optional; may be <code>null</code>. SQL doesn't allow inserting a completely empty row without naming at least one column name. If your provided <code>values</code> is empty, no column names a...
[ "Convenience", "method", "for", "inserting", "a", "row", "into", "the", "database", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteDatabase.java#L1369-L1372
basho/riak-java-client
src/main/java/com/basho/riak/client/api/RiakClient.java
RiakClient.newClient
public static RiakClient newClient(String... remoteAddresses) throws UnknownHostException { return newClient(RiakNode.Builder.DEFAULT_REMOTE_PORT, Arrays.asList(remoteAddresses)); }
java
public static RiakClient newClient(String... remoteAddresses) throws UnknownHostException { return newClient(RiakNode.Builder.DEFAULT_REMOTE_PORT, Arrays.asList(remoteAddresses)); }
[ "public", "static", "RiakClient", "newClient", "(", "String", "...", "remoteAddresses", ")", "throws", "UnknownHostException", "{", "return", "newClient", "(", "RiakNode", ".", "Builder", ".", "DEFAULT_REMOTE_PORT", ",", "Arrays", ".", "asList", "(", "remoteAddresse...
Static factory method to create a new client instance. This method produces a client connected to the supplied addresses on the default (protocol buffers) port (8087). @param remoteAddresses a list of IP addresses or hostnames @return a new client instance @throws UnknownHostException if a supplied hostname cannot be r...
[ "Static", "factory", "method", "to", "create", "a", "new", "client", "instance", ".", "This", "method", "produces", "a", "client", "connected", "to", "the", "supplied", "addresses", "on", "the", "default", "(", "protocol", "buffers", ")", "port", "(", "8087"...
train
https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/api/RiakClient.java#L231-L234
op4j/op4j
src/main/java/org/op4j/functions/FnString.java
FnString.toInteger
public static final Function<String,Integer> toInteger(final RoundingMode roundingMode, final DecimalPoint decimalPoint) { return new ToInteger(roundingMode, decimalPoint); }
java
public static final Function<String,Integer> toInteger(final RoundingMode roundingMode, final DecimalPoint decimalPoint) { return new ToInteger(roundingMode, decimalPoint); }
[ "public", "static", "final", "Function", "<", "String", ",", "Integer", ">", "toInteger", "(", "final", "RoundingMode", "roundingMode", ",", "final", "DecimalPoint", "decimalPoint", ")", "{", "return", "new", "ToInteger", "(", "roundingMode", ",", "decimalPoint", ...
<p> Converts a String into an Integer, using the specified decimal point configuration ({@link DecimalPoint}). Rounding mode is used for removing the decimal part of the number. The target String should contain no thousand separators. The integer part of the input string must be between {@link Integer#MIN_VALUE} and {@...
[ "<p", ">", "Converts", "a", "String", "into", "an", "Integer", "using", "the", "specified", "decimal", "point", "configuration", "(", "{", "@link", "DecimalPoint", "}", ")", ".", "Rounding", "mode", "is", "used", "for", "removing", "the", "decimal", "part", ...
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/functions/FnString.java#L938-L940
alkacon/opencms-core
src/org/opencms/ui/components/fileselect/CmsResourceSelectDialog.java
CmsResourceSelectDialog.updateRoot
protected void updateRoot(CmsObject rootCms, CmsResource siteRootResource) { m_root = siteRootResource; m_currentCms = rootCms; updateView(); }
java
protected void updateRoot(CmsObject rootCms, CmsResource siteRootResource) { m_root = siteRootResource; m_currentCms = rootCms; updateView(); }
[ "protected", "void", "updateRoot", "(", "CmsObject", "rootCms", ",", "CmsResource", "siteRootResource", ")", "{", "m_root", "=", "siteRootResource", ";", "m_currentCms", "=", "rootCms", ";", "updateView", "(", ")", ";", "}" ]
Updates the current site root resource.<p> @param rootCms the CMS context @param siteRootResource the resource corresponding to a site root
[ "Updates", "the", "current", "site", "root", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/fileselect/CmsResourceSelectDialog.java#L413-L418
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/ExpressionUtils.java
ExpressionUtils.predicateTemplate
@Deprecated public static PredicateTemplate predicateTemplate(String template, ImmutableList<?> args) { return predicateTemplate(TemplateFactory.DEFAULT.create(template), args); }
java
@Deprecated public static PredicateTemplate predicateTemplate(String template, ImmutableList<?> args) { return predicateTemplate(TemplateFactory.DEFAULT.create(template), args); }
[ "@", "Deprecated", "public", "static", "PredicateTemplate", "predicateTemplate", "(", "String", "template", ",", "ImmutableList", "<", "?", ">", "args", ")", "{", "return", "predicateTemplate", "(", "TemplateFactory", ".", "DEFAULT", ".", "create", "(", "template"...
Create a new Template expression @deprecated Use {@link #predicateTemplate(String, List)} instead. @param template template @param args template parameters @return template expression
[ "Create", "a", "new", "Template", "expression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/ExpressionUtils.java#L153-L156
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java
SpoofChecker.getResolvedScriptSet
private void getResolvedScriptSet(CharSequence input, ScriptSet result) { getResolvedScriptSetWithout(input, UScript.CODE_LIMIT, result); }
java
private void getResolvedScriptSet(CharSequence input, ScriptSet result) { getResolvedScriptSetWithout(input, UScript.CODE_LIMIT, result); }
[ "private", "void", "getResolvedScriptSet", "(", "CharSequence", "input", ",", "ScriptSet", "result", ")", "{", "getResolvedScriptSetWithout", "(", "input", ",", "UScript", ".", "CODE_LIMIT", ",", "result", ")", ";", "}" ]
Computes the resolved script set for a string, according to UTS 39 section 5.1.
[ "Computes", "the", "resolved", "script", "set", "for", "a", "string", "according", "to", "UTS", "39", "section", "5", ".", "1", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java#L1519-L1521
powermock/powermock
powermock-api/powermock-api-support/src/main/java/org/powermock/api/support/SuppressCode.java
SuppressCode.suppressConstructor
public static synchronized void suppressConstructor(Class<?> clazz, boolean excludePrivateConstructors) { Constructor<?>[] ctors = null; if (excludePrivateConstructors) { ctors = clazz.getConstructors(); } else { ctors = clazz.getDeclaredConstructors(); } for (Constructor<?> ctor : ctors) { MockRep...
java
public static synchronized void suppressConstructor(Class<?> clazz, boolean excludePrivateConstructors) { Constructor<?>[] ctors = null; if (excludePrivateConstructors) { ctors = clazz.getConstructors(); } else { ctors = clazz.getDeclaredConstructors(); } for (Constructor<?> ctor : ctors) { MockRep...
[ "public", "static", "synchronized", "void", "suppressConstructor", "(", "Class", "<", "?", ">", "clazz", ",", "boolean", "excludePrivateConstructors", ")", "{", "Constructor", "<", "?", ">", "[", "]", "ctors", "=", "null", ";", "if", "(", "excludePrivateConstr...
Suppress all constructors in the given class. @param clazz The classes whose constructors will be suppressed. @param excludePrivateConstructors optionally keep code in private constructors
[ "Suppress", "all", "constructors", "in", "the", "given", "class", "." ]
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-support/src/main/java/org/powermock/api/support/SuppressCode.java#L80-L92
facebook/fresco
imagepipeline-base/src/main/java/com/facebook/imageformat/DefaultImageFormatChecker.java
DefaultImageFormatChecker.getWebpFormat
private static ImageFormat getWebpFormat(final byte[] imageHeaderBytes, final int headerSize) { Preconditions.checkArgument(WebpSupportStatus.isWebpHeader(imageHeaderBytes, 0, headerSize)); if (WebpSupportStatus.isSimpleWebpHeader(imageHeaderBytes, 0)) { return DefaultImageFormats.WEBP_SIMPLE; } ...
java
private static ImageFormat getWebpFormat(final byte[] imageHeaderBytes, final int headerSize) { Preconditions.checkArgument(WebpSupportStatus.isWebpHeader(imageHeaderBytes, 0, headerSize)); if (WebpSupportStatus.isSimpleWebpHeader(imageHeaderBytes, 0)) { return DefaultImageFormats.WEBP_SIMPLE; } ...
[ "private", "static", "ImageFormat", "getWebpFormat", "(", "final", "byte", "[", "]", "imageHeaderBytes", ",", "final", "int", "headerSize", ")", "{", "Preconditions", ".", "checkArgument", "(", "WebpSupportStatus", ".", "isWebpHeader", "(", "imageHeaderBytes", ",", ...
Determines type of WebP image. imageHeaderBytes has to be header of a WebP image
[ "Determines", "type", "of", "WebP", "image", ".", "imageHeaderBytes", "has", "to", "be", "header", "of", "a", "WebP", "image" ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline-base/src/main/java/com/facebook/imageformat/DefaultImageFormatChecker.java#L104-L125
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PathNormalizer.java
PathNormalizer.joinPaths
public static String joinPaths(String prefix, String path, GeneratorRegistry generatorRegistry) { return joinPaths(prefix, path, generatorRegistry.isPathGenerated(prefix)); }
java
public static String joinPaths(String prefix, String path, GeneratorRegistry generatorRegistry) { return joinPaths(prefix, path, generatorRegistry.isPathGenerated(prefix)); }
[ "public", "static", "String", "joinPaths", "(", "String", "prefix", ",", "String", "path", ",", "GeneratorRegistry", "generatorRegistry", ")", "{", "return", "joinPaths", "(", "prefix", ",", "path", ",", "generatorRegistry", ".", "isPathGenerated", "(", "prefix", ...
Normalizes two paths and joins them as a single path. @param prefix @param path @param generatorRegistry the generator registry @return the joined path
[ "Normalizes", "two", "paths", "and", "joins", "them", "as", "a", "single", "path", "." ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PathNormalizer.java#L282-L285
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSConnectionRequestInfoImpl.java
WSConnectionRequestInfoImpl.matchTypeMap
public static final boolean matchTypeMap(Map<String, Class<?>> m1, Map<String, Class<?>> m2) { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(tc, "matchTypeMap", new Object[] { m1, m2 }); boolean match = false; ...
java
public static final boolean matchTypeMap(Map<String, Class<?>> m1, Map<String, Class<?>> m2) { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(tc, "matchTypeMap", new Object[] { m1, m2 }); boolean match = false; ...
[ "public", "static", "final", "boolean", "matchTypeMap", "(", "Map", "<", "String", ",", "Class", "<", "?", ">", ">", "m1", ",", "Map", "<", "String", ",", "Class", "<", "?", ">", ">", "m2", ")", "{", "final", "boolean", "isTraceOn", "=", "TraceCompon...
determines if two typeMaps match. Note that this method takes under account an Oracle 11g change with TypeMap @param m1 @param m2 @return
[ "determines", "if", "two", "typeMaps", "match", ".", "Note", "that", "this", "method", "takes", "under", "account", "an", "Oracle", "11g", "change", "with", "TypeMap" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSConnectionRequestInfoImpl.java#L676-L691
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/spec/DESKeySpec.java
DESKeySpec.isParityAdjusted
public static boolean isParityAdjusted(byte[] key, int offset) throws InvalidKeyException { if (key == null) { throw new InvalidKeyException("null key"); } if (key.length - offset < DES_KEY_LEN) { throw new InvalidKeyException("Wrong key size")...
java
public static boolean isParityAdjusted(byte[] key, int offset) throws InvalidKeyException { if (key == null) { throw new InvalidKeyException("null key"); } if (key.length - offset < DES_KEY_LEN) { throw new InvalidKeyException("Wrong key size")...
[ "public", "static", "boolean", "isParityAdjusted", "(", "byte", "[", "]", "key", ",", "int", "offset", ")", "throws", "InvalidKeyException", "{", "if", "(", "key", "==", "null", ")", "{", "throw", "new", "InvalidKeyException", "(", "\"null key\"", ")", ";", ...
Checks if the given DES key material, starting at <code>offset</code> inclusive, is parity-adjusted. @param key the buffer with the DES key material. @param offset the offset in <code>key</code>, where the DES key material starts. @return true if the given DES key material is parity-adjusted, false otherwise. @excep...
[ "Checks", "if", "the", "given", "DES", "key", "material", "starting", "at", "<code", ">", "offset<", "/", "code", ">", "inclusive", "is", "parity", "-", "adjusted", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/spec/DESKeySpec.java#L186-L203
briandilley/jsonrpc4j
src/main/java/com/googlecode/jsonrpc4j/JsonRpcClient.java
JsonRpcClient.invokeNotification
public void invokeNotification(String methodName, Object argument, OutputStream output) throws IOException { writeRequest(methodName, argument, output, null); output.flush(); }
java
public void invokeNotification(String methodName, Object argument, OutputStream output) throws IOException { writeRequest(methodName, argument, output, null); output.flush(); }
[ "public", "void", "invokeNotification", "(", "String", "methodName", ",", "Object", "argument", ",", "OutputStream", "output", ")", "throws", "IOException", "{", "writeRequest", "(", "methodName", ",", "argument", ",", "output", ",", "null", ")", ";", "output", ...
Invokes the given method on the remote service passing the given argument without reading or expecting a return response. @param methodName the method to invoke @param argument the argument to pass to the method @param output the {@link OutputStream} to write to @throws IOException on error @see #writeRequest(St...
[ "Invokes", "the", "given", "method", "on", "the", "remote", "service", "passing", "the", "given", "argument", "without", "reading", "or", "expecting", "a", "return", "response", "." ]
train
https://github.com/briandilley/jsonrpc4j/blob/d749762c9295b92d893677a8c7be2a14dd43b3bb/src/main/java/com/googlecode/jsonrpc4j/JsonRpcClient.java#L501-L504
chr78rm/tracelogger
src/main/java/de/christofreichardt/diagnosis/QueueTracer.java
QueueTracer.logException
@Override public void logException(LogLevel logLevel, Throwable throwable, Class clazz, String methodName) { this.tracer.logException(logLevel, throwable, clazz, methodName); }
java
@Override public void logException(LogLevel logLevel, Throwable throwable, Class clazz, String methodName) { this.tracer.logException(logLevel, throwable, clazz, methodName); }
[ "@", "Override", "public", "void", "logException", "(", "LogLevel", "logLevel", ",", "Throwable", "throwable", ",", "Class", "clazz", ",", "String", "methodName", ")", "{", "this", ".", "tracer", ".", "logException", "(", "logLevel", ",", "throwable", ",", "...
Delegates to the corresponding method of the wrapped tracer. @param logLevel one of the predefined levels INFO, WARNING, ERROR, FATAL and SEVERE @param throwable the to be logged throwable @param clazz the originating class @param methodName the name of the relevant method
[ "Delegates", "to", "the", "corresponding", "method", "of", "the", "wrapped", "tracer", "." ]
train
https://github.com/chr78rm/tracelogger/blob/ad22452b20f8111ad4d367302c2b26a100a20200/src/main/java/de/christofreichardt/diagnosis/QueueTracer.java#L205-L208
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/openStreetMap/OpenStreetMapRenderer.java
OpenStreetMapRenderer.encodeEnd
@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { if (!component.isRendered()) { return; } OpenStreetMap openStreetMap = (OpenStreetMap) component; ResponseWriter rw = context.getResponseWriter(); String clientIdRaw = openStreetMap.getClientId(); String cl...
java
@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { if (!component.isRendered()) { return; } OpenStreetMap openStreetMap = (OpenStreetMap) component; ResponseWriter rw = context.getResponseWriter(); String clientIdRaw = openStreetMap.getClientId(); String cl...
[ "@", "Override", "public", "void", "encodeEnd", "(", "FacesContext", "context", ",", "UIComponent", "component", ")", "throws", "IOException", "{", "if", "(", "!", "component", ".", "isRendered", "(", ")", ")", "{", "return", ";", "}", "OpenStreetMap", "open...
This methods generates the HTML code of the current b:openStreetMap. <code>encodeBegin</code> generates the start of the component. After the, the JSF framework calls <code>encodeChildren()</code> to generate the HTML code between the beginning and the end of the component. For instance, in the case of a panel componen...
[ "This", "methods", "generates", "the", "HTML", "code", "of", "the", "current", "b", ":", "openStreetMap", ".", "<code", ">", "encodeBegin<", "/", "code", ">", "generates", "the", "start", "of", "the", "component", ".", "After", "the", "the", "JSF", "framew...
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/openStreetMap/OpenStreetMapRenderer.java#L90-L135
osmdroid/osmdroid
osmdroid-android/src/main/java/org/osmdroid/util/TileSystem.java
TileSystem.getLatitudeFromY01
public double getLatitudeFromY01(final double pY01, boolean wrapEnabled) { final double latitude = getLatitudeFromY01(wrapEnabled ? Clip(pY01, 0, 1) : pY01); return wrapEnabled ? Clip(latitude, getMinLatitude(), getMaxLatitude()) : latitude; }
java
public double getLatitudeFromY01(final double pY01, boolean wrapEnabled) { final double latitude = getLatitudeFromY01(wrapEnabled ? Clip(pY01, 0, 1) : pY01); return wrapEnabled ? Clip(latitude, getMinLatitude(), getMaxLatitude()) : latitude; }
[ "public", "double", "getLatitudeFromY01", "(", "final", "double", "pY01", ",", "boolean", "wrapEnabled", ")", "{", "final", "double", "latitude", "=", "getLatitudeFromY01", "(", "wrapEnabled", "?", "Clip", "(", "pY01", ",", "0", ",", "1", ")", ":", "pY01", ...
Converts a "Y01" value into latitude "Y01" is a double between 0 and 1 for the whole latitude range MaxLatitude:0 ... MinLatitude:1 @since 6.0.0
[ "Converts", "a", "Y01", "value", "into", "latitude", "Y01", "is", "a", "double", "between", "0", "and", "1", "for", "the", "whole", "latitude", "range", "MaxLatitude", ":", "0", "...", "MinLatitude", ":", "1" ]
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-android/src/main/java/org/osmdroid/util/TileSystem.java#L505-L508
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java
HttpChannelConfig.parseBinaryTransport
private void parseBinaryTransport(Map<Object, Object> props) { Object value = props.get(HttpConfigConstants.PROPNAME_BINARY_TRANSPORT); if (null != value) { this.bBinaryTransport = convertBoolean(value); if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) { ...
java
private void parseBinaryTransport(Map<Object, Object> props) { Object value = props.get(HttpConfigConstants.PROPNAME_BINARY_TRANSPORT); if (null != value) { this.bBinaryTransport = convertBoolean(value); if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) { ...
[ "private", "void", "parseBinaryTransport", "(", "Map", "<", "Object", ",", "Object", ">", "props", ")", "{", "Object", "value", "=", "props", ".", "get", "(", "HttpConfigConstants", ".", "PROPNAME_BINARY_TRANSPORT", ")", ";", "if", "(", "null", "!=", "value"...
Check the input configuration for whether the parsing and marshalling should use the binary transport mode or not. @param props
[ "Check", "the", "input", "configuration", "for", "whether", "the", "parsing", "and", "marshalling", "should", "use", "the", "binary", "transport", "mode", "or", "not", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java#L797-L805
jhg023/SimpleNet
src/main/java/simplenet/Server.java
Server.writeHelper
@SafeVarargs private <T extends Client> void writeHelper(Consumer<Client> consumer, T... clients) { var toExclude = Collections.newSetFromMap(new IdentityHashMap<>(clients.length)); toExclude.addAll(List.of(clients)); connectedClients.stream().filter(Predicate.not(toExclude::contains)).forEa...
java
@SafeVarargs private <T extends Client> void writeHelper(Consumer<Client> consumer, T... clients) { var toExclude = Collections.newSetFromMap(new IdentityHashMap<>(clients.length)); toExclude.addAll(List.of(clients)); connectedClients.stream().filter(Predicate.not(toExclude::contains)).forEa...
[ "@", "SafeVarargs", "private", "<", "T", "extends", "Client", ">", "void", "writeHelper", "(", "Consumer", "<", "Client", ">", "consumer", ",", "T", "...", "clients", ")", "{", "var", "toExclude", "=", "Collections", ".", "newSetFromMap", "(", "new", "Iden...
A helper method that eliminates code duplication in the {@link #writeToAllExcept(Packet, Client[])} and {@link #writeAndFlushToAllExcept(Packet, Client[])} methods. @param <T> A {@link Client} or any of its children. @param consumer The action to perform for each {@link Client}. @param clients A variable amount of {@l...
[ "A", "helper", "method", "that", "eliminates", "code", "duplication", "in", "the", "{", "@link", "#writeToAllExcept", "(", "Packet", "Client", "[]", ")", "}", "and", "{", "@link", "#writeAndFlushToAllExcept", "(", "Packet", "Client", "[]", ")", "}", "methods",...
train
https://github.com/jhg023/SimpleNet/blob/a5b55cbfe1768c6a28874f12adac3c748f2b509a/src/main/java/simplenet/Server.java#L210-L215
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailService.java
MailService.findMessage
public MailMessage findMessage(final String accountReservationKey, final Predicate<MailMessage> condition, final long timeoutSeconds) { return findMessage(accountReservationKey, condition, timeoutSeconds, defaultSleepMillis); }
java
public MailMessage findMessage(final String accountReservationKey, final Predicate<MailMessage> condition, final long timeoutSeconds) { return findMessage(accountReservationKey, condition, timeoutSeconds, defaultSleepMillis); }
[ "public", "MailMessage", "findMessage", "(", "final", "String", "accountReservationKey", ",", "final", "Predicate", "<", "MailMessage", ">", "condition", ",", "final", "long", "timeoutSeconds", ")", "{", "return", "findMessage", "(", "accountReservationKey", ",", "c...
Tries to find a message for the mail account reserved under the specified {@code accountReservationKey} applying the specified {@code condition} until it times out using the specified {@code timeout} and {@link EmailConstants#MAIL_SLEEP_MILLIS}. @param accountReservationKey the key under which the account has been res...
[ "Tries", "to", "find", "a", "message", "for", "the", "mail", "account", "reserved", "under", "the", "specified", "{", "@code", "accountReservationKey", "}", "applying", "the", "specified", "{", "@code", "condition", "}", "until", "it", "times", "out", "using",...
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailService.java#L117-L120
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/widget/FacebookDialog.java
FacebookDialog.canPresentShareDialog
public static boolean canPresentShareDialog(Context context, ShareDialogFeature... features) { return handleCanPresent(context, EnumSet.of(ShareDialogFeature.SHARE_DIALOG, features)); }
java
public static boolean canPresentShareDialog(Context context, ShareDialogFeature... features) { return handleCanPresent(context, EnumSet.of(ShareDialogFeature.SHARE_DIALOG, features)); }
[ "public", "static", "boolean", "canPresentShareDialog", "(", "Context", "context", ",", "ShareDialogFeature", "...", "features", ")", "{", "return", "handleCanPresent", "(", "context", ",", "EnumSet", ".", "of", "(", "ShareDialogFeature", ".", "SHARE_DIALOG", ",", ...
Determines whether the version of the Facebook application installed on the user's device is recent enough to support specific features of the native Share dialog, which in turn may be used to determine which UI, etc., to present to the user. @param context the calling Context @param features zero or more features to...
[ "Determines", "whether", "the", "version", "of", "the", "Facebook", "application", "installed", "on", "the", "user", "s", "device", "is", "recent", "enough", "to", "support", "specific", "features", "of", "the", "native", "Share", "dialog", "which", "in", "tur...
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/widget/FacebookDialog.java#L369-L371
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java
AbstractManagedType.addSingularAttribute
public void addSingularAttribute(String attributeName, SingularAttribute<X, ?> attribute) { if (declaredSingluarAttribs == null) { declaredSingluarAttribs = new HashMap<String, SingularAttribute<X, ?>>(); } declaredSingluarAttribs.put(attributeName, attribute); ...
java
public void addSingularAttribute(String attributeName, SingularAttribute<X, ?> attribute) { if (declaredSingluarAttribs == null) { declaredSingluarAttribs = new HashMap<String, SingularAttribute<X, ?>>(); } declaredSingluarAttribs.put(attributeName, attribute); ...
[ "public", "void", "addSingularAttribute", "(", "String", "attributeName", ",", "SingularAttribute", "<", "X", ",", "?", ">", "attribute", ")", "{", "if", "(", "declaredSingluarAttribs", "==", "null", ")", "{", "declaredSingluarAttribs", "=", "new", "HashMap", "<...
Adds the singular attribute. @param attributeName the attribute name @param attribute the attribute
[ "Adds", "the", "singular", "attribute", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java#L820-L831
alkacon/opencms-core
src/org/opencms/jsp/util/A_CmsJspValueWrapper.java
A_CmsJspValueWrapper.substituteLink
protected static String substituteLink(CmsObject cms, String target) { if (cms != null) { return OpenCms.getLinkManager().substituteLinkForUnknownTarget( cms, CmsLinkManager.getAbsoluteUri(String.valueOf(target), cms.getRequestContext().getUri())); } else { ...
java
protected static String substituteLink(CmsObject cms, String target) { if (cms != null) { return OpenCms.getLinkManager().substituteLinkForUnknownTarget( cms, CmsLinkManager.getAbsoluteUri(String.valueOf(target), cms.getRequestContext().getUri())); } else { ...
[ "protected", "static", "String", "substituteLink", "(", "CmsObject", "cms", ",", "String", "target", ")", "{", "if", "(", "cms", "!=", "null", ")", "{", "return", "OpenCms", ".", "getLinkManager", "(", ")", ".", "substituteLinkForUnknownTarget", "(", "cms", ...
Returns the substituted link to the given target.<p> @param cms the cms context @param target the link target @return the substituted link
[ "Returns", "the", "substituted", "link", "to", "the", "given", "target", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/A_CmsJspValueWrapper.java#L171-L180
Stratio/stratio-cassandra
src/java/org/apache/cassandra/io/sstable/Downsampling.java
Downsampling.getEffectiveIndexIntervalAfterIndex
public static int getEffectiveIndexIntervalAfterIndex(int index, int samplingLevel, int minIndexInterval) { assert index >= 0; index %= samplingLevel; List<Integer> originalIndexes = getOriginalIndexes(samplingLevel); int nextEntryOriginalIndex = (index == originalIndexes.size() - 1)...
java
public static int getEffectiveIndexIntervalAfterIndex(int index, int samplingLevel, int minIndexInterval) { assert index >= 0; index %= samplingLevel; List<Integer> originalIndexes = getOriginalIndexes(samplingLevel); int nextEntryOriginalIndex = (index == originalIndexes.size() - 1)...
[ "public", "static", "int", "getEffectiveIndexIntervalAfterIndex", "(", "int", "index", ",", "int", "samplingLevel", ",", "int", "minIndexInterval", ")", "{", "assert", "index", ">=", "0", ";", "index", "%=", "samplingLevel", ";", "List", "<", "Integer", ">", "...
Calculates the effective index interval after the entry at `index` in an IndexSummary. In other words, this returns the number of partitions in the primary on-disk index before the next partition that has an entry in the index summary. If samplingLevel == BASE_SAMPLING_LEVEL, this will be equal to the index interval....
[ "Calculates", "the", "effective", "index", "interval", "after", "the", "entry", "at", "index", "in", "an", "IndexSummary", ".", "In", "other", "words", "this", "returns", "the", "number", "of", "partitions", "in", "the", "primary", "on", "-", "disk", "index"...
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/io/sstable/Downsampling.java#L116-L123
feroult/yawp
yawp-core/src/main/java/io/yawp/commons/utils/json/gson/CustomTypeAdapterFactory.java
CustomTypeAdapterFactory.read
protected T read(JsonReader in, TypeAdapter<JsonElement> elementAdapter, TypeAdapter<T> delegate) throws IOException { JsonElement tree = elementAdapter.read(in); afterRead(tree); return delegate.fromJsonTree(tree); }
java
protected T read(JsonReader in, TypeAdapter<JsonElement> elementAdapter, TypeAdapter<T> delegate) throws IOException { JsonElement tree = elementAdapter.read(in); afterRead(tree); return delegate.fromJsonTree(tree); }
[ "protected", "T", "read", "(", "JsonReader", "in", ",", "TypeAdapter", "<", "JsonElement", ">", "elementAdapter", ",", "TypeAdapter", "<", "T", ">", "delegate", ")", "throws", "IOException", "{", "JsonElement", "tree", "=", "elementAdapter", ".", "read", "(", ...
Override this to define how this is deserialized in {@code deserialize} to its type.
[ "Override", "this", "to", "define", "how", "this", "is", "deserialized", "in", "{" ]
train
https://github.com/feroult/yawp/blob/b90deb905edd3fdb3009a5525e310cd17ead7f3d/yawp-core/src/main/java/io/yawp/commons/utils/json/gson/CustomTypeAdapterFactory.java#L58-L62
forge/core
maven/api/src/main/java/org/jboss/forge/addon/maven/archetype/SimpleNamespaceContext.java
SimpleNamespaceContext.registerMapping
public void registerMapping(String prefix, String namespaceURI) { prefix2Ns.put(prefix, namespaceURI); ns2Prefix.put(namespaceURI, prefix); }
java
public void registerMapping(String prefix, String namespaceURI) { prefix2Ns.put(prefix, namespaceURI); ns2Prefix.put(namespaceURI, prefix); }
[ "public", "void", "registerMapping", "(", "String", "prefix", ",", "String", "namespaceURI", ")", "{", "prefix2Ns", ".", "put", "(", "prefix", ",", "namespaceURI", ")", ";", "ns2Prefix", ".", "put", "(", "namespaceURI", ",", "prefix", ")", ";", "}" ]
Registers prefix - namespace URI mapping @param prefix @param namespaceURI
[ "Registers", "prefix", "-", "namespace", "URI", "mapping" ]
train
https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/maven/api/src/main/java/org/jboss/forge/addon/maven/archetype/SimpleNamespaceContext.java#L57-L61
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/context/SvgGraphicsContext.java
SvgGraphicsContext.setCursor
public void setCursor(Object parent, String name, String cursor) { if (isAttached()) { helper.setCursor(parent, name, cursor); } }
java
public void setCursor(Object parent, String name, String cursor) { if (isAttached()) { helper.setCursor(parent, name, cursor); } }
[ "public", "void", "setCursor", "(", "Object", "parent", ",", "String", "name", ",", "String", "cursor", ")", "{", "if", "(", "isAttached", "(", ")", ")", "{", "helper", ".", "setCursor", "(", "parent", ",", "name", ",", "cursor", ")", ";", "}", "}" ]
Set a specific cursor on an element of this <code>GraphicsContext</code>. @param parent the parent of the element on which the cursor should be set. @param name the name of the child element on which the cursor should be set @param cursor The string representation of the cursor to use.
[ "Set", "a", "specific", "cursor", "on", "an", "element", "of", "this", "<code", ">", "GraphicsContext<", "/", "code", ">", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/SvgGraphicsContext.java#L695-L699
haifengl/smile
core/src/main/java/smile/classification/NeuralNetwork.java
NeuralNetwork.learn
public double learn(double[] x, double[] y, double weight) { setInput(x); propagate(); double err = weight * computeOutputError(y); if (weight != 1.0) { for (int i = 0; i < outputLayer.units; i++) { outputLayer.error[i] *= weight; } } ...
java
public double learn(double[] x, double[] y, double weight) { setInput(x); propagate(); double err = weight * computeOutputError(y); if (weight != 1.0) { for (int i = 0; i < outputLayer.units; i++) { outputLayer.error[i] *= weight; } } ...
[ "public", "double", "learn", "(", "double", "[", "]", "x", ",", "double", "[", "]", "y", ",", "double", "weight", ")", "{", "setInput", "(", "x", ")", ";", "propagate", "(", ")", ";", "double", "err", "=", "weight", "*", "computeOutputError", "(", ...
Update the neural network with given instance and associated target value. Note that this method is NOT multi-thread safe. @param x the training instance. @param y the target value. @param weight a positive weight value associated with the training instance. @return the weighted training error before back-propagation.
[ "Update", "the", "neural", "network", "with", "given", "instance", "and", "associated", "target", "value", ".", "Note", "that", "this", "method", "is", "NOT", "multi", "-", "thread", "safe", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/core/src/main/java/smile/classification/NeuralNetwork.java#L849-L864
netty/netty
common/src/main/java/io/netty/util/AsciiString.java
AsciiString.forEachByteDesc
public int forEachByteDesc(int index, int length, ByteProcessor visitor) throws Exception { if (isOutOfBounds(index, length, length())) { throw new IndexOutOfBoundsException("expected: " + "0 <= index(" + index + ") <= start + length(" + length + ") <= " + "length(" + length() + ...
java
public int forEachByteDesc(int index, int length, ByteProcessor visitor) throws Exception { if (isOutOfBounds(index, length, length())) { throw new IndexOutOfBoundsException("expected: " + "0 <= index(" + index + ") <= start + length(" + length + ") <= " + "length(" + length() + ...
[ "public", "int", "forEachByteDesc", "(", "int", "index", ",", "int", "length", ",", "ByteProcessor", "visitor", ")", "throws", "Exception", "{", "if", "(", "isOutOfBounds", "(", "index", ",", "length", ",", "length", "(", ")", ")", ")", "{", "throw", "ne...
Iterates over the specified area of this buffer with the specified {@code processor} in descending order. (i.e. {@code (index + length - 1)}, {@code (index + length - 2)}, ... {@code index}). @return {@code -1} if the processor iterated to or beyond the beginning of the specified area. The last-visited index If the {@...
[ "Iterates", "over", "the", "specified", "area", "of", "this", "buffer", "with", "the", "specified", "{", "@code", "processor", "}", "in", "descending", "order", ".", "(", "i", ".", "e", ".", "{", "@code", "(", "index", "+", "length", "-", "1", ")", "...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/AsciiString.java#L304-L310
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_account_primaryEmailAddress_alias_alias_GET
public OvhExchangeAccountAlias organizationName_service_exchangeService_account_primaryEmailAddress_alias_alias_GET(String organizationName, String exchangeService, String primaryEmailAddress, String alias) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/account/{prim...
java
public OvhExchangeAccountAlias organizationName_service_exchangeService_account_primaryEmailAddress_alias_alias_GET(String organizationName, String exchangeService, String primaryEmailAddress, String alias) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/account/{prim...
[ "public", "OvhExchangeAccountAlias", "organizationName_service_exchangeService_account_primaryEmailAddress_alias_alias_GET", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "String", "primaryEmailAddress", ",", "String", "alias", ")", "throws", "IOExceptio...
Get this object properties REST: GET /email/exchange/{organizationName}/service/{exchangeService}/account/{primaryEmailAddress}/alias/{alias} @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] The internal name of your exchange service @param primaryEma...
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L1673-L1678
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/CoronaConf.java
CoronaConf.getPoolInfo
public PoolInfo getPoolInfo() { String poolNameProperty = get(IMPLICIT_POOL_PROPERTY, "user.name"); String explicitPool = get(EXPLICIT_POOL_PROPERTY, get(poolNameProperty, "")).trim(); String[] poolInfoSplitString = explicitPool.split("[.]"); if (poolInfoSplitString != null && poolInfoSplitStrin...
java
public PoolInfo getPoolInfo() { String poolNameProperty = get(IMPLICIT_POOL_PROPERTY, "user.name"); String explicitPool = get(EXPLICIT_POOL_PROPERTY, get(poolNameProperty, "")).trim(); String[] poolInfoSplitString = explicitPool.split("[.]"); if (poolInfoSplitString != null && poolInfoSplitStrin...
[ "public", "PoolInfo", "getPoolInfo", "(", ")", "{", "String", "poolNameProperty", "=", "get", "(", "IMPLICIT_POOL_PROPERTY", ",", "\"user.name\"", ")", ";", "String", "explicitPool", "=", "get", "(", "EXPLICIT_POOL_PROPERTY", ",", "get", "(", "poolNameProperty", "...
Get the pool info. In order to support previous behavior, a single pool name is accepted. @return Pool info, using a default pool group if the explicit pool can not be found
[ "Get", "the", "pool", "info", ".", "In", "order", "to", "support", "previous", "behavior", "a", "single", "pool", "name", "is", "accepted", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/CoronaConf.java#L376-L388
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/services/path/PathManagerService.java
PathManagerService.removePathEntry
final void removePathEntry(final String pathName, boolean check) throws OperationFailedException{ synchronized (pathEntries) { PathEntry pathEntry = pathEntries.get(pathName); if (pathEntry.isReadOnly()) { throw ControllerLogger.ROOT_LOGGER.pathEntryIsReadOnly(pathName); ...
java
final void removePathEntry(final String pathName, boolean check) throws OperationFailedException{ synchronized (pathEntries) { PathEntry pathEntry = pathEntries.get(pathName); if (pathEntry.isReadOnly()) { throw ControllerLogger.ROOT_LOGGER.pathEntryIsReadOnly(pathName); ...
[ "final", "void", "removePathEntry", "(", "final", "String", "pathName", ",", "boolean", "check", ")", "throws", "OperationFailedException", "{", "synchronized", "(", "pathEntries", ")", "{", "PathEntry", "pathEntry", "=", "pathEntries", ".", "get", "(", "pathName"...
Removes the entry for a path and sends an {@link org.jboss.as.controller.services.path.PathManager.Event#REMOVED} notification to any registered {@linkplain org.jboss.as.controller.services.path.PathManager.Callback#pathEvent(Event, PathEntry) callbacks}. @param pathName the logical name of the path within the model. C...
[ "Removes", "the", "entry", "for", "a", "path", "and", "sends", "an", "{" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/services/path/PathManagerService.java#L224-L247
mikepenz/FastAdapter
app/src/main/java/com/mikepenz/fastadapter/app/items/SwipeableItem.java
SwipeableItem.bindView
@Override public void bindView(ViewHolder viewHolder, List<Object> payloads) { super.bindView(viewHolder, payloads); //set the text for the name StringHolder.applyTo(name, viewHolder.name); //set the text for the description or hide StringHolder.applyToOrHide(description, vi...
java
@Override public void bindView(ViewHolder viewHolder, List<Object> payloads) { super.bindView(viewHolder, payloads); //set the text for the name StringHolder.applyTo(name, viewHolder.name); //set the text for the description or hide StringHolder.applyToOrHide(description, vi...
[ "@", "Override", "public", "void", "bindView", "(", "ViewHolder", "viewHolder", ",", "List", "<", "Object", ">", "payloads", ")", "{", "super", ".", "bindView", "(", "viewHolder", ",", "payloads", ")", ";", "//set the text for the name", "StringHolder", ".", "...
binds the data of this item onto the viewHolder @param viewHolder the viewHolder of this item
[ "binds", "the", "data", "of", "this", "item", "onto", "the", "viewHolder" ]
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/app/src/main/java/com/mikepenz/fastadapter/app/items/SwipeableItem.java#L115-L137
samskivert/samskivert
src/main/java/com/samskivert/util/ConfigUtil.java
ConfigUtil.loadProperties
public static void loadProperties (String path, ClassLoader loader, Properties target) throws IOException { InputStream in = getStream(path, loader); if (in == null) { throw new FileNotFoundException(path); } target.load(in); in.close(); }
java
public static void loadProperties (String path, ClassLoader loader, Properties target) throws IOException { InputStream in = getStream(path, loader); if (in == null) { throw new FileNotFoundException(path); } target.load(in); in.close(); }
[ "public", "static", "void", "loadProperties", "(", "String", "path", ",", "ClassLoader", "loader", ",", "Properties", "target", ")", "throws", "IOException", "{", "InputStream", "in", "=", "getStream", "(", "path", ",", "loader", ")", ";", "if", "(", "in", ...
Like {@link #loadProperties(String,ClassLoader)} but the properties are loaded into the supplied {@link Properties} object.
[ "Like", "{" ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/ConfigUtil.java#L78-L87
Cleveroad/AdaptiveTableLayout
library/src/main/java/com/cleveroad/adaptivetablelayout/LinkedAdaptiveTableAdapter.java
LinkedAdaptiveTableAdapter.notifyItemChanged
@Override public void notifyItemChanged(int rowIndex, int columnIndex) { for (AdaptiveTableDataSetObserver observer : mAdaptiveTableDataSetObservers) { observer.notifyItemChanged(rowIndex, columnIndex); } }
java
@Override public void notifyItemChanged(int rowIndex, int columnIndex) { for (AdaptiveTableDataSetObserver observer : mAdaptiveTableDataSetObservers) { observer.notifyItemChanged(rowIndex, columnIndex); } }
[ "@", "Override", "public", "void", "notifyItemChanged", "(", "int", "rowIndex", ",", "int", "columnIndex", ")", "{", "for", "(", "AdaptiveTableDataSetObserver", "observer", ":", "mAdaptiveTableDataSetObservers", ")", "{", "observer", ".", "notifyItemChanged", "(", "...
{@inheritDoc} @param rowIndex the row index @param columnIndex the column index
[ "{", "@inheritDoc", "}" ]
train
https://github.com/Cleveroad/AdaptiveTableLayout/blob/188213b35e05e635497b03fe741799782dde7208/library/src/main/java/com/cleveroad/adaptivetablelayout/LinkedAdaptiveTableAdapter.java#L97-L102
camunda/camunda-bpmn-model
src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractBoundaryEventBuilder.java
AbstractBoundaryEventBuilder.errorEventDefinition
public ErrorEventDefinitionBuilder errorEventDefinition(String id) { ErrorEventDefinition errorEventDefinition = createEmptyErrorEventDefinition(); if (id != null) { errorEventDefinition.setId(id); } element.getEventDefinitions().add(errorEventDefinition); return new ErrorEventDefinitionBuild...
java
public ErrorEventDefinitionBuilder errorEventDefinition(String id) { ErrorEventDefinition errorEventDefinition = createEmptyErrorEventDefinition(); if (id != null) { errorEventDefinition.setId(id); } element.getEventDefinitions().add(errorEventDefinition); return new ErrorEventDefinitionBuild...
[ "public", "ErrorEventDefinitionBuilder", "errorEventDefinition", "(", "String", "id", ")", "{", "ErrorEventDefinition", "errorEventDefinition", "=", "createEmptyErrorEventDefinition", "(", ")", ";", "if", "(", "id", "!=", "null", ")", "{", "errorEventDefinition", ".", ...
Creates an error event definition with an unique id and returns a builder for the error event definition. @return the error event definition builder object
[ "Creates", "an", "error", "event", "definition", "with", "an", "unique", "id", "and", "returns", "a", "builder", "for", "the", "error", "event", "definition", "." ]
train
https://github.com/camunda/camunda-bpmn-model/blob/debcadf041d10fa62b799de0307b832cea84e5d4/src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractBoundaryEventBuilder.java#L79-L87
google/error-prone-javac
src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java
Util.remoteInputOutput
public static ExecutionControl remoteInputOutput(InputStream input, OutputStream output, Map<String, OutputStream> outputStreamMap, Map<String, InputStream> inputStreamMap, BiFunction<ObjectInput, ObjectOutput, ExecutionControl> factory) throws IOException { ExecutionControl[] result = n...
java
public static ExecutionControl remoteInputOutput(InputStream input, OutputStream output, Map<String, OutputStream> outputStreamMap, Map<String, InputStream> inputStreamMap, BiFunction<ObjectInput, ObjectOutput, ExecutionControl> factory) throws IOException { ExecutionControl[] result = n...
[ "public", "static", "ExecutionControl", "remoteInputOutput", "(", "InputStream", "input", ",", "OutputStream", "output", ",", "Map", "<", "String", ",", "OutputStream", ">", "outputStreamMap", ",", "Map", "<", "String", ",", "InputStream", ">", "inputStreamMap", "...
Creates an ExecutionControl for given packetized input and output. The given InputStream is de-packetized, and content forwarded to ObjectInput and given OutputStreams. The ObjectOutput and values read from the given InputStream are packetized and sent to the given OutputStream. @param input the packetized input strea...
[ "Creates", "an", "ExecutionControl", "for", "given", "packetized", "input", "and", "output", ".", "The", "given", "InputStream", "is", "de", "-", "packetized", "and", "content", "forwarded", "to", "ObjectInput", "and", "given", "OutputStreams", ".", "The", "Obje...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java#L159-L202
gfk-ba/senbot
SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/ElementService.java
ElementService.dragElementTo
public void dragElementTo(By draggable, int x, int y) throws InterruptedException { WebDriver driver = getWebDriver(); Actions clickAndDrag = new Actions(getWebDriver()); clickAndDrag.dragAndDropBy(driver.findElement(draggable), x, y); clickAndDrag.perform(); }
java
public void dragElementTo(By draggable, int x, int y) throws InterruptedException { WebDriver driver = getWebDriver(); Actions clickAndDrag = new Actions(getWebDriver()); clickAndDrag.dragAndDropBy(driver.findElement(draggable), x, y); clickAndDrag.perform(); }
[ "public", "void", "dragElementTo", "(", "By", "draggable", ",", "int", "x", ",", "int", "y", ")", "throws", "InterruptedException", "{", "WebDriver", "driver", "=", "getWebDriver", "(", ")", ";", "Actions", "clickAndDrag", "=", "new", "Actions", "(", "getWeb...
Drags an element some place else @param draggable The element to drag @param x Offset @param y Offset @throws InterruptedException
[ "Drags", "an", "element", "some", "place", "else" ]
train
https://github.com/gfk-ba/senbot/blob/e9a152aa67be48b1bb13a4691655caf6d873b553/SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/ElementService.java#L351-L357
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.isAssignableFrom
public static boolean isAssignableFrom(String lookingFor, TypeDescriptor candidate) { String[] interfaces = candidate.getSuperinterfacesName(); for (String intface : interfaces) { if (intface.equals(lookingFor)) { return true; } boolean b = isAssignableFrom(lookingFor, candidate.getTypeRegistry().getDe...
java
public static boolean isAssignableFrom(String lookingFor, TypeDescriptor candidate) { String[] interfaces = candidate.getSuperinterfacesName(); for (String intface : interfaces) { if (intface.equals(lookingFor)) { return true; } boolean b = isAssignableFrom(lookingFor, candidate.getTypeRegistry().getDe...
[ "public", "static", "boolean", "isAssignableFrom", "(", "String", "lookingFor", ",", "TypeDescriptor", "candidate", ")", "{", "String", "[", "]", "interfaces", "=", "candidate", ".", "getSuperinterfacesName", "(", ")", ";", "for", "(", "String", "intface", ":", ...
/* Determine if the type specified in lookingFor is a supertype (class/interface) of the specified typedescriptor, i.e. can an object of type 'candidate' be assigned to a variable of typ 'lookingFor'. @return true if it is a supertype
[ "/", "*", "Determine", "if", "the", "type", "specified", "in", "lookingFor", "is", "a", "supertype", "(", "class", "/", "interface", ")", "of", "the", "specified", "typedescriptor", "i", ".", "e", ".", "can", "an", "object", "of", "type", "candidate", "b...
train
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L1662-L1681
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/DdosProtectionPlansInner.java
DdosProtectionPlansInner.createOrUpdateAsync
public Observable<DdosProtectionPlanInner> createOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).map(new Func1<ServiceResponse<DdosProtectionPlanInner...
java
public Observable<DdosProtectionPlanInner> createOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).map(new Func1<ServiceResponse<DdosProtectionPlanInner...
[ "public", "Observable", "<", "DdosProtectionPlanInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "ddosProtectionPlanName", ",", "DdosProtectionPlanInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "r...
Creates or updates a DDoS protection plan. @param resourceGroupName The name of the resource group. @param ddosProtectionPlanName The name of the DDoS protection plan. @param parameters Parameters supplied to the create or update operation. @throws IllegalArgumentException thrown if parameters fail the validation @ret...
[ "Creates", "or", "updates", "a", "DDoS", "protection", "plan", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/DdosProtectionPlansInner.java#L378-L385
xcesco/kripton
kripton-arch-integration/src/main/java/android/arch/lifecycle/MediatorLiveData.java
MediatorLiveData.addSource
@MainThread public <S> void addSource(@NonNull LiveData<S> source, @NonNull Observer<S> onChanged) { Source<S> e = new Source<>(source, onChanged); Source<?> existing = mSources.putIfAbsent(source, e); if (existing != null && existing.mObserver != onChanged) { throw new IllegalAr...
java
@MainThread public <S> void addSource(@NonNull LiveData<S> source, @NonNull Observer<S> onChanged) { Source<S> e = new Source<>(source, onChanged); Source<?> existing = mSources.putIfAbsent(source, e); if (existing != null && existing.mObserver != onChanged) { throw new IllegalAr...
[ "@", "MainThread", "public", "<", "S", ">", "void", "addSource", "(", "@", "NonNull", "LiveData", "<", "S", ">", "source", ",", "@", "NonNull", "Observer", "<", "S", ">", "onChanged", ")", "{", "Source", "<", "S", ">", "e", "=", "new", "Source", "<...
Starts to listen the given {@code source} LiveData, {@code onChanged} observer will be called when {@code source} value was changed. <p> {@code onChanged} callback will be called only when this {@code MediatorLiveData} is active. <p> If the given LiveData is already added as a source but with a different Observer, {@li...
[ "Starts", "to", "listen", "the", "given", "{", "@code", "source", "}", "LiveData", "{", "@code", "onChanged", "}", "observer", "will", "be", "called", "when", "{", "@code", "source", "}", "value", "was", "changed", ".", "<p", ">", "{", "@code", "onChange...
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-arch-integration/src/main/java/android/arch/lifecycle/MediatorLiveData.java#L85-L99
headius/invokebinder
src/main/java/com/headius/invokebinder/SmartBinder.java
SmartBinder.invokeStaticQuiet
public SmartHandle invokeStaticQuiet(Lookup lookup, Class<?> target, String name) { return new SmartHandle(start, binder.invokeStaticQuiet(lookup, target, name)); }
java
public SmartHandle invokeStaticQuiet(Lookup lookup, Class<?> target, String name) { return new SmartHandle(start, binder.invokeStaticQuiet(lookup, target, name)); }
[ "public", "SmartHandle", "invokeStaticQuiet", "(", "Lookup", "lookup", ",", "Class", "<", "?", ">", "target", ",", "String", "name", ")", "{", "return", "new", "SmartHandle", "(", "start", ",", "binder", ".", "invokeStaticQuiet", "(", "lookup", ",", "target"...
Terminate this binder by looking up the named static method on the given target type. Perform the actual method lookup using the given Lookup object. If the lookup fails, a RuntimeException will be raised, containing the actual reason. This method is for convenience in (for example) field declarations, where checked ex...
[ "Terminate", "this", "binder", "by", "looking", "up", "the", "named", "static", "method", "on", "the", "given", "target", "type", ".", "Perform", "the", "actual", "method", "lookup", "using", "the", "given", "Lookup", "object", ".", "If", "the", "lookup", ...
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/SmartBinder.java#L1039-L1041
Netflix/Hystrix
hystrix-core/src/main/java/com/netflix/hystrix/strategy/properties/HystrixPropertiesStrategy.java
HystrixPropertiesStrategy.getThreadPoolProperties
public HystrixThreadPoolProperties getThreadPoolProperties(HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolProperties.Setter builder) { return new HystrixPropertiesThreadPoolDefault(threadPoolKey, builder); }
java
public HystrixThreadPoolProperties getThreadPoolProperties(HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolProperties.Setter builder) { return new HystrixPropertiesThreadPoolDefault(threadPoolKey, builder); }
[ "public", "HystrixThreadPoolProperties", "getThreadPoolProperties", "(", "HystrixThreadPoolKey", "threadPoolKey", ",", "HystrixThreadPoolProperties", ".", "Setter", "builder", ")", "{", "return", "new", "HystrixPropertiesThreadPoolDefault", "(", "threadPoolKey", ",", "builder",...
Construct an implementation of {@link HystrixThreadPoolProperties} for {@link HystrixThreadPool} instances with {@link HystrixThreadPoolKey}. <p> <b>Default Implementation</b> <p> Constructs instance of {@link HystrixPropertiesThreadPoolDefault}. @param threadPoolKey {@link HystrixThreadPoolKey} representing the name ...
[ "Construct", "an", "implementation", "of", "{", "@link", "HystrixThreadPoolProperties", "}", "for", "{", "@link", "HystrixThreadPool", "}", "instances", "with", "{", "@link", "HystrixThreadPoolKey", "}", ".", "<p", ">", "<b", ">", "Default", "Implementation<", "/"...
train
https://github.com/Netflix/Hystrix/blob/3cb21589895e9f8f87cfcdbc9d96d9f63d48b848/hystrix-core/src/main/java/com/netflix/hystrix/strategy/properties/HystrixPropertiesStrategy.java#L92-L94
kaazing/gateway
transport/http/src/main/java/org/kaazing/gateway/transport/http/bridge/filter/HttpMergeRequestFilter.java
HttpMergeRequestFilter.mergeRequests
private boolean mergeRequests(HttpRequestMessage from, HttpRequestMessage to) { if (from == null || to == null) { return false; } final URI initialRequestURI = from.getRequestURI(); final URI extendedRequestURI = to.getRequestURI(); boolean uriPathOk = initialReque...
java
private boolean mergeRequests(HttpRequestMessage from, HttpRequestMessage to) { if (from == null || to == null) { return false; } final URI initialRequestURI = from.getRequestURI(); final URI extendedRequestURI = to.getRequestURI(); boolean uriPathOk = initialReque...
[ "private", "boolean", "mergeRequests", "(", "HttpRequestMessage", "from", ",", "HttpRequestMessage", "to", ")", "{", "if", "(", "from", "==", "null", "||", "to", "==", "null", ")", "{", "return", "false", ";", "}", "final", "URI", "initialRequestURI", "=", ...
Return true iff the extended request matches the initial request. <p/> This function, when returning true, additionally ensures that the extended request contains no illegal headers, and has had selected header elements from the initial request merged into the extended request. @param from the initial request @param ...
[ "Return", "true", "iff", "the", "extended", "request", "matches", "the", "initial", "request", ".", "<p", "/", ">", "This", "function", "when", "returning", "true", "additionally", "ensures", "that", "the", "extended", "request", "contains", "no", "illegal", "...
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/transport/http/src/main/java/org/kaazing/gateway/transport/http/bridge/filter/HttpMergeRequestFilter.java#L348-L388
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/StatementsForClassImpl.java
StatementsForClassImpl.createStatement
private Statement createStatement(Connection con, boolean scrollable, int explicitFetchSizeHint) throws java.sql.SQLException { Statement result; try { // if necessary use JDBC1.0 methods if (!FORCEJDBC1_0) { result = ...
java
private Statement createStatement(Connection con, boolean scrollable, int explicitFetchSizeHint) throws java.sql.SQLException { Statement result; try { // if necessary use JDBC1.0 methods if (!FORCEJDBC1_0) { result = ...
[ "private", "Statement", "createStatement", "(", "Connection", "con", ",", "boolean", "scrollable", ",", "int", "explicitFetchSizeHint", ")", "throws", "java", ".", "sql", ".", "SQLException", "{", "Statement", "result", ";", "try", "{", "// if necessary use JDBC1.0 ...
Creates a statement with parameters that should work with most RDBMS.
[ "Creates", "a", "statement", "with", "parameters", "that", "should", "work", "with", "most", "RDBMS", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementsForClassImpl.java#L352-L409
perwendel/spark
src/main/java/spark/embeddedserver/jetty/SocketConnectorFactory.java
SocketConnectorFactory.createSecureSocketConnector
public static ServerConnector createSecureSocketConnector(Server server, String host, int port, SslStores sslStores) { Assert....
java
public static ServerConnector createSecureSocketConnector(Server server, String host, int port, SslStores sslStores) { Assert....
[ "public", "static", "ServerConnector", "createSecureSocketConnector", "(", "Server", "server", ",", "String", "host", ",", "int", "port", ",", "SslStores", "sslStores", ")", "{", "Assert", ".", "notNull", "(", "server", ",", "\"'server' must not be null\"", ")", "...
Creates a ssl jetty socket jetty. Keystore required, truststore optional. If truststore not specified keystore will be reused. @param server Jetty server @param sslStores the security sslStores. @param host host @param port port @return a ssl socket jetty
[ "Creates", "a", "ssl", "jetty", "socket", "jetty", ".", "Keystore", "required", "truststore", "optional", ".", "If", "truststore", "not", "specified", "keystore", "will", "be", "reused", "." ]
train
https://github.com/perwendel/spark/blob/080fb1f9d6e580f6742e9589044c7420d3157b8b/src/main/java/spark/embeddedserver/jetty/SocketConnectorFactory.java#L64-L100
real-logic/agrona
agrona/src/main/java/org/agrona/BufferUtil.java
BufferUtil.allocateDirectAligned
public static ByteBuffer allocateDirectAligned(final int capacity, final int alignment) { if (!isPowerOfTwo(alignment)) { throw new IllegalArgumentException("Must be a power of 2: alignment=" + alignment); } final ByteBuffer buffer = ByteBuffer.allocateDirect(capacity + ...
java
public static ByteBuffer allocateDirectAligned(final int capacity, final int alignment) { if (!isPowerOfTwo(alignment)) { throw new IllegalArgumentException("Must be a power of 2: alignment=" + alignment); } final ByteBuffer buffer = ByteBuffer.allocateDirect(capacity + ...
[ "public", "static", "ByteBuffer", "allocateDirectAligned", "(", "final", "int", "capacity", ",", "final", "int", "alignment", ")", "{", "if", "(", "!", "isPowerOfTwo", "(", "alignment", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Must be a...
Allocate a new direct {@link ByteBuffer} that is aligned on a given alignment boundary. @param capacity required for the buffer. @param alignment boundary at which the buffer should begin. @return a new {@link ByteBuffer} with the required alignment. @throws IllegalArgumentException if the alignment is not a power of...
[ "Allocate", "a", "new", "direct", "{", "@link", "ByteBuffer", "}", "that", "is", "aligned", "on", "a", "given", "alignment", "boundary", "." ]
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/BufferUtil.java#L139-L156
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.isCompatibleSARLLibraryOnClasspath
public static boolean isCompatibleSARLLibraryOnClasspath(TypeReferences typeReferences, Notifier context) { final OutParameter<String> version = new OutParameter<>(); final SarlLibraryErrorCode code = getSARLLibraryVersionOnClasspath(typeReferences, context, version); if (code == SarlLibraryErrorCode.SARL_FOUND) ...
java
public static boolean isCompatibleSARLLibraryOnClasspath(TypeReferences typeReferences, Notifier context) { final OutParameter<String> version = new OutParameter<>(); final SarlLibraryErrorCode code = getSARLLibraryVersionOnClasspath(typeReferences, context, version); if (code == SarlLibraryErrorCode.SARL_FOUND) ...
[ "public", "static", "boolean", "isCompatibleSARLLibraryOnClasspath", "(", "TypeReferences", "typeReferences", ",", "Notifier", "context", ")", "{", "final", "OutParameter", "<", "String", ">", "version", "=", "new", "OutParameter", "<>", "(", ")", ";", "final", "S...
Check if a compatible SARL library is available on the classpath. @param typeReferences - the accessor to the types. @param context - the context that is providing the access to the classpath. @return <code>true</code> if a compatible SARL library was found. Otherwise <code>false</code>.
[ "Check", "if", "a", "compatible", "SARL", "library", "is", "available", "on", "the", "classpath", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1047-L1054
wisdom-framework/wisdom-jdbc
wisdom-openjpa-enhancer-plugin/src/main/java/org/wisdom/openjpa/enhancer/OpenJPAEnhancerMojo.java
OpenJPAEnhancerMojo.extendRealmClasspath
protected void extendRealmClasspath() throws MojoExecutionException { List<URL> urls = new ArrayList<>(); for (String fileName : compileClasspathElements) { File pathElem = new File(fileName); try { URL url = pathElem.toURI().toURL(); ...
java
protected void extendRealmClasspath() throws MojoExecutionException { List<URL> urls = new ArrayList<>(); for (String fileName : compileClasspathElements) { File pathElem = new File(fileName); try { URL url = pathElem.toURI().toURL(); ...
[ "protected", "void", "extendRealmClasspath", "(", ")", "throws", "MojoExecutionException", "{", "List", "<", "URL", ">", "urls", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "String", "fileName", ":", "compileClasspathElements", ")", "{", "File", ...
This will prepare the current ClassLoader and add all jars and local classpaths (e.g. target/classes) needed by the OpenJPA task. @throws MojoExecutionException on any error inside the mojo
[ "This", "will", "prepare", "the", "current", "ClassLoader", "and", "add", "all", "jars", "and", "local", "classpaths", "(", "e", ".", "g", ".", "target", "/", "classes", ")", "needed", "by", "the", "OpenJPA", "task", "." ]
train
https://github.com/wisdom-framework/wisdom-jdbc/blob/931f5acf0b2bcb0a8f3b683d60d326caafd09a72/wisdom-openjpa-enhancer-plugin/src/main/java/org/wisdom/openjpa/enhancer/OpenJPAEnhancerMojo.java#L320-L341
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.addAnnotationInfo
public void addAnnotationInfo(ProgramElementDoc doc, Content htmltree) { addAnnotationInfo(doc, doc.annotations(), htmltree); }
java
public void addAnnotationInfo(ProgramElementDoc doc, Content htmltree) { addAnnotationInfo(doc, doc.annotations(), htmltree); }
[ "public", "void", "addAnnotationInfo", "(", "ProgramElementDoc", "doc", ",", "Content", "htmltree", ")", "{", "addAnnotationInfo", "(", "doc", ",", "doc", ".", "annotations", "(", ")", ",", "htmltree", ")", ";", "}" ]
Adds the annotatation types for the given doc. @param doc the package to write annotations for @param htmltree the content tree to which the annotation types will be added
[ "Adds", "the", "annotatation", "types", "for", "the", "given", "doc", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java#L1861-L1863
luontola/jumi
jumi-core/src/main/java/fi/jumi/core/network/NettyNetworkEndpointAdapter.java
NettyNetworkEndpointAdapter.channelClosed
@Override public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { endpoint.onDisconnected(); super.channelClosed(ctx, e); }
java
@Override public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { endpoint.onDisconnected(); super.channelClosed(ctx, e); }
[ "@", "Override", "public", "void", "channelClosed", "(", "ChannelHandlerContext", "ctx", ",", "ChannelStateEvent", "e", ")", "throws", "Exception", "{", "endpoint", ".", "onDisconnected", "(", ")", ";", "super", ".", "channelClosed", "(", "ctx", ",", "e", ")",...
of those events comes, even though the channelConnected came. Using just channelClosed appears to be reliable.
[ "of", "those", "events", "comes", "even", "though", "the", "channelConnected", "came", ".", "Using", "just", "channelClosed", "appears", "to", "be", "reliable", "." ]
train
https://github.com/luontola/jumi/blob/18815c499b770f51cdb58cc6720dca4f254b2019/jumi-core/src/main/java/fi/jumi/core/network/NettyNetworkEndpointAdapter.java#L37-L41
junit-team/junit4
src/main/java/org/junit/runner/FilterFactories.java
FilterFactories.createFilter
public static Filter createFilter(Class<? extends FilterFactory> filterFactoryClass, FilterFactoryParams params) throws FilterFactory.FilterNotCreatedException { FilterFactory filterFactory = createFilterFactory(filterFactoryClass); return filterFactory.createFilter(params); }
java
public static Filter createFilter(Class<? extends FilterFactory> filterFactoryClass, FilterFactoryParams params) throws FilterFactory.FilterNotCreatedException { FilterFactory filterFactory = createFilterFactory(filterFactoryClass); return filterFactory.createFilter(params); }
[ "public", "static", "Filter", "createFilter", "(", "Class", "<", "?", "extends", "FilterFactory", ">", "filterFactoryClass", ",", "FilterFactoryParams", "params", ")", "throws", "FilterFactory", ".", "FilterNotCreatedException", "{", "FilterFactory", "filterFactory", "=...
Creates a {@link Filter}. @param filterFactoryClass The class of the {@link FilterFactory} @param params The arguments to the {@link FilterFactory}
[ "Creates", "a", "{", "@link", "Filter", "}", "." ]
train
https://github.com/junit-team/junit4/blob/d9861ecdb6e487f6c352437ee823879aca3b81d4/src/main/java/org/junit/runner/FilterFactories.java#L55-L60
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java
AbstractMySQLQuery.withRollup
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C withRollup() { return addFlag(Position.AFTER_GROUP_BY, WITH_ROLLUP); }
java
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true) public C withRollup() { return addFlag(Position.AFTER_GROUP_BY, WITH_ROLLUP); }
[ "@", "WithBridgeMethods", "(", "value", "=", "MySQLQuery", ".", "class", ",", "castRequired", "=", "true", ")", "public", "C", "withRollup", "(", ")", "{", "return", "addFlag", "(", "Position", ".", "AFTER_GROUP_BY", ",", "WITH_ROLLUP", ")", ";", "}" ]
The GROUP BY clause permits a WITH ROLLUP modifier that causes extra rows to be added to the summary output. These rows represent higher-level (or super-aggregate) summary operations. ROLLUP thus enables you to answer questions at multiple levels of analysis with a single query. It can be used, for example, to provide ...
[ "The", "GROUP", "BY", "clause", "permits", "a", "WITH", "ROLLUP", "modifier", "that", "causes", "extra", "rows", "to", "be", "added", "to", "the", "summary", "output", ".", "These", "rows", "represent", "higher", "-", "level", "(", "or", "super", "-", "a...
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java#L251-L254
alkacon/opencms-core
src/org/opencms/workflow/A_CmsWorkflowManager.java
A_CmsWorkflowManager.setParameters
public void setParameters(Map<String, String> parameters) { if (m_parameters != null) { throw new IllegalStateException(); } m_parameters = parameters; }
java
public void setParameters(Map<String, String> parameters) { if (m_parameters != null) { throw new IllegalStateException(); } m_parameters = parameters; }
[ "public", "void", "setParameters", "(", "Map", "<", "String", ",", "String", ">", "parameters", ")", "{", "if", "(", "m_parameters", "!=", "null", ")", "{", "throw", "new", "IllegalStateException", "(", ")", ";", "}", "m_parameters", "=", "parameters", ";"...
Sets the configuration parameters of the workflow manager.<p> @param parameters the map of configuration parameters
[ "Sets", "the", "configuration", "parameters", "of", "the", "workflow", "manager", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workflow/A_CmsWorkflowManager.java#L73-L79
strator-dev/greenpepper
greenpepper/core/src/main/java/com/greenpepper/util/BOMUtil.java
BOMUtil.newReader
public static Reader newReader(File file, String encoding) throws IOException { int bomType = getBOMType( file ); int skipBytes = getSkipBytes( bomType ); FileInputStream fIn = new FileInputStream( file ); long skippedBytes = fIn.skip( skipBytes ); return new Inpu...
java
public static Reader newReader(File file, String encoding) throws IOException { int bomType = getBOMType( file ); int skipBytes = getSkipBytes( bomType ); FileInputStream fIn = new FileInputStream( file ); long skippedBytes = fIn.skip( skipBytes ); return new Inpu...
[ "public", "static", "Reader", "newReader", "(", "File", "file", ",", "String", "encoding", ")", "throws", "IOException", "{", "int", "bomType", "=", "getBOMType", "(", "file", ")", ";", "int", "skipBytes", "=", "getSkipBytes", "(", "bomType", ")", ";", "Fi...
<p>newReader.</p> @param file a {@link java.io.File} object. @param encoding a {@link java.lang.String} object. @return a {@link java.io.Reader} object. @throws java.io.IOException if any.
[ "<p", ">", "newReader", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/core/src/main/java/com/greenpepper/util/BOMUtil.java#L160-L168
nguyenq/tess4j
src/main/java/net/sourceforge/tess4j/Tesseract1.java
Tesseract1.createDocuments
private int createDocuments(String filename, TessResultRenderer renderer) throws TesseractException { TessBaseAPISetInputName(handle, filename); //for reading a UNLV zone file int result = TessBaseAPIProcessPages(handle, filename, null, 0, renderer); // if (result == ITessAPI.FALSE) { // ...
java
private int createDocuments(String filename, TessResultRenderer renderer) throws TesseractException { TessBaseAPISetInputName(handle, filename); //for reading a UNLV zone file int result = TessBaseAPIProcessPages(handle, filename, null, 0, renderer); // if (result == ITessAPI.FALSE) { // ...
[ "private", "int", "createDocuments", "(", "String", "filename", ",", "TessResultRenderer", "renderer", ")", "throws", "TesseractException", "{", "TessBaseAPISetInputName", "(", "handle", ",", "filename", ")", ";", "//for reading a UNLV zone file", "int", "result", "=", ...
Creates documents. @param filename input file @param renderer renderer @throws TesseractException @return the average text confidence for Tesseract page result
[ "Creates", "documents", "." ]
train
https://github.com/nguyenq/tess4j/blob/cfcd4a8a44042f150b4aaf7bdf5ffc485a2236e1/src/main/java/net/sourceforge/tess4j/Tesseract1.java#L636-L644
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/io/OAuthCredentialsCache.java
OAuthCredentialsCache.getHeaderUnsafe
@VisibleForTesting HeaderCacheElement getHeaderUnsafe(long timeout, TimeUnit timeUnit) { // Optimize for the common case: do a volatile read to peek for a Good cache value HeaderCacheElement headerCacheUnsync = this.headerCache; // TODO(igorbernstein2): figure out how to make this work with appengine req...
java
@VisibleForTesting HeaderCacheElement getHeaderUnsafe(long timeout, TimeUnit timeUnit) { // Optimize for the common case: do a volatile read to peek for a Good cache value HeaderCacheElement headerCacheUnsync = this.headerCache; // TODO(igorbernstein2): figure out how to make this work with appengine req...
[ "@", "VisibleForTesting", "HeaderCacheElement", "getHeaderUnsafe", "(", "long", "timeout", ",", "TimeUnit", "timeUnit", ")", "{", "// Optimize for the common case: do a volatile read to peek for a Good cache value", "HeaderCacheElement", "headerCacheUnsync", "=", "this", ".", "he...
Get the http credential header we need from a new oauth2 AccessToken.
[ "Get", "the", "http", "credential", "header", "we", "need", "from", "a", "new", "oauth2", "AccessToken", "." ]
train
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/io/OAuthCredentialsCache.java#L203-L226