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
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelResource.java
TunnelResource.getStream
@Path("streams/ { """ Intercepts and returns the entire contents of a specific stream. @param streamIndex The index of the stream to intercept. @param mediaType The media type (mimetype) of the data within the stream. @param filename The filename to use for the sake of identifying the data returned. ...
java
@Path("streams/{index}/{filename}") public StreamResource getStream(@PathParam("index") final int streamIndex, @QueryParam("type") @DefaultValue(DEFAULT_MEDIA_TYPE) String mediaType, @PathParam("filename") String filename) throws GuacamoleException { return new StreamRes...
[ "@", "Path", "(", "\"streams/{index}/{filename}\"", ")", "public", "StreamResource", "getStream", "(", "@", "PathParam", "(", "\"index\"", ")", "final", "int", "streamIndex", ",", "@", "QueryParam", "(", "\"type\"", ")", "@", "DefaultValue", "(", "DEFAULT_MEDIA_TY...
Intercepts and returns the entire contents of a specific stream. @param streamIndex The index of the stream to intercept. @param mediaType The media type (mimetype) of the data within the stream. @param filename The filename to use for the sake of identifying the data returned. @return A response through which the ...
[ "Intercepts", "and", "returns", "the", "entire", "contents", "of", "a", "specific", "stream", "." ]
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelResource.java#L129-L137
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/internal/LettuceAssert.java
LettuceAssert.notEmpty
public static void notEmpty(String string, String message) { """ Assert that a string is not empty, it must not be {@code null} and it must not be empty. @param string the object to check @param message the exception message to use if the assertion fails @throws IllegalArgumentException if the object is {@cod...
java
public static void notEmpty(String string, String message) { if (LettuceStrings.isEmpty(string)) { throw new IllegalArgumentException(message); } }
[ "public", "static", "void", "notEmpty", "(", "String", "string", ",", "String", "message", ")", "{", "if", "(", "LettuceStrings", ".", "isEmpty", "(", "string", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "message", ")", ";", "}", "}" ]
Assert that a string is not empty, it must not be {@code null} and it must not be empty. @param string the object to check @param message the exception message to use if the assertion fails @throws IllegalArgumentException if the object is {@code null} or the underlying string is empty
[ "Assert", "that", "a", "string", "is", "not", "empty", "it", "must", "not", "be", "{", "@code", "null", "}", "and", "it", "must", "not", "be", "empty", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/internal/LettuceAssert.java#L43-L47
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.assertTrueOrUnknownPropertyInJQLException
public static void assertTrueOrUnknownPropertyInJQLException(boolean expression, JQLContext method, String columnName) { """ Assert true or unknown property in JQL exception. @param expression the expression @param method the method @param columnName the column name """ if (!expression) { throw...
java
public static void assertTrueOrUnknownPropertyInJQLException(boolean expression, JQLContext method, String columnName) { if (!expression) { throw (new UnknownPropertyInJQLException(method, columnName)); } }
[ "public", "static", "void", "assertTrueOrUnknownPropertyInJQLException", "(", "boolean", "expression", ",", "JQLContext", "method", ",", "String", "columnName", ")", "{", "if", "(", "!", "expression", ")", "{", "throw", "(", "new", "UnknownPropertyInJQLException", "...
Assert true or unknown property in JQL exception. @param expression the expression @param method the method @param columnName the column name
[ "Assert", "true", "or", "unknown", "property", "in", "JQL", "exception", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L257-L263
molgenis/molgenis
molgenis-data/src/main/java/org/molgenis/data/meta/AttributeRepositoryDecorator.java
AttributeRepositoryDecorator.updateAttributeInBackend
private void updateAttributeInBackend(Attribute attr, Attribute updatedAttr) { """ Updates an attribute's representation in the backend for each concrete {@link EntityType} that has the {@link Attribute}. @param attr current version of the attribute @param updatedAttr new version of the attribute """ ...
java
private void updateAttributeInBackend(Attribute attr, Attribute updatedAttr) { MetaDataService meta = dataService.getMeta(); meta.getConcreteChildren(attr.getEntity()) .forEach( entityType -> meta.getBackend(entityType).updateAttribute(entityType, attr, updatedAttr)); }
[ "private", "void", "updateAttributeInBackend", "(", "Attribute", "attr", ",", "Attribute", "updatedAttr", ")", "{", "MetaDataService", "meta", "=", "dataService", ".", "getMeta", "(", ")", ";", "meta", ".", "getConcreteChildren", "(", "attr", ".", "getEntity", "...
Updates an attribute's representation in the backend for each concrete {@link EntityType} that has the {@link Attribute}. @param attr current version of the attribute @param updatedAttr new version of the attribute
[ "Updates", "an", "attribute", "s", "representation", "in", "the", "backend", "for", "each", "concrete", "{", "@link", "EntityType", "}", "that", "has", "the", "{", "@link", "Attribute", "}", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data/src/main/java/org/molgenis/data/meta/AttributeRepositoryDecorator.java#L51-L57
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java
RuntimeExceptionsFactory.newIllegalArgumentException
public static IllegalArgumentException newIllegalArgumentException(Throwable cause, String message, Object... args) { """ Constructs and initializes a new {@link IllegalArgumentException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @par...
java
public static IllegalArgumentException newIllegalArgumentException(Throwable cause, String message, Object... args) { return new IllegalArgumentException(format(message, args), cause); }
[ "public", "static", "IllegalArgumentException", "newIllegalArgumentException", "(", "Throwable", "cause", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "new", "IllegalArgumentException", "(", "format", "(", "message", ",", "args", ")", ...
Constructs and initializes a new {@link IllegalArgumentException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throwable} identified as the reason this {@link IllegalArgumentException} was thrown. @param message {@link String...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "IllegalArgumentException", "}", "with", "the", "given", "{", "@link", "Throwable", "cause", "}", "and", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", ...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java#L62-L64
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java
ValueEnforcer.notEmpty
@CodingStyleguideUnaware public static <T extends Map <?, ?>> T notEmpty (final T aValue, final String sName) { """ Check that the passed Collection is neither <code>null</code> nor empty. @param <T> Type to be checked and returned @param aValue The String to check. @param sName The name of the value (e....
java
@CodingStyleguideUnaware public static <T extends Map <?, ?>> T notEmpty (final T aValue, final String sName) { if (isEnabled ()) return notEmpty (aValue, () -> sName); return aValue; }
[ "@", "CodingStyleguideUnaware", "public", "static", "<", "T", "extends", "Map", "<", "?", ",", "?", ">", ">", "T", "notEmpty", "(", "final", "T", "aValue", ",", "final", "String", "sName", ")", "{", "if", "(", "isEnabled", "(", ")", ")", "return", "n...
Check that the passed Collection is neither <code>null</code> nor empty. @param <T> Type to be checked and returned @param aValue The String to check. @param sName The name of the value (e.g. the parameter name) @return The passed value. @throws IllegalArgumentException if the passed value is empty
[ "Check", "that", "the", "passed", "Collection", "is", "neither", "<code", ">", "null<", "/", "code", ">", "nor", "empty", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java#L826-L832
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/interactions/Actions.java
Actions.dragAndDropBy
public Actions dragAndDropBy(WebElement source, int xOffset, int yOffset) { """ A convenience method that performs click-and-hold at the location of the source element, moves by a given offset, then releases the mouse. @param source element to emulate button down at. @param xOffset horizontal move offset. @p...
java
public Actions dragAndDropBy(WebElement source, int xOffset, int yOffset) { if (isBuildingActions()) { action.addAction(new ClickAndHoldAction(jsonMouse, (Locatable) source)); action.addAction(new MoveToOffsetAction(jsonMouse, null, xOffset, yOffset)); action.addAction(new ButtonReleaseAction(json...
[ "public", "Actions", "dragAndDropBy", "(", "WebElement", "source", ",", "int", "xOffset", ",", "int", "yOffset", ")", "{", "if", "(", "isBuildingActions", "(", ")", ")", "{", "action", ".", "addAction", "(", "new", "ClickAndHoldAction", "(", "jsonMouse", ","...
A convenience method that performs click-and-hold at the location of the source element, moves by a given offset, then releases the mouse. @param source element to emulate button down at. @param xOffset horizontal move offset. @param yOffset vertical move offset. @return A self reference.
[ "A", "convenience", "method", "that", "performs", "click", "-", "and", "-", "hold", "at", "the", "location", "of", "the", "source", "element", "moves", "by", "a", "given", "offset", "then", "releases", "the", "mouse", "." ]
train
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/interactions/Actions.java#L470-L481
kiegroup/drools
drools-core/src/main/java/org/drools/core/factmodel/DefaultBeanClassBuilder.java
DefaultBeanClassBuilder.initializeDynamicTypeStructures
protected void initializeDynamicTypeStructures( MethodVisitor mv, ClassDefinition classDef) { """ Initializes the trait map and dynamic property map to empty values @param mv @param classDef """ if ( classDef.isFullTraiting() ) { mv.visitVarInsn( ALOAD, 0 ); mv.visitTypeInsn(...
java
protected void initializeDynamicTypeStructures( MethodVisitor mv, ClassDefinition classDef) { if ( classDef.isFullTraiting() ) { mv.visitVarInsn( ALOAD, 0 ); mv.visitTypeInsn( NEW, Type.getInternalName( TraitFieldTMSImpl.class ) ); mv.visitInsn( DUP ); mv.visitMe...
[ "protected", "void", "initializeDynamicTypeStructures", "(", "MethodVisitor", "mv", ",", "ClassDefinition", "classDef", ")", "{", "if", "(", "classDef", ".", "isFullTraiting", "(", ")", ")", "{", "mv", ".", "visitVarInsn", "(", "ALOAD", ",", "0", ")", ";", "...
Initializes the trait map and dynamic property map to empty values @param mv @param classDef
[ "Initializes", "the", "trait", "map", "and", "dynamic", "property", "map", "to", "empty", "values" ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/factmodel/DefaultBeanClassBuilder.java#L1058-L1101
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.lockResource
private void lockResource(String resourcename, CmsLockType type) throws CmsException { """ Locks a resource.<p> The <code>type</code> parameter controls what kind of lock is used.<br> Possible values for this parameter are: <br> <ul> <li><code>{@link org.opencms.lock.CmsLockType#EXCLUSIVE}</code></li> <li><...
java
private void lockResource(String resourcename, CmsLockType type) throws CmsException { // throw the exception if resource name is an empty string if (CmsStringUtil.isEmptyOrWhitespaceOnly(resourcename)) { throw new CmsVfsResourceNotFoundException( Messages.get().container(Me...
[ "private", "void", "lockResource", "(", "String", "resourcename", ",", "CmsLockType", "type", ")", "throws", "CmsException", "{", "// throw the exception if resource name is an empty string", "if", "(", "CmsStringUtil", ".", "isEmptyOrWhitespaceOnly", "(", "resourcename", "...
Locks a resource.<p> The <code>type</code> parameter controls what kind of lock is used.<br> Possible values for this parameter are: <br> <ul> <li><code>{@link org.opencms.lock.CmsLockType#EXCLUSIVE}</code></li> <li><code>{@link org.opencms.lock.CmsLockType#TEMPORARY}</code></li> </ul><p> @param resourcename the name...
[ "Locks", "a", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L4322-L4331
sarxos/webcam-capture
webcam-capture-drivers/driver-v4l4j/src/main/java/com/github/sarxos/webcam/ds/v4l4j/V4l4jDevice.java
V4l4jDevice.getVideoDevice
private static VideoDevice getVideoDevice(File file) { """ Create video device from file. @param file the video descriptor file @return The {@link VideoDevice} """ LOG.debug("Creating V4L4J device from file {}", file); try { return new VideoDevice(file.getAbsolutePath()); } catch (V4L4JException...
java
private static VideoDevice getVideoDevice(File file) { LOG.debug("Creating V4L4J device from file {}", file); try { return new VideoDevice(file.getAbsolutePath()); } catch (V4L4JException e) { throw new WebcamException("Cannot instantiate V4L4J device from " + file, e); } }
[ "private", "static", "VideoDevice", "getVideoDevice", "(", "File", "file", ")", "{", "LOG", ".", "debug", "(", "\"Creating V4L4J device from file {}\"", ",", "file", ")", ";", "try", "{", "return", "new", "VideoDevice", "(", "file", ".", "getAbsolutePath", "(", ...
Create video device from file. @param file the video descriptor file @return The {@link VideoDevice}
[ "Create", "video", "device", "from", "file", "." ]
train
https://github.com/sarxos/webcam-capture/blob/efbdae04f9ba48db9ec621e94a9bcd6f031882c8/webcam-capture-drivers/driver-v4l4j/src/main/java/com/github/sarxos/webcam/ds/v4l4j/V4l4jDevice.java#L100-L109
arnaudroger/SimpleFlatMapper
sfm-map/src/main/java/org/simpleflatmapper/map/mapper/MapperBuilder.java
MapperBuilder.addKey
public final B addKey(String column) { """ add a new mapping to the specified property with a key property definition and an undefined type. The index is incremented for each non indexed property mapping. @param column the property name @return the current builder """ return addMapping(column, cal...
java
public final B addKey(String column) { return addMapping(column, calculatedIndex++, FieldMapperColumnDefinition.<K>key()); }
[ "public", "final", "B", "addKey", "(", "String", "column", ")", "{", "return", "addMapping", "(", "column", ",", "calculatedIndex", "++", ",", "FieldMapperColumnDefinition", ".", "<", "K", ">", "key", "(", ")", ")", ";", "}" ]
add a new mapping to the specified property with a key property definition and an undefined type. The index is incremented for each non indexed property mapping. @param column the property name @return the current builder
[ "add", "a", "new", "mapping", "to", "the", "specified", "property", "with", "a", "key", "property", "definition", "and", "an", "undefined", "type", ".", "The", "index", "is", "incremented", "for", "each", "non", "indexed", "property", "mapping", "." ]
train
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-map/src/main/java/org/simpleflatmapper/map/mapper/MapperBuilder.java#L56-L58
lukas-krecan/json2xml
src/main/java/net/javacrumbs/json2xml/JsonXmlHelper.java
JsonXmlHelper.convertToDom
public static Node convertToDom(final String json, final String namespace, final boolean addTypeAttributes, final String artificialRootName) throws TransformerConfigurationException, TransformerException { """ Helper method to convert JSON string to XML DOM @param json String containing the json document @para...
java
public static Node convertToDom(final String json, final String namespace, final boolean addTypeAttributes, final String artificialRootName) throws TransformerConfigurationException, TransformerException { Transformer transformer = TransformerFactory.newInstance().newTransformer(); InputSource source = ...
[ "public", "static", "Node", "convertToDom", "(", "final", "String", "json", ",", "final", "String", "namespace", ",", "final", "boolean", "addTypeAttributes", ",", "final", "String", "artificialRootName", ")", "throws", "TransformerConfigurationException", ",", "Trans...
Helper method to convert JSON string to XML DOM @param json String containing the json document @param namespace Namespace that will contain the generated dom nodes @param addTypeAttributes Set to true to generate type attributes @param artificialRootName Name of the artificial root element node @return Document DOM n...
[ "Helper", "method", "to", "convert", "JSON", "string", "to", "XML", "DOM" ]
train
https://github.com/lukas-krecan/json2xml/blob/8fba4f942ebed5d6f7ad851390c634fff8559cac/src/main/java/net/javacrumbs/json2xml/JsonXmlHelper.java#L67-L73
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMesh.java
AiMesh.getColorR
public float getColorR(int vertex, int colorset) { """ Returns the red color component of a color from a vertex color set. @param vertex the vertex index @param colorset the color set @return the red color component """ if (!hasColors(colorset)) { throw new IllegalStateException("mesh ...
java
public float getColorR(int vertex, int colorset) { if (!hasColors(colorset)) { throw new IllegalStateException("mesh has no colorset " + colorset); } checkVertexIndexBounds(vertex); /* bound checks for colorset are done by java for us */ return m_col...
[ "public", "float", "getColorR", "(", "int", "vertex", ",", "int", "colorset", ")", "{", "if", "(", "!", "hasColors", "(", "colorset", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"mesh has no colorset \"", "+", "colorset", ")", ";", "}", ...
Returns the red color component of a color from a vertex color set. @param vertex the vertex index @param colorset the color set @return the red color component
[ "Returns", "the", "red", "color", "component", "of", "a", "color", "from", "a", "vertex", "color", "set", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMesh.java#L870-L879
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineExtensionsInner.java
VirtualMachineExtensionsInner.beginCreateOrUpdateAsync
public Observable<VirtualMachineExtensionInner> beginCreateOrUpdateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionInner extensionParameters) { """ The operation to create or update the extension. @param resourceGroupName The name of the resource group. @param vmNa...
java
public Observable<VirtualMachineExtensionInner> beginCreateOrUpdateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionInner extensionParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).map(ne...
[ "public", "Observable", "<", "VirtualMachineExtensionInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "vmName", ",", "String", "vmExtensionName", ",", "VirtualMachineExtensionInner", "extensionParameters", ")", "{", "return", "begi...
The operation to create or update the extension. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine where the extension should be created or updated. @param vmExtensionName The name of the virtual machine extension. @param extensionParameters Parameters supplied to t...
[ "The", "operation", "to", "create", "or", "update", "the", "extension", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineExtensionsInner.java#L215-L222
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/filter/binary/ThresholdSauvola_MT.java
ThresholdSauvola_MT.process
@Override public void process(GrayF32 input , GrayU8 output ) { """ Converts the input image into a binary image. @param input Input image. Not modified. @param output Output binary image. Modified. """ inputPow2.reshape(input.width,input.height); inputMean.reshape(input.width,input.height); input...
java
@Override public void process(GrayF32 input , GrayU8 output ) { inputPow2.reshape(input.width,input.height); inputMean.reshape(input.width,input.height); inputMeanPow2.reshape(input.width,input.height); inputPow2Mean.reshape(input.width,input.height); stdev.reshape(input.width,input.height); tmp.reshape(in...
[ "@", "Override", "public", "void", "process", "(", "GrayF32", "input", ",", "GrayU8", "output", ")", "{", "inputPow2", ".", "reshape", "(", "input", ".", "width", ",", "input", ".", "height", ")", ";", "inputMean", ".", "reshape", "(", "input", ".", "w...
Converts the input image into a binary image. @param input Input image. Not modified. @param output Output binary image. Modified.
[ "Converts", "the", "input", "image", "into", "a", "binary", "image", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/binary/ThresholdSauvola_MT.java#L86-L135
paymill/paymill-java
src/main/java/com/paymill/services/SubscriptionService.java
SubscriptionService.changeAmountTemporary
public Subscription changeAmountTemporary( Subscription subscription, Integer amount ) { """ Changes the amount of a subscription.<br> <br> The new amount is valid one-time only after which the original subscription amount will be charged again. If you want to permanently change the amount use {@link Subscripti...
java
public Subscription changeAmountTemporary( Subscription subscription, Integer amount ) { return changeAmount( subscription, amount, 0, null, null ); }
[ "public", "Subscription", "changeAmountTemporary", "(", "Subscription", "subscription", ",", "Integer", "amount", ")", "{", "return", "changeAmount", "(", "subscription", ",", "amount", ",", "0", ",", "null", ",", "null", ")", ";", "}" ]
Changes the amount of a subscription.<br> <br> The new amount is valid one-time only after which the original subscription amount will be charged again. If you want to permanently change the amount use {@link SubscriptionService#changeAmount(String, Integer)} . @param subscription the subscription. @param amount the ne...
[ "Changes", "the", "amount", "of", "a", "subscription", ".", "<br", ">", "<br", ">", "The", "new", "amount", "is", "valid", "one", "-", "time", "only", "after", "which", "the", "original", "subscription", "amount", "will", "be", "charged", "again", ".", "...
train
https://github.com/paymill/paymill-java/blob/17281a0d4376c76f1711af9f09bfc138c90ba65a/src/main/java/com/paymill/services/SubscriptionService.java#L353-L355
box/box-java-sdk
src/main/java/com/box/sdk/BoxRetentionPolicy.java
BoxRetentionPolicy.getAll
public static Iterable<BoxRetentionPolicy.Info> getAll(final BoxAPIConnection api, String ... fields) { """ Returns all the retention policies. @param api the API connection to be used by the resource. @param fields the fields to retrieve. @return an iterable with all the retention policies. """ re...
java
public static Iterable<BoxRetentionPolicy.Info> getAll(final BoxAPIConnection api, String ... fields) { return getAll(null, null, null, DEFAULT_LIMIT, api, fields); }
[ "public", "static", "Iterable", "<", "BoxRetentionPolicy", ".", "Info", ">", "getAll", "(", "final", "BoxAPIConnection", "api", ",", "String", "...", "fields", ")", "{", "return", "getAll", "(", "null", ",", "null", ",", "null", ",", "DEFAULT_LIMIT", ",", ...
Returns all the retention policies. @param api the API connection to be used by the resource. @param fields the fields to retrieve. @return an iterable with all the retention policies.
[ "Returns", "all", "the", "retention", "policies", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxRetentionPolicy.java#L346-L348
zaproxy/zaproxy
src/org/zaproxy/zap/utils/FontUtils.java
FontUtils.getFont
public static Font getFont (Font font, Size size) { """ Gets the specified font with the specified size, correctly scaled @param font @param size @since 2.7.0 @return the specified font with the specified size, correctly scaled """ float s; switch (size) { case smallest: s = (float) (font.getSize() ...
java
public static Font getFont (Font font, Size size) { float s; switch (size) { case smallest: s = (float) (font.getSize() * 0.5); break; case much_smaller: s = (float) (font.getSize() * 0.7); break; case smaller: s = (float) (font.getSize() * 0.8); break; case standard: s = (float) font.getSize(); break; ...
[ "public", "static", "Font", "getFont", "(", "Font", "font", ",", "Size", "size", ")", "{", "float", "s", ";", "switch", "(", "size", ")", "{", "case", "smallest", ":", "s", "=", "(", "float", ")", "(", "font", ".", "getSize", "(", ")", "*", "0.5"...
Gets the specified font with the specified size, correctly scaled @param font @param size @since 2.7.0 @return the specified font with the specified size, correctly scaled
[ "Gets", "the", "specified", "font", "with", "the", "specified", "size", "correctly", "scaled" ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/FontUtils.java#L210-L223
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfStamper.java
PdfStamper.createSignature
public static PdfStamper createSignature(PdfReader reader, OutputStream os, char pdfVersion, File tempFile) throws DocumentException, IOException { """ Applies a digital signature to a document. The returned PdfStamper can be used normally as the signature is only applied when closing. <p> A possible use is: <...
java
public static PdfStamper createSignature(PdfReader reader, OutputStream os, char pdfVersion, File tempFile) throws DocumentException, IOException { return createSignature(reader, os, pdfVersion, tempFile, false); }
[ "public", "static", "PdfStamper", "createSignature", "(", "PdfReader", "reader", ",", "OutputStream", "os", ",", "char", "pdfVersion", ",", "File", "tempFile", ")", "throws", "DocumentException", ",", "IOException", "{", "return", "createSignature", "(", "reader", ...
Applies a digital signature to a document. The returned PdfStamper can be used normally as the signature is only applied when closing. <p> A possible use is: <p> <pre> KeyStore ks = KeyStore.getInstance("pkcs12"); ks.load(new FileInputStream("my_private_key.pfx"), "my_password".toCharArray()); String alias = (String)ks...
[ "Applies", "a", "digital", "signature", "to", "a", "document", ".", "The", "returned", "PdfStamper", "can", "be", "used", "normally", "as", "the", "signature", "is", "only", "applied", "when", "closing", ".", "<p", ">", "A", "possible", "use", "is", ":", ...
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfStamper.java#L757-L760
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java
Interpreter.setBreakpoint
public Breakpoint setBreakpoint(PStm stmt, String condition) throws ParserException, LexException { """ Set a statement breakpoint. A breakpoint stops execution and allows the user to query the environment. @param stmt The statement at which to stop. @param condition The condition when to stop. @return T...
java
public Breakpoint setBreakpoint(PStm stmt, String condition) throws ParserException, LexException { BreakpointManager.setBreakpoint(stmt, new Stoppoint(stmt.getLocation(), ++nextbreakpoint, condition)); breakpoints.put(nextbreakpoint, BreakpointManager.getBreakpoint(stmt)); return BreakpointManager.getBreakpo...
[ "public", "Breakpoint", "setBreakpoint", "(", "PStm", "stmt", ",", "String", "condition", ")", "throws", "ParserException", ",", "LexException", "{", "BreakpointManager", ".", "setBreakpoint", "(", "stmt", ",", "new", "Stoppoint", "(", "stmt", ".", "getLocation", ...
Set a statement breakpoint. A breakpoint stops execution and allows the user to query the environment. @param stmt The statement at which to stop. @param condition The condition when to stop. @return The Breakpoint object created. @throws LexException @throws ParserException
[ "Set", "a", "statement", "breakpoint", ".", "A", "breakpoint", "stops", "execution", "and", "allows", "the", "user", "to", "query", "the", "environment", "." ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java#L467-L473
bbottema/simple-java-mail
modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageParser.java
MimeMessageParser.createDataSource
@Nonnull private static DataSource createDataSource(@Nonnull final MimePart part) { """ Parses the MimePart to create a DataSource. @param part the current part to be processed @return the DataSource """ final DataHandler dataHandler = retrieveDataHandler(part); final DataSource dataSource = dataHandl...
java
@Nonnull private static DataSource createDataSource(@Nonnull final MimePart part) { final DataHandler dataHandler = retrieveDataHandler(part); final DataSource dataSource = dataHandler.getDataSource(); final String contentType = parseBaseMimeType(dataSource.getContentType()); final byte[] content = readContent...
[ "@", "Nonnull", "private", "static", "DataSource", "createDataSource", "(", "@", "Nonnull", "final", "MimePart", "part", ")", "{", "final", "DataHandler", "dataHandler", "=", "retrieveDataHandler", "(", "part", ")", ";", "final", "DataSource", "dataSource", "=", ...
Parses the MimePart to create a DataSource. @param part the current part to be processed @return the DataSource
[ "Parses", "the", "MimePart", "to", "create", "a", "DataSource", "." ]
train
https://github.com/bbottema/simple-java-mail/blob/b03635328aeecd525e35eddfef8f5b9a184559d8/modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageParser.java#L337-L348
r0adkll/PostOffice
library/src/main/java/com/r0adkll/postoffice/PostOffice.java
PostOffice.newSimpleListMail
public static Delivery newSimpleListMail(@NotNull Context ctx, CharSequence title, Design design, CharSequence[] contents, ListStyle.OnItemAcceptedListener<CharSequence> listener) { """ Create a new Simple List Dialog @param ctx the application context @param title the dialog title @param de...
java
public static Delivery newSimpleListMail(@NotNull Context ctx, CharSequence title, Design design, CharSequence[] contents, ListStyle.OnItemAcceptedListener<CharSequence> listener){ ArrayAdapter<CharSequence> adapterHolo = new ArrayAdapter<>(ctx, android.R.layout.simple_list_item_1, contents); ArrayAdapt...
[ "public", "static", "Delivery", "newSimpleListMail", "(", "@", "NotNull", "Context", "ctx", ",", "CharSequence", "title", ",", "Design", "design", ",", "CharSequence", "[", "]", "contents", ",", "ListStyle", ".", "OnItemAcceptedListener", "<", "CharSequence", ">",...
Create a new Simple List Dialog @param ctx the application context @param title the dialog title @param design the dialog design @param contents the list of CharSequence for the contents @param listener the acceptance listener that gets called when the user selects an item @return ...
[ "Create", "a", "new", "Simple", "List", "Dialog" ]
train
https://github.com/r0adkll/PostOffice/blob/f98e365fd66c004ccce64ee87d9f471b97e4e3c2/library/src/main/java/com/r0adkll/postoffice/PostOffice.java#L420-L432
phax/ph-css
ph-css/src/main/java/com/helger/css/decl/CSSExpression.java
CSSExpression.addString
@Nonnull public CSSExpression addString (@Nonnegative final int nIndex, @Nonnull final String sValue) { """ Shortcut method to add a string value that is automatically quoted inside @param nIndex The index where the member should be added. Must be &ge; 0. @param sValue The value to be quoted and than added...
java
@Nonnull public CSSExpression addString (@Nonnegative final int nIndex, @Nonnull final String sValue) { return addTermSimple (nIndex, getQuotedStringValue (sValue)); }
[ "@", "Nonnull", "public", "CSSExpression", "addString", "(", "@", "Nonnegative", "final", "int", "nIndex", ",", "@", "Nonnull", "final", "String", "sValue", ")", "{", "return", "addTermSimple", "(", "nIndex", ",", "getQuotedStringValue", "(", "sValue", ")", ")...
Shortcut method to add a string value that is automatically quoted inside @param nIndex The index where the member should be added. Must be &ge; 0. @param sValue The value to be quoted and than added. May not be <code>null</code>. @return this
[ "Shortcut", "method", "to", "add", "a", "string", "value", "that", "is", "automatically", "quoted", "inside" ]
train
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/decl/CSSExpression.java#L272-L276
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java
ChartComputator.setViewportTopLeft
public void setViewportTopLeft(float left, float top) { """ Sets the current viewport (defined by {@link #currentViewport}) to the given X and Y positions. """ /** * Constrains within the scroll range. The scroll range is simply the viewport extremes (AXIS_X_MAX, * etc.) minus ...
java
public void setViewportTopLeft(float left, float top) { /** * Constrains within the scroll range. The scroll range is simply the viewport extremes (AXIS_X_MAX, * etc.) minus * the viewport size. For example, if the extrema were 0 and 10, and the viewport size was 2, the scroll range ...
[ "public", "void", "setViewportTopLeft", "(", "float", "left", ",", "float", "top", ")", "{", "/**\n * Constrains within the scroll range. The scroll range is simply the viewport extremes (AXIS_X_MAX,\n * etc.) minus\n * the viewport size. For example, if the extrema wer...
Sets the current viewport (defined by {@link #currentViewport}) to the given X and Y positions.
[ "Sets", "the", "current", "viewport", "(", "defined", "by", "{" ]
train
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/computator/ChartComputator.java#L116-L130
YahooArchive/samoa
samoa-samza/src/main/java/com/yahoo/labs/samoa/utils/SamzaConfigFactory.java
SamzaConfigFactory.setJobName
private static void setJobName(Map<String,String> map, String jobName) { """ /* Helper methods to set different properties in the input map """ map.put(JOB_NAME_KEY, jobName); }
java
private static void setJobName(Map<String,String> map, String jobName) { map.put(JOB_NAME_KEY, jobName); }
[ "private", "static", "void", "setJobName", "(", "Map", "<", "String", ",", "String", ">", "map", ",", "String", "jobName", ")", "{", "map", ".", "put", "(", "JOB_NAME_KEY", ",", "jobName", ")", ";", "}" ]
/* Helper methods to set different properties in the input map
[ "/", "*", "Helper", "methods", "to", "set", "different", "properties", "in", "the", "input", "map" ]
train
https://github.com/YahooArchive/samoa/blob/540a2c30167ac85c432b593baabd5ca97e7e8a0f/samoa-samza/src/main/java/com/yahoo/labs/samoa/utils/SamzaConfigFactory.java#L428-L430
groupe-sii/ogham
ogham-core/src/main/java/fr/sii/ogham/core/util/bean/BeanWrapperUtils.java
BeanWrapperUtils.getReadMethods
public static Map<String, Method> getReadMethods(Object bean) { """ Get the whole list of read {@link Method}s using introspection. @param bean the bean to introspect @return the map of bean property getters (indexed by property name) """ Class<? extends Object> beanClass = bean.getClass(); try { M...
java
public static Map<String, Method> getReadMethods(Object bean) { Class<? extends Object> beanClass = bean.getClass(); try { Map<String, Method> readMethods = new HashMap<>(); final BeanInfo beanInfo = Introspector.getBeanInfo(beanClass); final PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyD...
[ "public", "static", "Map", "<", "String", ",", "Method", ">", "getReadMethods", "(", "Object", "bean", ")", "{", "Class", "<", "?", "extends", "Object", ">", "beanClass", "=", "bean", ".", "getClass", "(", ")", ";", "try", "{", "Map", "<", "String", ...
Get the whole list of read {@link Method}s using introspection. @param bean the bean to introspect @return the map of bean property getters (indexed by property name)
[ "Get", "the", "whole", "list", "of", "read", "{", "@link", "Method", "}", "s", "using", "introspection", "." ]
train
https://github.com/groupe-sii/ogham/blob/e273b845604add74b5a25dfd931cb3c166b1008f/ogham-core/src/main/java/fr/sii/ogham/core/util/bean/BeanWrapperUtils.java#L65-L87
ops4j/org.ops4j.pax.logging
pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java
ThrowableProxy.getCauseStackTraceAsString
public String getCauseStackTraceAsString(final List<String> ignorePackages, final TextRenderer textRenderer, final String suffix) { """ Formats the Throwable that is the cause of this Throwable. @param ignorePackages The List of packages to be suppressed from the trace. @param textRenderer the text renderer ...
java
public String getCauseStackTraceAsString(final List<String> ignorePackages, final TextRenderer textRenderer, final String suffix) { final StringBuilder sb = new StringBuilder(); if (this.causeProxy != null) { this.formatWrapper(sb, this.causeProxy, ignorePackages, textRenderer, suffix); ...
[ "public", "String", "getCauseStackTraceAsString", "(", "final", "List", "<", "String", ">", "ignorePackages", ",", "final", "TextRenderer", "textRenderer", ",", "final", "String", "suffix", ")", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "("...
Formats the Throwable that is the cause of this Throwable. @param ignorePackages The List of packages to be suppressed from the trace. @param textRenderer the text renderer @param suffix @return The formatted Throwable that caused this Throwable.
[ "Formats", "the", "Throwable", "that", "is", "the", "cause", "of", "this", "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#L422-L435
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/alias/AliasFactory.java
AliasFactory.createProxy
@SuppressWarnings("unchecked") protected <A> A createProxy(Class<A> cl, Expression<?> path) { """ Create a proxy instance for the given class and path @param <A> @param cl type of the proxy @param path underlying expression @return proxy instance """ Enhancer enhancer = new Enhancer(); ...
java
@SuppressWarnings("unchecked") protected <A> A createProxy(Class<A> cl, Expression<?> path) { Enhancer enhancer = new Enhancer(); enhancer.setClassLoader(AliasFactory.class.getClassLoader()); if (cl.isInterface()) { enhancer.setInterfaces(new Class<?>[] {cl, ManagedObject.class})...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "<", "A", ">", "A", "createProxy", "(", "Class", "<", "A", ">", "cl", ",", "Expression", "<", "?", ">", "path", ")", "{", "Enhancer", "enhancer", "=", "new", "Enhancer", "(", ")", ";", ...
Create a proxy instance for the given class and path @param <A> @param cl type of the proxy @param path underlying expression @return proxy instance
[ "Create", "a", "proxy", "instance", "for", "the", "given", "class", "and", "path" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/alias/AliasFactory.java#L126-L140
BlueBrain/bluima
modules/bluima_opennlp/src/main/java/ch/epfl/bbp/shaded/opennlp/tools/util/BeamSearch.java
BeamSearch.bestSequence
public Sequence bestSequence(List sequence, Object[] additionalContext) { """ Returns the best sequence of outcomes based on model for this object. @param sequence The input sequence. @param additionalContext An Object[] of additional context. This is passed to the context generator blindly with the assumption ...
java
public Sequence bestSequence(List sequence, Object[] additionalContext) { return bestSequences(1, sequence.toArray(), additionalContext)[0]; }
[ "public", "Sequence", "bestSequence", "(", "List", "sequence", ",", "Object", "[", "]", "additionalContext", ")", "{", "return", "bestSequences", "(", "1", ",", "sequence", ".", "toArray", "(", ")", ",", "additionalContext", ")", "[", "0", "]", ";", "}" ]
Returns the best sequence of outcomes based on model for this object. @param sequence The input sequence. @param additionalContext An Object[] of additional context. This is passed to the context generator blindly with the assumption that the context are appropiate. @return The top ranked sequence of outcomes.
[ "Returns", "the", "best", "sequence", "of", "outcomes", "based", "on", "model", "for", "this", "object", "." ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_opennlp/src/main/java/ch/epfl/bbp/shaded/opennlp/tools/util/BeamSearch.java#L146-L148
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/AbstractResources.java
AbstractResources.createResource
protected <T, S> T createResource(String path, Class<T> objectClass, S object) throws SmartsheetException { """ Create a resource using Smartsheet REST API. Exceptions: IllegalArgumentException : if any argument is null, or path is empty string InvalidRequestException : if there is any problem with the REST A...
java
protected <T, S> T createResource(String path, Class<T> objectClass, S object) throws SmartsheetException { Util.throwIfNull(path, object, objectClass); Util.throwIfEmpty(path); HttpRequest request = createHttpRequest(smartsheet.getBaseURI().resolve(path), HttpMethod.POST); ByteArrayOu...
[ "protected", "<", "T", ",", "S", ">", "T", "createResource", "(", "String", "path", ",", "Class", "<", "T", ">", "objectClass", ",", "S", "object", ")", "throws", "SmartsheetException", "{", "Util", ".", "throwIfNull", "(", "path", ",", "object", ",", ...
Create a resource using Smartsheet REST API. Exceptions: IllegalArgumentException : if any argument is null, or path is empty string InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorization(access token) ServiceUnavaila...
[ "Create", "a", "resource", "using", "Smartsheet", "REST", "API", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/AbstractResources.java#L272-L317
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.rebootAsync
public Observable<Void> rebootAsync(String resourceGroupName, String name) { """ Reboot all machines in an App Service Environment. Reboot all machines in an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environm...
java
public Observable<Void> rebootAsync(String resourceGroupName, String name) { return rebootWithServiceResponseAsync(resourceGroupName, name).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); ...
[ "public", "Observable", "<", "Void", ">", "rebootAsync", "(", "String", "resourceGroupName", ",", "String", "name", ")", "{", "return", "rebootWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ")", ".", "map", "(", "new", "Func1", "<", "ServiceRe...
Reboot all machines in an App Service Environment. Reboot all machines in an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @throws IllegalArgumentException thrown if parameters fail the validation @return the...
[ "Reboot", "all", "machines", "in", "an", "App", "Service", "Environment", ".", "Reboot", "all", "machines", "in", "an", "App", "Service", "Environment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L3743-L3750
spring-projects/spring-ldap
core/src/main/java/org/springframework/ldap/support/LdapUtils.java
LdapUtils.getValue
public static Object getValue(Name name, String key) { """ Get the value of the Rdn with the requested key in the supplied Name. @param name the Name in which to search for the key. @param key the attribute key to search for. @return the value of the rdn corresponding to the <b>first</b> occurrence of the req...
java
public static Object getValue(Name name, String key) { NamingEnumeration<? extends Attribute> allAttributes = getRdn(name, key).toAttributes().getAll(); while (allAttributes.hasMoreElements()) { Attribute oneAttribute = allAttributes.nextElement(); if(key.equalsIgnoreCase(oneAttr...
[ "public", "static", "Object", "getValue", "(", "Name", "name", ",", "String", "key", ")", "{", "NamingEnumeration", "<", "?", "extends", "Attribute", ">", "allAttributes", "=", "getRdn", "(", "name", ",", "key", ")", ".", "toAttributes", "(", ")", ".", "...
Get the value of the Rdn with the requested key in the supplied Name. @param name the Name in which to search for the key. @param key the attribute key to search for. @return the value of the rdn corresponding to the <b>first</b> occurrence of the requested key. @throws NoSuchElementException if no corresponding entry...
[ "Get", "the", "value", "of", "the", "Rdn", "with", "the", "requested", "key", "in", "the", "supplied", "Name", "." ]
train
https://github.com/spring-projects/spring-ldap/blob/15142d4ae18a9dc6b363a1ebf085e2bda9d9a4c0/core/src/main/java/org/springframework/ldap/support/LdapUtils.java#L535-L550
apache/incubator-gobblin
gobblin-modules/gobblin-kafka-09/src/main/java/org/apache/gobblin/source/extractor/extract/kafka/KafkaSimpleStreamingExtractor.java
KafkaSimpleStreamingExtractor.readRecordEnvelopeImpl
@Override public RecordEnvelope<D> readRecordEnvelopeImpl() throws DataRecordException, IOException { """ Return the next record when available. Will never time out since this is a streaming source. """ if (!_isStarted.get()) { throw new IOException("Streaming extractor has not been started."...
java
@Override public RecordEnvelope<D> readRecordEnvelopeImpl() throws DataRecordException, IOException { if (!_isStarted.get()) { throw new IOException("Streaming extractor has not been started."); } while ((_records == null) || (!_records.hasNext())) { synchronized (_consumer) { if...
[ "@", "Override", "public", "RecordEnvelope", "<", "D", ">", "readRecordEnvelopeImpl", "(", ")", "throws", "DataRecordException", ",", "IOException", "{", "if", "(", "!", "_isStarted", ".", "get", "(", ")", ")", "{", "throw", "new", "IOException", "(", "\"Str...
Return the next record when available. Will never time out since this is a streaming source.
[ "Return", "the", "next", "record", "when", "available", ".", "Will", "never", "time", "out", "since", "this", "is", "a", "streaming", "source", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-kafka-09/src/main/java/org/apache/gobblin/source/extractor/extract/kafka/KafkaSimpleStreamingExtractor.java#L208-L225
schallee/alib4j
servlet/src/main/java/net/darkmist/alib/servlet/ServletUtil.java
ServletUtil.getServletParameter
public static String getServletParameter(HttpServlet servlet, String name, Set<GetOpts> opts, String defaultValue) { """ /* getServletParameter(HttpServlet...) HttpServlet implements ServletConfig as well as Servlet... """ return getServletParameter((ServletConfig)servlet, name, opts, defaultValue); }
java
public static String getServletParameter(HttpServlet servlet, String name, Set<GetOpts> opts, String defaultValue) { return getServletParameter((ServletConfig)servlet, name, opts, defaultValue); }
[ "public", "static", "String", "getServletParameter", "(", "HttpServlet", "servlet", ",", "String", "name", ",", "Set", "<", "GetOpts", ">", "opts", ",", "String", "defaultValue", ")", "{", "return", "getServletParameter", "(", "(", "ServletConfig", ")", "servlet...
/* getServletParameter(HttpServlet...) HttpServlet implements ServletConfig as well as Servlet...
[ "/", "*", "getServletParameter", "(", "HttpServlet", "...", ")", "HttpServlet", "implements", "ServletConfig", "as", "well", "as", "Servlet", "..." ]
train
https://github.com/schallee/alib4j/blob/0e0718aee574bbb62268e1cf58e99286529ce529/servlet/src/main/java/net/darkmist/alib/servlet/ServletUtil.java#L181-L184
Netflix/blitz4j
src/main/java/com/netflix/logging/messaging/BatcherFactory.java
BatcherFactory.createBatcher
public static MessageBatcher createBatcher(String name, MessageProcessor processor) { """ Creates the batcher. The user needs to make sure another batcher already exists before they create one. @param name - The name of the batcher to be created @param processor - The user override for actions to be perfor...
java
public static MessageBatcher createBatcher(String name, MessageProcessor processor) { MessageBatcher batcher = batcherMap.get(name); if (batcher == null) { synchronized (BatcherFactory.class) { batcher = batcherMap.get(name); if (batcher == null) { batcher = new MessageBatcher(name, processor); ...
[ "public", "static", "MessageBatcher", "createBatcher", "(", "String", "name", ",", "MessageProcessor", "processor", ")", "{", "MessageBatcher", "batcher", "=", "batcherMap", ".", "get", "(", "name", ")", ";", "if", "(", "batcher", "==", "null", ")", "{", "sy...
Creates the batcher. The user needs to make sure another batcher already exists before they create one. @param name - The name of the batcher to be created @param processor - The user override for actions to be performed on the batched messages. @return
[ "Creates", "the", "batcher", ".", "The", "user", "needs", "to", "make", "sure", "another", "batcher", "already", "exists", "before", "they", "create", "one", "." ]
train
https://github.com/Netflix/blitz4j/blob/d03aaf4ede238dc204a4420c8d333565f86fc6f2/src/main/java/com/netflix/logging/messaging/BatcherFactory.java#L63-L76
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/wizard/AbstractWizard.java
AbstractWizard.addForm
public WizardPage addForm(Form formPage) { """ Adds a new page to this wizard. The page is created by wrapping the form in a {@link FormBackedWizardPage} and appending it to the end of the page list. @param formPage The form page to be added to the wizard. @return the newly created wizard page that wraps the ...
java
public WizardPage addForm(Form formPage) { Assert.notNull(formPage, "The form page cannot be null"); WizardPage page = new FormBackedWizardPage(formPage, !autoConfigureChildPages); addPage(page); return page; }
[ "public", "WizardPage", "addForm", "(", "Form", "formPage", ")", "{", "Assert", ".", "notNull", "(", "formPage", ",", "\"The form page cannot be null\"", ")", ";", "WizardPage", "page", "=", "new", "FormBackedWizardPage", "(", "formPage", ",", "!", "autoConfigureC...
Adds a new page to this wizard. The page is created by wrapping the form in a {@link FormBackedWizardPage} and appending it to the end of the page list. @param formPage The form page to be added to the wizard. @return the newly created wizard page that wraps the given form. @throws IllegalArgumentException if {@code ...
[ "Adds", "a", "new", "page", "to", "this", "wizard", ".", "The", "page", "is", "created", "by", "wrapping", "the", "form", "in", "a", "{", "@link", "FormBackedWizardPage", "}", "and", "appending", "it", "to", "the", "end", "of", "the", "page", "list", "...
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/wizard/AbstractWizard.java#L194-L199
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/core/QueryReferenceBroker.java
QueryReferenceBroker.retrieveProxyReference
public void retrieveProxyReference(Object obj, ClassDescriptor cld, ObjectReferenceDescriptor rds, boolean forced) { """ Retrieve a single Reference. This implementation retrieves a referenced object from the data backend if <b>cascade-retrieve</b> is true or if <b>forced</b> is true. @param obj - object that...
java
public void retrieveProxyReference(Object obj, ClassDescriptor cld, ObjectReferenceDescriptor rds, boolean forced) { PersistentField refField; Object refObj = null; pb.getInternalCache().enableMaterializationCache(); try { Identity id = ge...
[ "public", "void", "retrieveProxyReference", "(", "Object", "obj", ",", "ClassDescriptor", "cld", ",", "ObjectReferenceDescriptor", "rds", ",", "boolean", "forced", ")", "{", "PersistentField", "refField", ";", "Object", "refObj", "=", "null", ";", "pb", ".", "ge...
Retrieve a single Reference. This implementation retrieves a referenced object from the data backend if <b>cascade-retrieve</b> is true or if <b>forced</b> is true. @param obj - object that will have it's field set with a referenced object. @param cld - the ClassDescriptor describring obj @param rds - the ObjectRefere...
[ "Retrieve", "a", "single", "Reference", ".", "This", "implementation", "retrieves", "a", "referenced", "object", "from", "the", "data", "backend", "if", "<b", ">", "cascade", "-", "retrieve<", "/", "b", ">", "is", "true", "or", "if", "<b", ">", "forced<", ...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/QueryReferenceBroker.java#L477-L515
oboehm/jfachwert
src/main/java/de/jfachwert/bank/Waehrung.java
Waehrung.validate
public static String validate(String code) { """ Validiert den uebergebenen Waehrungscode. @param code Waehrungscode als String @return Waehrungscode zur Weiterverarbeitung """ try { toCurrency(code); } catch (IllegalArgumentException ex) { throw new InvalidValueExce...
java
public static String validate(String code) { try { toCurrency(code); } catch (IllegalArgumentException ex) { throw new InvalidValueException(code, "currency"); } return code; }
[ "public", "static", "String", "validate", "(", "String", "code", ")", "{", "try", "{", "toCurrency", "(", "code", ")", ";", "}", "catch", "(", "IllegalArgumentException", "ex", ")", "{", "throw", "new", "InvalidValueException", "(", "code", ",", "\"currency\...
Validiert den uebergebenen Waehrungscode. @param code Waehrungscode als String @return Waehrungscode zur Weiterverarbeitung
[ "Validiert", "den", "uebergebenen", "Waehrungscode", "." ]
train
https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/bank/Waehrung.java#L151-L158
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuModuleLoadDataJIT
public static int cuModuleLoadDataJIT(CUmodule module, Pointer pointer, JITOptions jitOptions) { """ A wrapper function for {@link JCudaDriver#cuModuleLoadDataEx(CUmodule, Pointer, int, int[], Pointer)} which allows passing in the options for the JIT compiler, and obtaining the output of the JIT compiler via a ...
java
public static int cuModuleLoadDataJIT(CUmodule module, Pointer pointer, JITOptions jitOptions) { return cuModuleLoadDataJITNative(module, pointer, jitOptions); }
[ "public", "static", "int", "cuModuleLoadDataJIT", "(", "CUmodule", "module", ",", "Pointer", "pointer", ",", "JITOptions", "jitOptions", ")", "{", "return", "cuModuleLoadDataJITNative", "(", "module", ",", "pointer", ",", "jitOptions", ")", ";", "}" ]
A wrapper function for {@link JCudaDriver#cuModuleLoadDataEx(CUmodule, Pointer, int, int[], Pointer)} which allows passing in the options for the JIT compiler, and obtaining the output of the JIT compiler via a {@link JITOptions} object. <br /> <br /> <u>Note:</u> This method should be considered as preliminary, and mi...
[ "A", "wrapper", "function", "for", "{", "@link", "JCudaDriver#cuModuleLoadDataEx", "(", "CUmodule", "Pointer", "int", "int", "[]", "Pointer", ")", "}", "which", "allows", "passing", "in", "the", "options", "for", "the", "JIT", "compiler", "and", "obtaining", "...
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L395-L398
Erudika/para
para-server/src/main/java/com/erudika/para/rest/RestUtils.java
RestUtils.hasQueryParam
public static boolean hasQueryParam(String param, ContainerRequestContext ctx) { """ Returns true if parameter exists. @param param a parameter name @param ctx ctx @return true if parameter is set """ return ctx.getUriInfo().getQueryParameters().containsKey(param); }
java
public static boolean hasQueryParam(String param, ContainerRequestContext ctx) { return ctx.getUriInfo().getQueryParameters().containsKey(param); }
[ "public", "static", "boolean", "hasQueryParam", "(", "String", "param", ",", "ContainerRequestContext", "ctx", ")", "{", "return", "ctx", ".", "getUriInfo", "(", ")", ".", "getQueryParameters", "(", ")", ".", "containsKey", "(", "param", ")", ";", "}" ]
Returns true if parameter exists. @param param a parameter name @param ctx ctx @return true if parameter is set
[ "Returns", "true", "if", "parameter", "exists", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/rest/RestUtils.java#L1032-L1034
OpenLiberty/open-liberty
dev/com.ibm.ws.session/src/com/ibm/ws/session/utils/IDGeneratorImpl.java
IDGeneratorImpl.convertSessionIdBytesToSessionId
public static String convertSessionIdBytesToSessionId(byte[] pBytes, int sessionIdLength) { """ Method convertSessionIdBytesToSessionIdBase64 Converts the specified byte array to a String to be used for the session id. The conversion is performed breaking the byte array into groups of 6 bits, then taking each g...
java
public static String convertSessionIdBytesToSessionId(byte[] pBytes, int sessionIdLength) { // int numBits = pBytes.length * 8; char[] chars = new char[sessionIdLength]; int byteNum = 0; int bitNum = 0; int pos = 0; while (byteNum < pBytes.length && pos < sessionIdLength...
[ "public", "static", "String", "convertSessionIdBytesToSessionId", "(", "byte", "[", "]", "pBytes", ",", "int", "sessionIdLength", ")", "{", "// int numBits = pBytes.length * 8;", "char", "[", "]", "chars", "=", "new", "char", "[", "sessionIdLength", "]", ";", "int...
Method convertSessionIdBytesToSessionIdBase64 Converts the specified byte array to a String to be used for the session id. The conversion is performed breaking the byte array into groups of 6 bits, then taking each group (value 0-63) and converting to a character 'A'-'Z', 'a'-'z','0'-'9',_,-. @param pBytes @return Str...
[ "Method", "convertSessionIdBytesToSessionIdBase64", "Converts", "the", "specified", "byte", "array", "to", "a", "String", "to", "be", "used", "for", "the", "session", "id", ".", "The", "conversion", "is", "performed", "breaking", "the", "byte", "array", "into", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.session/src/com/ibm/ws/session/utils/IDGeneratorImpl.java#L149-L197
samskivert/pythagoras
src/main/java/pythagoras/f/Box.java
Box.intersectsY
protected boolean intersectsY (IRay3 ray, float y) { """ Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box at the plane where y equals the value specified. """ IVector3 origin = ray.origin(), dir = ray.direction(); float t = (y - origin.y()) / dir.y(); ...
java
protected boolean intersectsY (IRay3 ray, float y) { IVector3 origin = ray.origin(), dir = ray.direction(); float t = (y - origin.y()) / dir.y(); if (t < 0f) { return false; } float ix = origin.x() + t*dir.x(), iz = origin.z() + t*dir.z(); return ix >= _minExt...
[ "protected", "boolean", "intersectsY", "(", "IRay3", "ray", ",", "float", "y", ")", "{", "IVector3", "origin", "=", "ray", ".", "origin", "(", ")", ",", "dir", "=", "ray", ".", "direction", "(", ")", ";", "float", "t", "=", "(", "y", "-", "origin",...
Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box at the plane where y equals the value specified.
[ "Helper", "method", "for", "{" ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/f/Box.java#L449-L458
apereo/cas
core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java
AbstractCasView.getAssertionFrom
protected Assertion getAssertionFrom(final Map<String, Object> model) { """ Gets the assertion from the model. @param model the model @return the assertion from """ return (Assertion) model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_ASSERTION); }
java
protected Assertion getAssertionFrom(final Map<String, Object> model) { return (Assertion) model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_ASSERTION); }
[ "protected", "Assertion", "getAssertionFrom", "(", "final", "Map", "<", "String", ",", "Object", ">", "model", ")", "{", "return", "(", "Assertion", ")", "model", ".", "get", "(", "CasViewConstants", ".", "MODEL_ATTRIBUTE_NAME_ASSERTION", ")", ";", "}" ]
Gets the assertion from the model. @param model the model @return the assertion from
[ "Gets", "the", "assertion", "from", "the", "model", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java#L76-L78
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouteClient.java
RouteClient.insertRoute
@BetaApi public final Operation insertRoute(ProjectName project, Route routeResource) { """ Creates a Route resource in the specified project using the data included in the request. <p>Sample code: <pre><code> try (RouteClient routeClient = RouteClient.create()) { ProjectName project = ProjectName.of("[P...
java
@BetaApi public final Operation insertRoute(ProjectName project, Route routeResource) { InsertRouteHttpRequest request = InsertRouteHttpRequest.newBuilder() .setProject(project == null ? null : project.toString()) .setRouteResource(routeResource) .build(); return i...
[ "@", "BetaApi", "public", "final", "Operation", "insertRoute", "(", "ProjectName", "project", ",", "Route", "routeResource", ")", "{", "InsertRouteHttpRequest", "request", "=", "InsertRouteHttpRequest", ".", "newBuilder", "(", ")", ".", "setProject", "(", "project",...
Creates a Route resource in the specified project using the data included in the request. <p>Sample code: <pre><code> try (RouteClient routeClient = RouteClient.create()) { ProjectName project = ProjectName.of("[PROJECT]"); Route routeResource = Route.newBuilder().build(); Operation response = routeClient.insertRoute...
[ "Creates", "a", "Route", "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/RouteClient.java#L378-L387
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.findWildcard
public <P extends ParaObject> List<P> findWildcard(String type, String field, String wildcard, Pager... pager) { """ Searches for objects that have a property with a value matching a wildcard query. @param <P> type of the object @param type the type of object to search for. See {@link com.erudika.para.core.ParaO...
java
public <P extends ParaObject> List<P> findWildcard(String type, String field, String wildcard, Pager... pager) { MultivaluedMap<String, String> params = new MultivaluedHashMap<>(); params.putSingle("field", field); params.putSingle("q", wildcard); params.putSingle(Config._TYPE, type); params.putAll(pagerToPar...
[ "public", "<", "P", "extends", "ParaObject", ">", "List", "<", "P", ">", "findWildcard", "(", "String", "type", ",", "String", "field", ",", "String", "wildcard", ",", "Pager", "...", "pager", ")", "{", "MultivaluedMap", "<", "String", ",", "String", ">"...
Searches for objects that have a property with a value matching a wildcard query. @param <P> type of the object @param type the type of object to search for. See {@link com.erudika.para.core.ParaObject#getType()} @param field the property name of an object @param wildcard wildcard query string. For example "cat*". @par...
[ "Searches", "for", "objects", "that", "have", "a", "property", "with", "a", "value", "matching", "a", "wildcard", "query", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L860-L867
Squarespace/cldr
core/src/main/java/com/squarespace/cldr/units/Rational.java
Rational.compute
public BigDecimal compute(int scale, RoundingMode mode) { """ Divide the numerator by the denominator, using the given scale and rounding mode, and return the resulting decimal number. """ return numerator.divide(denominator, scale, mode).stripTrailingZeros(); }
java
public BigDecimal compute(int scale, RoundingMode mode) { return numerator.divide(denominator, scale, mode).stripTrailingZeros(); }
[ "public", "BigDecimal", "compute", "(", "int", "scale", ",", "RoundingMode", "mode", ")", "{", "return", "numerator", ".", "divide", "(", "denominator", ",", "scale", ",", "mode", ")", ".", "stripTrailingZeros", "(", ")", ";", "}" ]
Divide the numerator by the denominator, using the given scale and rounding mode, and return the resulting decimal number.
[ "Divide", "the", "numerator", "by", "the", "denominator", "using", "the", "given", "scale", "and", "rounding", "mode", "and", "return", "the", "resulting", "decimal", "number", "." ]
train
https://github.com/Squarespace/cldr/blob/54b752d4ec2457df56e98461618f9c0eec41e1e1/core/src/main/java/com/squarespace/cldr/units/Rational.java#L74-L76
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/SystemUtil.java
SystemUtil.normalizePath
public static String normalizePath(String _path, boolean _appendFinalSeparator) { """ Normalize a file system path expression for the current OS. Replaces path separators by this OS's path separator. Appends a final path separator if parameter is set and if not yet present. @param _path path @param _appendFin...
java
public static String normalizePath(String _path, boolean _appendFinalSeparator) { if (_path == null) { return _path; } String path = _path .replace("\\", FILE_SEPARATOR) .replace("/", FILE_SEPARATOR); if (_appendFinalSeparator && !path.endsWith(FILE_S...
[ "public", "static", "String", "normalizePath", "(", "String", "_path", ",", "boolean", "_appendFinalSeparator", ")", "{", "if", "(", "_path", "==", "null", ")", "{", "return", "_path", ";", "}", "String", "path", "=", "_path", ".", "replace", "(", "\"\\\\\...
Normalize a file system path expression for the current OS. Replaces path separators by this OS's path separator. Appends a final path separator if parameter is set and if not yet present. @param _path path @param _appendFinalSeparator controls appendix of separator at the end @return normalized path
[ "Normalize", "a", "file", "system", "path", "expression", "for", "the", "current", "OS", ".", "Replaces", "path", "separators", "by", "this", "OS", "s", "path", "separator", ".", "Appends", "a", "final", "path", "separator", "if", "parameter", "is", "set", ...
train
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/SystemUtil.java#L409-L421
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.beginStart
public OperationStatusResponseInner beginStart(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { """ Starts one or more virtual machines in a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @param instanceIds...
java
public OperationStatusResponseInner beginStart(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); }
[ "public", "OperationStatusResponseInner", "beginStart", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ",", "List", "<", "String", ">", "instanceIds", ")", "{", "return", "beginStartWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmScaleSe...
Starts one or more virtual machines in a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being perfo...
[ "Starts", "one", "or", "more", "virtual", "machines", "in", "a", "VM", "scale", "set", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L2617-L2619
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/ContentKeyPoliciesInner.java
ContentKeyPoliciesInner.createOrUpdateAsync
public Observable<ContentKeyPolicyInner> createOrUpdateAsync(String resourceGroupName, String accountName, String contentKeyPolicyName, ContentKeyPolicyInner parameters) { """ Create or update an Content Key Policy. Create or update a Content Key Policy in the Media Services account. @param resourceGroupName T...
java
public Observable<ContentKeyPolicyInner> createOrUpdateAsync(String resourceGroupName, String accountName, String contentKeyPolicyName, ContentKeyPolicyInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, contentKeyPolicyName, parameters).map(new Func1<ServiceRespons...
[ "public", "Observable", "<", "ContentKeyPolicyInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "contentKeyPolicyName", ",", "ContentKeyPolicyInner", "parameters", ")", "{", "return", "createOrUpdateWithServ...
Create or update an Content Key Policy. Create or update a Content Key Policy in the Media Services account. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param contentKeyPolicyName The Content Key Policy name. @param paramet...
[ "Create", "or", "update", "an", "Content", "Key", "Policy", ".", "Create", "or", "update", "a", "Content", "Key", "Policy", "in", "the", "Media", "Services", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/ContentKeyPoliciesInner.java#L505-L512
apereo/cas
support/cas-server-support-memcached-monitor/src/main/java/org/apereo/cas/monitor/MemcachedHealthIndicator.java
MemcachedHealthIndicator.getStatistics
@Override protected CacheStatistics[] getStatistics() { """ Get cache statistics for all memcached hosts known to {@link MemcachedClientIF}. @return Statistics for all available hosts. """ val statsList = new ArrayList<CacheStatistics>(); try { val client = getClientFromPool(...
java
@Override protected CacheStatistics[] getStatistics() { val statsList = new ArrayList<CacheStatistics>(); try { val client = getClientFromPool(); client.getStats() .forEach((key, statsMap) -> { if (!statsMap.isEmpty()) { ...
[ "@", "Override", "protected", "CacheStatistics", "[", "]", "getStatistics", "(", ")", "{", "val", "statsList", "=", "new", "ArrayList", "<", "CacheStatistics", ">", "(", ")", ";", "try", "{", "val", "client", "=", "getClientFromPool", "(", ")", ";", "clien...
Get cache statistics for all memcached hosts known to {@link MemcachedClientIF}. @return Statistics for all available hosts.
[ "Get", "cache", "statistics", "for", "all", "memcached", "hosts", "known", "to", "{", "@link", "MemcachedClientIF", "}", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-memcached-monitor/src/main/java/org/apereo/cas/monitor/MemcachedHealthIndicator.java#L60-L83
roboconf/roboconf-platform
miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/ProjectUtils.java
ProjectUtils.createProjectSkeleton
public static void createProjectSkeleton( File targetDirectory, CreationBean creationBean ) throws IOException { """ Creates a project for Roboconf. @param targetDirectory the directory into which the Roboconf files must be copied @param creationBean the creation properties @throws IOException if something went...
java
public static void createProjectSkeleton( File targetDirectory, CreationBean creationBean ) throws IOException { if( creationBean.isMavenProject()) createMavenProject( targetDirectory, creationBean ); else createSimpleProject( targetDirectory, creationBean ); }
[ "public", "static", "void", "createProjectSkeleton", "(", "File", "targetDirectory", ",", "CreationBean", "creationBean", ")", "throws", "IOException", "{", "if", "(", "creationBean", ".", "isMavenProject", "(", ")", ")", "createMavenProject", "(", "targetDirectory", ...
Creates a project for Roboconf. @param targetDirectory the directory into which the Roboconf files must be copied @param creationBean the creation properties @throws IOException if something went wrong
[ "Creates", "a", "project", "for", "Roboconf", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/ProjectUtils.java#L91-L97
googleapis/google-cloud-java
google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TimestampBound.java
TimestampBound.ofExactStaleness
public static TimestampBound ofExactStaleness(long num, TimeUnit units) { """ Returns a timestamp bound that will perform reads and queries at an exact staleness. The timestamp is chosen soon after the read is started. <p>Guarantees that all writes that have committed more than the specified number of seconds ...
java
public static TimestampBound ofExactStaleness(long num, TimeUnit units) { checkStaleness(num); return new TimestampBound(Mode.EXACT_STALENESS, null, createDuration(num, units)); }
[ "public", "static", "TimestampBound", "ofExactStaleness", "(", "long", "num", ",", "TimeUnit", "units", ")", "{", "checkStaleness", "(", "num", ")", ";", "return", "new", "TimestampBound", "(", "Mode", ".", "EXACT_STALENESS", ",", "null", ",", "createDuration", ...
Returns a timestamp bound that will perform reads and queries at an exact staleness. The timestamp is chosen soon after the read is started. <p>Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works ev...
[ "Returns", "a", "timestamp", "bound", "that", "will", "perform", "reads", "and", "queries", "at", "an", "exact", "staleness", ".", "The", "timestamp", "is", "chosen", "soon", "after", "the", "read", "is", "started", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TimestampBound.java#L180-L183
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java
AssertMessages.lowerEqualParameters
@Pure public static String lowerEqualParameters(int aindex, Object avalue, int bindex, Object bvalue) { """ Parameter A must be lower than or equal to Parameter B. @param aindex the index of the parameter A. @param avalue the value of the parameter A. @param bindex the index of the parameter B. @param bvalu...
java
@Pure public static String lowerEqualParameters(int aindex, Object avalue, int bindex, Object bvalue) { return msg("A3", aindex, avalue, bindex, bvalue); //$NON-NLS-1$ }
[ "@", "Pure", "public", "static", "String", "lowerEqualParameters", "(", "int", "aindex", ",", "Object", "avalue", ",", "int", "bindex", ",", "Object", "bvalue", ")", "{", "return", "msg", "(", "\"A3\"", ",", "aindex", ",", "avalue", ",", "bindex", ",", "...
Parameter A must be lower than or equal to Parameter B. @param aindex the index of the parameter A. @param avalue the value of the parameter A. @param bindex the index of the parameter B. @param bvalue the value of the parameter B. @return the error message.
[ "Parameter", "A", "must", "be", "lower", "than", "or", "equal", "to", "Parameter", "B", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java#L139-L142
sundrio/sundrio
codegen/src/main/java/io/sundr/codegen/processor/JavaGeneratingProcessor.java
JavaGeneratingProcessor.generateFromStringTemplate
public void generateFromStringTemplate(TypeDef model, String[] parameters, String content) throws IOException { """ Generates a source file from the specified {@link io.sundr.codegen.model.TypeDef}. @param model The model of the class to generate. @param content The template to use. @throws IOEx...
java
public void generateFromStringTemplate(TypeDef model, String[] parameters, String content) throws IOException { TypeDef newModel = createTypeFromTemplate(model, parameters, content); if (processingEnv.getElementUtils().getTypeElement(newModel.getFullyQualifiedName()) != null) { System.err.pr...
[ "public", "void", "generateFromStringTemplate", "(", "TypeDef", "model", ",", "String", "[", "]", "parameters", ",", "String", "content", ")", "throws", "IOException", "{", "TypeDef", "newModel", "=", "createTypeFromTemplate", "(", "model", ",", "parameters", ",",...
Generates a source file from the specified {@link io.sundr.codegen.model.TypeDef}. @param model The model of the class to generate. @param content The template to use. @throws IOException If it fails to create the source file.
[ "Generates", "a", "source", "file", "from", "the", "specified", "{", "@link", "io", ".", "sundr", ".", "codegen", ".", "model", ".", "TypeDef", "}", "." ]
train
https://github.com/sundrio/sundrio/blob/4e38368f4db0d950f7c41a8c75e15b0baff1f69a/codegen/src/main/java/io/sundr/codegen/processor/JavaGeneratingProcessor.java#L86-L97
andrehertwig/admintool
admin-tools-core/src/main/java/de/chandre/admintool/core/utils/AdminToolMenuUtils.java
AdminToolMenuUtils.hasMenuEntry
public boolean hasMenuEntry(AdminComponent component, MenuEntry activeMenue) { """ checks if the activeMenue is part of given component @param component the AdminComponent which should contain the activeMenue @param activeMenue the menue to check @return """ if (null != component && null != component.ge...
java
public boolean hasMenuEntry(AdminComponent component, MenuEntry activeMenue) { if (null != component && null != component.getMainMenu()) { Optional<MenuEntry> result = component.getMainMenu().flattened() .filter(menu -> checkForNull(menu, activeMenue) ? menu.getName().equals(activeMenue.getName()): false) ...
[ "public", "boolean", "hasMenuEntry", "(", "AdminComponent", "component", ",", "MenuEntry", "activeMenue", ")", "{", "if", "(", "null", "!=", "component", "&&", "null", "!=", "component", ".", "getMainMenu", "(", ")", ")", "{", "Optional", "<", "MenuEntry", "...
checks if the activeMenue is part of given component @param component the AdminComponent which should contain the activeMenue @param activeMenue the menue to check @return
[ "checks", "if", "the", "activeMenue", "is", "part", "of", "given", "component" ]
train
https://github.com/andrehertwig/admintool/blob/6d391e2d26969b70e3ccabfc34202abe8d915080/admin-tools-core/src/main/java/de/chandre/admintool/core/utils/AdminToolMenuUtils.java#L182-L190
Esri/geometry-api-java
src/main/java/com/esri/core/geometry/MultiPath.java
MultiPath.bezierTo
void bezierTo(Point2D controlPoint1, Point2D controlPoint2, Point2D endPoint) { """ Adds a Cubic Bezier Segment to the current Path. The Bezier Segment connects the current last Point and the given endPoint. """ m_impl.bezierTo(controlPoint1, controlPoint2, endPoint); }
java
void bezierTo(Point2D controlPoint1, Point2D controlPoint2, Point2D endPoint) { m_impl.bezierTo(controlPoint1, controlPoint2, endPoint); }
[ "void", "bezierTo", "(", "Point2D", "controlPoint1", ",", "Point2D", "controlPoint2", ",", "Point2D", "endPoint", ")", "{", "m_impl", ".", "bezierTo", "(", "controlPoint1", ",", "controlPoint2", ",", "endPoint", ")", ";", "}" ]
Adds a Cubic Bezier Segment to the current Path. The Bezier Segment connects the current last Point and the given endPoint.
[ "Adds", "a", "Cubic", "Bezier", "Segment", "to", "the", "current", "Path", ".", "The", "Bezier", "Segment", "connects", "the", "current", "last", "Point", "and", "the", "given", "endPoint", "." ]
train
https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/MultiPath.java#L615-L617
roboconf/roboconf-platform
core/roboconf-messaging-api/src/main/java/net/roboconf/messaging/api/extensions/AbstractRoutingClient.java
AbstractRoutingClient.unsubscribe
protected void unsubscribe( String id, MessagingContext ctx ) throws IOException { """ Unregisters a subscription between an ID and a context. @param id a client ID @param ctx a messaging context @throws IOException """ if( ! canProceed()) return; Set<MessagingContext> sub = this.routingContext.sub...
java
protected void unsubscribe( String id, MessagingContext ctx ) throws IOException { if( ! canProceed()) return; Set<MessagingContext> sub = this.routingContext.subscriptions.get( id ); if( sub != null ) { sub.remove( ctx ); if( sub.isEmpty()) this.routingContext.subscriptions.remove( id ); } }
[ "protected", "void", "unsubscribe", "(", "String", "id", ",", "MessagingContext", "ctx", ")", "throws", "IOException", "{", "if", "(", "!", "canProceed", "(", ")", ")", "return", ";", "Set", "<", "MessagingContext", ">", "sub", "=", "this", ".", "routingCo...
Unregisters a subscription between an ID and a context. @param id a client ID @param ctx a messaging context @throws IOException
[ "Unregisters", "a", "subscription", "between", "an", "ID", "and", "a", "context", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-messaging-api/src/main/java/net/roboconf/messaging/api/extensions/AbstractRoutingClient.java#L286-L297
zeromq/jeromq
src/main/java/zmq/poll/PollerBase.java
PollerBase.cancelTimer
public void cancelTimer(IPollEvents sink, int id) { """ Cancel the timer created by sink_ object with ID equal to id_. """ assert (Thread.currentThread() == worker); TimerInfo copy = new TimerInfo(sink, id); // Complexity of this operation is O(n). We assume it is rarely used. ...
java
public void cancelTimer(IPollEvents sink, int id) { assert (Thread.currentThread() == worker); TimerInfo copy = new TimerInfo(sink, id); // Complexity of this operation is O(n). We assume it is rarely used. TimerInfo timerInfo = timers.find(copy); if (timerInfo != null) { ...
[ "public", "void", "cancelTimer", "(", "IPollEvents", "sink", ",", "int", "id", ")", "{", "assert", "(", "Thread", ".", "currentThread", "(", ")", "==", "worker", ")", ";", "TimerInfo", "copy", "=", "new", "TimerInfo", "(", "sink", ",", "id", ")", ";", ...
Cancel the timer created by sink_ object with ID equal to id_.
[ "Cancel", "the", "timer", "created", "by", "sink_", "object", "with", "ID", "equal", "to", "id_", "." ]
train
https://github.com/zeromq/jeromq/blob/8b4a2960b468d08b7aebb0d40bfb947e08fed040/src/main/java/zmq/poll/PollerBase.java#L123-L135
javagl/CommonUI
src/main/java/de/javagl/common/ui/LocationBasedPopupHandler.java
LocationBasedPopupHandler.prepareMenu
private void prepareMenu(Container menu, Component component, int x, int y) { """ Prepare the given menu recursively with the given parameters @param menu The menu @param component The component @param x The x-coordinate @param y THe y-coordinate """ int n = menu.getComponentCount(); fo...
java
private void prepareMenu(Container menu, Component component, int x, int y) { int n = menu.getComponentCount(); for (int i=0; i<n; i++) { Component menuComponent = popupMenu.getComponent(i); if (menuComponent instanceof JMenu) { JMe...
[ "private", "void", "prepareMenu", "(", "Container", "menu", ",", "Component", "component", ",", "int", "x", ",", "int", "y", ")", "{", "int", "n", "=", "menu", ".", "getComponentCount", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<"...
Prepare the given menu recursively with the given parameters @param menu The menu @param component The component @param x The x-coordinate @param y THe y-coordinate
[ "Prepare", "the", "given", "menu", "recursively", "with", "the", "given", "parameters" ]
train
https://github.com/javagl/CommonUI/blob/b2c7a7637d4e288271392ba148dc17e4c9780255/src/main/java/de/javagl/common/ui/LocationBasedPopupHandler.java#L102-L125
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/TagUtil.java
TagUtil.checkMatchingTags
public static boolean checkMatchingTags(Collection<String> tags, Set<String> includeTags, Set<String> excludeTags, boolean strictExclude) { """ <p> If any tag is in the exclude list and strictExclude is true, this will return false. If any tag is in the exclude list and strictExclude is false, then it will dep...
java
public static boolean checkMatchingTags(Collection<String> tags, Set<String> includeTags, Set<String> excludeTags, boolean strictExclude) { boolean foundIncludeMatch = false; if (includeTags.isEmpty()) return true; for (String tag : tags) { if (excludeTags.c...
[ "public", "static", "boolean", "checkMatchingTags", "(", "Collection", "<", "String", ">", "tags", ",", "Set", "<", "String", ">", "includeTags", ",", "Set", "<", "String", ">", "excludeTags", ",", "boolean", "strictExclude", ")", "{", "boolean", "foundInclude...
<p> If any tag is in the exclude list and strictExclude is true, this will return false. If any tag is in the exclude list and strictExclude is false, then it will depend upon whether or not there is a tag in the includeTags list. </p> <p> If the includeTags list is empty or if any tag is in the includeTags list, ret...
[ "<p", ">", "If", "any", "tag", "is", "in", "the", "exclude", "list", "and", "strictExclude", "is", "true", "this", "will", "return", "false", "." ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/TagUtil.java#L67-L88
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/ReadOnlyHttp2Headers.java
ReadOnlyHttp2Headers.serverHeaders
public static ReadOnlyHttp2Headers serverHeaders(boolean validateHeaders, AsciiString status, AsciiString... otherHeaders) { """ Create a new read only representation of headers used by servers. @param valida...
java
public static ReadOnlyHttp2Headers serverHeaders(boolean validateHeaders, AsciiString status, AsciiString... otherHeaders) { return new ReadOnlyHttp2Headers(validateHeaders, ...
[ "public", "static", "ReadOnlyHttp2Headers", "serverHeaders", "(", "boolean", "validateHeaders", ",", "AsciiString", "status", ",", "AsciiString", "...", "otherHeaders", ")", "{", "return", "new", "ReadOnlyHttp2Headers", "(", "validateHeaders", ",", "new", "AsciiString",...
Create a new read only representation of headers used by servers. @param validateHeaders {@code true} will run validation on each header name/value pair to ensure protocol compliance. @param status The value for {@link PseudoHeaderName#STATUS}. @param otherHeaders A an array of key:value pairs. Must not contain any <a ...
[ "Create", "a", "new", "read", "only", "representation", "of", "headers", "used", "by", "servers", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/ReadOnlyHttp2Headers.java#L107-L113
alkacon/opencms-core
src/org/opencms/letsencrypt/CmsSiteConfigToLetsEncryptConfigConverter.java
CmsSiteConfigToLetsEncryptConfigConverter.getDomainInfo
private static SiteDomainInfo getDomainInfo(Collection<String> uris) { """ Computes the SiteDomainInfo bean for a collection of URIs.<p> @param uris a collection of URIs @return the SiteDomainInfo bean for the URIs """ Set<String> rootDomains = Sets.newHashSet(); Set<String> domains = Sets...
java
private static SiteDomainInfo getDomainInfo(Collection<String> uris) { Set<String> rootDomains = Sets.newHashSet(); Set<String> domains = Sets.newHashSet(); boolean invalidPort = false; for (String uriStr : uris) { try { URI uri = new URI(uriStr); ...
[ "private", "static", "SiteDomainInfo", "getDomainInfo", "(", "Collection", "<", "String", ">", "uris", ")", "{", "Set", "<", "String", ">", "rootDomains", "=", "Sets", ".", "newHashSet", "(", ")", ";", "Set", "<", "String", ">", "domains", "=", "Sets", "...
Computes the SiteDomainInfo bean for a collection of URIs.<p> @param uris a collection of URIs @return the SiteDomainInfo bean for the URIs
[ "Computes", "the", "SiteDomainInfo", "bean", "for", "a", "collection", "of", "URIs", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/letsencrypt/CmsSiteConfigToLetsEncryptConfigConverter.java#L314-L342
alkacon/opencms-core
src/org/opencms/main/CmsSystemInfo.java
CmsSystemInfo.getConfigFilePath
public String getConfigFilePath(CmsObject cms, String configFile) { """ Returns the path to a configuration file.<p> This will either be a file below /system/config/ or in case an override file exists below /system/config/overrides/.<p> @param cms the cms ontext @param configFile the config file path within /...
java
public String getConfigFilePath(CmsObject cms, String configFile) { String path = CmsStringUtil.joinPaths(VFS_CONFIG_OVERRIDE_FOLDER, configFile); if (!cms.existsResource(path)) { path = CmsStringUtil.joinPaths(VFS_CONFIG_FOLDER, configFile); } return path; }
[ "public", "String", "getConfigFilePath", "(", "CmsObject", "cms", ",", "String", "configFile", ")", "{", "String", "path", "=", "CmsStringUtil", ".", "joinPaths", "(", "VFS_CONFIG_OVERRIDE_FOLDER", ",", "configFile", ")", ";", "if", "(", "!", "cms", ".", "exis...
Returns the path to a configuration file.<p> This will either be a file below /system/config/ or in case an override file exists below /system/config/overrides/.<p> @param cms the cms ontext @param configFile the config file path within /system/config/ @return the file path
[ "Returns", "the", "path", "to", "a", "configuration", "file", ".", "<p", ">", "This", "will", "either", "be", "a", "file", "below", "/", "system", "/", "config", "/", "or", "in", "case", "an", "override", "file", "exists", "below", "/", "system", "/", ...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/CmsSystemInfo.java#L320-L327
Whiley/WhileyCompiler
src/main/java/wyil/transform/VerificationConditionGenerator.java
VerificationConditionGenerator.translateAsUnknown
private Expr translateAsUnknown(WyilFile.Expr expr, LocalEnvironment environment) { """ Translating as unknown basically means we're not representing the operation in question at the verification level. This could be something that we'll implement in the future, or maybe not. @param expr @param environment ...
java
private Expr translateAsUnknown(WyilFile.Expr expr, LocalEnvironment environment) { // What we're doing here is creating a completely fresh variable to // represent the return value. This is basically saying the return value // could be anything, and we don't care what. String name = "r" + Integer.toString(expr...
[ "private", "Expr", "translateAsUnknown", "(", "WyilFile", ".", "Expr", "expr", ",", "LocalEnvironment", "environment", ")", "{", "// What we're doing here is creating a completely fresh variable to", "// represent the return value. This is basically saying the return value", "// could ...
Translating as unknown basically means we're not representing the operation in question at the verification level. This could be something that we'll implement in the future, or maybe not. @param expr @param environment @return
[ "Translating", "as", "unknown", "basically", "means", "we", "re", "not", "representing", "the", "operation", "in", "question", "at", "the", "verification", "level", ".", "This", "could", "be", "something", "that", "we", "ll", "implement", "in", "the", "future"...
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/transform/VerificationConditionGenerator.java#L1639-L1651
nguillaumin/slick2d-maven
slick2d-hiero/src/main/java/org/newdawn/slick/tools/hiero/truetype/TTFSubSetFile.java
TTFSubSetFile.createMaxp
private void createMaxp(FontFileReader in, int size) throws IOException { """ Copy the maxp table as is from original font to subset font and set num glyphs to size @param in The reader from which to obtain the info @param size The size of the MAXP table to write @throws IOException Indicates a failure to wr...
java
private void createMaxp(FontFileReader in, int size) throws IOException { TTFDirTabEntry entry = (TTFDirTabEntry)dirTabs.get("maxp"); if (entry != null) { pad4(); seekTab(in, "maxp", 0); System.arraycopy(in.getBytes((int)entry.getOffset(), (int)entry.getLength()), ...
[ "private", "void", "createMaxp", "(", "FontFileReader", "in", ",", "int", "size", ")", "throws", "IOException", "{", "TTFDirTabEntry", "entry", "=", "(", "TTFDirTabEntry", ")", "dirTabs", ".", "get", "(", "\"maxp\"", ")", ";", "if", "(", "entry", "!=", "nu...
Copy the maxp table as is from original font to subset font and set num glyphs to size @param in The reader from which to obtain the info @param size The size of the MAXP table to write @throws IOException Indicates a failure to write
[ "Copy", "the", "maxp", "table", "as", "is", "from", "original", "font", "to", "subset", "font", "and", "set", "num", "glyphs", "to", "size" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-hiero/src/main/java/org/newdawn/slick/tools/hiero/truetype/TTFSubSetFile.java#L273-L291
joniles/mpxj
src/main/java/net/sf/mpxj/RecurringData.java
RecurringData.moreDates
private boolean moreDates(Calendar calendar, List<Date> dates) { """ Determines if we need to calculate more dates. If we do not have a finish date, this method falls back on using the occurrences attribute. If we have a finish date, we'll use that instead. We're assuming that the recurring data has one or othe...
java
private boolean moreDates(Calendar calendar, List<Date> dates) { boolean result; if (m_finishDate == null) { int occurrences = NumberHelper.getInt(m_occurrences); if (occurrences < 1) { occurrences = 1; } result = dates.size() < occurrences; ...
[ "private", "boolean", "moreDates", "(", "Calendar", "calendar", ",", "List", "<", "Date", ">", "dates", ")", "{", "boolean", "result", ";", "if", "(", "m_finishDate", "==", "null", ")", "{", "int", "occurrences", "=", "NumberHelper", ".", "getInt", "(", ...
Determines if we need to calculate more dates. If we do not have a finish date, this method falls back on using the occurrences attribute. If we have a finish date, we'll use that instead. We're assuming that the recurring data has one or other of those values. @param calendar current date @param dates dates generated...
[ "Determines", "if", "we", "need", "to", "calculate", "more", "dates", ".", "If", "we", "do", "not", "have", "a", "finish", "date", "this", "method", "falls", "back", "on", "using", "the", "occurrences", "attribute", ".", "If", "we", "have", "a", "finish"...
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L375-L392
alkacon/opencms-core
src/org/opencms/jsp/util/CmsJspElFunctions.java
CmsJspElFunctions.convertResource
public static CmsJspResourceWrapper convertResource(CmsObject cms, Object input) throws CmsException { """ Returns a resource wrapper created from the input. The wrapped result of {@link #convertRawResource(CmsObject, Object)} is returned. @param cms the current OpenCms user context @param input the input t...
java
public static CmsJspResourceWrapper convertResource(CmsObject cms, Object input) throws CmsException { CmsJspResourceWrapper result; if (input instanceof CmsResource) { result = CmsJspResourceWrapper.wrap(cms, (CmsResource)input); } else { result = CmsJspResourceWrapper....
[ "public", "static", "CmsJspResourceWrapper", "convertResource", "(", "CmsObject", "cms", ",", "Object", "input", ")", "throws", "CmsException", "{", "CmsJspResourceWrapper", "result", ";", "if", "(", "input", "instanceof", "CmsResource", ")", "{", "result", "=", "...
Returns a resource wrapper created from the input. The wrapped result of {@link #convertRawResource(CmsObject, Object)} is returned. @param cms the current OpenCms user context @param input the input to create a resource from @return a resource wrapper created from the given Object @throws CmsException in case of e...
[ "Returns", "a", "resource", "wrapper", "created", "from", "the", "input", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspElFunctions.java#L365-L374
MenoData/Time4J
base/src/main/java/net/time4j/calendar/frenchrev/FrenchRepublicanCalendar.java
FrenchRepublicanCalendar.getDate
public Date getDate(FrenchRepublicanAlgorithm algorithm) { """ /*[deutsch] <p>Erh&auml;lt eine alternative Datumssicht spezifisch f&uuml;r den angegebenen Algorithmus. </p> @param algorithm calendar computation @return French republican date (possibly modified) @throws IllegalArgumentException in case ...
java
public Date getDate(FrenchRepublicanAlgorithm algorithm) { if (algorithm == DEFAULT_ALGORITHM) { return new Date(this, DEFAULT_ALGORITHM); } long utcDays = DEFAULT_ALGORITHM.transform(this); return new Date(algorithm.transform(utcDays), algorithm); }
[ "public", "Date", "getDate", "(", "FrenchRepublicanAlgorithm", "algorithm", ")", "{", "if", "(", "algorithm", "==", "DEFAULT_ALGORITHM", ")", "{", "return", "new", "Date", "(", "this", ",", "DEFAULT_ALGORITHM", ")", ";", "}", "long", "utcDays", "=", "DEFAULT_A...
/*[deutsch] <p>Erh&auml;lt eine alternative Datumssicht spezifisch f&uuml;r den angegebenen Algorithmus. </p> @param algorithm calendar computation @return French republican date (possibly modified) @throws IllegalArgumentException in case of date overflow @since 3.33/4.28
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Erh&auml", ";", "lt", "eine", "alternative", "Datumssicht", "spezifisch", "f&uuml", ";", "r", "den", "angegebenen", "Algorithmus", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/calendar/frenchrev/FrenchRepublicanCalendar.java#L1077-L1086
opentable/otj-jaxrs
client/src/main/java/com/opentable/jaxrs/JaxRsClientFactory.java
JaxRsClientFactory.newClient
public Client newClient(String clientName, Collection<JaxRsFeatureGroup> featureGroups) { """ Create a new {@link Client} instance with the given name and groups. You own the returned client and are responsible for managing its cleanup. """ return newBuilder(clientName, featureGroups).build(); }
java
public Client newClient(String clientName, Collection<JaxRsFeatureGroup> featureGroups) { return newBuilder(clientName, featureGroups).build(); }
[ "public", "Client", "newClient", "(", "String", "clientName", ",", "Collection", "<", "JaxRsFeatureGroup", ">", "featureGroups", ")", "{", "return", "newBuilder", "(", "clientName", ",", "featureGroups", ")", ".", "build", "(", ")", ";", "}" ]
Create a new {@link Client} instance with the given name and groups. You own the returned client and are responsible for managing its cleanup.
[ "Create", "a", "new", "{" ]
train
https://github.com/opentable/otj-jaxrs/blob/384e7094fe5a56d41b2a9970bfd783fa85cbbcb8/client/src/main/java/com/opentable/jaxrs/JaxRsClientFactory.java#L247-L249
sangupta/jerry-web
src/main/java/com/sangupta/jerry/web/filters/ExceptionCatchingFilter.java
ExceptionCatchingFilter.doFilter
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { """ @param request the incoming {@link ServletRequest} instance @param response the outgoing {@link ServletResponse} instance @param chain the {@link FilterChain} bei...
java
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { try { chain.doFilter(request, response); } catch(Throwable t) { String uuid = UUID.randomUUID().toString(); LOGGER.error("Uncaught exception found with UUID: " + u...
[ "@", "Override", "public", "void", "doFilter", "(", "ServletRequest", "request", ",", "ServletResponse", "response", ",", "FilterChain", "chain", ")", "throws", "IOException", ",", "ServletException", "{", "try", "{", "chain", ".", "doFilter", "(", "request", ",...
@param request the incoming {@link ServletRequest} instance @param response the outgoing {@link ServletResponse} instance @param chain the {@link FilterChain} being executed @throws IOException if something fails @throws ServletException if something fails @see javax.servlet.Filter#doFilter(javax.servlet.ServletRe...
[ "@param", "request", "the", "incoming", "{", "@link", "ServletRequest", "}", "instance" ]
train
https://github.com/sangupta/jerry-web/blob/f0d02a5d6e7d1c15292509ce588caf52a4ddb895/src/main/java/com/sangupta/jerry/web/filters/ExceptionCatchingFilter.java#L100-L115
alkacon/opencms-core
src-gwt/org/opencms/ade/upload/client/ui/A_CmsUploadDialog.java
A_CmsUploadDialog.startLoadingAnimation
private void startLoadingAnimation(final String msg, int delayMillis) { """ Starts the loading animation.<p> Used while client is loading files from hard disk into memory.<p> @param msg the message that should be displayed below the loading animation (can also be HTML as String) @param delayMillis the delay...
java
private void startLoadingAnimation(final String msg, int delayMillis) { m_loadingTimer = new Timer() { @Override public void run() { createLoadingAnimation(msg); } }; if (delayMillis > 0) { m_loadingTimer.schedule(delayMillis); ...
[ "private", "void", "startLoadingAnimation", "(", "final", "String", "msg", ",", "int", "delayMillis", ")", "{", "m_loadingTimer", "=", "new", "Timer", "(", ")", "{", "@", "Override", "public", "void", "run", "(", ")", "{", "createLoadingAnimation", "(", "msg...
Starts the loading animation.<p> Used while client is loading files from hard disk into memory.<p> @param msg the message that should be displayed below the loading animation (can also be HTML as String) @param delayMillis the delay to start the animation with
[ "Starts", "the", "loading", "animation", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/upload/client/ui/A_CmsUploadDialog.java#L1432-L1447
carewebframework/carewebframework-core
org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/context/ContextManager.java
ContextManager.resetItem
private void resetItem(IManagedContext<?> item, boolean silent, ISurveyCallback callback) { """ Resets the managed context. @param item Managed context to reset. @param silent Silent flag. @param callback Callback for polling. """ try { localChangeBegin(item); item.reset();...
java
private void resetItem(IManagedContext<?> item, boolean silent, ISurveyCallback callback) { try { localChangeBegin(item); item.reset(); localChangeEnd(item, silent, true, callback); } catch (ContextException e) { execCallback(callback, e); } }
[ "private", "void", "resetItem", "(", "IManagedContext", "<", "?", ">", "item", ",", "boolean", "silent", ",", "ISurveyCallback", "callback", ")", "{", "try", "{", "localChangeBegin", "(", "item", ")", ";", "item", ".", "reset", "(", ")", ";", "localChangeE...
Resets the managed context. @param item Managed context to reset. @param silent Silent flag. @param callback Callback for polling.
[ "Resets", "the", "managed", "context", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/context/ContextManager.java#L603-L611
facebookarchive/hadoop-20
src/core/org/apache/hadoop/io/SequenceFile.java
SequenceFile.createWriter
private static Writer createWriter(FileSystem fs, Configuration conf, Path file, Class keyClass, Class valClass, boolean compress, boolean blockCompress, CompressionCodec codec, Progressable progress, Metadata metadata) throws IOException { """ Construct the prefe...
java
private static Writer createWriter(FileSystem fs, Configuration conf, Path file, Class keyClass, Class valClass, boolean compress, boolean blockCompress, CompressionCodec codec, Progressable progress, Metadata metadata) throws IOException { if (codec != null && (code...
[ "private", "static", "Writer", "createWriter", "(", "FileSystem", "fs", ",", "Configuration", "conf", ",", "Path", "file", ",", "Class", "keyClass", ",", "Class", "valClass", ",", "boolean", "compress", ",", "boolean", "blockCompress", ",", "CompressionCodec", "...
Construct the preferred type of 'raw' SequenceFile Writer. @param fs The configured filesystem. @param conf The configuration. @param file The name of the file. @param keyClass The 'key' type. @param valClass The 'value' type. @param compress Compress data? @param blockCompress Compress blocks? @param codec The compres...
[ "Construct", "the", "preferred", "type", "of", "raw", "SequenceFile", "Writer", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/io/SequenceFile.java#L611-L637
infinispan/infinispan
core/src/main/java/org/infinispan/cache/impl/SimpleCacheImpl.java
SimpleCacheImpl.getValue
private V getValue(InternalCacheEntry<K, V> entry) { """ This method can be called only from dataContainer.compute()'s action! """ return isNull(entry) ? null : entry.getValue(); }
java
private V getValue(InternalCacheEntry<K, V> entry) { return isNull(entry) ? null : entry.getValue(); }
[ "private", "V", "getValue", "(", "InternalCacheEntry", "<", "K", ",", "V", ">", "entry", ")", "{", "return", "isNull", "(", "entry", ")", "?", "null", ":", "entry", ".", "getValue", "(", ")", ";", "}" ]
This method can be called only from dataContainer.compute()'s action!
[ "This", "method", "can", "be", "called", "only", "from", "dataContainer", ".", "compute", "()", "s", "action!" ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/cache/impl/SimpleCacheImpl.java#L1616-L1618
pravega/pravega
common/src/main/java/io/pravega/common/util/btree/BTreeIndex.java
BTreeIndex.fetchPage
private CompletableFuture<PageWrapper> fetchPage(PagePointer pagePointer, PageWrapper parentPage, PageCollection pageCollection, Duration timeout) { """ Loads up a single Page. @param pagePointer A PagePointer indicating the Page to load. @param parentPage The sought page's Parent Page. May be null for ...
java
private CompletableFuture<PageWrapper> fetchPage(PagePointer pagePointer, PageWrapper parentPage, PageCollection pageCollection, Duration timeout) { PageWrapper fromCache = pageCollection.get(pagePointer.getOffset()); if (fromCache != null) { return CompletableFuture.completedFuture(fromCach...
[ "private", "CompletableFuture", "<", "PageWrapper", ">", "fetchPage", "(", "PagePointer", "pagePointer", ",", "PageWrapper", "parentPage", ",", "PageCollection", "pageCollection", ",", "Duration", "timeout", ")", "{", "PageWrapper", "fromCache", "=", "pageCollection", ...
Loads up a single Page. @param pagePointer A PagePointer indicating the Page to load. @param parentPage The sought page's Parent Page. May be null for root pages only. @param pageCollection A PageCollection that contains already looked up pages. If the sought page is already loaded it will be served from here; ...
[ "Loads", "up", "a", "single", "Page", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/util/btree/BTreeIndex.java#L651-L667
lesaint/damapping
core-parent/annotation-processor/src/main/java/fr/javatronic/damapping/processor/impl/javaxparsing/ProcessingEnvironmentWrapper.java
ProcessingEnvironmentWrapper.buildErrorMessage
private static String buildErrorMessage(Exception e, String annotationSimpleName) { """ Produit un message d'erreur indiquant que le traitement de l'annoation {@code annotation} a échoué avec l'exception indiquée et précise la première ligne de la stacktrace si l'information est disponible. @param e ...
java
private static String buildErrorMessage(Exception e, String annotationSimpleName) { StackTraceElement[] stackTrace = e.getStackTrace(); StringBuilder builder = new StringBuilder() .append("Processing of annotation ") .append(annotationSimpleName) .append(" : ") .append(e); if...
[ "private", "static", "String", "buildErrorMessage", "(", "Exception", "e", ",", "String", "annotationSimpleName", ")", "{", "StackTraceElement", "[", "]", "stackTrace", "=", "e", ".", "getStackTrace", "(", ")", ";", "StringBuilder", "builder", "=", "new", "Strin...
Produit un message d'erreur indiquant que le traitement de l'annoation {@code annotation} a échoué avec l'exception indiquée et précise la première ligne de la stacktrace si l'information est disponible. @param e l'{@link Exception} capturée @param annotationSimpleName un {@link TypeElement} représe...
[ "Produit", "un", "message", "d", "erreur", "indiquant", "que", "le", "traitement", "de", "l", "annoation", "{", "@code", "annotation", "}", "a", "échoué", "avec", "l", "exception", "indiquée", "et", "précise", "la", "première", "ligne", "de", "la", "stacktra...
train
https://github.com/lesaint/damapping/blob/357afa5866939fd2a18c09213975ffef4836f328/core-parent/annotation-processor/src/main/java/fr/javatronic/damapping/processor/impl/javaxparsing/ProcessingEnvironmentWrapper.java#L109-L120
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/archivalurl/StandardAttributeRewriter.java
StandardAttributeRewriter.initTransformers
protected void initTransformers() { """ Initialize {@code StringTransformer}s, register them to {@code transformers} map by their name. """ if (jsBlockTrans == null) jsBlockTrans = new JSStringTransformer(); URLStringTransformer anchorTrans = new URLStringTransformer(); anchorTrans.setJsTransformer(j...
java
protected void initTransformers() { if (jsBlockTrans == null) jsBlockTrans = new JSStringTransformer(); URLStringTransformer anchorTrans = new URLStringTransformer(); anchorTrans.setJsTransformer(jsBlockTrans); transformers = new HashMap<String, StringTransformer>(); transformers.put("fw", new URLStringTr...
[ "protected", "void", "initTransformers", "(", ")", "{", "if", "(", "jsBlockTrans", "==", "null", ")", "jsBlockTrans", "=", "new", "JSStringTransformer", "(", ")", ";", "URLStringTransformer", "anchorTrans", "=", "new", "URLStringTransformer", "(", ")", ";", "anc...
Initialize {@code StringTransformer}s, register them to {@code transformers} map by their name.
[ "Initialize", "{" ]
train
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/archivalurl/StandardAttributeRewriter.java#L211-L235
SimplicityApks/ReminderDatePicker
lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/ReminderDatePicker.java
ReminderDatePicker.getNextItemDate
private @Nullable Calendar getNextItemDate(Calendar searchDate) { """ Gets the next date item's date equal to or later than the given date in the DateSpinner. Requires that the items are in ascending order. @return A date from the next item in the DateSpinner, or no such date was found. """ final int...
java
private @Nullable Calendar getNextItemDate(Calendar searchDate) { final int last = dateSpinner.getLastItemPosition(); for (int i=0; i<=last; i++) { final Calendar date = ((DateItem) dateSpinner.getItemAtPosition(i)).getDate(); // use the DateSpinner's compare method so hours and ...
[ "private", "@", "Nullable", "Calendar", "getNextItemDate", "(", "Calendar", "searchDate", ")", "{", "final", "int", "last", "=", "dateSpinner", ".", "getLastItemPosition", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<=", "last", ";", "i",...
Gets the next date item's date equal to or later than the given date in the DateSpinner. Requires that the items are in ascending order. @return A date from the next item in the DateSpinner, or no such date was found.
[ "Gets", "the", "next", "date", "item", "s", "date", "equal", "to", "or", "later", "than", "the", "given", "date", "in", "the", "DateSpinner", ".", "Requires", "that", "the", "items", "are", "in", "ascending", "order", "." ]
train
https://github.com/SimplicityApks/ReminderDatePicker/blob/7596fbac77a5d26f687fec11758935a2b7db156f/lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/ReminderDatePicker.java#L216-L226
getsentry/sentry-java
sentry/src/main/java/io/sentry/util/Util.java
Util.parseInteger
public static Integer parseInteger(String value, Integer defaultValue) { """ Parses the provided string value into an integer value. <p>If the string is null or empty this returns the default value.</p> @param value value to parse @param defaultValue default value @return integer representation of pro...
java
public static Integer parseInteger(String value, Integer defaultValue) { if (isNullOrEmpty(value)) { return defaultValue; } return Integer.parseInt(value); }
[ "public", "static", "Integer", "parseInteger", "(", "String", "value", ",", "Integer", "defaultValue", ")", "{", "if", "(", "isNullOrEmpty", "(", "value", ")", ")", "{", "return", "defaultValue", ";", "}", "return", "Integer", ".", "parseInt", "(", "value", ...
Parses the provided string value into an integer value. <p>If the string is null or empty this returns the default value.</p> @param value value to parse @param defaultValue default value @return integer representation of provided value or default value.
[ "Parses", "the", "provided", "string", "value", "into", "an", "integer", "value", ".", "<p", ">", "If", "the", "string", "is", "null", "or", "empty", "this", "returns", "the", "default", "value", ".", "<", "/", "p", ">" ]
train
https://github.com/getsentry/sentry-java/blob/2e01461775cbd5951ff82b566069c349146d8aca/sentry/src/main/java/io/sentry/util/Util.java#L102-L107
Azure/azure-sdk-for-java
containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ManagedClustersInner.java
ManagedClustersInner.getAccessProfileAsync
public Observable<ManagedClusterAccessProfileInner> getAccessProfileAsync(String resourceGroupName, String resourceName, String roleName) { """ Gets an access profile of a managed cluster. Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and name. @param...
java
public Observable<ManagedClusterAccessProfileInner> getAccessProfileAsync(String resourceGroupName, String resourceName, String roleName) { return getAccessProfileWithServiceResponseAsync(resourceGroupName, resourceName, roleName).map(new Func1<ServiceResponse<ManagedClusterAccessProfileInner>, ManagedClusterAc...
[ "public", "Observable", "<", "ManagedClusterAccessProfileInner", ">", "getAccessProfileAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "String", "roleName", ")", "{", "return", "getAccessProfileWithServiceResponseAsync", "(", "resourceGroupName...
Gets an access profile of a managed cluster. Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and name. @param resourceGroupName The name of the resource group. @param resourceName The name of the managed cluster resource. @param roleName The name of the role fo...
[ "Gets", "an", "access", "profile", "of", "a", "managed", "cluster", ".", "Gets", "the", "accessProfile", "for", "the", "specified", "role", "name", "of", "the", "managed", "cluster", "with", "a", "specified", "resource", "group", "and", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ManagedClustersInner.java#L508-L515
fcrepo3/fcrepo
fcrepo-webapp/fcrepo-webapp-saxon/src/main/java/org/fcrepo/localservices/saxon/SaxonServlet.java
SaxonServlet.getInputStream
private InputStream getInputStream(String url) throws Exception { """ Get the content at the given location using the configured credentials (if any). """ HttpGet getMethod = new HttpGet(url); DefaultHttpClient client = new DefaultHttpClient(m_cManager); client.getParams().setIntParame...
java
private InputStream getInputStream(String url) throws Exception { HttpGet getMethod = new HttpGet(url); DefaultHttpClient client = new DefaultHttpClient(m_cManager); client.getParams().setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, TIMEOUT_SECONDS * 1000); UsernamePasswordCrede...
[ "private", "InputStream", "getInputStream", "(", "String", "url", ")", "throws", "Exception", "{", "HttpGet", "getMethod", "=", "new", "HttpGet", "(", "url", ")", ";", "DefaultHttpClient", "client", "=", "new", "DefaultHttpClient", "(", "m_cManager", ")", ";", ...
Get the content at the given location using the configured credentials (if any).
[ "Get", "the", "content", "at", "the", "given", "location", "using", "the", "configured", "credentials", "(", "if", "any", ")", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-webapp/fcrepo-webapp-saxon/src/main/java/org/fcrepo/localservices/saxon/SaxonServlet.java#L271-L293
lucee/Lucee
core/src/main/java/lucee/commons/lang/StringUtil.java
StringUtil.addZeros
public static String addZeros(int i, int size) { """ adds zeros add the begin of a int example: addZeros(2,3) return "002" @param i number to add nulls @param size @return min len of return value; """ String rtn = Caster.toString(i); if (rtn.length() < size) return repeatString("0", size - rtn.length())...
java
public static String addZeros(int i, int size) { String rtn = Caster.toString(i); if (rtn.length() < size) return repeatString("0", size - rtn.length()) + rtn; return rtn; }
[ "public", "static", "String", "addZeros", "(", "int", "i", ",", "int", "size", ")", "{", "String", "rtn", "=", "Caster", ".", "toString", "(", "i", ")", ";", "if", "(", "rtn", ".", "length", "(", ")", "<", "size", ")", "return", "repeatString", "("...
adds zeros add the begin of a int example: addZeros(2,3) return "002" @param i number to add nulls @param size @return min len of return value;
[ "adds", "zeros", "add", "the", "begin", "of", "a", "int", "example", ":", "addZeros", "(", "2", "3", ")", "return", "002" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L792-L796
kuali/kc-s2sgen
coeus-s2sgen-impl/src/main/java/org/kuali/coeus/s2sgen/impl/generate/support/RRFedNonFedBudget10V1_1Generator.java
RRFedNonFedBudget10V1_1Generator.setCumulativeEquipments
private void setCumulativeEquipments(BudgetSummary budgetSummary, BudgetSummaryDto budgetSummaryData) { """ This method gets CumulativeEquipments information CumulativeTotalFundsRequestedEquipment based on BudgetSummaryInfo for the form RRFedNonFedBudget. @param budgetSummaryData (BudgetSummaryInfo) budget sum...
java
private void setCumulativeEquipments(BudgetSummary budgetSummary, BudgetSummaryDto budgetSummaryData) { if (budgetSummaryData != null) { SummaryDataType summary = SummaryDataType.Factory.newInstance(); if (budgetSummaryData.getCumEquipmentFunds() != null) { summary.setFe...
[ "private", "void", "setCumulativeEquipments", "(", "BudgetSummary", "budgetSummary", ",", "BudgetSummaryDto", "budgetSummaryData", ")", "{", "if", "(", "budgetSummaryData", "!=", "null", ")", "{", "SummaryDataType", "summary", "=", "SummaryDataType", ".", "Factory", "...
This method gets CumulativeEquipments information CumulativeTotalFundsRequestedEquipment based on BudgetSummaryInfo for the form RRFedNonFedBudget. @param budgetSummaryData (BudgetSummaryInfo) budget summary entry.
[ "This", "method", "gets", "CumulativeEquipments", "information", "CumulativeTotalFundsRequestedEquipment", "based", "on", "BudgetSummaryInfo", "for", "the", "form", "RRFedNonFedBudget", "." ]
train
https://github.com/kuali/kc-s2sgen/blob/2886380e1e3cb8bdd732ba99b2afa6ffc630bb37/coeus-s2sgen-impl/src/main/java/org/kuali/coeus/s2sgen/impl/generate/support/RRFedNonFedBudget10V1_1Generator.java#L629-L648
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java
AnnotationTypeRequiredMemberBuilder.buildMemberComments
public void buildMemberComments(XMLNode node, Content annotationDocTree) { """ Build the comments for the member. Do nothing if {@link Configuration#nocomment} is set to true. @param node the XML element that specifies which components to document @param annotationDocTree the content tree to which the docume...
java
public void buildMemberComments(XMLNode node, Content annotationDocTree) { if(! configuration.nocomment){ writer.addComments((MemberDoc) members.get(currentMemberIndex), annotationDocTree); } }
[ "public", "void", "buildMemberComments", "(", "XMLNode", "node", ",", "Content", "annotationDocTree", ")", "{", "if", "(", "!", "configuration", ".", "nocomment", ")", "{", "writer", ".", "addComments", "(", "(", "MemberDoc", ")", "members", ".", "get", "(",...
Build the comments for the member. Do nothing if {@link Configuration#nocomment} is set to true. @param node the XML element that specifies which components to document @param annotationDocTree the content tree to which the documentation will be added
[ "Build", "the", "comments", "for", "the", "member", ".", "Do", "nothing", "if", "{", "@link", "Configuration#nocomment", "}", "is", "set", "to", "true", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java#L214-L219
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassButtonUI.java
SeaGlassButtonUI.getSelectedIcon
private Icon getSelectedIcon(AbstractButton b, Icon defaultIcon) { """ DOCUMENT ME! @param b DOCUMENT ME! @param defaultIcon DOCUMENT ME! @return DOCUMENT ME! """ return getIcon(b, b.getSelectedIcon(), defaultIcon, SynthConstants.SELECTED); }
java
private Icon getSelectedIcon(AbstractButton b, Icon defaultIcon) { return getIcon(b, b.getSelectedIcon(), defaultIcon, SynthConstants.SELECTED); }
[ "private", "Icon", "getSelectedIcon", "(", "AbstractButton", "b", ",", "Icon", "defaultIcon", ")", "{", "return", "getIcon", "(", "b", ",", "b", ".", "getSelectedIcon", "(", ")", ",", "defaultIcon", ",", "SynthConstants", ".", "SELECTED", ")", ";", "}" ]
DOCUMENT ME! @param b DOCUMENT ME! @param defaultIcon DOCUMENT ME! @return DOCUMENT ME!
[ "DOCUMENT", "ME!" ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassButtonUI.java#L467-L469
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/matrix/MatrixIO.java
MatrixIO.readMatrix
public static Matrix readMatrix(File matrix, Format format) throws IOException { """ Converts the contents of a matrix file as a {@link Matrix} object, using the provided format as a hint for what kind to create. The type of {@code Matrix} object created will assuming that the entire matrix can fi...
java
public static Matrix readMatrix(File matrix, Format format) throws IOException { switch (format) { // Assume all sparse formats will fit in memory. case SVDLIBC_SPARSE_TEXT: case SVDLIBC_SPARSE_BINARY: case MATLAB_SPARSE: case CLUTO_...
[ "public", "static", "Matrix", "readMatrix", "(", "File", "matrix", ",", "Format", "format", ")", "throws", "IOException", "{", "switch", "(", "format", ")", "{", "// Assume all sparse formats will fit in memory.", "case", "SVDLIBC_SPARSE_TEXT", ":", "case", "SVDLIBC_S...
Converts the contents of a matrix file as a {@link Matrix} object, using the provided format as a hint for what kind to create. The type of {@code Matrix} object created will assuming that the entire matrix can fit in memory based on the format of the file speicfied Note that the returned {@link Matrix} instance is no...
[ "Converts", "the", "contents", "of", "a", "matrix", "file", "as", "a", "{", "@link", "Matrix", "}", "object", "using", "the", "provided", "format", "as", "a", "hint", "for", "what", "kind", "to", "create", ".", "The", "type", "of", "{", "@code", "Matri...
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/matrix/MatrixIO.java#L716-L740
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/view/facelets/impl/DefaultFaceletFactory.java
DefaultFaceletFactory.getViewMetadataFacelet
@Override public Facelet getViewMetadataFacelet(FacesContext facesContext, String uri) throws IOException { """ Works in the same way as getFacelet(String uri), but redirect to getViewMetadataFacelet(URL url) @since 2.0 """ URL url = (URL) _relativeLocations.get(uri); if (url == ...
java
@Override public Facelet getViewMetadataFacelet(FacesContext facesContext, String uri) throws IOException { URL url = (URL) _relativeLocations.get(uri); if (url == null) { url = resolveURL(facesContext, getBaseUrl(), uri); ViewResource viewResource = (Vie...
[ "@", "Override", "public", "Facelet", "getViewMetadataFacelet", "(", "FacesContext", "facesContext", ",", "String", "uri", ")", "throws", "IOException", "{", "URL", "url", "=", "(", "URL", ")", "_relativeLocations", ".", "get", "(", "uri", ")", ";", "if", "(...
Works in the same way as getFacelet(String uri), but redirect to getViewMetadataFacelet(URL url) @since 2.0
[ "Works", "in", "the", "same", "way", "as", "getFacelet", "(", "String", "uri", ")", "but", "redirect", "to", "getViewMetadataFacelet", "(", "URL", "url", ")" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/view/facelets/impl/DefaultFaceletFactory.java#L464-L494
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/ISO9075.java
ISO9075.needsEscaping
private static boolean needsEscaping(String name, int location) throws ArrayIndexOutOfBoundsException { """ Returns true if <code>name.charAt(location)</code> is the underscore character and the following character sequence is 'xHHHH_' where H is a hex digit. @param name the name to check. @param location t...
java
private static boolean needsEscaping(String name, int location) throws ArrayIndexOutOfBoundsException { if (name.charAt(location) == '_' && name.length() >= location + 6) { return name.charAt(location + 1) == 'x' && HEX_DIGITS.indexOf(name.charAt(location + 2)) != -1 && HEX_DIGI...
[ "private", "static", "boolean", "needsEscaping", "(", "String", "name", ",", "int", "location", ")", "throws", "ArrayIndexOutOfBoundsException", "{", "if", "(", "name", ".", "charAt", "(", "location", ")", "==", "'", "'", "&&", "name", ".", "length", "(", ...
Returns true if <code>name.charAt(location)</code> is the underscore character and the following character sequence is 'xHHHH_' where H is a hex digit. @param name the name to check. @param location the location to look at. @throws ArrayIndexOutOfBoundsException if location > name.length()
[ "Returns", "true", "if", "<code", ">", "name", ".", "charAt", "(", "location", ")", "<", "/", "code", ">", "is", "the", "underscore", "character", "and", "the", "following", "character", "sequence", "is", "xHHHH_", "where", "H", "is", "a", "hex", "digit"...
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/ISO9075.java#L215-L228
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/datagrid/HeaderCell.java
HeaderCell.renderHeaderCellContents
protected void renderHeaderCellContents(AbstractRenderAppender appender, String jspFragmentOutput) throws IOException, JspException { """ Render the contents of the body of the HTML th tag into the given {@link AbstractRenderAppender} @param appender the {@link AbstractRenderAppender} for the output ...
java
protected void renderHeaderCellContents(AbstractRenderAppender appender, String jspFragmentOutput) throws IOException, JspException { if(_headerValue == null) { appender.append(jspFragmentOutput); } else { _headerCellModel.setDataGridTagModel(DataGridUtil.get...
[ "protected", "void", "renderHeaderCellContents", "(", "AbstractRenderAppender", "appender", ",", "String", "jspFragmentOutput", ")", "throws", "IOException", ",", "JspException", "{", "if", "(", "_headerValue", "==", "null", ")", "{", "appender", ".", "append", "(",...
Render the contents of the body of the HTML th tag into the given {@link AbstractRenderAppender} @param appender the {@link AbstractRenderAppender} for the output @param jspFragmentOutput the result of having evaluated the tag's {@link JspFragment} @throws IOException when an error occurs writing to the output stream @...
[ "Render", "the", "contents", "of", "the", "body", "of", "the", "HTML", "th", "tag", "into", "the", "given", "{" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/datagrid/HeaderCell.java#L838-L851
Netflix/dyno
dyno-core/src/main/java/com/netflix/dyno/connectionpool/impl/hash/Murmur2Hash.java
Murmur2Hash.hash32
public static int hash32(final String text, int from, int length) { """ Generates 32 bit hash from a substring. @param text string to hash @param from starting index @param length length of the substring to hash @return 32 bit hash of the given string """ return hash32(text.substring( from, from+...
java
public static int hash32(final String text, int from, int length) { return hash32(text.substring( from, from+length)); }
[ "public", "static", "int", "hash32", "(", "final", "String", "text", ",", "int", "from", ",", "int", "length", ")", "{", "return", "hash32", "(", "text", ".", "substring", "(", "from", ",", "from", "+", "length", ")", ")", ";", "}" ]
Generates 32 bit hash from a substring. @param text string to hash @param from starting index @param length length of the substring to hash @return 32 bit hash of the given string
[ "Generates", "32", "bit", "hash", "from", "a", "substring", "." ]
train
https://github.com/Netflix/dyno/blob/158f807083ea8e9b09c8089cb07f98e954ad5b23/dyno-core/src/main/java/com/netflix/dyno/connectionpool/impl/hash/Murmur2Hash.java#L114-L116
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/OutputProperties.java
OutputProperties.setProperty
public void setProperty(String key, String value) { """ Set an output property. @param key the key to be placed into the property list. @param value the value corresponding to <tt>key</tt>. @see javax.xml.transform.OutputKeys """ if(key.equals(OutputKeys.METHOD)) { setMethodDefaults(value); ...
java
public void setProperty(String key, String value) { if(key.equals(OutputKeys.METHOD)) { setMethodDefaults(value); } if (key.startsWith(OutputPropertiesFactory.S_BUILTIN_OLD_EXTENSIONS_UNIVERSAL)) key = OutputPropertiesFactory.S_BUILTIN_EXTENSIONS_UNIVERSAL + key.substring(Out...
[ "public", "void", "setProperty", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "key", ".", "equals", "(", "OutputKeys", ".", "METHOD", ")", ")", "{", "setMethodDefaults", "(", "value", ")", ";", "}", "if", "(", "key", ".", "start...
Set an output property. @param key the key to be placed into the property list. @param value the value corresponding to <tt>key</tt>. @see javax.xml.transform.OutputKeys
[ "Set", "an", "output", "property", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/OutputProperties.java#L130-L142
apache/reef
lang/java/reef-runtime-azbatch/src/main/java/org/apache/reef/runtime/azbatch/util/storage/AzureStorageClient.java
AzureStorageClient.uploadFile
public URI uploadFile(final String jobFolder, final File file) throws IOException { """ Upload a file to the storage account. @param jobFolder the path to the destination folder within storage container. @param file the source file. @return the SAS URI to the uploaded file. @throws IOException """ L...
java
public URI uploadFile(final String jobFolder, final File file) throws IOException { LOG.log(Level.INFO, "Uploading [{0}] to [{1}]", new Object[]{file, jobFolder}); try { final CloudBlobClient cloudBlobClient = this.cloudBlobClientProvider.getCloudBlobClient(); final CloudBlobContainer container = ...
[ "public", "URI", "uploadFile", "(", "final", "String", "jobFolder", ",", "final", "File", "file", ")", "throws", "IOException", "{", "LOG", ".", "log", "(", "Level", ".", "INFO", ",", "\"Uploading [{0}] to [{1}]\"", ",", "new", "Object", "[", "]", "{", "fi...
Upload a file to the storage account. @param jobFolder the path to the destination folder within storage container. @param file the source file. @return the SAS URI to the uploaded file. @throws IOException
[ "Upload", "a", "file", "to", "the", "storage", "account", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-runtime-azbatch/src/main/java/org/apache/reef/runtime/azbatch/util/storage/AzureStorageClient.java#L97-L118
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/BugInstance.java
BugInstance.addCalledMethod
@Nonnull public BugInstance addCalledMethod(MethodGen methodGen, InvokeInstruction inv) { """ Add a method annotation for the method which is called by given instruction. @param methodGen the method containing the call @param inv the InvokeInstruction @return this object """ ConstantPoolGen...
java
@Nonnull public BugInstance addCalledMethod(MethodGen methodGen, InvokeInstruction inv) { ConstantPoolGen cpg = methodGen.getConstantPool(); return addCalledMethod(cpg, inv); }
[ "@", "Nonnull", "public", "BugInstance", "addCalledMethod", "(", "MethodGen", "methodGen", ",", "InvokeInstruction", "inv", ")", "{", "ConstantPoolGen", "cpg", "=", "methodGen", ".", "getConstantPool", "(", ")", ";", "return", "addCalledMethod", "(", "cpg", ",", ...
Add a method annotation for the method which is called by given instruction. @param methodGen the method containing the call @param inv the InvokeInstruction @return this object
[ "Add", "a", "method", "annotation", "for", "the", "method", "which", "is", "called", "by", "given", "instruction", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/BugInstance.java#L1472-L1476
wcm-io/wcm-io-caconfig
compat/src/main/java/io/wcm/config/core/persistence/impl/MapUtil.java
MapUtil.traceOutput
public static String traceOutput(Map<String, Object> properties) { """ Produce trace output for properties map. @param properties Properties @return Debug output """ SortedSet<String> propertyNames = new TreeSet<>(properties.keySet()); StringBuilder sb = new StringBuilder(); sb.append("{"); I...
java
public static String traceOutput(Map<String, Object> properties) { SortedSet<String> propertyNames = new TreeSet<>(properties.keySet()); StringBuilder sb = new StringBuilder(); sb.append("{"); Iterator<String> propertyNameIterator = propertyNames.iterator(); while (propertyNameIterator.hasNext()) { ...
[ "public", "static", "String", "traceOutput", "(", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "SortedSet", "<", "String", ">", "propertyNames", "=", "new", "TreeSet", "<>", "(", "properties", ".", "keySet", "(", ")", ")", ";", "Stri...
Produce trace output for properties map. @param properties Properties @return Debug output
[ "Produce", "trace", "output", "for", "properties", "map", "." ]
train
https://github.com/wcm-io/wcm-io-caconfig/blob/48592eadb0b62a09eec555cedfae7e00b213f6ed/compat/src/main/java/io/wcm/config/core/persistence/impl/MapUtil.java#L39-L54
signalapp/curve25519-java
common/src/main/java/org/whispersystems/curve25519/java/fe_neg.java
fe_neg.fe_neg
public static void fe_neg(int[] h,int[] f) { """ /* h = -f Preconditions: |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. Postconditions: |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. """ int f0 = f[0]; int f1 = f[1]; int f2 = f[2]; int f3 = f[3]; int f4 = f[4]; int f5 = ...
java
public static void fe_neg(int[] h,int[] f) { int f0 = f[0]; int f1 = f[1]; int f2 = f[2]; int f3 = f[3]; int f4 = f[4]; int f5 = f[5]; int f6 = f[6]; int f7 = f[7]; int f8 = f[8]; int f9 = f[9]; int h0 = -f0; int h1 = -f1; int h2 = -f2; int h3 = -f3; int h4 = -f4; int h5 = -f5; int h6 ...
[ "public", "static", "void", "fe_neg", "(", "int", "[", "]", "h", ",", "int", "[", "]", "f", ")", "{", "int", "f0", "=", "f", "[", "0", "]", ";", "int", "f1", "=", "f", "[", "1", "]", ";", "int", "f2", "=", "f", "[", "2", "]", ";", "int"...
/* h = -f Preconditions: |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. Postconditions: |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
[ "/", "*", "h", "=", "-", "f" ]
train
https://github.com/signalapp/curve25519-java/blob/70fae57d6dccff7e78a46203c534314b07dfdd98/common/src/main/java/org/whispersystems/curve25519/java/fe_neg.java#L17-L49
GoogleCloudPlatform/appengine-plugins-core
src/main/java/com/google/cloud/tools/appengine/operations/cloudsdk/PathResolver.java
PathResolver.getLocationsFromLink
@VisibleForTesting static void getLocationsFromLink(List<String> possiblePaths, Path link) { """ resolve symlinks to a path that could be the bin directory of the cloud sdk """ try { Path resolvedLink = link.toRealPath(); Path possibleBinDir = resolvedLink.getParent(); // check if the p...
java
@VisibleForTesting static void getLocationsFromLink(List<String> possiblePaths, Path link) { try { Path resolvedLink = link.toRealPath(); Path possibleBinDir = resolvedLink.getParent(); // check if the parent is "bin", we actually depend on that for other resolution if (possibleBinDir != n...
[ "@", "VisibleForTesting", "static", "void", "getLocationsFromLink", "(", "List", "<", "String", ">", "possiblePaths", ",", "Path", "link", ")", "{", "try", "{", "Path", "resolvedLink", "=", "link", ".", "toRealPath", "(", ")", ";", "Path", "possibleBinDir", ...
resolve symlinks to a path that could be the bin directory of the cloud sdk
[ "resolve", "symlinks", "to", "a", "path", "that", "could", "be", "the", "bin", "directory", "of", "the", "cloud", "sdk" ]
train
https://github.com/GoogleCloudPlatform/appengine-plugins-core/blob/d22e9fa1103522409ab6fdfbf68c4a5a0bc5b97d/src/main/java/com/google/cloud/tools/appengine/operations/cloudsdk/PathResolver.java#L128-L144
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/AbstractEntityReader.java
AbstractEntityReader.recursivelyFindEntities
public Object recursivelyFindEntities(Object entity, Map<String, Object> relationsMap, EntityMetadata m, PersistenceDelegator pd, boolean lazilyLoaded, Map<Object, Object> relationStack) { """ Recursively fetches associated entities for a given <code>entity</code> @param entity @param relationsMap ...
java
public Object recursivelyFindEntities(Object entity, Map<String, Object> relationsMap, EntityMetadata m, PersistenceDelegator pd, boolean lazilyLoaded, Map<Object, Object> relationStack) { return handleAssociation(entity, relationsMap, m, pd, lazilyLoaded, relationStack); }
[ "public", "Object", "recursivelyFindEntities", "(", "Object", "entity", ",", "Map", "<", "String", ",", "Object", ">", "relationsMap", ",", "EntityMetadata", "m", ",", "PersistenceDelegator", "pd", ",", "boolean", "lazilyLoaded", ",", "Map", "<", "Object", ",", ...
Recursively fetches associated entities for a given <code>entity</code> @param entity @param relationsMap @param client @param m @param pd @return
[ "Recursively", "fetches", "associated", "entities", "for", "a", "given", "<code", ">", "entity<", "/", "code", ">" ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/AbstractEntityReader.java#L518-L523
jcuda/jnvgraph
JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java
JNvgraph.nvgraphGetVertexData
public static int nvgraphGetVertexData( nvgraphHandle handle, nvgraphGraphDescr descrG, Pointer vertexData, long setnum) { """ Copy the edge set #setnum in *edgeData, sets have 0-based index Conversions are not sopported so nvgraphTopologyType_t should match the graph structure ...
java
public static int nvgraphGetVertexData( nvgraphHandle handle, nvgraphGraphDescr descrG, Pointer vertexData, long setnum) { return checkResult(nvgraphGetVertexDataNative(handle, descrG, vertexData, setnum)); }
[ "public", "static", "int", "nvgraphGetVertexData", "(", "nvgraphHandle", "handle", ",", "nvgraphGraphDescr", "descrG", ",", "Pointer", "vertexData", ",", "long", "setnum", ")", "{", "return", "checkResult", "(", "nvgraphGetVertexDataNative", "(", "handle", ",", "des...
Copy the edge set #setnum in *edgeData, sets have 0-based index Conversions are not sopported so nvgraphTopologyType_t should match the graph structure
[ "Copy", "the", "edge", "set", "#setnum", "in", "*", "edgeData", "sets", "have", "0", "-", "based", "index", "Conversions", "are", "not", "sopported", "so", "nvgraphTopologyType_t", "should", "match", "the", "graph", "structure" ]
train
https://github.com/jcuda/jnvgraph/blob/2c6bd7c58edac181753bacf30af2cceeb1989a78/JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java#L290-L297
google/closure-templates
java/src/com/google/template/soy/soytree/SoyTreeUtils.java
SoyTreeUtils.buildAstString
public static StringBuilder buildAstString(ParentSoyNode<?> node, int indent, StringBuilder sb) { """ Given a Soy node, returns a {@code StringBuilder} that can be used to pretty print the AST structure. <p>For example, for the following soy source <code><pre> {for i in range(5)} {if $i % 2 == 0} foo {/if}...
java
public static StringBuilder buildAstString(ParentSoyNode<?> node, int indent, StringBuilder sb) { for (SoyNode child : node.getChildren()) { sb.append(Strings.repeat(" ", indent)).append(child.getKind()).append('\n'); if (child instanceof ParentSoyNode) { buildAstString((ParentSoyNode<?>) child...
[ "public", "static", "StringBuilder", "buildAstString", "(", "ParentSoyNode", "<", "?", ">", "node", ",", "int", "indent", ",", "StringBuilder", "sb", ")", "{", "for", "(", "SoyNode", "child", ":", "node", ".", "getChildren", "(", ")", ")", "{", "sb", "."...
Given a Soy node, returns a {@code StringBuilder} that can be used to pretty print the AST structure. <p>For example, for the following soy source <code><pre> {for i in range(5)} {if $i % 2 == 0} foo {/if} {/for} </pre></code> This method prints the AST string as follow: <code><pre> FOR_NODE IF_NODE IF_COND_NODE PRINT...
[ "Given", "a", "Soy", "node", "returns", "a", "{", "@code", "StringBuilder", "}", "that", "can", "be", "used", "to", "pretty", "print", "the", "AST", "structure", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/soytree/SoyTreeUtils.java#L203-L211
kamranzafar/jtar
src/main/java/org/kamranzafar/jtar/Octal.java
Octal.getLongOctalBytes
public static int getLongOctalBytes(long value, byte[] buf, int offset, int length) { """ Write an octal long integer to a header buffer. @param value The value to write. @param buf The header buffer from which to parse. @param offset The offset into the buffer from which to parse. @param length The numb...
java
public static int getLongOctalBytes(long value, byte[] buf, int offset, int length) { byte[] temp = new byte[length + 1]; getOctalBytes( value, temp, 0, length + 1 ); System.arraycopy( temp, 0, buf, offset, length ); return offset + length; }
[ "public", "static", "int", "getLongOctalBytes", "(", "long", "value", ",", "byte", "[", "]", "buf", ",", "int", "offset", ",", "int", "length", ")", "{", "byte", "[", "]", "temp", "=", "new", "byte", "[", "length", "+", "1", "]", ";", "getOctalBytes"...
Write an octal long integer to a header buffer. @param value The value to write. @param buf The header buffer from which to parse. @param offset The offset into the buffer from which to parse. @param length The number of header bytes to parse. @return The long value of the octal bytes.
[ "Write", "an", "octal", "long", "integer", "to", "a", "header", "buffer", "." ]
train
https://github.com/kamranzafar/jtar/blob/aace0a3c8a6478fd1bac95865c27535e658afb73/src/main/java/org/kamranzafar/jtar/Octal.java#L137-L142