repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/carouselItem/CarouselItemRenderer.java
CarouselItemRenderer.decode
@Override public void decode(FacesContext context, UIComponent component) { """ This methods receives and processes input made by the user. More specifically, it ckecks whether the user has interacted with the current b:carouselItem. The default implementation simply stores the input value in the list of submit...
java
@Override public void decode(FacesContext context, UIComponent component) { // CarouselItem carouselItem = (CarouselItem) component; new AJAXRenderer().decode(context, component); }
[ "@", "Override", "public", "void", "decode", "(", "FacesContext", "context", ",", "UIComponent", "component", ")", "{", "// CarouselItem carouselItem = (CarouselItem) component;", "new", "AJAXRenderer", "(", ")", ".", "decode", "(", "context", ",", "component", ")", ...
This methods receives and processes input made by the user. More specifically, it ckecks whether the user has interacted with the current b:carouselItem. The default implementation simply stores the input value in the list of submitted values. If the validation checks are passed, the values in the <code>submittedValues...
[ "This", "methods", "receives", "and", "processes", "input", "made", "by", "the", "user", ".", "More", "specifically", "it", "ckecks", "whether", "the", "user", "has", "interacted", "with", "the", "current", "b", ":", "carouselItem", ".", "The", "default", "i...
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/carouselItem/CarouselItemRenderer.java#L45-L50
bladecoder/blade-ink
src/main/java/com/bladecoder/ink/runtime/Story.java
Story.observeVariable
public void observeVariable(String variableName, VariableObserver observer) throws StoryException, Exception { """ When the named global variable changes it's value, the observer will be called to notify it of the change. Note that if the value changes multiple times within the ink, the observer will only be cal...
java
public void observeVariable(String variableName, VariableObserver observer) throws StoryException, Exception { ifAsyncWeCant("observe a new variable"); if (variableObservers == null) variableObservers = new HashMap<String, List<VariableObserver>>(); if (!state.getVariablesState().globalVariableExistsWithName...
[ "public", "void", "observeVariable", "(", "String", "variableName", ",", "VariableObserver", "observer", ")", "throws", "StoryException", ",", "Exception", "{", "ifAsyncWeCant", "(", "\"observe a new variable\"", ")", ";", "if", "(", "variableObservers", "==", "null",...
When the named global variable changes it's value, the observer will be called to notify it of the change. Note that if the value changes multiple times within the ink, the observer will only be called once, at the end of the ink's evaluation. If, during the evaluation, it changes and then changes back again to its ori...
[ "When", "the", "named", "global", "variable", "changes", "it", "s", "value", "the", "observer", "will", "be", "called", "to", "notify", "it", "of", "the", "change", ".", "Note", "that", "if", "the", "value", "changes", "multiple", "times", "within", "the",...
train
https://github.com/bladecoder/blade-ink/blob/930922099f7073f50f956479adaa3cbd47c70225/src/main/java/com/bladecoder/ink/runtime/Story.java#L1039-L1056
kite-sdk/kite
kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/SchemaUtil.java
SchemaUtil.fieldSchema
public static Schema fieldSchema(Schema schema, String name) { """ Returns the nested {@link Schema} for the given field name. @param schema a record Schema @param name a String field name @return the nested Schema for the field """ Schema nested = unwrapNullable(schema); List<String> levels = Lis...
java
public static Schema fieldSchema(Schema schema, String name) { Schema nested = unwrapNullable(schema); List<String> levels = Lists.newArrayList(); for (String level : NAME_SPLITTER.split(name)) { levels.add(level); ValidationException.check(Schema.Type.RECORD == schema.getType(), "Cann...
[ "public", "static", "Schema", "fieldSchema", "(", "Schema", "schema", ",", "String", "name", ")", "{", "Schema", "nested", "=", "unwrapNullable", "(", "schema", ")", ";", "List", "<", "String", ">", "levels", "=", "Lists", ".", "newArrayList", "(", ")", ...
Returns the nested {@link Schema} for the given field name. @param schema a record Schema @param name a String field name @return the nested Schema for the field
[ "Returns", "the", "nested", "{", "@link", "Schema", "}", "for", "the", "given", "field", "name", "." ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/SchemaUtil.java#L232-L247
joelittlejohn/jsonschema2pojo
jsonschema2pojo-maven-plugin/src/main/java/org/jsonschema2pojo/maven/ProjectClasspath.java
ProjectClasspath.getClassLoader
public ClassLoader getClassLoader(MavenProject project, final ClassLoader parent, Log log) throws DependencyResolutionRequiredException { """ Provides a class loader that can be used to load classes from this project classpath. @param project the maven project currently being built @param parent a classload...
java
public ClassLoader getClassLoader(MavenProject project, final ClassLoader parent, Log log) throws DependencyResolutionRequiredException { @SuppressWarnings("unchecked") List<String> classpathElements = project.getCompileClasspathElements(); final List<URL> classpathUrls = new ArrayList<>(class...
[ "public", "ClassLoader", "getClassLoader", "(", "MavenProject", "project", ",", "final", "ClassLoader", "parent", ",", "Log", "log", ")", "throws", "DependencyResolutionRequiredException", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "List", "<", "String",...
Provides a class loader that can be used to load classes from this project classpath. @param project the maven project currently being built @param parent a classloader which should be used as the parent of the newly created classloader. @param log object to which details of the found/loaded classpath elements can be ...
[ "Provides", "a", "class", "loader", "that", "can", "be", "used", "to", "load", "classes", "from", "this", "project", "classpath", "." ]
train
https://github.com/joelittlejohn/jsonschema2pojo/blob/0552b80db93214eb186e4ae45b40866cc1e7eb84/jsonschema2pojo-maven-plugin/src/main/java/org/jsonschema2pojo/maven/ProjectClasspath.java#L56-L81
netty/netty
common/src/main/java/io/netty/util/AsciiString.java
AsciiString.containsIgnoreCase
public static boolean containsIgnoreCase(CharSequence a, CharSequence b) { """ Determine if {@code a} contains {@code b} in a case insensitive manner. """ return contains(a, b, AsciiCaseInsensitiveCharEqualityComparator.INSTANCE); }
java
public static boolean containsIgnoreCase(CharSequence a, CharSequence b) { return contains(a, b, AsciiCaseInsensitiveCharEqualityComparator.INSTANCE); }
[ "public", "static", "boolean", "containsIgnoreCase", "(", "CharSequence", "a", ",", "CharSequence", "b", ")", "{", "return", "contains", "(", "a", ",", "b", ",", "AsciiCaseInsensitiveCharEqualityComparator", ".", "INSTANCE", ")", ";", "}" ]
Determine if {@code a} contains {@code b} in a case insensitive manner.
[ "Determine", "if", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/AsciiString.java#L1432-L1434
netty/netty
buffer/src/main/java/io/netty/buffer/ByteBufUtil.java
ByteBufUtil.getBytes
public static byte[] getBytes(ByteBuf buf, int start, int length) { """ Create a copy of the underlying storage from {@code buf} into a byte array. The copy will start at {@code start} and copy {@code length} bytes. """ return getBytes(buf, start, length, true); }
java
public static byte[] getBytes(ByteBuf buf, int start, int length) { return getBytes(buf, start, length, true); }
[ "public", "static", "byte", "[", "]", "getBytes", "(", "ByteBuf", "buf", ",", "int", "start", ",", "int", "length", ")", "{", "return", "getBytes", "(", "buf", ",", "start", ",", "length", ",", "true", ")", ";", "}" ]
Create a copy of the underlying storage from {@code buf} into a byte array. The copy will start at {@code start} and copy {@code length} bytes.
[ "Create", "a", "copy", "of", "the", "underlying", "storage", "from", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/ByteBufUtil.java#L829-L831
segmentio/analytics-android
analytics/src/main/java/com/segment/analytics/ValueMap.java
ValueMap.getChar
public char getChar(String key, char defaultValue) { """ Returns the value mapped by {@code key} if it exists and is a char or can be coerced to a char. Returns {@code defaultValue} otherwise. """ Object value = get(key); if (value instanceof Character) { return (Character) value; } if (...
java
public char getChar(String key, char defaultValue) { Object value = get(key); if (value instanceof Character) { return (Character) value; } if (value != null && value instanceof String) { if (((String) value).length() == 1) { return ((String) value).charAt(0); } } retur...
[ "public", "char", "getChar", "(", "String", "key", ",", "char", "defaultValue", ")", "{", "Object", "value", "=", "get", "(", "key", ")", ";", "if", "(", "value", "instanceof", "Character", ")", "{", "return", "(", "Character", ")", "value", ";", "}", ...
Returns the value mapped by {@code key} if it exists and is a char or can be coerced to a char. Returns {@code defaultValue} otherwise.
[ "Returns", "the", "value", "mapped", "by", "{" ]
train
https://github.com/segmentio/analytics-android/blob/93c7d5bb09b593440a2347a6089db3e9f74012da/analytics/src/main/java/com/segment/analytics/ValueMap.java#L244-L255
Microsoft/malmo
Minecraft/src/main/java/com/microsoft/Malmo/Utils/CraftingHelper.java
CraftingHelper.itemStackIngredientsMatch
private static boolean itemStackIngredientsMatch(ItemStack A, ItemStack B) { """ Compare two ItemStacks and see if their items match - take wildcards into account, don't take stacksize into account. @param A ItemStack A @param B ItemStack B @return true if the stacks contain matching items. """ if (...
java
private static boolean itemStackIngredientsMatch(ItemStack A, ItemStack B) { if (A == null && B == null) return true; if (A == null || B == null) return false; if (A.getMetadata() == OreDictionary.WILDCARD_VALUE || B.getMetadata() == OreDictionary.WILDCARD_VALUE) ...
[ "private", "static", "boolean", "itemStackIngredientsMatch", "(", "ItemStack", "A", ",", "ItemStack", "B", ")", "{", "if", "(", "A", "==", "null", "&&", "B", "==", "null", ")", "return", "true", ";", "if", "(", "A", "==", "null", "||", "B", "==", "nu...
Compare two ItemStacks and see if their items match - take wildcards into account, don't take stacksize into account. @param A ItemStack A @param B ItemStack B @return true if the stacks contain matching items.
[ "Compare", "two", "ItemStacks", "and", "see", "if", "their", "items", "match", "-", "take", "wildcards", "into", "account", "don", "t", "take", "stacksize", "into", "account", "." ]
train
https://github.com/Microsoft/malmo/blob/4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a/Minecraft/src/main/java/com/microsoft/Malmo/Utils/CraftingHelper.java#L210-L219
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/watchdir/WatchDir.java
WatchDir.createAsyncRunningWatchDir
@Nonnull @ReturnsMutableCopy public static WatchDir createAsyncRunningWatchDir (@Nonnull final Path aDir, final boolean bRecursive, @Nonnull final IWatchDirCallback aCallback) throws IOException { """ Stat...
java
@Nonnull @ReturnsMutableCopy public static WatchDir createAsyncRunningWatchDir (@Nonnull final Path aDir, final boolean bRecursive, @Nonnull final IWatchDirCallback aCallback) throws IOException { final W...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "WatchDir", "createAsyncRunningWatchDir", "(", "@", "Nonnull", "final", "Path", "aDir", ",", "final", "boolean", "bRecursive", ",", "@", "Nonnull", "final", "IWatchDirCallback", "aCallback", ")", "throws...
Static factory method to create a simple {@link WatchDir} instance that already spawned an Thread to listen. To close the thread call the {@link WatchDir#close()} method. @param aDir The directory to be watched. May not be <code>null</code>. @param bRecursive <code>true</code> to watch the directory recursive, <code>f...
[ "Static", "factory", "method", "to", "create", "a", "simple", "{", "@link", "WatchDir", "}", "instance", "that", "already", "spawned", "an", "Thread", "to", "listen", ".", "To", "close", "the", "thread", "call", "the", "{", "@link", "WatchDir#close", "()", ...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/watchdir/WatchDir.java#L399-L409
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.serviceName_features_ipmi_access_GET
public OvhIpmiAccessValue serviceName_features_ipmi_access_GET(String serviceName, OvhIpmiAccessTypeEnum type) throws IOException { """ IPMI access method REST: GET /dedicated/server/{serviceName}/features/ipmi/access @param type [required] IPMI console access @param serviceName [required] The internal name o...
java
public OvhIpmiAccessValue serviceName_features_ipmi_access_GET(String serviceName, OvhIpmiAccessTypeEnum type) throws IOException { String qPath = "/dedicated/server/{serviceName}/features/ipmi/access"; StringBuilder sb = path(qPath, serviceName); query(sb, "type", type); String resp = exec(qPath, "GET", sb.toS...
[ "public", "OvhIpmiAccessValue", "serviceName_features_ipmi_access_GET", "(", "String", "serviceName", ",", "OvhIpmiAccessTypeEnum", "type", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/server/{serviceName}/features/ipmi/access\"", ";", "StringBuilder",...
IPMI access method REST: GET /dedicated/server/{serviceName}/features/ipmi/access @param type [required] IPMI console access @param serviceName [required] The internal name of your dedicated server
[ "IPMI", "access", "method" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L1099-L1105
ksoichiro/Android-ObservableScrollView
samples/src/main/java/com/github/ksoichiro/android/observablescrollview/samples/FlexibleSpaceWithImageWithViewPagerTabActivity.java
FlexibleSpaceWithImageWithViewPagerTabActivity.onScrollChanged
public void onScrollChanged(int scrollY, Scrollable s) { """ Called by children Fragments when their scrollY are changed. They all call this method even when they are inactive but this Activity should listen only the active child, so each Fragments will pass themselves for Activity to check if they are active. ...
java
public void onScrollChanged(int scrollY, Scrollable s) { FlexibleSpaceWithImageBaseFragment fragment = (FlexibleSpaceWithImageBaseFragment) mPagerAdapter.getItemAt(mPager.getCurrentItem()); if (fragment == null) { return; } View view = fragment.getView(); ...
[ "public", "void", "onScrollChanged", "(", "int", "scrollY", ",", "Scrollable", "s", ")", "{", "FlexibleSpaceWithImageBaseFragment", "fragment", "=", "(", "FlexibleSpaceWithImageBaseFragment", ")", "mPagerAdapter", ".", "getItemAt", "(", "mPager", ".", "getCurrentItem", ...
Called by children Fragments when their scrollY are changed. They all call this method even when they are inactive but this Activity should listen only the active child, so each Fragments will pass themselves for Activity to check if they are active. @param scrollY scroll position of Scrollable @param s caller S...
[ "Called", "by", "children", "Fragments", "when", "their", "scrollY", "are", "changed", ".", "They", "all", "call", "this", "method", "even", "when", "they", "are", "inactive", "but", "this", "Activity", "should", "listen", "only", "the", "active", "child", "...
train
https://github.com/ksoichiro/Android-ObservableScrollView/blob/47a5fb2db5e93d923a8c6772cde48bbb7d932345/samples/src/main/java/com/github/ksoichiro/android/observablescrollview/samples/FlexibleSpaceWithImageWithViewPagerTabActivity.java#L104-L126
RestComm/media-core
network/src/main/java/org/restcomm/media/core/network/netty/NettyNetworkManager.java
NettyNetworkManager.openChannel
@Override public Channel openChannel() throws IOException, IllegalStateException { """ {@inheritDoc} @throws IllegalStateException If manager is already closed. """ assertOpen(); try { return this.bootstrap.clone().register().sync().channel(); } catch (Exception e) { ...
java
@Override public Channel openChannel() throws IOException, IllegalStateException { assertOpen(); try { return this.bootstrap.clone().register().sync().channel(); } catch (Exception e) { throw new IOException("Could not open channel.", e); } }
[ "@", "Override", "public", "Channel", "openChannel", "(", ")", "throws", "IOException", ",", "IllegalStateException", "{", "assertOpen", "(", ")", ";", "try", "{", "return", "this", ".", "bootstrap", ".", "clone", "(", ")", ".", "register", "(", ")", ".", ...
{@inheritDoc} @throws IllegalStateException If manager is already closed.
[ "{", "@inheritDoc", "}" ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/network/src/main/java/org/restcomm/media/core/network/netty/NettyNetworkManager.java#L79-L87
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/KeyAreaInfo.java
KeyAreaInfo.addKeyField
public void addKeyField(Field field, boolean bKeyOrder) { """ Add this field to this Key Area. @param field The field to add. @param bKeyArea The order (ascending/descending). """ // Get the field with this seq if (m_vKeyFieldList.size() == 0) m_bKeyOrder = bKeyOrder; m_vKeyFieldL...
java
public void addKeyField(Field field, boolean bKeyOrder) { // Get the field with this seq if (m_vKeyFieldList.size() == 0) m_bKeyOrder = bKeyOrder; m_vKeyFieldList.add(field); // init the key field seq }
[ "public", "void", "addKeyField", "(", "Field", "field", ",", "boolean", "bKeyOrder", ")", "{", "// Get the field with this seq", "if", "(", "m_vKeyFieldList", ".", "size", "(", ")", "==", "0", ")", "m_bKeyOrder", "=", "bKeyOrder", ";", "m_vKeyFieldList", ".", ...
Add this field to this Key Area. @param field The field to add. @param bKeyArea The order (ascending/descending).
[ "Add", "this", "field", "to", "this", "Key", "Area", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/KeyAreaInfo.java#L146-L151
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java
Hierarchy.visitSuperClassMethods
public static JavaClassAndMethod visitSuperClassMethods(JavaClassAndMethod method, JavaClassAndMethodChooser chooser) throws ClassNotFoundException { """ Visit all superclass methods which the given method overrides. @param method the method @param chooser chooser which visits each superclass met...
java
public static JavaClassAndMethod visitSuperClassMethods(JavaClassAndMethod method, JavaClassAndMethodChooser chooser) throws ClassNotFoundException { return findMethod(method.getJavaClass().getSuperClasses(), method.getMethod().getName(), method.getMethod() .getSignature(), chooser);...
[ "public", "static", "JavaClassAndMethod", "visitSuperClassMethods", "(", "JavaClassAndMethod", "method", ",", "JavaClassAndMethodChooser", "chooser", ")", "throws", "ClassNotFoundException", "{", "return", "findMethod", "(", "method", ".", "getJavaClass", "(", ")", ".", ...
Visit all superclass methods which the given method overrides. @param method the method @param chooser chooser which visits each superclass method @return the chosen method, or null if no method is chosen @throws ClassNotFoundException
[ "Visit", "all", "superclass", "methods", "which", "the", "given", "method", "overrides", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java#L272-L276
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ExampleSection.java
ExampleSection.getSource
private static String getSource(final String className) { """ Tries to obtain the source file for the given class. @param className the name of the class to find the source for. @return the source file for the given class, or null on error. """ String sourceName = '/' + className.replace('.', '/') + ".ja...
java
private static String getSource(final String className) { String sourceName = '/' + className.replace('.', '/') + ".java"; InputStream stream = null; try { stream = ExampleSection.class.getResourceAsStream(sourceName); if (stream != null) { byte[] sourceBytes = StreamUtil.getBytes(stream); // we...
[ "private", "static", "String", "getSource", "(", "final", "String", "className", ")", "{", "String", "sourceName", "=", "'", "'", "+", "className", ".", "replace", "(", "'", "'", ",", "'", "'", ")", "+", "\".java\"", ";", "InputStream", "stream", "=", ...
Tries to obtain the source file for the given class. @param className the name of the class to find the source for. @return the source file for the given class, or null on error.
[ "Tries", "to", "obtain", "the", "source", "file", "for", "the", "given", "class", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ExampleSection.java#L218-L245
DiUS/pact-jvm
pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslRequestWithoutPath.java
PactDslRequestWithoutPath.queryParameterFromProviderState
public PactDslRequestWithoutPath queryParameterFromProviderState(String name, String expression, String example) { """ Adds a query parameter that will have it's value injected from the provider state @param name Name @param expression Expression to be evaluated from the provider state @param example Example va...
java
public PactDslRequestWithoutPath queryParameterFromProviderState(String name, String expression, String example) { requestGenerators.addGenerator(Category.QUERY, name, new ProviderStateGenerator(expression)); query.put(name, Collections.singletonList(example)); return this; }
[ "public", "PactDslRequestWithoutPath", "queryParameterFromProviderState", "(", "String", "name", ",", "String", "expression", ",", "String", "example", ")", "{", "requestGenerators", ".", "addGenerator", "(", "Category", ".", "QUERY", ",", "name", ",", "new", "Provi...
Adds a query parameter that will have it's value injected from the provider state @param name Name @param expression Expression to be evaluated from the provider state @param example Example value to use in the consumer test
[ "Adds", "a", "query", "parameter", "that", "will", "have", "it", "s", "value", "injected", "from", "the", "provider", "state" ]
train
https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslRequestWithoutPath.java#L308-L312
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/style/StyleUtil.java
StyleUtil.setFontStyle
public static Font setFontStyle(Font font, short color, short fontSize, String fontName) { """ 设置字体样式 @param font 字体{@link Font} @param color 字体颜色 @param fontSize 字体大小 @param fontName 字体名称,可以为null使用默认字体 @return {@link Font} """ if(color > 0) { font.setColor(color); } if(fontSize > 0) { ...
java
public static Font setFontStyle(Font font, short color, short fontSize, String fontName) { if(color > 0) { font.setColor(color); } if(fontSize > 0) { font.setFontHeightInPoints(fontSize); } if(StrUtil.isNotBlank(fontName)) { font.setFontName(fontName); } return font; }
[ "public", "static", "Font", "setFontStyle", "(", "Font", "font", ",", "short", "color", ",", "short", "fontSize", ",", "String", "fontName", ")", "{", "if", "(", "color", ">", "0", ")", "{", "font", ".", "setColor", "(", "color", ")", ";", "}", "if",...
设置字体样式 @param font 字体{@link Font} @param color 字体颜色 @param fontSize 字体大小 @param fontName 字体名称,可以为null使用默认字体 @return {@link Font}
[ "设置字体样式" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/style/StyleUtil.java#L134-L145
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/scoping/ScopedServletUtils.java
ScopedServletUtils.getScopedSessionAttrName
public static String getScopedSessionAttrName( String attrName, HttpServletRequest request ) { """ If the request is a ScopedRequest, this returns an attribute name scoped to that request's scope-ID; otherwise, it returns the given attribute name. @exclude """ String requestScopeParam = request.get...
java
public static String getScopedSessionAttrName( String attrName, HttpServletRequest request ) { String requestScopeParam = request.getParameter( SCOPE_ID_PARAM ); if ( requestScopeParam != null ) { return getScopedName( attrName, requestScopeParam ); } ...
[ "public", "static", "String", "getScopedSessionAttrName", "(", "String", "attrName", ",", "HttpServletRequest", "request", ")", "{", "String", "requestScopeParam", "=", "request", ".", "getParameter", "(", "SCOPE_ID_PARAM", ")", ";", "if", "(", "requestScopeParam", ...
If the request is a ScopedRequest, this returns an attribute name scoped to that request's scope-ID; otherwise, it returns the given attribute name. @exclude
[ "If", "the", "request", "is", "a", "ScopedRequest", "this", "returns", "an", "attribute", "name", "scoped", "to", "that", "request", "s", "scope", "-", "ID", ";", "otherwise", "it", "returns", "the", "given", "attribute", "name", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/scoping/ScopedServletUtils.java#L291-L302
alkacon/opencms-core
src/org/opencms/ui/apps/CmsEditor.java
CmsEditor.getEditState
public static String getEditState(CmsUUID resourceId, boolean plainText, String backLink) { """ Returns the edit state for the given resource structure id.<p> @param resourceId the resource structure is @param plainText if plain text/source editing is required @param backLink the back link location @return...
java
public static String getEditState(CmsUUID resourceId, boolean plainText, String backLink) { try { backLink = URLEncoder.encode(backLink, CmsEncoder.ENCODING_UTF_8); } catch (UnsupportedEncodingException e) { LOG.error(e.getLocalizedMessage(), e); } String state =...
[ "public", "static", "String", "getEditState", "(", "CmsUUID", "resourceId", ",", "boolean", "plainText", ",", "String", "backLink", ")", "{", "try", "{", "backLink", "=", "URLEncoder", ".", "encode", "(", "backLink", ",", "CmsEncoder", ".", "ENCODING_UTF_8", "...
Returns the edit state for the given resource structure id.<p> @param resourceId the resource structure is @param plainText if plain text/source editing is required @param backLink the back link location @return the state
[ "Returns", "the", "edit", "state", "for", "the", "given", "resource", "structure", "id", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/CmsEditor.java#L102-L114
future-architect/uroborosql
src/main/java/jp/co/future/uroborosql/context/SqlContextFactoryImpl.java
SqlContextFactoryImpl.findEnumClassesWithFile
private static Set<Class<?>> findEnumClassesWithFile(final String packageName, final Path dir) { """ classファイルから対象パッケージ以下のEnumクラスを取得 @param packageName ルートパッケージ名 @param dir 対象ディレクトリ @return クラスリスト @throws ClassNotFoundException エラー @throws IOException """ Set<Class<?>> classes = new HashSet<>(); try...
java
private static Set<Class<?>> findEnumClassesWithFile(final String packageName, final Path dir) { Set<Class<?>> classes = new HashSet<>(); try (Stream<Path> stream = Files.walk(dir)) { stream.filter(entry -> entry.getFileName().toString().endsWith(".class")).forEach(file -> { StringJoiner joiner = new StringJ...
[ "private", "static", "Set", "<", "Class", "<", "?", ">", ">", "findEnumClassesWithFile", "(", "final", "String", "packageName", ",", "final", "Path", "dir", ")", "{", "Set", "<", "Class", "<", "?", ">", ">", "classes", "=", "new", "HashSet", "<>", "(",...
classファイルから対象パッケージ以下のEnumクラスを取得 @param packageName ルートパッケージ名 @param dir 対象ディレクトリ @return クラスリスト @throws ClassNotFoundException エラー @throws IOException
[ "classファイルから対象パッケージ以下のEnumクラスを取得" ]
train
https://github.com/future-architect/uroborosql/blob/4c26db51defdac3c6ed16866e33ab45e190e2e0c/src/main/java/jp/co/future/uroborosql/context/SqlContextFactoryImpl.java#L483-L497
groupon/monsoon
expr/src/main/java/com/groupon/lex/metrics/PathMatcher.java
PathMatcher.valueOf
public static PathMatcher valueOf(String str) throws ParseException { """ Read path matcher from string. @param str A string containing a path expression. @return A PathMatcher corresponding to the parsed input from the string. @throws com.groupon.lex.metrics.PathMatcher.ParseException on invalid path expr...
java
public static PathMatcher valueOf(String str) throws ParseException { try { return valueOf(new StringReader(str)); } catch (IOException ex) { throw new IllegalStateException("StringReader IO error?", ex); } }
[ "public", "static", "PathMatcher", "valueOf", "(", "String", "str", ")", "throws", "ParseException", "{", "try", "{", "return", "valueOf", "(", "new", "StringReader", "(", "str", ")", ")", ";", "}", "catch", "(", "IOException", "ex", ")", "{", "throw", "...
Read path matcher from string. @param str A string containing a path expression. @return A PathMatcher corresponding to the parsed input from the string. @throws com.groupon.lex.metrics.PathMatcher.ParseException on invalid path expression.
[ "Read", "path", "matcher", "from", "string", "." ]
train
https://github.com/groupon/monsoon/blob/eb68d72ba4c01fe018dc981097dbee033908f5c7/expr/src/main/java/com/groupon/lex/metrics/PathMatcher.java#L386-L392
amaembo/streamex
src/main/java/one/util/streamex/LongStreamEx.java
LongStreamEx.maxByInt
public OptionalLong maxByInt(LongToIntFunction keyExtractor) { """ Returns the maximum element of this stream according to the provided key extractor function. <p> This is a terminal operation. @param keyExtractor a non-interfering, stateless function @return an {@code OptionalLong} describing the first e...
java
public OptionalLong maxByInt(LongToIntFunction keyExtractor) { return collect(PrimitiveBox::new, (box, l) -> { int key = keyExtractor.applyAsInt(l); if (!box.b || box.i < key) { box.b = true; box.i = key; box.l = l; } ...
[ "public", "OptionalLong", "maxByInt", "(", "LongToIntFunction", "keyExtractor", ")", "{", "return", "collect", "(", "PrimitiveBox", "::", "new", ",", "(", "box", ",", "l", ")", "->", "{", "int", "key", "=", "keyExtractor", ".", "applyAsInt", "(", "l", ")",...
Returns the maximum element of this stream according to the provided key extractor function. <p> This is a terminal operation. @param keyExtractor a non-interfering, stateless function @return an {@code OptionalLong} describing the first element of this stream for which the highest value was returned by key extractor...
[ "Returns", "the", "maximum", "element", "of", "this", "stream", "according", "to", "the", "provided", "key", "extractor", "function", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/LongStreamEx.java#L1065-L1074
OpenLiberty/open-liberty
dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainer.java
ZipFileContainer.placeExtractionGuard
private ExtractionGuard placeExtractionGuard(String path) { """ Make sure a completion latch exists for a specified path. Create and store one if necessary. Answer the completion latch encapsulated in an extraction latch, which brings together the completion latch with the path and with a setting of whethe...
java
private ExtractionGuard placeExtractionGuard(String path) { boolean isPrimary; CountDownLatch completionLatch; synchronized( extractionsLock ) { completionLatch = extractionLocks.get(path); if ( completionLatch != null ) { isPrimary = false; ...
[ "private", "ExtractionGuard", "placeExtractionGuard", "(", "String", "path", ")", "{", "boolean", "isPrimary", ";", "CountDownLatch", "completionLatch", ";", "synchronized", "(", "extractionsLock", ")", "{", "completionLatch", "=", "extractionLocks", ".", "get", "(", ...
Make sure a completion latch exists for a specified path. Create and store one if necessary. Answer the completion latch encapsulated in an extraction latch, which brings together the completion latch with the path and with a setting of whether the extraction is a primary (doing the extraction) or secondary (waiting ...
[ "Make", "sure", "a", "completion", "latch", "exists", "for", "a", "specified", "path", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainer.java#L1401-L1420
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/SheetDiscussionResourcesImpl.java
SheetDiscussionResourcesImpl.createDiscussion
public Discussion createDiscussion(long sheetId, Discussion discussion) throws SmartsheetException { """ Create a discussion on a sheet. It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/discussions @param sheetId the sheet id @param discussion the discussion object @return the...
java
public Discussion createDiscussion(long sheetId, Discussion discussion) throws SmartsheetException{ Util.throwIfNull(sheetId, discussion); return this.createResource("sheets/" + sheetId + "/discussions", Discussion.class, discussion); }
[ "public", "Discussion", "createDiscussion", "(", "long", "sheetId", ",", "Discussion", "discussion", ")", "throws", "SmartsheetException", "{", "Util", ".", "throwIfNull", "(", "sheetId", ",", "discussion", ")", ";", "return", "this", ".", "createResource", "(", ...
Create a discussion on a sheet. It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/discussions @param sheetId the sheet id @param discussion the discussion object @return the created discussion @throws IllegalArgumentException if any argument is null or empty string @throws InvalidRequestE...
[ "Create", "a", "discussion", "on", "a", "sheet", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/SheetDiscussionResourcesImpl.java#L71-L75
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java
Configuration.getResource
public Content getResource(String key, Object o) { """ Get the configuration string as a content. @param key the key to look for in the configuration file @param o string or content argument added to configuration text @return a content tree for the text """ return getResource(key, o, null, null...
java
public Content getResource(String key, Object o) { return getResource(key, o, null, null); }
[ "public", "Content", "getResource", "(", "String", "key", ",", "Object", "o", ")", "{", "return", "getResource", "(", "key", ",", "o", ",", "null", ",", "null", ")", ";", "}" ]
Get the configuration string as a content. @param key the key to look for in the configuration file @param o string or content argument added to configuration text @return a content tree for the text
[ "Get", "the", "configuration", "string", "as", "a", "content", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java#L778-L780
lucee/Lucee
core/src/main/java/lucee/transformer/bytecode/op/OpDecision.java
OpDecision.toExprBoolean
public static ExprBoolean toExprBoolean(Expression left, Expression right, int operation) { """ Create a String expression from a operation @param left @param right @return String expression """ return new OpDecision(left, right, operation); }
java
public static ExprBoolean toExprBoolean(Expression left, Expression right, int operation) { return new OpDecision(left, right, operation); }
[ "public", "static", "ExprBoolean", "toExprBoolean", "(", "Expression", "left", ",", "Expression", "right", ",", "int", "operation", ")", "{", "return", "new", "OpDecision", "(", "left", ",", "right", ",", "operation", ")", ";", "}" ]
Create a String expression from a operation @param left @param right @return String expression
[ "Create", "a", "String", "expression", "from", "a", "operation" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/bytecode/op/OpDecision.java#L67-L69
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/validation/builder/PayloadTemplateMessageBuilder.java
PayloadTemplateMessageBuilder.buildMessagePayload
public Object buildMessagePayload(TestContext context, String messageType) { """ Build the control message from payload file resource or String data. """ this.getMessageInterceptors().add(gzipMessageConstructionInterceptor); this.getMessageInterceptors().add(binaryMessageConstructionInterceptor...
java
public Object buildMessagePayload(TestContext context, String messageType) { this.getMessageInterceptors().add(gzipMessageConstructionInterceptor); this.getMessageInterceptors().add(binaryMessageConstructionInterceptor); return getPayloadContent(context, messageType); }
[ "public", "Object", "buildMessagePayload", "(", "TestContext", "context", ",", "String", "messageType", ")", "{", "this", ".", "getMessageInterceptors", "(", ")", ".", "add", "(", "gzipMessageConstructionInterceptor", ")", ";", "this", ".", "getMessageInterceptors", ...
Build the control message from payload file resource or String data.
[ "Build", "the", "control", "message", "from", "payload", "file", "resource", "or", "String", "data", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/builder/PayloadTemplateMessageBuilder.java#L55-L59
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/utility/PRJUtil.java
PRJUtil.writePRJ
public static void writePRJ(Connection connection, int srid, File fileName) throws SQLException, FileNotFoundException { """ Write a prj file according a given SRID code. @param connection database connection @param srid srid code @param fileName path of the prj file @throws SQLException @throws FileNotFoundE...
java
public static void writePRJ(Connection connection, int srid, File fileName) throws SQLException, FileNotFoundException { if (srid != 0) { StringBuilder sb = new StringBuilder("SELECT SRTEXT FROM "); sb.append("PUBLIC.SPATIAL_REF_SYS ").append(" WHERE SRID = ?"); PreparedState...
[ "public", "static", "void", "writePRJ", "(", "Connection", "connection", ",", "int", "srid", ",", "File", "fileName", ")", "throws", "SQLException", ",", "FileNotFoundException", "{", "if", "(", "srid", "!=", "0", ")", "{", "StringBuilder", "sb", "=", "new",...
Write a prj file according a given SRID code. @param connection database connection @param srid srid code @param fileName path of the prj file @throws SQLException @throws FileNotFoundException
[ "Write", "a", "prj", "file", "according", "a", "given", "SRID", "code", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/utility/PRJUtil.java#L146-L172
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.setPasswordUsingHashSalt
public Boolean setPasswordUsingHashSalt(long id, String password, String passwordConfirmation, String passwordAlgorithm) throws OAuthSystemException, OAuthProblemException, URISyntaxException { """ Set Password by ID Using Salt and SHA-256 @param id Id of the user to be modified @param password Set to the pa...
java
public Boolean setPasswordUsingHashSalt(long id, String password, String passwordConfirmation, String passwordAlgorithm) throws OAuthSystemException, OAuthProblemException, URISyntaxException { return setPasswordUsingHashSalt(id, password, passwordConfirmation, passwordAlgorithm, null); }
[ "public", "Boolean", "setPasswordUsingHashSalt", "(", "long", "id", ",", "String", "password", ",", "String", "passwordConfirmation", ",", "String", "passwordAlgorithm", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", ...
Set Password by ID Using Salt and SHA-256 @param id Id of the user to be modified @param password Set to the password value using a SHA-256-encoded value. @param passwordConfirmation This value must match the password value. @param passwordAlgorithm Set to salt+sha256. @return true if success @throws OAuthSystemExce...
[ "Set", "Password", "by", "ID", "Using", "Salt", "and", "SHA", "-", "256" ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L1285-L1287
ops4j/org.ops4j.pax.logging
pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java
ThrowableProxy.formatWrapper
@SuppressWarnings("ThrowableResultOfMethodCallIgnored") public void formatWrapper(final StringBuilder sb, final ThrowableProxy cause, final List<String> ignorePackages, final String suffix) { """ Formats the specified Throwable. @param sb StringBuilder to contain the formatted Throwable. @param c...
java
@SuppressWarnings("ThrowableResultOfMethodCallIgnored") public void formatWrapper(final StringBuilder sb, final ThrowableProxy cause, final List<String> ignorePackages, final String suffix) { this.formatWrapper(sb, cause, ignorePackages, PlainTextRenderer.getInstance(), suffix); }
[ "@", "SuppressWarnings", "(", "\"ThrowableResultOfMethodCallIgnored\"", ")", "public", "void", "formatWrapper", "(", "final", "StringBuilder", "sb", ",", "final", "ThrowableProxy", "cause", ",", "final", "List", "<", "String", ">", "ignorePackages", ",", "final", "S...
Formats the specified Throwable. @param sb StringBuilder to contain the formatted Throwable. @param cause The Throwable to format. @param ignorePackages The List of packages to be suppressed from the trace. @param suffix
[ "Formats", "the", "specified", "Throwable", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java#L360-L363
eclipse/xtext-core
org.eclipse.xtext.ide/xtend-gen/org/eclipse/xtext/ide/refactoring/ResourceRelocationContext.java
ResourceRelocationContext.addModification
public void addModification(final ResourceRelocationChange change, final IChangeSerializer.IModification<Resource> modification) { """ Loads and watches the respective resource, applies the relocation change and calls the given <code>modification</code> with the renamed/moved/copied resource. @param change the...
java
public void addModification(final ResourceRelocationChange change, final IChangeSerializer.IModification<Resource> modification) { this.changeSerializer.<Resource>addModification(this.loadAndWatchResource(change), modification); }
[ "public", "void", "addModification", "(", "final", "ResourceRelocationChange", "change", ",", "final", "IChangeSerializer", ".", "IModification", "<", "Resource", ">", "modification", ")", "{", "this", ".", "changeSerializer", ".", "<", "Resource", ">", "addModifica...
Loads and watches the respective resource, applies the relocation change and calls the given <code>modification</code> with the renamed/moved/copied resource. @param change the change to execute @param modification the side-effect the rename/move/copy operation should have.
[ "Loads", "and", "watches", "the", "respective", "resource", "applies", "the", "relocation", "change", "and", "calls", "the", "given", "<code", ">", "modification<", "/", "code", ">", "with", "the", "renamed", "/", "moved", "/", "copied", "resource", "." ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.ide/xtend-gen/org/eclipse/xtext/ide/refactoring/ResourceRelocationContext.java#L55-L57
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/RandomUtils.java
RandomUtils.nextFloat
public static float nextFloat(final float startInclusive, final float endInclusive) { """ <p> Returns a random float within the specified range. </p> @param startInclusive the smallest value that can be returned, must be non-negative @param endInclusive the upper bound (included) @throws IllegalArgumentEx...
java
public static float nextFloat(final float startInclusive, final float endInclusive) { Validate.isTrue(endInclusive >= startInclusive, "Start value must be smaller or equal to end value."); Validate.isTrue(startInclusive >= 0, "Both range values must be non-negative."); if (start...
[ "public", "static", "float", "nextFloat", "(", "final", "float", "startInclusive", ",", "final", "float", "endInclusive", ")", "{", "Validate", ".", "isTrue", "(", "endInclusive", ">=", "startInclusive", ",", "\"Start value must be smaller or equal to end value.\"", ")"...
<p> Returns a random float within the specified range. </p> @param startInclusive the smallest value that can be returned, must be non-negative @param endInclusive the upper bound (included) @throws IllegalArgumentException if {@code startInclusive > endInclusive} or if {@code startInclusive} is negative @return the r...
[ "<p", ">", "Returns", "a", "random", "float", "within", "the", "specified", "range", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/RandomUtils.java#L205-L215
diffplug/durian
src/com/diffplug/common/base/TreeQuery.java
TreeQuery.copyRootOut
public static <T, CopyType> CopyType copyRootOut(TreeDef<T> def, T root, BiFunction<T, CopyType, CopyType> mapper) { """ Copies the given tree of T to CopyType, starting at the root node of the tree and moving out to the leaf nodes, which generally requires CopyType to be mutable (if you want CopyType nodes to k...
java
public static <T, CopyType> CopyType copyRootOut(TreeDef<T> def, T root, BiFunction<T, CopyType, CopyType> mapper) { List<T> children = def.childrenOf(root); CopyType copyRoot = mapper.apply(root, null); copyMutableRecurse(def, root, children, copyRoot, mapper); return copyRoot; }
[ "public", "static", "<", "T", ",", "CopyType", ">", "CopyType", "copyRootOut", "(", "TreeDef", "<", "T", ">", "def", ",", "T", "root", ",", "BiFunction", "<", "T", ",", "CopyType", ",", "CopyType", ">", "mapper", ")", "{", "List", "<", "T", ">", "c...
Copies the given tree of T to CopyType, starting at the root node of the tree and moving out to the leaf nodes, which generally requires CopyType to be mutable (if you want CopyType nodes to know who their children are). @param def defines the structure of the tree @param root root of the tree @param nodeMapper give...
[ "Copies", "the", "given", "tree", "of", "T", "to", "CopyType", "starting", "at", "the", "root", "node", "of", "the", "tree", "and", "moving", "out", "to", "the", "leaf", "nodes", "which", "generally", "requires", "CopyType", "to", "be", "mutable", "(", "...
train
https://github.com/diffplug/durian/blob/10631a3480e5491eb6eb6ee06e752d8596914232/src/com/diffplug/common/base/TreeQuery.java#L107-L112
alrocar/POIProxy
es.alrocar.poiproxy/src/main/java/es/alrocar/poiproxy/servlet/BaseServerResource.java
BaseServerResource.addAdditionalParams
protected void addAdditionalParams(HashMap<String, String> params, ArrayList<Param> extractedParams) { """ Adds params found in the URL that are not in the {@link DescribeService} document of the service. Having this, we can add in the URL to POIProxy params from the original service. This should not be a goo...
java
protected void addAdditionalParams(HashMap<String, String> params, ArrayList<Param> extractedParams) { for (String key : params.keySet()) { if (!ParamEnum.from(key)) { extractedParams.add(new Param(key, params.get(key))); } } }
[ "protected", "void", "addAdditionalParams", "(", "HashMap", "<", "String", ",", "String", ">", "params", ",", "ArrayList", "<", "Param", ">", "extractedParams", ")", "{", "for", "(", "String", "key", ":", "params", ".", "keySet", "(", ")", ")", "{", "if"...
Adds params found in the URL that are not in the {@link DescribeService} document of the service. Having this, we can add in the URL to POIProxy params from the original service. This should not be a good option when we want to have a single interface, but allows anyone to access the original API adding the original pa...
[ "Adds", "params", "found", "in", "the", "URL", "that", "are", "not", "in", "the", "{", "@link", "DescribeService", "}", "document", "of", "the", "service", ".", "Having", "this", "we", "can", "add", "in", "the", "URL", "to", "POIProxy", "params", "from",...
train
https://github.com/alrocar/POIProxy/blob/e1dabe738a862478b2580e90d5fc4209a2997868/es.alrocar.poiproxy/src/main/java/es/alrocar/poiproxy/servlet/BaseServerResource.java#L79-L86
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TextTrieMap.java
TextTrieMap.put
public TextTrieMap<V> put(CharSequence text, V val) { """ Adds the text key and its associated object in this object. @param text The text. @param val The value object associated with the text. """ CharIterator chitr = new CharIterator(text, 0, _ignoreCase); _root.add(chitr, val); r...
java
public TextTrieMap<V> put(CharSequence text, V val) { CharIterator chitr = new CharIterator(text, 0, _ignoreCase); _root.add(chitr, val); return this; }
[ "public", "TextTrieMap", "<", "V", ">", "put", "(", "CharSequence", "text", ",", "V", "val", ")", "{", "CharIterator", "chitr", "=", "new", "CharIterator", "(", "text", ",", "0", ",", "_ignoreCase", ")", ";", "_root", ".", "add", "(", "chitr", ",", "...
Adds the text key and its associated object in this object. @param text The text. @param val The value object associated with the text.
[ "Adds", "the", "text", "key", "and", "its", "associated", "object", "in", "this", "object", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TextTrieMap.java#L44-L48
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java
ClassReader.enterTypevars
protected void enterTypevars(Symbol sym, Type t) { """ Enter type variables of this classtype and all enclosing ones in `typevars'. """ if (t.getEnclosingType() != null) { if (!t.getEnclosingType().hasTag(TypeTag.NONE)) { enterTypevars(sym.owner, t.getEnclosingType()); ...
java
protected void enterTypevars(Symbol sym, Type t) { if (t.getEnclosingType() != null) { if (!t.getEnclosingType().hasTag(TypeTag.NONE)) { enterTypevars(sym.owner, t.getEnclosingType()); } } else if (sym.kind == MTH && !sym.isStatic()) { enterTypevars(sy...
[ "protected", "void", "enterTypevars", "(", "Symbol", "sym", ",", "Type", "t", ")", "{", "if", "(", "t", ".", "getEnclosingType", "(", ")", "!=", "null", ")", "{", "if", "(", "!", "t", ".", "getEnclosingType", "(", ")", ".", "hasTag", "(", "TypeTag", ...
Enter type variables of this classtype and all enclosing ones in `typevars'.
[ "Enter", "type", "variables", "of", "this", "classtype", "and", "all", "enclosing", "ones", "in", "typevars", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java#L2543-L2554
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/BugInstance.java
BugInstance.getAnnotationWithRole
public @CheckForNull <A extends BugAnnotation> A getAnnotationWithRole(Class<A> c, String role) { """ Get the first bug annotation with the specified class and role; return null if no such annotation exists; """ for(BugAnnotation a : annotationList) { if (c.isInstance(a) && Objects.equals(...
java
public @CheckForNull <A extends BugAnnotation> A getAnnotationWithRole(Class<A> c, String role) { for(BugAnnotation a : annotationList) { if (c.isInstance(a) && Objects.equals(role, a.getDescription())) { return c.cast(a); } } return null; }
[ "public", "@", "CheckForNull", "<", "A", "extends", "BugAnnotation", ">", "A", "getAnnotationWithRole", "(", "Class", "<", "A", ">", "c", ",", "String", "role", ")", "{", "for", "(", "BugAnnotation", "a", ":", "annotationList", ")", "{", "if", "(", "c", ...
Get the first bug annotation with the specified class and role; return null if no such annotation exists;
[ "Get", "the", "first", "bug", "annotation", "with", "the", "specified", "class", "and", "role", ";", "return", "null", "if", "no", "such", "annotation", "exists", ";" ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/BugInstance.java#L596-L603
lucee/Lucee
core/src/main/java/lucee/runtime/config/ConfigServerImpl.java
ConfigServerImpl.createClusterScope
@Override public Cluster createClusterScope() throws PageException { """ /* private static long _countx(Mapping mapping) { PCLCollection pcl = ((MappingImpl)mapping).getPCLCollection(); return pcl==null?0:pcl.count(); } """ Cluster cluster = null; try { if (Reflector.isInstaneOf(getClusterClass(),...
java
@Override public Cluster createClusterScope() throws PageException { Cluster cluster = null; try { if (Reflector.isInstaneOf(getClusterClass(), Cluster.class)) { cluster = (Cluster) ClassUtil.loadInstance(getClusterClass(), ArrayUtil.OBJECT_EMPTY); cluster.init(this); } else if (Reflector.isIns...
[ "@", "Override", "public", "Cluster", "createClusterScope", "(", ")", "throws", "PageException", "{", "Cluster", "cluster", "=", "null", ";", "try", "{", "if", "(", "Reflector", ".", "isInstaneOf", "(", "getClusterClass", "(", ")", ",", "Cluster", ".", "clas...
/* private static long _countx(Mapping mapping) { PCLCollection pcl = ((MappingImpl)mapping).getPCLCollection(); return pcl==null?0:pcl.count(); }
[ "/", "*", "private", "static", "long", "_countx", "(", "Mapping", "mapping", ")", "{", "PCLCollection", "pcl", "=", "((", "MappingImpl", ")", "mapping", ")", ".", "getPCLCollection", "()", ";", "return", "pcl", "==", "null?0", ":", "pcl", ".", "count", "...
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/ConfigServerImpl.java#L624-L643
dropbox/dropbox-sdk-java
src/main/java/com/dropbox/core/v1/DbxThumbnailFormat.java
DbxThumbnailFormat.bestForFileName
public static DbxThumbnailFormat bestForFileName(String fileName, DbxThumbnailFormat fallback) { """ Try and guess the right {@code DbxThumbnailFormat} to use based on the image's file name. Sometimes this function won't be able to guess and will just return whatever you pass in for {@code fallback}. <pre> ...
java
public static DbxThumbnailFormat bestForFileName(String fileName, DbxThumbnailFormat fallback) { fileName = fileName.toLowerCase(); if (fileName.endsWith(".png") || fileName.endsWith(".gif")) { return DbxThumbnailFormat.PNG; } else if (fileName.endsWith(".jpeg") || fileNa...
[ "public", "static", "DbxThumbnailFormat", "bestForFileName", "(", "String", "fileName", ",", "DbxThumbnailFormat", "fallback", ")", "{", "fileName", "=", "fileName", ".", "toLowerCase", "(", ")", ";", "if", "(", "fileName", ".", "endsWith", "(", "\".png\"", ")",...
Try and guess the right {@code DbxThumbnailFormat} to use based on the image's file name. Sometimes this function won't be able to guess and will just return whatever you pass in for {@code fallback}. <pre> DbxThumbnailFormat.bestForFileName("test.png"); // returns DbxThumbnailFormat.PNG DbxThumbnailFormat.b...
[ "Try", "and", "guess", "the", "right", "{", "@code", "DbxThumbnailFormat", "}", "to", "use", "based", "on", "the", "image", "s", "file", "name", ".", "Sometimes", "this", "function", "won", "t", "be", "able", "to", "guess", "and", "will", "just", "return...
train
https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/v1/DbxThumbnailFormat.java#L37-L47
Hygieia/Hygieia
api-audit/src/main/java/com/capitalone/dashboard/evaluator/BuildEvaluator.java
BuildEvaluator.getBuildJobAuditResponse
private BuildAuditResponse getBuildJobAuditResponse(CollectorItem buildItem, long beginDate, long endDate, List<CollectorItem> repoItems) { """ Calculates Audit Response for a given dashboard @param beginDate @param endDate @return BuildAuditResponse for the build job for a given dashboard, begin and end date...
java
private BuildAuditResponse getBuildJobAuditResponse(CollectorItem buildItem, long beginDate, long endDate, List<CollectorItem> repoItems) { BuildAuditResponse buildAuditResponse = new BuildAuditResponse(); List<CollectorItemConfigHistory> jobConfigHists = collItemConfigHistoryRepository.findByCollecto...
[ "private", "BuildAuditResponse", "getBuildJobAuditResponse", "(", "CollectorItem", "buildItem", ",", "long", "beginDate", ",", "long", "endDate", ",", "List", "<", "CollectorItem", ">", "repoItems", ")", "{", "BuildAuditResponse", "buildAuditResponse", "=", "new", "Bu...
Calculates Audit Response for a given dashboard @param beginDate @param endDate @return BuildAuditResponse for the build job for a given dashboard, begin and end date
[ "Calculates", "Audit", "Response", "for", "a", "given", "dashboard" ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api-audit/src/main/java/com/capitalone/dashboard/evaluator/BuildEvaluator.java#L112-L142
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/AbstractApi.java
AbstractApi.putUpload
protected Response putUpload(Response.Status expectedStatus, String name, File fileToUpload, Object... pathArgs) throws GitLabApiException { """ Perform a file upload using the HTTP PUT method with the specified File instance and path objects, returning a ClientResponse instance with the data returned from the en...
java
protected Response putUpload(Response.Status expectedStatus, String name, File fileToUpload, Object... pathArgs) throws GitLabApiException { try { return validate(getApiClient().putUpload(name, fileToUpload, pathArgs), expectedStatus); } catch (Exception e) { throw handle(e); ...
[ "protected", "Response", "putUpload", "(", "Response", ".", "Status", "expectedStatus", ",", "String", "name", ",", "File", "fileToUpload", ",", "Object", "...", "pathArgs", ")", "throws", "GitLabApiException", "{", "try", "{", "return", "validate", "(", "getApi...
Perform a file upload using the HTTP PUT method with the specified File instance and path objects, returning a ClientResponse instance with the data returned from the endpoint. @param expectedStatus the HTTP status that should be returned from the server @param name the name for the form field that contains the file n...
[ "Perform", "a", "file", "upload", "using", "the", "HTTP", "PUT", "method", "with", "the", "specified", "File", "instance", "and", "path", "objects", "returning", "a", "ClientResponse", "instance", "with", "the", "data", "returned", "from", "the", "endpoint", "...
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AbstractApi.java#L471-L477
apache/incubator-gobblin
gobblin-core/src/main/java/org/apache/gobblin/source/extractor/watermark/DateWatermark.java
DateWatermark.adjustWatermark
public static long adjustWatermark(String baseWatermark, int diff) { """ Adjust the given watermark by diff @param baseWatermark the original watermark @param diff the amount to change @return the adjusted watermark value """ SimpleDateFormat parser = new SimpleDateFormat(INPUTFORMAT); Date date =...
java
public static long adjustWatermark(String baseWatermark, int diff) { SimpleDateFormat parser = new SimpleDateFormat(INPUTFORMAT); Date date = Utils.toDate(baseWatermark, INPUTFORMAT, OUTPUTFORMAT); return Long.parseLong(parser.format(Utils.addDaysToDate(date, diff))); }
[ "public", "static", "long", "adjustWatermark", "(", "String", "baseWatermark", ",", "int", "diff", ")", "{", "SimpleDateFormat", "parser", "=", "new", "SimpleDateFormat", "(", "INPUTFORMAT", ")", ";", "Date", "date", "=", "Utils", ".", "toDate", "(", "baseWate...
Adjust the given watermark by diff @param baseWatermark the original watermark @param diff the amount to change @return the adjusted watermark value
[ "Adjust", "the", "given", "watermark", "by", "diff" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/source/extractor/watermark/DateWatermark.java#L162-L166
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/logging/MyfacesLogger.java
MyfacesLogger.createMyfacesLogger
private static MyfacesLogger createMyfacesLogger(String name, String resourceBundleName) { """ Find or create a logger for a named subsystem. If a logger has already been created with the given name it is returned. Otherwise a new logger is created. <p> If a new logger is created its log level will be config...
java
private static MyfacesLogger createMyfacesLogger(String name, String resourceBundleName) { if (name == null) { throw new IllegalArgumentException(_LOG.getMessage( "LOGGER_NAME_REQUIRED")); } Logger log = Logger.getLogger(name, resourceBundleName); ...
[ "private", "static", "MyfacesLogger", "createMyfacesLogger", "(", "String", "name", ",", "String", "resourceBundleName", ")", "{", "if", "(", "name", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "_LOG", ".", "getMessage", "(", "\"LOGG...
Find or create a logger for a named subsystem. If a logger has already been created with the given name it is returned. Otherwise a new logger is created. <p> If a new logger is created its log level will be configured based on the LogManager and it will configured to also send logging output to its parent loggers Ha...
[ "Find", "or", "create", "a", "logger", "for", "a", "named", "subsystem", ".", "If", "a", "logger", "has", "already", "been", "created", "with", "the", "given", "name", "it", "is", "returned", ".", "Otherwise", "a", "new", "logger", "is", "created", ".", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/logging/MyfacesLogger.java#L199-L210
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/XlsLoader.java
XlsLoader.loadMultiple
public Object[] loadMultiple(final InputStream xlsIn, final Class<?>[] classes) throws XlsMapperException, IOException { """ Excelファイルの複数シートを読み込み、任意のクラスにマップする。 <p>複数のシートの形式を一度に読み込む際に使用します。</p> @param xlsIn 読み込み元のExcelファイルのストリーム。 @param classes マッピング先のクラスタイプの配列。 @return マッピングした複数のシート。 {@link Con...
java
public Object[] loadMultiple(final InputStream xlsIn, final Class<?>[] classes) throws XlsMapperException, IOException { return loadMultipleDetail(xlsIn, classes).getAll().stream() .map(s -> s.getTarget()) .toArray(); }
[ "public", "Object", "[", "]", "loadMultiple", "(", "final", "InputStream", "xlsIn", ",", "final", "Class", "<", "?", ">", "[", "]", "classes", ")", "throws", "XlsMapperException", ",", "IOException", "{", "return", "loadMultipleDetail", "(", "xlsIn", ",", "c...
Excelファイルの複数シートを読み込み、任意のクラスにマップする。 <p>複数のシートの形式を一度に読み込む際に使用します。</p> @param xlsIn 読み込み元のExcelファイルのストリーム。 @param classes マッピング先のクラスタイプの配列。 @return マッピングした複数のシート。 {@link Configuration#isIgnoreSheetNotFound()}の値がtrueで、シートが見つからない場合、マッピング結果には含まれません。 @throws IllegalArgumentException {@literal xlsIn == null or classes == null...
[ "Excelファイルの複数シートを読み込み、任意のクラスにマップする。", "<p", ">", "複数のシートの形式を一度に読み込む際に使用します。<", "/", "p", ">" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/XlsLoader.java#L246-L251
lukas-krecan/JsonUnit
json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/JsonUtils.java
JsonUtils.convertToJson
public static Node convertToJson(Object source, String label) { """ Converts object to JSON. @param source @param label label to be logged in case of error. @return """ return convertToJson(source, label, false); }
java
public static Node convertToJson(Object source, String label) { return convertToJson(source, label, false); }
[ "public", "static", "Node", "convertToJson", "(", "Object", "source", ",", "String", "label", ")", "{", "return", "convertToJson", "(", "source", ",", "label", ",", "false", ")", ";", "}" ]
Converts object to JSON. @param source @param label label to be logged in case of error. @return
[ "Converts", "object", "to", "JSON", "." ]
train
https://github.com/lukas-krecan/JsonUnit/blob/2b12ed792e8dd787bddd6f3b8eb2325737435791/json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/JsonUtils.java#L40-L42
ineunetOS/knife-commons
knife-commons-utils/src/main/java/com/ineunet/knife/util/StringUtils.java
StringUtils.indexOf
public static int indexOf(String str, String searchStr, int startPos) { """ <p>Finds the first index within a String, handling <code>null</code>. This method uses {@link String#indexOf(String, int)}.</p> <p>A <code>null</code> String will return <code>-1</code>. A negative start position is treated as zero. ...
java
public static int indexOf(String str, String searchStr, int startPos) { if (str == null || searchStr == null) { return INDEX_NOT_FOUND; } // JDK1.2/JDK1.3 have a bug, when startPos > str.length for "", hence if (searchStr.length() == 0 && startPos >= str.length()) { ...
[ "public", "static", "int", "indexOf", "(", "String", "str", ",", "String", "searchStr", ",", "int", "startPos", ")", "{", "if", "(", "str", "==", "null", "||", "searchStr", "==", "null", ")", "{", "return", "INDEX_NOT_FOUND", ";", "}", "// JDK1.2/JDK1.3 ha...
<p>Finds the first index within a String, handling <code>null</code>. This method uses {@link String#indexOf(String, int)}.</p> <p>A <code>null</code> String will return <code>-1</code>. A negative start position is treated as zero. An empty ("") search String always matches. A start position greater than the string l...
[ "<p", ">", "Finds", "the", "first", "index", "within", "a", "String", "handling", "<code", ">", "null<", "/", "code", ">", ".", "This", "method", "uses", "{", "@link", "String#indexOf", "(", "String", "int", ")", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/ineunetOS/knife-commons/blob/eae9e59afa020a00ae8977c10d43ac8ae46ae236/knife-commons-utils/src/main/java/com/ineunet/knife/util/StringUtils.java#L852-L861
openwms/org.openwms
org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java
AbstractWebController.getLocationForCreatedResource
protected String getLocationForCreatedResource(HttpServletRequest req, String objId) { """ Append the ID of the object that was created to the original request URL and return it. @param req The HttpServletRequest object @param objId The ID to append @return The complete appended URL """ StringBuff...
java
protected String getLocationForCreatedResource(HttpServletRequest req, String objId) { StringBuffer url = req.getRequestURL(); UriTemplate template = new UriTemplate(url.append("/{objId}/").toString()); return template.expand(objId).toASCIIString(); }
[ "protected", "String", "getLocationForCreatedResource", "(", "HttpServletRequest", "req", ",", "String", "objId", ")", "{", "StringBuffer", "url", "=", "req", ".", "getRequestURL", "(", ")", ";", "UriTemplate", "template", "=", "new", "UriTemplate", "(", "url", ...
Append the ID of the object that was created to the original request URL and return it. @param req The HttpServletRequest object @param objId The ID to append @return The complete appended URL
[ "Append", "the", "ID", "of", "the", "object", "that", "was", "created", "to", "the", "original", "request", "URL", "and", "return", "it", "." ]
train
https://github.com/openwms/org.openwms/blob/b24a95c5d09a7ec3c723d7e107d1cb0039d06a7e/org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java#L211-L215
threerings/narya
core/src/main/java/com/threerings/presents/dobj/DObject.java
DObject.addListener
public void addListener (ChangeListener listener, boolean weak) { """ Adds an event listener to this object. The listener will be notified when any events are dispatched on this object that match their particular listener interface. <p> Note that the entity adding itself as a listener should have obtained the ...
java
public void addListener (ChangeListener listener, boolean weak) { // only add the listener if they're not already there int idx = getListenerIndex(listener); if (idx == -1) { _listeners = ListUtil.add(_listeners, weak ? new WeakReference<Object>(listener) : listen...
[ "public", "void", "addListener", "(", "ChangeListener", "listener", ",", "boolean", "weak", ")", "{", "// only add the listener if they're not already there", "int", "idx", "=", "getListenerIndex", "(", "listener", ")", ";", "if", "(", "idx", "==", "-", "1", ")", ...
Adds an event listener to this object. The listener will be notified when any events are dispatched on this object that match their particular listener interface. <p> Note that the entity adding itself as a listener should have obtained the object reference by subscribing to it or should be acting on behalf of some ot...
[ "Adds", "an", "event", "listener", "to", "this", "object", ".", "The", "listener", "will", "be", "notified", "when", "any", "events", "are", "dispatched", "on", "this", "object", "that", "match", "their", "particular", "listener", "interface", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/dobj/DObject.java#L201-L219
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/CASH.java
CASH.initHeap
private void initHeap(ObjectHeap<CASHInterval> heap, Relation<ParameterizationFunction> relation, int dim, DBIDs ids) { """ Initializes the heap with the root intervals. @param heap the heap to be initialized @param relation the database storing the parameterization functions @param dim the dimensionality of ...
java
private void initHeap(ObjectHeap<CASHInterval> heap, Relation<ParameterizationFunction> relation, int dim, DBIDs ids) { CASHIntervalSplit split = new CASHIntervalSplit(relation, minPts); // determine minimum and maximum function value of all functions double[] minMax = determineMinMaxDistance(relation, dim...
[ "private", "void", "initHeap", "(", "ObjectHeap", "<", "CASHInterval", ">", "heap", ",", "Relation", "<", "ParameterizationFunction", ">", "relation", ",", "int", "dim", ",", "DBIDs", "ids", ")", "{", "CASHIntervalSplit", "split", "=", "new", "CASHIntervalSplit"...
Initializes the heap with the root intervals. @param heap the heap to be initialized @param relation the database storing the parameterization functions @param dim the dimensionality of the database @param ids the ids of the database
[ "Initializes", "the", "heap", "with", "the", "root", "intervals", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/CASH.java#L376-L414
Alluxio/alluxio
core/server/common/src/main/java/alluxio/master/journal/ufs/UfsJournalFile.java
UfsJournalFile.createLogFile
static UfsJournalFile createLogFile(URI location, long start, long end) { """ Creates a journal log file. @param location the file location @param start the start sequence number (inclusive) @param end the end sequence number (exclusive) @return the file """ return new UfsJournalFile(location, start,...
java
static UfsJournalFile createLogFile(URI location, long start, long end) { return new UfsJournalFile(location, start, end, false); }
[ "static", "UfsJournalFile", "createLogFile", "(", "URI", "location", ",", "long", "start", ",", "long", "end", ")", "{", "return", "new", "UfsJournalFile", "(", "location", ",", "start", ",", "end", ",", "false", ")", ";", "}" ]
Creates a journal log file. @param location the file location @param start the start sequence number (inclusive) @param end the end sequence number (exclusive) @return the file
[ "Creates", "a", "journal", "log", "file", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/common/src/main/java/alluxio/master/journal/ufs/UfsJournalFile.java#L91-L93
j256/ormlite-core
src/main/java/com/j256/ormlite/dao/BaseForeignCollection.java
BaseForeignCollection.addAll
@Override public boolean addAll(Collection<? extends T> collection) { """ Add the collection of elements to this collection. This will also them to the associated database table. @return Returns true if any of the items did not already exist in the collection otherwise false. """ boolean changed = false;...
java
@Override public boolean addAll(Collection<? extends T> collection) { boolean changed = false; for (T data : collection) { try { if (addElement(data)) { changed = true; } } catch (SQLException e) { throw new IllegalStateException("Could not create data elements in dao", e); } } return...
[ "@", "Override", "public", "boolean", "addAll", "(", "Collection", "<", "?", "extends", "T", ">", "collection", ")", "{", "boolean", "changed", "=", "false", ";", "for", "(", "T", "data", ":", "collection", ")", "{", "try", "{", "if", "(", "addElement"...
Add the collection of elements to this collection. This will also them to the associated database table. @return Returns true if any of the items did not already exist in the collection otherwise false.
[ "Add", "the", "collection", "of", "elements", "to", "this", "collection", ".", "This", "will", "also", "them", "to", "the", "associated", "database", "table", "." ]
train
https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/dao/BaseForeignCollection.java#L62-L75
landawn/AbacusUtil
src/com/landawn/abacus/util/JdbcUtil.java
JdbcUtil.importData
public static int importData(final DataSet dataset, final Connection conn, final String insertSQL, final Try.BiConsumer<? super PreparedStatement, ? super Object[], SQLException> stmtSetter) throws UncheckedSQLException { """ Imports the data from <code>DataSet</code> to database. @param dataset @...
java
public static int importData(final DataSet dataset, final Connection conn, final String insertSQL, final Try.BiConsumer<? super PreparedStatement, ? super Object[], SQLException> stmtSetter) throws UncheckedSQLException { return importData(dataset, 0, dataset.size(), conn, insertSQL, stmtSetter); ...
[ "public", "static", "int", "importData", "(", "final", "DataSet", "dataset", ",", "final", "Connection", "conn", ",", "final", "String", "insertSQL", ",", "final", "Try", ".", "BiConsumer", "<", "?", "super", "PreparedStatement", ",", "?", "super", "Object", ...
Imports the data from <code>DataSet</code> to database. @param dataset @param conn @param insertSQL the column order in the sql must be consistent with the column order in the DataSet. Here is sample about how to create the sql: <pre><code> List<String> columnNameList = new ArrayList<>(dataset.columnNameList()); colum...
[ "Imports", "the", "data", "from", "<code", ">", "DataSet<", "/", "code", ">", "to", "database", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/JdbcUtil.java#L2081-L2084
landawn/AbacusUtil
src/com/landawn/abacus/util/JdbcUtil.java
JdbcUtil.createTableIfNotExists
public static boolean createTableIfNotExists(final Connection conn, final String tableName, final String schema) { """ Returns {@code true} if succeed to create table, otherwise {@code false} is returned. @param conn @param tableName @param schema @return """ if (doesTableExist(conn, tableName))...
java
public static boolean createTableIfNotExists(final Connection conn, final String tableName, final String schema) { if (doesTableExist(conn, tableName)) { return false; } try { execute(conn, schema); return true; } catch (SQLException e) { ...
[ "public", "static", "boolean", "createTableIfNotExists", "(", "final", "Connection", "conn", ",", "final", "String", "tableName", ",", "final", "String", "schema", ")", "{", "if", "(", "doesTableExist", "(", "conn", ",", "tableName", ")", ")", "{", "return", ...
Returns {@code true} if succeed to create table, otherwise {@code false} is returned. @param conn @param tableName @param schema @return
[ "Returns", "{", "@code", "true", "}", "if", "succeed", "to", "create", "table", "otherwise", "{", "@code", "false", "}", "is", "returned", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/JdbcUtil.java#L1666-L1678
Alluxio/alluxio
core/server/master/src/main/java/alluxio/master/file/meta/InodeTreePersistentState.java
InodeTreePersistentState.applyAndJournal
public void applyAndJournal(Supplier<JournalContext> context, SetAclEntry entry) { """ Sets an ACL for an inode. @param context journal context supplier @param entry set acl entry """ try { applySetAcl(entry); context.get().append(JournalEntry.newBuilder().setSetAcl(entry).build()); } c...
java
public void applyAndJournal(Supplier<JournalContext> context, SetAclEntry entry) { try { applySetAcl(entry); context.get().append(JournalEntry.newBuilder().setSetAcl(entry).build()); } catch (Throwable t) { ProcessUtils.fatalError(LOG, t, "Failed to apply %s", entry); throw t; // fatalEr...
[ "public", "void", "applyAndJournal", "(", "Supplier", "<", "JournalContext", ">", "context", ",", "SetAclEntry", "entry", ")", "{", "try", "{", "applySetAcl", "(", "entry", ")", ";", "context", ".", "get", "(", ")", ".", "append", "(", "JournalEntry", ".",...
Sets an ACL for an inode. @param context journal context supplier @param entry set acl entry
[ "Sets", "an", "ACL", "for", "an", "inode", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/master/src/main/java/alluxio/master/file/meta/InodeTreePersistentState.java#L218-L226
VoltDB/voltdb
src/frontend/org/voltdb/exportclient/ExportRow.java
ExportRow.decodeRow
public static ExportRow decodeRow(ExportRow previous, int partition, long startTS, byte[] rowData) throws IOException { """ Decode a byte array of row data into ExportRow @param rowData @return ExportRow @throws IOException """ ByteBuffer bb = ByteBuffer.wrap(rowData); bb.order(ByteOrder.L...
java
public static ExportRow decodeRow(ExportRow previous, int partition, long startTS, byte[] rowData) throws IOException { ByteBuffer bb = ByteBuffer.wrap(rowData); bb.order(ByteOrder.LITTLE_ENDIAN); return decodeRow(previous, partition, startTS, bb); }
[ "public", "static", "ExportRow", "decodeRow", "(", "ExportRow", "previous", ",", "int", "partition", ",", "long", "startTS", ",", "byte", "[", "]", "rowData", ")", "throws", "IOException", "{", "ByteBuffer", "bb", "=", "ByteBuffer", ".", "wrap", "(", "rowDat...
Decode a byte array of row data into ExportRow @param rowData @return ExportRow @throws IOException
[ "Decode", "a", "byte", "array", "of", "row", "data", "into", "ExportRow" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ExportRow.java#L145-L149
arquillian/arquillian-extension-warp
impl/src/main/java/org/jboss/arquillian/warp/impl/utils/URLUtils.java
URLUtils.buildUrl
public static URL buildUrl(String context, String... relocations) { """ Use URL context and one or more relocations to build end URL. @param context first URL used like a context root for all relocation changes @param relocations array of relocation URLs @return end url after all changes made on context w...
java
public static URL buildUrl(String context, String... relocations) { try { return buildUrl(new URL(context), relocations); } catch (MalformedURLException e) { throw new AssertionError("URL('" + context + "') isn't valid URL"); } }
[ "public", "static", "URL", "buildUrl", "(", "String", "context", ",", "String", "...", "relocations", ")", "{", "try", "{", "return", "buildUrl", "(", "new", "URL", "(", "context", ")", ",", "relocations", ")", ";", "}", "catch", "(", "MalformedURLExceptio...
Use URL context and one or more relocations to build end URL. @param context first URL used like a context root for all relocation changes @param relocations array of relocation URLs @return end url after all changes made on context with relocations @throws AssertionError when context or some of relocations are ma...
[ "Use", "URL", "context", "and", "one", "or", "more", "relocations", "to", "build", "end", "URL", "." ]
train
https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/impl/src/main/java/org/jboss/arquillian/warp/impl/utils/URLUtils.java#L40-L46
ehcache/ehcache3
impl/src/main/java/org/ehcache/impl/config/executor/PooledExecutionServiceConfiguration.java
PooledExecutionServiceConfiguration.addDefaultPool
public void addDefaultPool(String alias, int minSize, int maxSize) { """ Adds a new default pool with the provided minimum and maximum. <p> The default pool will be used by any service requiring threads but not specifying a pool alias. It is not mandatory to have a default pool. But without one <i>ALL</i> serv...
java
public void addDefaultPool(String alias, int minSize, int maxSize) { if (alias == null) { throw new NullPointerException("Pool alias cannot be null"); } if (defaultAlias == null) { addPool(alias, minSize, maxSize); defaultAlias = alias; } else { throw new IllegalArgumentException...
[ "public", "void", "addDefaultPool", "(", "String", "alias", ",", "int", "minSize", ",", "int", "maxSize", ")", "{", "if", "(", "alias", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"Pool alias cannot be null\"", ")", ";", "}", "if",...
Adds a new default pool with the provided minimum and maximum. <p> The default pool will be used by any service requiring threads but not specifying a pool alias. It is not mandatory to have a default pool. But without one <i>ALL</i> services have to specify a pool alias. @param alias the pool alias @param minSize the...
[ "Adds", "a", "new", "default", "pool", "with", "the", "provided", "minimum", "and", "maximum", ".", "<p", ">", "The", "default", "pool", "will", "be", "used", "by", "any", "service", "requiring", "threads", "but", "not", "specifying", "a", "pool", "alias",...
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/impl/config/executor/PooledExecutionServiceConfiguration.java#L60-L70
Intel-HLS/GKL
src/main/java/com/intel/gkl/compression/IntelInflater.java
IntelInflater.setInput
@Override public void setInput(byte[] b, int off, int len) throws NullPointerException { """ Sets input data for compression. This should be called whenever needsInput() returns true indicating that more input data is required. @param b the input data bytes @param off the start offset of the data @param le...
java
@Override public void setInput(byte[] b, int off, int len) throws NullPointerException { if(lz_stream == 0) reset(); if(b == null) { throw new NullPointerException("Input is null"); } if(len <= 0) { throw new NullPointerException("Input buffer length is zero."...
[ "@", "Override", "public", "void", "setInput", "(", "byte", "[", "]", "b", ",", "int", "off", ",", "int", "len", ")", "throws", "NullPointerException", "{", "if", "(", "lz_stream", "==", "0", ")", "reset", "(", ")", ";", "if", "(", "b", "==", "null...
Sets input data for compression. This should be called whenever needsInput() returns true indicating that more input data is required. @param b the input data bytes @param off the start offset of the data @param len the length of the data @see IntelDeflater#needsInput
[ "Sets", "input", "data", "for", "compression", ".", "This", "should", "be", "called", "whenever", "needsInput", "()", "returns", "true", "indicating", "that", "more", "input", "data", "is", "required", "." ]
train
https://github.com/Intel-HLS/GKL/blob/c071276633f01d8198198fb40df468a0dffb0d41/src/main/java/com/intel/gkl/compression/IntelInflater.java#L116-L129
algolia/algoliasearch-client-java
src/main/java/com/algolia/search/saas/APIClient.java
APIClient.getLogs
public JSONObject getLogs(int offset, int length) throws AlgoliaException { """ Return last logs entries. @param offset Specify the first entry to retrieve (0-based, 0 is the most recent log entry). @param length Specify the maximum number of entries to retrieve starting at offset. Maximum allowed value: 1000....
java
public JSONObject getLogs(int offset, int length) throws AlgoliaException { return getLogs(offset, length, LogType.LOG_ALL); }
[ "public", "JSONObject", "getLogs", "(", "int", "offset", ",", "int", "length", ")", "throws", "AlgoliaException", "{", "return", "getLogs", "(", "offset", ",", "length", ",", "LogType", ".", "LOG_ALL", ")", ";", "}" ]
Return last logs entries. @param offset Specify the first entry to retrieve (0-based, 0 is the most recent log entry). @param length Specify the maximum number of entries to retrieve starting at offset. Maximum allowed value: 1000.
[ "Return", "last", "logs", "entries", "." ]
train
https://github.com/algolia/algoliasearch-client-java/blob/a05da2f66c099fe6f77295c7b6a8a12c24e95f9b/src/main/java/com/algolia/search/saas/APIClient.java#L427-L429
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountsInner.java
StorageAccountsInner.updateAsync
public Observable<Void> updateAsync(String resourceGroupName, String accountName, String storageAccountName) { """ Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix. @param resourceGroupName The name of the Azure resource group. @param a...
java
public Observable<Void> updateAsync(String resourceGroupName, String accountName, String storageAccountName) { return updateWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceRespon...
[ "public", "Observable", "<", "Void", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "storageAccountName", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ",", "st...
Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix. @param resourceGroupName The name of the Azure resource group. @param accountName The name of the Data Lake Analytics account. @param storageAccountName The Azure Storage account to modify @thro...
[ "Updates", "the", "Data", "Lake", "Analytics", "account", "to", "replace", "Azure", "Storage", "blob", "account", "details", "such", "as", "the", "access", "key", "and", "/", "or", "suffix", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountsInner.java#L619-L626
Harium/keel
src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java
HistogramStatistics.Skewness
public static double Skewness(int[] values) { """ Calculate Skewness value. @param values Values. @return Returns skewness value of the specified histogram array. """ double mean = Mean(values); double std = StdDev(values, mean); return Skewness(values, mean, std); }
java
public static double Skewness(int[] values){ double mean = Mean(values); double std = StdDev(values, mean); return Skewness(values, mean, std); }
[ "public", "static", "double", "Skewness", "(", "int", "[", "]", "values", ")", "{", "double", "mean", "=", "Mean", "(", "values", ")", ";", "double", "std", "=", "StdDev", "(", "values", ",", "mean", ")", ";", "return", "Skewness", "(", "values", ","...
Calculate Skewness value. @param values Values. @return Returns skewness value of the specified histogram array.
[ "Calculate", "Skewness", "value", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java#L220-L224
netty/netty
transport-native-kqueue/src/main/java/io/netty/channel/kqueue/AbstractKQueueChannel.java
AbstractKQueueChannel.newDirectBuffer
protected final ByteBuf newDirectBuffer(Object holder, ByteBuf buf) { """ Returns an off-heap copy of the specified {@link ByteBuf}, and releases the specified holder. The caller must ensure that the holder releases the original {@link ByteBuf} when the holder is released by this method. """ final in...
java
protected final ByteBuf newDirectBuffer(Object holder, ByteBuf buf) { final int readableBytes = buf.readableBytes(); if (readableBytes == 0) { ReferenceCountUtil.release(holder); return Unpooled.EMPTY_BUFFER; } final ByteBufAllocator alloc = alloc(); if (...
[ "protected", "final", "ByteBuf", "newDirectBuffer", "(", "Object", "holder", ",", "ByteBuf", "buf", ")", "{", "final", "int", "readableBytes", "=", "buf", ".", "readableBytes", "(", ")", ";", "if", "(", "readableBytes", "==", "0", ")", "{", "ReferenceCountUt...
Returns an off-heap copy of the specified {@link ByteBuf}, and releases the specified holder. The caller must ensure that the holder releases the original {@link ByteBuf} when the holder is released by this method.
[ "Returns", "an", "off", "-", "heap", "copy", "of", "the", "specified", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport-native-kqueue/src/main/java/io/netty/channel/kqueue/AbstractKQueueChannel.java#L210-L230
Red5/red5-server-common
src/main/java/org/red5/server/ClientRegistry.java
ClientRegistry.newClient
public IClient newClient(Object[] params) throws ClientNotFoundException, ClientRejectedException { """ Return client from next id with given params @param params Client params @return Client object @throws ClientNotFoundException if client not found @throws ClientRejectedException if client rejected ...
java
public IClient newClient(Object[] params) throws ClientNotFoundException, ClientRejectedException { // derive client id from the connection params or use next String id = nextId(); IClient client = new Client(id, this); addClient(id, client); return client; }
[ "public", "IClient", "newClient", "(", "Object", "[", "]", "params", ")", "throws", "ClientNotFoundException", ",", "ClientRejectedException", "{", "// derive client id from the connection params or use next\r", "String", "id", "=", "nextId", "(", ")", ";", "IClient", "...
Return client from next id with given params @param params Client params @return Client object @throws ClientNotFoundException if client not found @throws ClientRejectedException if client rejected
[ "Return", "client", "from", "next", "id", "with", "given", "params" ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/ClientRegistry.java#L195-L201
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java
PaymentSession.sendPayment
@Nullable public ListenableFuture<PaymentProtocol.Ack> sendPayment(List<Transaction> txns, @Nullable Address refundAddr, @Nullable String memo) throws PaymentProtocolException, VerificationException, IOException { """ Generates a Payment message and sends the payment to the merchant who sent the Pa...
java
@Nullable public ListenableFuture<PaymentProtocol.Ack> sendPayment(List<Transaction> txns, @Nullable Address refundAddr, @Nullable String memo) throws PaymentProtocolException, VerificationException, IOException { Protos.Payment payment = getPayment(txns, refundAddr, memo); if (payment =...
[ "@", "Nullable", "public", "ListenableFuture", "<", "PaymentProtocol", ".", "Ack", ">", "sendPayment", "(", "List", "<", "Transaction", ">", "txns", ",", "@", "Nullable", "Address", "refundAddr", ",", "@", "Nullable", "String", "memo", ")", "throws", "PaymentP...
Generates a Payment message and sends the payment to the merchant who sent the PaymentRequest. Provide transactions built by the wallet. NOTE: This does not broadcast the transactions to the bitcoin network, it merely sends a Payment message to the merchant confirming the payment. Returns an object wrapping PaymentACK ...
[ "Generates", "a", "Payment", "message", "and", "sends", "the", "payment", "to", "the", "merchant", "who", "sent", "the", "PaymentRequest", ".", "Provide", "transactions", "built", "by", "the", "wallet", ".", "NOTE", ":", "This", "does", "not", "broadcast", "...
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java#L318-L333
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceClient.java
InstanceClient.insertInstance
@BetaApi public final Operation insertInstance(String zone, Instance instanceResource) { """ Creates an instance resource in the specified project using the data included in the request. <p>Sample code: <pre><code> try (InstanceClient instanceClient = InstanceClient.create()) { ProjectZoneName zone = Pro...
java
@BetaApi public final Operation insertInstance(String zone, Instance instanceResource) { InsertInstanceHttpRequest request = InsertInstanceHttpRequest.newBuilder() .setZone(zone) .setInstanceResource(instanceResource) .build(); return insertInstance(request); }
[ "@", "BetaApi", "public", "final", "Operation", "insertInstance", "(", "String", "zone", ",", "Instance", "instanceResource", ")", "{", "InsertInstanceHttpRequest", "request", "=", "InsertInstanceHttpRequest", ".", "newBuilder", "(", ")", ".", "setZone", "(", "zone"...
Creates an instance resource in the specified project using the data included in the request. <p>Sample code: <pre><code> try (InstanceClient instanceClient = InstanceClient.create()) { ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); Instance instanceResource = Instance.newBuilder().build(); Operati...
[ "Creates", "an", "instance", "resource", "in", "the", "specified", "project", "using", "the", "data", "included", "in", "the", "request", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceClient.java#L1370-L1379
infinispan/infinispan
core/src/main/java/org/infinispan/util/concurrent/locks/StripedLock.java
StripedLock.acquireLock
public void acquireLock(Object key, boolean exclusive) { """ Blocks until a lock is acquired. @param exclusive if true, a write (exclusive) lock is attempted, otherwise a read (shared) lock is used. """ ReentrantReadWriteLock lock = getLock(key); if (exclusive) { lock.writeLock().lock()...
java
public void acquireLock(Object key, boolean exclusive) { ReentrantReadWriteLock lock = getLock(key); if (exclusive) { lock.writeLock().lock(); if (trace) log.tracef("WL acquired for '%s'", key); } else { lock.readLock().lock(); if (trace) log.tracef("RL acquired for...
[ "public", "void", "acquireLock", "(", "Object", "key", ",", "boolean", "exclusive", ")", "{", "ReentrantReadWriteLock", "lock", "=", "getLock", "(", "key", ")", ";", "if", "(", "exclusive", ")", "{", "lock", ".", "writeLock", "(", ")", ".", "lock", "(", ...
Blocks until a lock is acquired. @param exclusive if true, a write (exclusive) lock is attempted, otherwise a read (shared) lock is used.
[ "Blocks", "until", "a", "lock", "is", "acquired", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/util/concurrent/locks/StripedLock.java#L74-L83
facebookarchive/hadoop-20
src/core/org/apache/hadoop/jmx/JMXJsonServlet.java
JMXJsonServlet.renderMBeans
private int renderMBeans(JsonGenerator jg, String[] mBeanNames) throws IOException, MalformedObjectNameException { """ Renders MBean attributes to jg. The queries parameter allows selection of a subset of mbeans. @param jg JsonGenerator that will be written to @param mBeanNames Optional list of mbean ...
java
private int renderMBeans(JsonGenerator jg, String[] mBeanNames) throws IOException, MalformedObjectNameException { jg.writeStartObject(); Set<ObjectName> nameQueries, queriedObjects; nameQueries = new HashSet<ObjectName>(); queriedObjects = new HashSet<ObjectName>(); // if no mbean names pro...
[ "private", "int", "renderMBeans", "(", "JsonGenerator", "jg", ",", "String", "[", "]", "mBeanNames", ")", "throws", "IOException", ",", "MalformedObjectNameException", "{", "jg", ".", "writeStartObject", "(", ")", ";", "Set", "<", "ObjectName", ">", "nameQueries...
Renders MBean attributes to jg. The queries parameter allows selection of a subset of mbeans. @param jg JsonGenerator that will be written to @param mBeanNames Optional list of mbean names to render. If null, every mbean will be returned. @return int Returns the appropriate HTTP status code.
[ "Renders", "MBean", "attributes", "to", "jg", ".", "The", "queries", "parameter", "allows", "selection", "of", "a", "subset", "of", "mbeans", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/jmx/JMXJsonServlet.java#L195-L226
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java
SipApplicationDispatcherImpl.isExternal
public final boolean isExternal(String host, int port, String transport) { """ Check whether or not the triplet host, port and transport are corresponding to an interface @param host can be hostname or ipaddress @param port port number @param transport transport used @return true if the triplet host, port and ...
java
public final boolean isExternal(String host, int port, String transport) { if(logger.isDebugEnabled()) { logger.debug("isExternal - host=" + host + ", port=" + port + ", transport=" + transport); } boolean isExternal = true; MobicentsExtendedListeningPoint listeningPoint = sipNetworkInterfaceManager.findMatc...
[ "public", "final", "boolean", "isExternal", "(", "String", "host", ",", "int", "port", ",", "String", "transport", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"isExternal - host=\"", "+", "host",...
Check whether or not the triplet host, port and transport are corresponding to an interface @param host can be hostname or ipaddress @param port port number @param transport transport used @return true if the triplet host, port and transport are corresponding to an interface false otherwise
[ "Check", "whether", "or", "not", "the", "triplet", "host", "port", "and", "transport", "are", "corresponding", "to", "an", "interface" ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java#L1842-L1866
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/TextBuilder.java
TextBuilder.styledLink
public TextBuilder styledLink(final String text, final TextStyle ts, final Table table) { """ Create a styled link in the current paragraph. @param text the text @param ts the style @param table the destination @return this for fluent style """ this.curParagraphBuilder.styledLink(text, ts, table); ...
java
public TextBuilder styledLink(final String text, final TextStyle ts, final Table table) { this.curParagraphBuilder.styledLink(text, ts, table); return this; }
[ "public", "TextBuilder", "styledLink", "(", "final", "String", "text", ",", "final", "TextStyle", "ts", ",", "final", "Table", "table", ")", "{", "this", ".", "curParagraphBuilder", ".", "styledLink", "(", "text", ",", "ts", ",", "table", ")", ";", "return...
Create a styled link in the current paragraph. @param text the text @param ts the style @param table the destination @return this for fluent style
[ "Create", "a", "styled", "link", "in", "the", "current", "paragraph", "." ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TextBuilder.java#L130-L133
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/codec/HexUtils.java
HexUtils.writeBigInteger
public static void writeBigInteger(BigInteger integer, DataOutputStream out) throws IOException { """ Write a (reasonably short) BigInteger to a stream. @param integer the BigInteger to write @param out the stream to write it to @throws IOException I/O exception """ if (integer.sig...
java
public static void writeBigInteger(BigInteger integer, DataOutputStream out) throws IOException { if (integer.signum() == -1) { throw new IllegalStateException("Negative BigInteger!"); } byte[] buf = integer.toByteArray(); if (buf.length > Short.MAX_VALUE) ...
[ "public", "static", "void", "writeBigInteger", "(", "BigInteger", "integer", ",", "DataOutputStream", "out", ")", "throws", "IOException", "{", "if", "(", "integer", ".", "signum", "(", ")", "==", "-", "1", ")", "{", "throw", "new", "IllegalStateException", ...
Write a (reasonably short) BigInteger to a stream. @param integer the BigInteger to write @param out the stream to write it to @throws IOException I/O exception
[ "Write", "a", "(", "reasonably", "short", ")", "BigInteger", "to", "a", "stream", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/codec/HexUtils.java#L146-L156
BBN-E/bue-common-open
nlp-core-open/src/main/java/com/bbn/nlp/edl/EDLWriter.java
EDLWriter.writeEDLMentions
public void writeEDLMentions(Iterable<EDLMention> edlMentions, CharSink sink) throws IOException { """ Writes out the specified {@link EDLMention}s. If a {@link #defaultKbId} was not specified, an exception will be thrown if any EDL mentions have an absent KB ID. """ final List<String> lines = Lists.newAr...
java
public void writeEDLMentions(Iterable<EDLMention> edlMentions, CharSink sink) throws IOException { final List<String> lines = Lists.newArrayList(); for (final EDLMention edlMention : edlMentions) { lines.add(toLine(edlMention)); } sink.writeLines(lines, "\n"); }
[ "public", "void", "writeEDLMentions", "(", "Iterable", "<", "EDLMention", ">", "edlMentions", ",", "CharSink", "sink", ")", "throws", "IOException", "{", "final", "List", "<", "String", ">", "lines", "=", "Lists", ".", "newArrayList", "(", ")", ";", "for", ...
Writes out the specified {@link EDLMention}s. If a {@link #defaultKbId} was not specified, an exception will be thrown if any EDL mentions have an absent KB ID.
[ "Writes", "out", "the", "specified", "{" ]
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/nlp-core-open/src/main/java/com/bbn/nlp/edl/EDLWriter.java#L41-L49
Alluxio/alluxio
core/common/src/main/java/alluxio/grpc/GrpcServerBuilder.java
GrpcServerBuilder.forAddress
public static GrpcServerBuilder forAddress(String hostName, SocketAddress address, AlluxioConfiguration conf) { """ Create an new instance of {@link GrpcServerBuilder} with authentication support. @param hostName the host name @param address the address @param conf Alluxio configuration @return a new i...
java
public static GrpcServerBuilder forAddress(String hostName, SocketAddress address, AlluxioConfiguration conf) { return new GrpcServerBuilder(hostName, address, null, conf); }
[ "public", "static", "GrpcServerBuilder", "forAddress", "(", "String", "hostName", ",", "SocketAddress", "address", ",", "AlluxioConfiguration", "conf", ")", "{", "return", "new", "GrpcServerBuilder", "(", "hostName", ",", "address", ",", "null", ",", "conf", ")", ...
Create an new instance of {@link GrpcServerBuilder} with authentication support. @param hostName the host name @param address the address @param conf Alluxio configuration @return a new instance of {@link GrpcServerBuilder}
[ "Create", "an", "new", "instance", "of", "{", "@link", "GrpcServerBuilder", "}", "with", "authentication", "support", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/grpc/GrpcServerBuilder.java#L74-L77
JM-Lab/utils-java8
src/main/java/kr/jm/utils/CollectionPrinter.java
CollectionPrinter.mapToJSONString
public static String mapToJSONString(Map<?, ?> map) { """ Map to json string string. @param map the map @return the string """ if (map == null || map.size() == 0) { return "{}"; } StringBuilder sb = new StringBuilder("{"); for (Object o : map.entrySet()) { Entry<?, ?> e = (Entry<?, ?>) o; ...
java
public static String mapToJSONString(Map<?, ?> map) { if (map == null || map.size() == 0) { return "{}"; } StringBuilder sb = new StringBuilder("{"); for (Object o : map.entrySet()) { Entry<?, ?> e = (Entry<?, ?>) o; buildAppendString(sb, e.getKey()).append('='); buildAppendString(sb, e.getValue())....
[ "public", "static", "String", "mapToJSONString", "(", "Map", "<", "?", ",", "?", ">", "map", ")", "{", "if", "(", "map", "==", "null", "||", "map", ".", "size", "(", ")", "==", "0", ")", "{", "return", "\"{}\"", ";", "}", "StringBuilder", "sb", "...
Map to json string string. @param map the map @return the string
[ "Map", "to", "json", "string", "string", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/CollectionPrinter.java#L52-L63
Hygieia/Hygieia
api-audit/src/main/java/com/capitalone/dashboard/evaluator/StaticSecurityAnalysisEvaluator.java
StaticSecurityAnalysisEvaluator.getStaticSecurityScanResponse
private SecurityReviewAuditResponse getStaticSecurityScanResponse(CollectorItem collectorItem, long beginDate, long endDate) { """ Reusable method for constructing the CodeQualityAuditResponse object @param collectorItem Collector Item @param beginDate Begin Date @param endDate End Date @return SecurityRevie...
java
private SecurityReviewAuditResponse getStaticSecurityScanResponse(CollectorItem collectorItem, long beginDate, long endDate) { List<CodeQuality> codeQualities = codeQualityRepository.findByCollectorItemIdAndTimestampIsBetweenOrderByTimestampDesc(collectorItem.getId(), beginDate - 1, endDate + 1); Secur...
[ "private", "SecurityReviewAuditResponse", "getStaticSecurityScanResponse", "(", "CollectorItem", "collectorItem", ",", "long", "beginDate", ",", "long", "endDate", ")", "{", "List", "<", "CodeQuality", ">", "codeQualities", "=", "codeQualityRepository", ".", "findByCollec...
Reusable method for constructing the CodeQualityAuditResponse object @param collectorItem Collector Item @param beginDate Begin Date @param endDate End Date @return SecurityReviewAuditResponse
[ "Reusable", "method", "for", "constructing", "the", "CodeQualityAuditResponse", "object" ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api-audit/src/main/java/com/capitalone/dashboard/evaluator/StaticSecurityAnalysisEvaluator.java#L63-L92
dnsjava/dnsjava
org/xbill/DNS/DNSOutput.java
DNSOutput.writeByteArray
public void writeByteArray(byte [] b, int off, int len) { """ Writes a byte array to the stream. @param b The array to write. @param off The offset of the array to start copying data from. @param len The number of bytes to write. """ need(len); System.arraycopy(b, off, array, pos, len); pos += len; }
java
public void writeByteArray(byte [] b, int off, int len) { need(len); System.arraycopy(b, off, array, pos, len); pos += len; }
[ "public", "void", "writeByteArray", "(", "byte", "[", "]", "b", ",", "int", "off", ",", "int", "len", ")", "{", "need", "(", "len", ")", ";", "System", ".", "arraycopy", "(", "b", ",", "off", ",", "array", ",", "pos", ",", "len", ")", ";", "pos...
Writes a byte array to the stream. @param b The array to write. @param off The offset of the array to start copying data from. @param len The number of bytes to write.
[ "Writes", "a", "byte", "array", "to", "the", "stream", "." ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/DNSOutput.java#L162-L167
LearnLib/learnlib
algorithms/active/ttt/src/main/java/de/learnlib/algorithms/ttt/base/BlockList.java
BlockList.insertBlock
public void insertBlock(AbstractBaseDTNode<I, D> blockRoot) { """ Inserts a block into the list. Currently, the block is inserted at the head of the list. However, callers should not rely on this. @param blockRoot the root node of the block to be inserted """ blockRoot.removeFromBlockList(); ...
java
public void insertBlock(AbstractBaseDTNode<I, D> blockRoot) { blockRoot.removeFromBlockList(); blockRoot.setNextElement(next); if (getNextElement() != null) { next.setPrevElement(blockRoot); } blockRoot.setPrevElement(this); next = blockRoot; }
[ "public", "void", "insertBlock", "(", "AbstractBaseDTNode", "<", "I", ",", "D", ">", "blockRoot", ")", "{", "blockRoot", ".", "removeFromBlockList", "(", ")", ";", "blockRoot", ".", "setNextElement", "(", "next", ")", ";", "if", "(", "getNextElement", "(", ...
Inserts a block into the list. Currently, the block is inserted at the head of the list. However, callers should not rely on this. @param blockRoot the root node of the block to be inserted
[ "Inserts", "a", "block", "into", "the", "list", ".", "Currently", "the", "block", "is", "inserted", "at", "the", "head", "of", "the", "list", ".", "However", "callers", "should", "not", "rely", "on", "this", "." ]
train
https://github.com/LearnLib/learnlib/blob/fa38a14adcc0664099f180d671ffa42480318d7b/algorithms/active/ttt/src/main/java/de/learnlib/algorithms/ttt/base/BlockList.java#L38-L47
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF6.java
CommonOps_DDF6.add
public static void add( DMatrix6 a , DMatrix6 b , DMatrix6 c ) { """ <p>Performs the following operation:<br> <br> c = a + b <br> c<sub>i</sub> = a<sub>i</sub> + b<sub>i</sub> <br> </p> <p> Vector C can be the same instance as Vector A and/or B. </p> @param a A Vector. Not modified. @param b A Vector....
java
public static void add( DMatrix6 a , DMatrix6 b , DMatrix6 c ) { c.a1 = a.a1 + b.a1; c.a2 = a.a2 + b.a2; c.a3 = a.a3 + b.a3; c.a4 = a.a4 + b.a4; c.a5 = a.a5 + b.a5; c.a6 = a.a6 + b.a6; }
[ "public", "static", "void", "add", "(", "DMatrix6", "a", ",", "DMatrix6", "b", ",", "DMatrix6", "c", ")", "{", "c", ".", "a1", "=", "a", ".", "a1", "+", "b", ".", "a1", ";", "c", ".", "a2", "=", "a", ".", "a2", "+", "b", ".", "a2", ";", "...
<p>Performs the following operation:<br> <br> c = a + b <br> c<sub>i</sub> = a<sub>i</sub> + b<sub>i</sub> <br> </p> <p> Vector C can be the same instance as Vector A and/or B. </p> @param a A Vector. Not modified. @param b A Vector. Not modified. @param c A Vector where the results are stored. Modified.
[ "<p", ">", "Performs", "the", "following", "operation", ":", "<br", ">", "<br", ">", "c", "=", "a", "+", "b", "<br", ">", "c<sub", ">", "i<", "/", "sub", ">", "=", "a<sub", ">", "i<", "/", "sub", ">", "+", "b<sub", ">", "i<", "/", "sub", ">",...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF6.java#L101-L108
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/TransformerFactoryImpl.java
TransformerFactoryImpl.processFromNode
javax.xml.transform.Templates processFromNode(Node node, String systemID) throws TransformerConfigurationException { """ Process the stylesheet from a DOM tree, if the processor supports the "http://xml.org/trax/features/dom/input" feature. @param node A DOM tree which must contain valid transform ...
java
javax.xml.transform.Templates processFromNode(Node node, String systemID) throws TransformerConfigurationException { m_DOMsystemID = systemID; return processFromNode(node); }
[ "javax", ".", "xml", ".", "transform", ".", "Templates", "processFromNode", "(", "Node", "node", ",", "String", "systemID", ")", "throws", "TransformerConfigurationException", "{", "m_DOMsystemID", "=", "systemID", ";", "return", "processFromNode", "(", "node", ")...
Process the stylesheet from a DOM tree, if the processor supports the "http://xml.org/trax/features/dom/input" feature. @param node A DOM tree which must contain valid transform instructions that this processor understands. @param systemID The systemID from where xsl:includes and xsl:imports should be resolved from. ...
[ "Process", "the", "stylesheet", "from", "a", "DOM", "tree", "if", "the", "processor", "supports", "the", "http", ":", "//", "xml", ".", "org", "/", "trax", "/", "features", "/", "dom", "/", "input", "feature", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/TransformerFactoryImpl.java#L223-L230
groovy/groovy-core
subprojects/groovy-swing/src/main/groovy/groovy/swing/impl/TableLayout.java
TableLayout.addCell
public void addCell(TableLayoutCell cell) { """ Adds a new cell to the current grid @param cell the td component """ GridBagConstraints constraints = cell.getConstraints(); constraints.insets = new Insets(cellpadding, cellpadding, cellpadding, cellpadding); add(cell.getComponent(), con...
java
public void addCell(TableLayoutCell cell) { GridBagConstraints constraints = cell.getConstraints(); constraints.insets = new Insets(cellpadding, cellpadding, cellpadding, cellpadding); add(cell.getComponent(), constraints); }
[ "public", "void", "addCell", "(", "TableLayoutCell", "cell", ")", "{", "GridBagConstraints", "constraints", "=", "cell", ".", "getConstraints", "(", ")", ";", "constraints", ".", "insets", "=", "new", "Insets", "(", "cellpadding", ",", "cellpadding", ",", "cel...
Adds a new cell to the current grid @param cell the td component
[ "Adds", "a", "new", "cell", "to", "the", "current", "grid" ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/subprojects/groovy-swing/src/main/groovy/groovy/swing/impl/TableLayout.java#L54-L58
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/WorkbinsApi.java
WorkbinsApi.addInteractionToWorkbin
public ApiSuccessResponse addInteractionToWorkbin(String workbinId, AddInteractionToWorkbinData addInteractionToWorkbinData) throws ApiException { """ Add an Interaction to a workbin @param workbinId Id of the Workbin (required) @param addInteractionToWorkbinData (required) @return ApiSuccessResponse @throw...
java
public ApiSuccessResponse addInteractionToWorkbin(String workbinId, AddInteractionToWorkbinData addInteractionToWorkbinData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = addInteractionToWorkbinWithHttpInfo(workbinId, addInteractionToWorkbinData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "addInteractionToWorkbin", "(", "String", "workbinId", ",", "AddInteractionToWorkbinData", "addInteractionToWorkbinData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "addInteractionToWorkbinWith...
Add an Interaction to a workbin @param workbinId Id of the Workbin (required) @param addInteractionToWorkbinData (required) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Add", "an", "Interaction", "to", "a", "workbin" ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/WorkbinsApi.java#L145-L148
gwtbootstrap3/gwtbootstrap3
gwtbootstrap3/src/main/java/org/gwtbootstrap3/client/ui/base/helper/StyleHelper.java
StyleHelper.setVisibleOn
public static void setVisibleOn(final UIObject uiObject, final DeviceSize deviceSize) { """ Sets the ui object to be visible on the device size @param uiObject object to be visible on the device size @param deviceSize device size """ // Split the enum up by _ t...
java
public static void setVisibleOn(final UIObject uiObject, final DeviceSize deviceSize) { // Split the enum up by _ to get the different devices // Separates the SM_MD into [SM, MD] so we can add the right styles final String[] deviceString = deviceSize.name().s...
[ "public", "static", "void", "setVisibleOn", "(", "final", "UIObject", "uiObject", ",", "final", "DeviceSize", "deviceSize", ")", "{", "// Split the enum up by _ to get the different devices", "// Separates the SM_MD into [SM, MD] so we can add the right styles", "final", "String", ...
Sets the ui object to be visible on the device size @param uiObject object to be visible on the device size @param deviceSize device size
[ "Sets", "the", "ui", "object", "to", "be", "visible", "on", "the", "device", "size" ]
train
https://github.com/gwtbootstrap3/gwtbootstrap3/blob/54bdbd0b12ba7a436b278c007df960d1adf2e641/gwtbootstrap3/src/main/java/org/gwtbootstrap3/client/ui/base/helper/StyleHelper.java#L182-L211
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRVertexBuffer.java
GVRVertexBuffer.setIntArray
public void setIntArray(String attributeName, int[] data) { """ Updates a vertex attribute from an integer array. All of the entries of the input integer array are copied into the storage for the named vertex attribute. Other vertex attributes are not affected. The attribute name must be one of the attributes ...
java
public void setIntArray(String attributeName, int[] data) { if (!NativeVertexBuffer.setIntArray(getNative(), attributeName, data, 0, 0)) { throw new IllegalArgumentException("Attribute name " + attributeName + " cannot be updated"); } }
[ "public", "void", "setIntArray", "(", "String", "attributeName", ",", "int", "[", "]", "data", ")", "{", "if", "(", "!", "NativeVertexBuffer", ".", "setIntArray", "(", "getNative", "(", ")", ",", "attributeName", ",", "data", ",", "0", ",", "0", ")", "...
Updates a vertex attribute from an integer array. All of the entries of the input integer array are copied into the storage for the named vertex attribute. Other vertex attributes are not affected. The attribute name must be one of the attributes named in the descriptor passed to the constructor. <p> All vertex attribu...
[ "Updates", "a", "vertex", "attribute", "from", "an", "integer", "array", ".", "All", "of", "the", "entries", "of", "the", "input", "integer", "array", "are", "copied", "into", "the", "storage", "for", "the", "named", "vertex", "attribute", ".", "Other", "v...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRVertexBuffer.java#L254-L260
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/util/MultimapJoiner.java
MultimapJoiner.appendTo
public <A extends Appendable> A appendTo(A appendable, Map<?, ? extends Collection<?>> map) throws IOException { """ Appends the string representation of each entry of {@code map}, using the previously configured separator and key-value separator, to {@code appendable}. """ return appendTo(appendable, map.e...
java
public <A extends Appendable> A appendTo(A appendable, Map<?, ? extends Collection<?>> map) throws IOException { return appendTo(appendable, map.entrySet()); }
[ "public", "<", "A", "extends", "Appendable", ">", "A", "appendTo", "(", "A", "appendable", ",", "Map", "<", "?", ",", "?", "extends", "Collection", "<", "?", ">", ">", "map", ")", "throws", "IOException", "{", "return", "appendTo", "(", "appendable", "...
Appends the string representation of each entry of {@code map}, using the previously configured separator and key-value separator, to {@code appendable}.
[ "Appends", "the", "string", "representation", "of", "each", "entry", "of", "{" ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/util/MultimapJoiner.java#L53-L55
op4j/op4j
src/main/java/org/op4j/functions/FnString.java
FnString.toBigInteger
public static final Function<String,BigInteger> toBigInteger(final RoundingMode roundingMode, final Locale locale) { """ <p> Converts a String into a BigInteger, using the specified locale for determining decimal point. Rounding mode is used for removing the decimal part of the number. Any fractional part of t...
java
public static final Function<String,BigInteger> toBigInteger(final RoundingMode roundingMode, final Locale locale) { return new ToBigInteger(roundingMode, locale); }
[ "public", "static", "final", "Function", "<", "String", ",", "BigInteger", ">", "toBigInteger", "(", "final", "RoundingMode", "roundingMode", ",", "final", "Locale", "locale", ")", "{", "return", "new", "ToBigInteger", "(", "roundingMode", ",", "locale", ")", ...
<p> Converts a String into a BigInteger, using the specified locale for determining decimal point. Rounding mode is used for removing the decimal part of the number. Any fractional part of the input String will be removed. </p> @param roundingMode the rounding mode to be used when setting the scale @param locale the l...
[ "<p", ">", "Converts", "a", "String", "into", "a", "BigInteger", "using", "the", "specified", "locale", "for", "determining", "decimal", "point", ".", "Rounding", "mode", "is", "used", "for", "removing", "the", "decimal", "part", "of", "the", "number", ".", ...
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/functions/FnString.java#L383-L385
gosu-lang/gosu-lang
gosu-core/src/main/java/gw/internal/gosu/parser/ContextSensitiveCodeRunner.java
ContextSensitiveCodeRunner.runMeSomeCode
public static Object runMeSomeCode( Object enclosingInstance, ClassLoader cl, Object[] extSyms, String strText, final String strClassContext, String strContextElementClass, int iSourcePosition ) { """ Intended for use with a debugger to evaluate arbitrary expressions/programs in the context of a source position b...
java
public static Object runMeSomeCode( Object enclosingInstance, ClassLoader cl, Object[] extSyms, String strText, final String strClassContext, String strContextElementClass, int iSourcePosition ) { // Must execute in caller's classloader try { Class<?> cls; try { cls = Class.forN...
[ "public", "static", "Object", "runMeSomeCode", "(", "Object", "enclosingInstance", ",", "ClassLoader", "cl", ",", "Object", "[", "]", "extSyms", ",", "String", "strText", ",", "final", "String", "strClassContext", ",", "String", "strContextElementClass", ",", "int...
Intended for use with a debugger to evaluate arbitrary expressions/programs in the context of a source position being debugged, usually at a breakpoint. @param enclosingInstance The instance of the object immediately enclosing the source position. @param extSyms An array of adjacent name/value pairs corresponding with...
[ "Intended", "for", "use", "with", "a", "debugger", "to", "evaluate", "arbitrary", "expressions", "/", "programs", "in", "the", "context", "of", "a", "source", "position", "being", "debugged", "usually", "at", "a", "breakpoint", "." ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core/src/main/java/gw/internal/gosu/parser/ContextSensitiveCodeRunner.java#L75-L104
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java
ModulusSubstitution.doSubstitution
public void doSubstitution(long number, StringBuilder toInsertInto, int position, int recursionCount) { """ If this is a &gt;&gt;&gt; substitution, use ruleToUse to fill in the substitution. Otherwise, just use the superclass function. @param number The number being formatted @param toInsertInto The string to ...
java
public void doSubstitution(long number, StringBuilder toInsertInto, int position, int recursionCount) { // if this isn't a >>> substitution, just use the inherited version // of this function (which uses either a rule set or a DecimalFormat // to format its substitution value) if (ruleTo...
[ "public", "void", "doSubstitution", "(", "long", "number", ",", "StringBuilder", "toInsertInto", ",", "int", "position", ",", "int", "recursionCount", ")", "{", "// if this isn't a >>> substitution, just use the inherited version", "// of this function (which uses either a rule s...
If this is a &gt;&gt;&gt; substitution, use ruleToUse to fill in the substitution. Otherwise, just use the superclass function. @param number The number being formatted @param toInsertInto The string to insert the result of this substitution into @param position The position of the rule text in toInsertInto
[ "If", "this", "is", "a", "&gt", ";", "&gt", ";", "&gt", ";", "substitution", "use", "ruleToUse", "to", "fill", "in", "the", "substitution", ".", "Otherwise", "just", "use", "the", "superclass", "function", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java#L879-L892
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java
PerspectiveOps.pinholeToMatrix
public static DMatrix3x3 pinholeToMatrix(CameraPinhole param , DMatrix3x3 K ) { """ Given the intrinsic parameters create a calibration matrix @param param Intrinsic parameters structure that is to be converted into a matrix @param K Storage for calibration matrix, must be 3x3. If null then a new matrix is de...
java
public static DMatrix3x3 pinholeToMatrix(CameraPinhole param , DMatrix3x3 K ) { return ImplPerspectiveOps_F64.pinholeToMatrix(param, K); }
[ "public", "static", "DMatrix3x3", "pinholeToMatrix", "(", "CameraPinhole", "param", ",", "DMatrix3x3", "K", ")", "{", "return", "ImplPerspectiveOps_F64", ".", "pinholeToMatrix", "(", "param", ",", "K", ")", ";", "}" ]
Given the intrinsic parameters create a calibration matrix @param param Intrinsic parameters structure that is to be converted into a matrix @param K Storage for calibration matrix, must be 3x3. If null then a new matrix is declared @return Calibration matrix 3x3
[ "Given", "the", "intrinsic", "parameters", "create", "a", "calibration", "matrix" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java#L283-L286
moparisthebest/beehive
beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/ControlBeanContext.java
ControlBeanContext.resolveDefaultBinding
public static String resolveDefaultBinding( String implBinding, String controlClass ) { """ Implements the default control implementation binding algorithm ( <InterfaceName> + "Impl" ). See documentation for the org.apache.beehive.controls.api.bean.ControlInterface annotation. @param implBinding the value of ...
java
public static String resolveDefaultBinding( String implBinding, String controlClass ) { return ControlUtils.resolveDefaultBinding(implBinding, controlClass); }
[ "public", "static", "String", "resolveDefaultBinding", "(", "String", "implBinding", ",", "String", "controlClass", ")", "{", "return", "ControlUtils", ".", "resolveDefaultBinding", "(", "implBinding", ",", "controlClass", ")", ";", "}" ]
Implements the default control implementation binding algorithm ( <InterfaceName> + "Impl" ). See documentation for the org.apache.beehive.controls.api.bean.ControlInterface annotation. @param implBinding the value of the defaultBinding attribute returned from a ControlInterface annotation @param controlClass the act...
[ "Implements", "the", "default", "control", "implementation", "binding", "algorithm", "(", "<InterfaceName", ">", "+", "Impl", ")", ".", "See", "documentation", "for", "the", "org", ".", "apache", ".", "beehive", ".", "controls", ".", "api", ".", "bean", ".",...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/ControlBeanContext.java#L999-L1002
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-frontend/sharding-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/frontend/mysql/MySQLErrPacketFactory.java
MySQLErrPacketFactory.newInstance
public static MySQLErrPacket newInstance(final int sequenceId, final Exception cause) { """ New instance of MytSQL ERR packet. @param sequenceId sequence ID @param cause cause @return instance of MySQL ERR packet """ if (cause instanceof SQLException) { SQLException sqlException = (SQL...
java
public static MySQLErrPacket newInstance(final int sequenceId, final Exception cause) { if (cause instanceof SQLException) { SQLException sqlException = (SQLException) cause; return new MySQLErrPacket(sequenceId, sqlException.getErrorCode(), sqlException.getSQLState(), sqlException.getMe...
[ "public", "static", "MySQLErrPacket", "newInstance", "(", "final", "int", "sequenceId", ",", "final", "Exception", "cause", ")", "{", "if", "(", "cause", "instanceof", "SQLException", ")", "{", "SQLException", "sqlException", "=", "(", "SQLException", ")", "caus...
New instance of MytSQL ERR packet. @param sequenceId sequence ID @param cause cause @return instance of MySQL ERR packet
[ "New", "instance", "of", "MytSQL", "ERR", "packet", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-frontend/sharding-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/frontend/mysql/MySQLErrPacketFactory.java#L48-L67
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AlignedBox3f.java
AlignedBox3f.set
@Override public void set(Point3D min, Point3D max) { """ Change the frame of the box. @param min is the min corner of the box. @param max is the max corner of the box. """ setFromCorners( min.getX(), min.getY(), min.getZ(), max.getX(), max.getY(), max.getZ()); }
java
@Override public void set(Point3D min, Point3D max) { setFromCorners( min.getX(), min.getY(), min.getZ(), max.getX(), max.getY(), max.getZ()); }
[ "@", "Override", "public", "void", "set", "(", "Point3D", "min", ",", "Point3D", "max", ")", "{", "setFromCorners", "(", "min", ".", "getX", "(", ")", ",", "min", ".", "getY", "(", ")", ",", "min", ".", "getZ", "(", ")", ",", "max", ".", "getX", ...
Change the frame of the box. @param min is the min corner of the box. @param max is the max corner of the box.
[ "Change", "the", "frame", "of", "the", "box", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AlignedBox3f.java#L245-L250
grpc/grpc-java
core/src/main/java/io/grpc/internal/Http2ClientStreamTransportState.java
Http2ClientStreamTransportState.transportDataReceived
protected void transportDataReceived(ReadableBuffer frame, boolean endOfStream) { """ Called by subclasses whenever a data frame is received from the transport. @param frame the received data frame @param endOfStream {@code true} if there will be no more data received for this stream """ if (transportE...
java
protected void transportDataReceived(ReadableBuffer frame, boolean endOfStream) { if (transportError != null) { // We've already detected a transport error and now we're just accumulating more detail // for it. transportError = transportError.augmentDescription("DATA-----------------------------\n...
[ "protected", "void", "transportDataReceived", "(", "ReadableBuffer", "frame", ",", "boolean", "endOfStream", ")", "{", "if", "(", "transportError", "!=", "null", ")", "{", "// We've already detected a transport error and now we're just accumulating more detail", "// for it.", ...
Called by subclasses whenever a data frame is received from the transport. @param frame the received data frame @param endOfStream {@code true} if there will be no more data received for this stream
[ "Called", "by", "subclasses", "whenever", "a", "data", "frame", "is", "received", "from", "the", "transport", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/core/src/main/java/io/grpc/internal/Http2ClientStreamTransportState.java#L129-L156
undertow-io/undertow
core/src/main/java/io/undertow/server/HttpServerExchange.java
HttpServerExchange.getRequestChannel
public StreamSourceChannel getRequestChannel() { """ Get the inbound request. If there is no request body, calling this method may cause the next request to immediately be processed. The {@link StreamSourceChannel#close()} or {@link StreamSourceChannel#shutdownReads()} method must be called at some point after...
java
public StreamSourceChannel getRequestChannel() { if (requestChannel != null) { if(anyAreSet(state, FLAG_REQUEST_RESET)) { state &= ~FLAG_REQUEST_RESET; return requestChannel; } return null; } if (anyAreSet(state, FLAG_REQUEST_TE...
[ "public", "StreamSourceChannel", "getRequestChannel", "(", ")", "{", "if", "(", "requestChannel", "!=", "null", ")", "{", "if", "(", "anyAreSet", "(", "state", ",", "FLAG_REQUEST_RESET", ")", ")", "{", "state", "&=", "~", "FLAG_REQUEST_RESET", ";", "return", ...
Get the inbound request. If there is no request body, calling this method may cause the next request to immediately be processed. The {@link StreamSourceChannel#close()} or {@link StreamSourceChannel#shutdownReads()} method must be called at some point after the request is processed to prevent resource leakage and to...
[ "Get", "the", "inbound", "request", ".", "If", "there", "is", "no", "request", "body", "calling", "this", "method", "may", "cause", "the", "next", "request", "to", "immediately", "be", "processed", ".", "The", "{", "@link", "StreamSourceChannel#close", "()", ...
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/server/HttpServerExchange.java#L1194-L1213
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java
NodeIndexer.addStringValue
protected void addStringValue(Document doc, String fieldName, Object internalValue, boolean tokenized) { """ Adds the string value to the document both as the named field and optionally for full text indexing if <code>tokenized</code> is <code>true</code>. @param doc The document to which to add the...
java
protected void addStringValue(Document doc, String fieldName, Object internalValue, boolean tokenized) { addStringValue(doc, fieldName, internalValue, tokenized, true, DEFAULT_BOOST, true); }
[ "protected", "void", "addStringValue", "(", "Document", "doc", ",", "String", "fieldName", ",", "Object", "internalValue", ",", "boolean", "tokenized", ")", "{", "addStringValue", "(", "doc", ",", "fieldName", ",", "internalValue", ",", "tokenized", ",", "true",...
Adds the string value to the document both as the named field and optionally for full text indexing if <code>tokenized</code> is <code>true</code>. @param doc The document to which to add the field @param fieldName The name of the field to add @param internalValue The value for the field to add to the do...
[ "Adds", "the", "string", "value", "to", "the", "document", "both", "as", "the", "named", "field", "and", "optionally", "for", "full", "text", "indexing", "if", "<code", ">", "tokenized<", "/", "code", ">", "is", "<code", ">", "true<", "/", "code", ">", ...
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java#L824-L827
aws/aws-sdk-java
aws-java-sdk-simpledb/src/main/java/com/amazonaws/services/simpledb/util/SimpleDBUtils.java
SimpleDBUtils.encodeRealNumberRange
public static String encodeRealNumberRange(int number, int maxNumDigits, int offsetValue) { """ Encodes real integer value into a string by offsetting and zero-padding number up to the specified number of digits. Use this encoding method if the data range set includes both positive and negative values. @param...
java
public static String encodeRealNumberRange(int number, int maxNumDigits, int offsetValue) { long offsetNumber = number + offsetValue; String longString = Long.toString(offsetNumber); int numZeroes = maxNumDigits - longString.length(); StringBuffer strBuffer = new StringBuffer(numZeroes +...
[ "public", "static", "String", "encodeRealNumberRange", "(", "int", "number", ",", "int", "maxNumDigits", ",", "int", "offsetValue", ")", "{", "long", "offsetNumber", "=", "number", "+", "offsetValue", ";", "String", "longString", "=", "Long", ".", "toString", ...
Encodes real integer value into a string by offsetting and zero-padding number up to the specified number of digits. Use this encoding method if the data range set includes both positive and negative values. @param number integer to be encoded @param maxNumDigits maximum number of digits in the largest absolute value ...
[ "Encodes", "real", "integer", "value", "into", "a", "string", "by", "offsetting", "and", "zero", "-", "padding", "number", "up", "to", "the", "specified", "number", "of", "digits", ".", "Use", "this", "encoding", "method", "if", "the", "data", "range", "se...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-simpledb/src/main/java/com/amazonaws/services/simpledb/util/SimpleDBUtils.java#L146-L156
bbottema/simple-java-mail
modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageHelper.java
MimeMessageHelper.setRecipients
static void setRecipients(final Email email, final Message message) throws UnsupportedEncodingException, MessagingException { """ Fills the {@link Message} instance with recipients from the {@link Email}. @param email The message in which the recipients are defined. @param message The javax message that n...
java
static void setRecipients(final Email email, final Message message) throws UnsupportedEncodingException, MessagingException { for (final Recipient recipient : email.getRecipients()) { final Address address = new InternetAddress(recipient.getAddress(), recipient.getName(), CHARACTER_ENCODING); message.addReci...
[ "static", "void", "setRecipients", "(", "final", "Email", "email", ",", "final", "Message", "message", ")", "throws", "UnsupportedEncodingException", ",", "MessagingException", "{", "for", "(", "final", "Recipient", "recipient", ":", "email", ".", "getRecipients", ...
Fills the {@link Message} instance with recipients from the {@link Email}. @param email The message in which the recipients are defined. @param message The javax message that needs to be filled with recipients. @throws UnsupportedEncodingException See {@link InternetAddress#InternetAddress(String, String)}. @throws ...
[ "Fills", "the", "{", "@link", "Message", "}", "instance", "with", "recipients", "from", "the", "{", "@link", "Email", "}", "." ]
train
https://github.com/bbottema/simple-java-mail/blob/b03635328aeecd525e35eddfef8f5b9a184559d8/modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageHelper.java#L63-L69
micronaut-projects/micronaut-core
inject/src/main/java/io/micronaut/context/DefaultBeanContext.java
DefaultBeanContext.getActiveBeanRegistration
@Nullable protected <T> BeanRegistration<T> getActiveBeanRegistration(BeanDefinition<T> beanDefinition, Qualifier qualifier) { """ Find an active {@link javax.inject.Singleton} bean for the given definition and qualifier. @param beanDefinition The bean definition @param qualifier The qualifier @param...
java
@Nullable protected <T> BeanRegistration<T> getActiveBeanRegistration(BeanDefinition<T> beanDefinition, Qualifier qualifier) { if (beanDefinition == null) { return null; } return singletonObjects.get(new BeanKey(beanDefinition, qualifier)); }
[ "@", "Nullable", "protected", "<", "T", ">", "BeanRegistration", "<", "T", ">", "getActiveBeanRegistration", "(", "BeanDefinition", "<", "T", ">", "beanDefinition", ",", "Qualifier", "qualifier", ")", "{", "if", "(", "beanDefinition", "==", "null", ")", "{", ...
Find an active {@link javax.inject.Singleton} bean for the given definition and qualifier. @param beanDefinition The bean definition @param qualifier The qualifier @param <T> The bean generic type @return The bean registration
[ "Find", "an", "active", "{", "@link", "javax", ".", "inject", ".", "Singleton", "}", "bean", "for", "the", "given", "definition", "and", "qualifier", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/context/DefaultBeanContext.java#L787-L793
google/closure-templates
java/src/com/google/template/soy/shared/internal/AbstractGenerateSoyEscapingDirectiveCode.java
AbstractGenerateSoyEscapingDirectiveCode.escapeRegexpRangeOnto
private static void escapeRegexpRangeOnto(char start, char end, StringBuilder out) { """ Appends a RegExp character range set onto the given buffer. E.g. given the letters 'a' and 'z' as start and end, appends {@code a-z}. These are meant to be concatenated to create character sets like {@code /[a-zA-Z0-9]/}. Th...
java
private static void escapeRegexpRangeOnto(char start, char end, StringBuilder out) { if (!isPrintable(start)) { out.append(String.format(start >= 0x100 ? "\\u%04x" : "\\x%02x", (int) start)); } else { out.append(EscapingConventions.EscapeJsRegex.INSTANCE.escape(String.valueOf(start))); } if ...
[ "private", "static", "void", "escapeRegexpRangeOnto", "(", "char", "start", ",", "char", "end", ",", "StringBuilder", "out", ")", "{", "if", "(", "!", "isPrintable", "(", "start", ")", ")", "{", "out", ".", "append", "(", "String", ".", "format", "(", ...
Appends a RegExp character range set onto the given buffer. E.g. given the letters 'a' and 'z' as start and end, appends {@code a-z}. These are meant to be concatenated to create character sets like {@code /[a-zA-Z0-9]/}. This method will omit unnecessary ends or range separators.
[ "Appends", "a", "RegExp", "character", "range", "set", "onto", "the", "given", "buffer", ".", "E", ".", "g", ".", "given", "the", "letters", "a", "and", "z", "as", "start", "and", "end", "appends", "{" ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/shared/internal/AbstractGenerateSoyEscapingDirectiveCode.java#L476-L493
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/bcp/PatternElement.java
PatternElement.lookup
public static Variable lookup(String varName, BindingSet bindingSet) { """ Look up a variable definition in given BindingSet. @param varName the name of the variable @param bindingSet the BindingSet to look in @return the Variable, or null if no Variable is bound to the name """ if (bindingSet =...
java
public static Variable lookup(String varName, BindingSet bindingSet) { if (bindingSet == null) { return null; } Binding binding = bindingSet.lookup(varName); return (binding != null) ? binding.getVariable() : null; }
[ "public", "static", "Variable", "lookup", "(", "String", "varName", ",", "BindingSet", "bindingSet", ")", "{", "if", "(", "bindingSet", "==", "null", ")", "{", "return", "null", ";", "}", "Binding", "binding", "=", "bindingSet", ".", "lookup", "(", "varNam...
Look up a variable definition in given BindingSet. @param varName the name of the variable @param bindingSet the BindingSet to look in @return the Variable, or null if no Variable is bound to the name
[ "Look", "up", "a", "variable", "definition", "in", "given", "BindingSet", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/bcp/PatternElement.java#L140-L146
OpenLiberty/open-liberty
dev/com.ibm.ws.httpservice/src/com/ibm/ws/httpsvc/session/internal/SessionInfo.java
SessionInfo.parseIDFromURL
private void parseIDFromURL(RequestMessage request) { """ Look for the possible session ID in the URL of the input request message. @param request """ if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Looking for ID in URL"); } String url =...
java
private void parseIDFromURL(RequestMessage request) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Looking for ID in URL"); } String url = request.getRawRequestURI(); String target = getSessionConfig().getURLRewritingMarker(); URLPa...
[ "private", "void", "parseIDFromURL", "(", "RequestMessage", "request", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "{", "Tr", ".", "debug", "(", "tc", ",", "\"Looking for ID i...
Look for the possible session ID in the URL of the input request message. @param request
[ "Look", "for", "the", "possible", "session", "ID", "in", "the", "URL", "of", "the", "input", "request", "message", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.httpservice/src/com/ibm/ws/httpsvc/session/internal/SessionInfo.java#L88-L107
jbundle/jbundle
base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HImageView.java
HImageView.printInputControl
public void printInputControl(PrintWriter out, String strFieldDesc, String strFieldName, String strSize, String strMaxSize, String strValue, String strControlType, int iHtmlAttributes) { """ display this field in html input format. @param out The html out stream. @param strFieldDesc The field description. @para...
java
public void printInputControl(PrintWriter out, String strFieldDesc, String strFieldName, String strSize, String strMaxSize, String strValue, String strControlType, int iHtmlAttributes) { String strImagePath = this.getZmlImagePath(); if (strImagePath == null) strImagePath = "<img src=\"" ...
[ "public", "void", "printInputControl", "(", "PrintWriter", "out", ",", "String", "strFieldDesc", ",", "String", "strFieldName", ",", "String", "strSize", ",", "String", "strMaxSize", ",", "String", "strValue", ",", "String", "strControlType", ",", "int", "iHtmlAtt...
display this field in html input format. @param out The html out stream. @param strFieldDesc The field description. @param strFieldName The field name. @param strSize The control size. @param strMaxSize The string max size. @param strValue The default value. @param strControlType The control type. @param iHtmlAttribure...
[ "display", "this", "field", "in", "html", "input", "format", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HImageView.java#L69-L77