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
petergeneric/stdlib
stdlib/src/main/java/com/peterphi/std/util/HexHelper.java
HexHelper.fromHex
public static final byte[] fromHex(final String value) { """ Decodes a hexidecimal string into a series of bytes @param value @return """ if (value.length() == 0) return new byte[0]; else if (value.indexOf(':') != -1) return fromHex(':', value); else if (value.length() % 2 != 0) throw new ...
java
public static final byte[] fromHex(final String value) { if (value.length() == 0) return new byte[0]; else if (value.indexOf(':') != -1) return fromHex(':', value); else if (value.length() % 2 != 0) throw new IllegalArgumentException("Invalid hex specified: uneven number of digits passed for byte[] conv...
[ "public", "static", "final", "byte", "[", "]", "fromHex", "(", "final", "String", "value", ")", "{", "if", "(", "value", ".", "length", "(", ")", "==", "0", ")", "return", "new", "byte", "[", "0", "]", ";", "else", "if", "(", "value", ".", "index...
Decodes a hexidecimal string into a series of bytes @param value @return
[ "Decodes", "a", "hexidecimal", "string", "into", "a", "series", "of", "bytes" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/util/HexHelper.java#L24-L44
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NumberFormat.java
NumberFormat.getPattern
@Deprecated protected static String getPattern(Locale forLocale, int choice) { """ Returns the pattern for the provided locale and choice. @param forLocale the locale of the data. @param choice the pattern format. @return the pattern @deprecated ICU 3.4 subclassers should override getPattern(ULocale, int) ...
java
@Deprecated protected static String getPattern(Locale forLocale, int choice) { return getPattern(ULocale.forLocale(forLocale), choice); }
[ "@", "Deprecated", "protected", "static", "String", "getPattern", "(", "Locale", "forLocale", ",", "int", "choice", ")", "{", "return", "getPattern", "(", "ULocale", ".", "forLocale", "(", "forLocale", ")", ",", "choice", ")", ";", "}" ]
Returns the pattern for the provided locale and choice. @param forLocale the locale of the data. @param choice the pattern format. @return the pattern @deprecated ICU 3.4 subclassers should override getPattern(ULocale, int) instead of this method. @hide original deprecated declaration
[ "Returns", "the", "pattern", "for", "the", "provided", "locale", "and", "choice", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NumberFormat.java#L1355-L1358
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleEntries.java
ModuleEntries.fetchOneSnapshot
public CMASnapshot fetchOneSnapshot(CMAEntry entry, String snapshotId) { """ Fetch a specific snapshot of an entry. @param entry the entry whose snapshot to be returned. @param snapshotId the snapshot to be returned. @return an array of snapshots. @throws IllegalArgumentException if entry is null. @thr...
java
public CMASnapshot fetchOneSnapshot(CMAEntry entry, String snapshotId) { assertNotNull(entry, "entry"); assertNotNull(snapshotId, "snapshotId"); final String entryId = getResourceIdOrThrow(entry, "entry"); final String spaceId = getSpaceIdOrThrow(entry, "entry"); final String environmentId = entry....
[ "public", "CMASnapshot", "fetchOneSnapshot", "(", "CMAEntry", "entry", ",", "String", "snapshotId", ")", "{", "assertNotNull", "(", "entry", ",", "\"entry\"", ")", ";", "assertNotNull", "(", "snapshotId", ",", "\"snapshotId\"", ")", ";", "final", "String", "entr...
Fetch a specific snapshot of an entry. @param entry the entry whose snapshot to be returned. @param snapshotId the snapshot to be returned. @return an array of snapshots. @throws IllegalArgumentException if entry is null. @throws IllegalArgumentException if entry's id is null. @throws IllegalArgumentException if ...
[ "Fetch", "a", "specific", "snapshot", "of", "an", "entry", "." ]
train
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleEntries.java#L387-L396
google/closure-compiler
src/com/google/javascript/jscomp/NodeTraversal.java
NodeTraversal.traverseFunctionOutOfBand
public void traverseFunctionOutOfBand(Node node, AbstractScope<?, ?> scope) { """ Traverse a function out-of-band of normal traversal. @param node The function node. @param scope The scope the function is contained in. Does not fire enter/exit callback events for this scope. """ checkNotNull(scope); ...
java
public void traverseFunctionOutOfBand(Node node, AbstractScope<?, ?> scope) { checkNotNull(scope); checkState(node.isFunction(), node); checkNotNull(scope.getRootNode()); initTraversal(node); curNode = node.getParent(); pushScope(scope, true /* quietly */); traverseBranch(node, curNode); ...
[ "public", "void", "traverseFunctionOutOfBand", "(", "Node", "node", ",", "AbstractScope", "<", "?", ",", "?", ">", "scope", ")", "{", "checkNotNull", "(", "scope", ")", ";", "checkState", "(", "node", ".", "isFunction", "(", ")", ",", "node", ")", ";", ...
Traverse a function out-of-band of normal traversal. @param node The function node. @param scope The scope the function is contained in. Does not fire enter/exit callback events for this scope.
[ "Traverse", "a", "function", "out", "-", "of", "-", "band", "of", "normal", "traversal", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/NodeTraversal.java#L661-L670
JodaOrg/joda-time
src/main/java/org/joda/time/TimeOfDay.java
TimeOfDay.withHourOfDay
public TimeOfDay withHourOfDay(int hour) { """ Returns a copy of this time with the hour of day field updated. <p> TimeOfDay is immutable, so there are no set methods. Instead, this method returns a new instance with the value of hour of day changed. @param hour the hour of day to set @return a copy of th...
java
public TimeOfDay withHourOfDay(int hour) { int[] newValues = getValues(); newValues = getChronology().hourOfDay().set(this, HOUR_OF_DAY, newValues, hour); return new TimeOfDay(this, newValues); }
[ "public", "TimeOfDay", "withHourOfDay", "(", "int", "hour", ")", "{", "int", "[", "]", "newValues", "=", "getValues", "(", ")", ";", "newValues", "=", "getChronology", "(", ")", ".", "hourOfDay", "(", ")", ".", "set", "(", "this", ",", "HOUR_OF_DAY", "...
Returns a copy of this time with the hour of day field updated. <p> TimeOfDay is immutable, so there are no set methods. Instead, this method returns a new instance with the value of hour of day changed. @param hour the hour of day to set @return a copy of this object with the field set @throws IllegalArgumentExcepti...
[ "Returns", "a", "copy", "of", "this", "time", "with", "the", "hour", "of", "day", "field", "updated", ".", "<p", ">", "TimeOfDay", "is", "immutable", "so", "there", "are", "no", "set", "methods", ".", "Instead", "this", "method", "returns", "a", "new", ...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/TimeOfDay.java#L900-L904
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/JournalCreator.java
JournalCreator.purgeObject
public Date purgeObject(Context context, String pid, String logMessage) throws ServerException { """ Create a journal entry, add the arguments, and invoke the method. """ try { CreatorJournalEntry cje = new CreatorJ...
java
public Date purgeObject(Context context, String pid, String logMessage) throws ServerException { try { CreatorJournalEntry cje = new CreatorJournalEntry(METHOD_PURGE_OBJECT, context); cje.addArgument(ARGUMENT_NAM...
[ "public", "Date", "purgeObject", "(", "Context", "context", ",", "String", "pid", ",", "String", "logMessage", ")", "throws", "ServerException", "{", "try", "{", "CreatorJournalEntry", "cje", "=", "new", "CreatorJournalEntry", "(", "METHOD_PURGE_OBJECT", ",", "con...
Create a journal entry, add the arguments, and invoke the method.
[ "Create", "a", "journal", "entry", "add", "the", "arguments", "and", "invoke", "the", "method", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/JournalCreator.java#L148-L160
whizzosoftware/WZWave
src/main/java/com/whizzosoftware/wzwave/commandclass/MultiInstanceCommandClass.java
MultiInstanceCommandClass.createMultiChannelCapabilityGet
public DataFrame createMultiChannelCapabilityGet(byte nodeId, byte endPoint) { """ Create a MULTI_CHANNEL_CAPABILITY_GET command. @param nodeId the target node ID @param endPoint the endpoint ID @return a DataFrame instance """ if (getVersion() < 2) { throw new ZWaveRuntimeException(...
java
public DataFrame createMultiChannelCapabilityGet(byte nodeId, byte endPoint) { if (getVersion() < 2) { throw new ZWaveRuntimeException("MULTI_CHANNEL_CAPABILITY_GET is not available in command class version 1"); } return createSendDataFrame( "MULTI_CHANNEL_CAPABILITY_GET"...
[ "public", "DataFrame", "createMultiChannelCapabilityGet", "(", "byte", "nodeId", ",", "byte", "endPoint", ")", "{", "if", "(", "getVersion", "(", ")", "<", "2", ")", "{", "throw", "new", "ZWaveRuntimeException", "(", "\"MULTI_CHANNEL_CAPABILITY_GET is not available in...
Create a MULTI_CHANNEL_CAPABILITY_GET command. @param nodeId the target node ID @param endPoint the endpoint ID @return a DataFrame instance
[ "Create", "a", "MULTI_CHANNEL_CAPABILITY_GET", "command", "." ]
train
https://github.com/whizzosoftware/WZWave/blob/b9dfec6b55515226edf9d772a89933b336397501/src/main/java/com/whizzosoftware/wzwave/commandclass/MultiInstanceCommandClass.java#L296-L310
tinosteinort/beanrepository
src/main/java/com/github/tinosteinort/beanrepository/BeanRepositoryApplication.java
BeanRepositoryApplication.run
public static void run(final String[] args, final BeanRepositoryConfigurator ...configurators) { """ Startup initialisation of the BeanRepository. After the BeanRepository was initialised with the given configurator classes, a {@link ApplicationStartedEvent} is thrown. Use this event as starting point for the co...
java
public static void run(final String[] args, final BeanRepositoryConfigurator ...configurators) { validate(args, configurators); final BeanRepository beanRepository = buildAndConfigureBeanRepository(args, configurators); final ApplicationEventBus eventBus = beanRepository.getBean(ApplicationEv...
[ "public", "static", "void", "run", "(", "final", "String", "[", "]", "args", ",", "final", "BeanRepositoryConfigurator", "...", "configurators", ")", "{", "validate", "(", "args", ",", "configurators", ")", ";", "final", "BeanRepository", "beanRepository", "=", ...
Startup initialisation of the BeanRepository. After the BeanRepository was initialised with the given configurator classes, a {@link ApplicationStartedEvent} is thrown. Use this event as starting point for the code of your application. @param args the program arguments @param configurators the configurator classes, wh...
[ "Startup", "initialisation", "of", "the", "BeanRepository", ".", "After", "the", "BeanRepository", "was", "initialised", "with", "the", "given", "configurator", "classes", "a", "{", "@link", "ApplicationStartedEvent", "}", "is", "thrown", ".", "Use", "this", "even...
train
https://github.com/tinosteinort/beanrepository/blob/4131d1e380ebc511392f3bda9d0966997bb34a62/src/main/java/com/github/tinosteinort/beanrepository/BeanRepositoryApplication.java#L24-L36
jayantk/jklol
src/com/jayantkrish/jklol/cfg/CfgParser.java
CfgParser.parseMarginal
public CfgParseChart parseMarginal(List<?> terminals, Factor rootDist, boolean useSumProduct) { """ Compute the distribution over CFG entries, the parse root, and the children, conditioned on the provided terminals and assuming the provided distributions over the root node. """ return marginal(createPars...
java
public CfgParseChart parseMarginal(List<?> terminals, Factor rootDist, boolean useSumProduct) { return marginal(createParseChart(terminals, useSumProduct), terminals, rootDist); }
[ "public", "CfgParseChart", "parseMarginal", "(", "List", "<", "?", ">", "terminals", ",", "Factor", "rootDist", ",", "boolean", "useSumProduct", ")", "{", "return", "marginal", "(", "createParseChart", "(", "terminals", ",", "useSumProduct", ")", ",", "terminals...
Compute the distribution over CFG entries, the parse root, and the children, conditioned on the provided terminals and assuming the provided distributions over the root node.
[ "Compute", "the", "distribution", "over", "CFG", "entries", "the", "parse", "root", "and", "the", "children", "conditioned", "on", "the", "provided", "terminals", "and", "assuming", "the", "provided", "distributions", "over", "the", "root", "node", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/cfg/CfgParser.java#L157-L159
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java
StringIterate.tokensToMap
public static <K, V> MutableMap<K, V> tokensToMap( String string, String separator, String keyValueSeparator, Function<String, K> keyFunction, Function<String, V> valueFunction) { """ Converts a string of tokens to a {@link MutableMap} using the specified...
java
public static <K, V> MutableMap<K, V> tokensToMap( String string, String separator, String keyValueSeparator, Function<String, K> keyFunction, Function<String, V> valueFunction) { MutableMap<K, V> map = UnifiedMap.newMap(); for (StringToken...
[ "public", "static", "<", "K", ",", "V", ">", "MutableMap", "<", "K", ",", "V", ">", "tokensToMap", "(", "String", "string", ",", "String", "separator", ",", "String", "keyValueSeparator", ",", "Function", "<", "String", ",", "K", ">", "keyFunction", ",",...
Converts a string of tokens to a {@link MutableMap} using the specified 'key' and 'value' Functions. e.g. "1:2,2:1,3:3" with both functions as Functions.getStringToInteger(), will be translated a map {[1,2],[2,1],[3,3]}
[ "Converts", "a", "string", "of", "tokens", "to", "a", "{" ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java#L244-L260
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/FastAggregation.java
FastAggregation.priorityqueue_xor
public static RoaringBitmap priorityqueue_xor(RoaringBitmap... bitmaps) { """ Uses a priority queue to compute the xor aggregate. This function runs in linearithmic (O(n log n)) time with respect to the number of bitmaps. @param bitmaps input bitmaps @return aggregated bitmap @see #horizontal_xor(RoaringBi...
java
public static RoaringBitmap priorityqueue_xor(RoaringBitmap... bitmaps) { // TODO: This code could be faster, see priorityqueue_or if (bitmaps.length == 0) { return new RoaringBitmap(); } PriorityQueue<RoaringBitmap> pq = new PriorityQueue<>(bitmaps.length, new Comparator<RoaringBitmap>()...
[ "public", "static", "RoaringBitmap", "priorityqueue_xor", "(", "RoaringBitmap", "...", "bitmaps", ")", "{", "// TODO: This code could be faster, see priorityqueue_or", "if", "(", "bitmaps", ".", "length", "==", "0", ")", "{", "return", "new", "RoaringBitmap", "(", ")"...
Uses a priority queue to compute the xor aggregate. This function runs in linearithmic (O(n log n)) time with respect to the number of bitmaps. @param bitmaps input bitmaps @return aggregated bitmap @see #horizontal_xor(RoaringBitmap...)
[ "Uses", "a", "priority", "queue", "to", "compute", "the", "xor", "aggregate", "." ]
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/FastAggregation.java#L494-L514
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/Logger.java
Logger.entering
public void entering(String sourceClass, String sourceMethod) { """ Log a method entry. <p> This is a convenience method that can be used to log entry to a method. A LogRecord with message "ENTRY", log level FINER, and the given sourceMethod and sourceClass is logged. <p> @param sourceClass name of cla...
java
public void entering(String sourceClass, String sourceMethod) { if (Level.FINER.intValue() < levelValue) { return; } logp(Level.FINER, sourceClass, sourceMethod, "ENTRY"); }
[ "public", "void", "entering", "(", "String", "sourceClass", ",", "String", "sourceMethod", ")", "{", "if", "(", "Level", ".", "FINER", ".", "intValue", "(", ")", "<", "levelValue", ")", "{", "return", ";", "}", "logp", "(", "Level", ".", "FINER", ",", ...
Log a method entry. <p> This is a convenience method that can be used to log entry to a method. A LogRecord with message "ENTRY", log level FINER, and the given sourceMethod and sourceClass is logged. <p> @param sourceClass name of class that issued the logging request @param sourceMethod name of method that ...
[ "Log", "a", "method", "entry", ".", "<p", ">", "This", "is", "a", "convenience", "method", "that", "can", "be", "used", "to", "log", "entry", "to", "a", "method", ".", "A", "LogRecord", "with", "message", "ENTRY", "log", "level", "FINER", "and", "the",...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/Logger.java#L1026-L1031
ironjacamar/ironjacamar
common/src/main/java/org/ironjacamar/common/metadata/common/StringUtils.java
StringUtils.restoreExpression
public static String restoreExpression(Map<String, String> m, String key, String subkey, String v) { """ Restores expression with substituted default value @param m a Map with expressions @param key of the Map @param subkey of the Map @param v value for substitution @return restored expression string """ ...
java
public static String restoreExpression(Map<String, String> m, String key, String subkey, String v) { String k = key; if (subkey != null) { if (!isIncorrectExpression(subkey) && subkey.startsWith("${")) { subkey = subkey.substring(2, subkey.length() - 1); ...
[ "public", "static", "String", "restoreExpression", "(", "Map", "<", "String", ",", "String", ">", "m", ",", "String", "key", ",", "String", "subkey", ",", "String", "v", ")", "{", "String", "k", "=", "key", ";", "if", "(", "subkey", "!=", "null", ")"...
Restores expression with substituted default value @param m a Map with expressions @param key of the Map @param subkey of the Map @param v value for substitution @return restored expression string
[ "Restores", "expression", "with", "substituted", "default", "value" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/common/src/main/java/org/ironjacamar/common/metadata/common/StringUtils.java#L46-L65
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/persistence/objectManager/PersistableImpl.java
PersistableImpl.addToStore
public void addToStore(Transaction tran, ObjectStore store) throws PersistenceException, ObjectManagerException, SevereMessageStoreException { """ Add this Persistable and it's raw data managed object to the provided transaction. @param tran The transaction under which the add of this Persistable to the Objec...
java
public void addToStore(Transaction tran, ObjectStore store) throws PersistenceException, ObjectManagerException, SevereMessageStoreException { addToStore(tran, store, this); }
[ "public", "void", "addToStore", "(", "Transaction", "tran", ",", "ObjectStore", "store", ")", "throws", "PersistenceException", ",", "ObjectManagerException", ",", "SevereMessageStoreException", "{", "addToStore", "(", "tran", ",", "store", ",", "this", ")", ";", ...
Add this Persistable and it's raw data managed object to the provided transaction. @param tran The transaction under which the add of this Persistable to the ObjectStore takes place. @param store The ObjectStore to add this Persistable to. @exception ObjectManagerException @exception PersistenceException @exception S...
[ "Add", "this", "Persistable", "and", "it", "s", "raw", "data", "managed", "object", "to", "the", "provided", "transaction", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/persistence/objectManager/PersistableImpl.java#L316-L319
lessthanoptimal/BoofCV
main/boofcv-io/src/main/java/boofcv/io/image/ConvertBufferedImage.java
ConvertBufferedImage.checkInputs
public static BufferedImage checkInputs(ImageBase src, BufferedImage dst) { """ If null the dst is declared, otherwise it checks to see if the 'dst' as the same shape as 'src'. """ if (dst != null) { if (dst.getWidth() != src.getWidth() || dst.getHeight() != src.getHeight()) { throw new IllegalArgumen...
java
public static BufferedImage checkInputs(ImageBase src, BufferedImage dst) { if (dst != null) { if (dst.getWidth() != src.getWidth() || dst.getHeight() != src.getHeight()) { throw new IllegalArgumentException("Shapes do not match: "+ "src = ( "+src.width+" , "+src.height+" ) " + "dst = ( "+dst.getW...
[ "public", "static", "BufferedImage", "checkInputs", "(", "ImageBase", "src", ",", "BufferedImage", "dst", ")", "{", "if", "(", "dst", "!=", "null", ")", "{", "if", "(", "dst", ".", "getWidth", "(", ")", "!=", "src", ".", "getWidth", "(", ")", "||", "...
If null the dst is declared, otherwise it checks to see if the 'dst' as the same shape as 'src'.
[ "If", "null", "the", "dst", "is", "declared", "otherwise", "it", "checks", "to", "see", "if", "the", "dst", "as", "the", "same", "shape", "as", "src", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-io/src/main/java/boofcv/io/image/ConvertBufferedImage.java#L884-L906
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/util/ConvolutionUtils.java
ConvolutionUtils.cnn1dMaskReduction
public static INDArray cnn1dMaskReduction(INDArray in, int kernel, int stride, int padding, int dilation, ConvolutionMode cm) { """ Given a mask array for a 1D CNN layer of shape [minibatch, sequenceLength], reduce the mask according to the 1D CNN layer configuration. Unlike RNN layers, 1D CNN layers may down-sam...
java
public static INDArray cnn1dMaskReduction(INDArray in, int kernel, int stride, int padding, int dilation, ConvolutionMode cm){ Preconditions.checkState(in.rank()==2, "Rank must be 2 for cnn1d mask array - shape ", in.shape()); if(cm == ConvolutionMode.Same && stride == 1 ){ return in; ...
[ "public", "static", "INDArray", "cnn1dMaskReduction", "(", "INDArray", "in", ",", "int", "kernel", ",", "int", "stride", ",", "int", "padding", ",", "int", "dilation", ",", "ConvolutionMode", "cm", ")", "{", "Preconditions", ".", "checkState", "(", "in", "."...
Given a mask array for a 1D CNN layer of shape [minibatch, sequenceLength], reduce the mask according to the 1D CNN layer configuration. Unlike RNN layers, 1D CNN layers may down-sample the data; consequently, we need to down-sample the mask array in the same way, to maintain the correspondence between the masks and th...
[ "Given", "a", "mask", "array", "for", "a", "1D", "CNN", "layer", "of", "shape", "[", "minibatch", "sequenceLength", "]", "reduce", "the", "mask", "according", "to", "the", "1D", "CNN", "layer", "configuration", ".", "Unlike", "RNN", "layers", "1D", "CNN", ...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/util/ConvolutionUtils.java#L614-L645
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java
XpathUtils.asByteBuffer
public static ByteBuffer asByteBuffer(String expression, Node node, XPath xpath) throws XPathExpressionException { """ Same as {@link #asByteBuffer(String, Node)} but allows an xpath to be passed in explicitly for reuse. """ String base64EncodedString = evaluateAsString(expression, node, x...
java
public static ByteBuffer asByteBuffer(String expression, Node node, XPath xpath) throws XPathExpressionException { String base64EncodedString = evaluateAsString(expression, node, xpath); if (isEmptyString(base64EncodedString)) return null; if (!isEmpty(node)) { byte[] de...
[ "public", "static", "ByteBuffer", "asByteBuffer", "(", "String", "expression", ",", "Node", "node", ",", "XPath", "xpath", ")", "throws", "XPathExpressionException", "{", "String", "base64EncodedString", "=", "evaluateAsString", "(", "expression", ",", "node", ",", ...
Same as {@link #asByteBuffer(String, Node)} but allows an xpath to be passed in explicitly for reuse.
[ "Same", "as", "{" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java#L504-L514
LearnLib/automatalib
util/src/main/java/net/automatalib/util/automata/minimizer/hopcroft/HopcroftMinimization.java
HopcroftMinimization.minimizeDFA
public static <I> CompactDFA<I> minimizeDFA(DFA<?, I> dfa, Alphabet<I> alphabet) { """ Minimizes the given DFA. The result is returned in the form of a {@link CompactDFA}, and pruning (see above) is performed after computing state equivalences. @param dfa the DFA to minimize @param alphabet the input alphab...
java
public static <I> CompactDFA<I> minimizeDFA(DFA<?, I> dfa, Alphabet<I> alphabet) { return minimizeDFA(dfa, alphabet, PruningMode.PRUNE_AFTER); }
[ "public", "static", "<", "I", ">", "CompactDFA", "<", "I", ">", "minimizeDFA", "(", "DFA", "<", "?", ",", "I", ">", "dfa", ",", "Alphabet", "<", "I", ">", "alphabet", ")", "{", "return", "minimizeDFA", "(", "dfa", ",", "alphabet", ",", "PruningMode",...
Minimizes the given DFA. The result is returned in the form of a {@link CompactDFA}, and pruning (see above) is performed after computing state equivalences. @param dfa the DFA to minimize @param alphabet the input alphabet (this will be the input alphabet of the returned DFA) @return a minimized version of the speci...
[ "Minimizes", "the", "given", "DFA", ".", "The", "result", "is", "returned", "in", "the", "form", "of", "a", "{", "@link", "CompactDFA", "}", "and", "pruning", "(", "see", "above", ")", "is", "performed", "after", "computing", "state", "equivalences", "." ]
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/util/src/main/java/net/automatalib/util/automata/minimizer/hopcroft/HopcroftMinimization.java#L160-L162
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/utils/ByteUtils.java
ByteUtils.shortToBytes
public static final void shortToBytes( short s, byte[] data, int[] offset ) { """ Write the bytes representing <code>s</code> into the byte array <code>data</code>, starting at index <code>offset [0]</code>, and increment <code>offset [0]</code> by the number of bytes written; if <code>data == null</code>, incr...
java
public static final void shortToBytes( short s, byte[] data, int[] offset ) { /** * TODO: We use network-order within OceanStore, but temporarily * supporting intel-order to work with some JNI code until JNI code is * set to interoperate with network-order. */ if (dat...
[ "public", "static", "final", "void", "shortToBytes", "(", "short", "s", ",", "byte", "[", "]", "data", ",", "int", "[", "]", "offset", ")", "{", "/**\n * TODO: We use network-order within OceanStore, but temporarily\n * supporting intel-order to work with some...
Write the bytes representing <code>s</code> into the byte array <code>data</code>, starting at index <code>offset [0]</code>, and increment <code>offset [0]</code> by the number of bytes written; if <code>data == null</code>, increment <code>offset [0]</code> by the number of bytes that would have been written otherwis...
[ "Write", "the", "bytes", "representing", "<code", ">", "s<", "/", "code", ">", "into", "the", "byte", "array", "<code", ">", "data<", "/", "code", ">", "starting", "at", "index", "<code", ">", "offset", "[", "0", "]", "<", "/", "code", ">", "and", ...
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/utils/ByteUtils.java#L136-L148
johncarl81/transfuse
transfuse-api/src/main/java/org/androidtransfuse/util/GeneratedCodeRepository.java
GeneratedCodeRepository.loadRepository
public final void loadRepository(ClassLoader classLoader, String repositoryPackage, String repositoryName) { """ Update the repository class from the given classloader. If the given repository class cannot be instantiated then this method will throw a TransfuseRuntimeException. @throws TransfuseRuntimeExcepti...
java
public final void loadRepository(ClassLoader classLoader, String repositoryPackage, String repositoryName){ try{ Class repositoryClass = classLoader.loadClass(repositoryPackage + "." + repositoryName); Repository<T> instance = (Repository<T>) repositoryClass.newInstance(); ge...
[ "public", "final", "void", "loadRepository", "(", "ClassLoader", "classLoader", ",", "String", "repositoryPackage", ",", "String", "repositoryName", ")", "{", "try", "{", "Class", "repositoryClass", "=", "classLoader", ".", "loadClass", "(", "repositoryPackage", "+"...
Update the repository class from the given classloader. If the given repository class cannot be instantiated then this method will throw a TransfuseRuntimeException. @throws TransfuseRuntimeException @param classLoader
[ "Update", "the", "repository", "class", "from", "the", "given", "classloader", ".", "If", "the", "given", "repository", "class", "cannot", "be", "instantiated", "then", "this", "method", "will", "throw", "a", "TransfuseRuntimeException", "." ]
train
https://github.com/johncarl81/transfuse/blob/a5f837504797a6c4f8628f7e1dde09b8e6368c8b/transfuse-api/src/main/java/org/androidtransfuse/util/GeneratedCodeRepository.java#L67-L80
TheHortonMachine/hortonmachine
hmachine/src/main/java/org/hortonmachine/hmachine/modules/geomorphology/curvatures/OmsCurvaturesBivariate.java
OmsCurvaturesBivariate.calculateCurvatures
public static void calculateCurvatures( RandomIter elevationIter, final double[] planTangProf, int ncols, int nrows, int col, int row, double xRes, double yRes, double disXX, double disYY, int windowSize ) { """ Calculate curvatures for a single cell. @param elevationIter the elevation map. @param ...
java
public static void calculateCurvatures( RandomIter elevationIter, final double[] planTangProf, int ncols, int nrows, int col, int row, double xRes, double yRes, double disXX, double disYY, int windowSize ) { GridNode node = new GridNode(elevationIter, ncols, nrows, xRes, yRes, col, row); do...
[ "public", "static", "void", "calculateCurvatures", "(", "RandomIter", "elevationIter", ",", "final", "double", "[", "]", "planTangProf", ",", "int", "ncols", ",", "int", "nrows", ",", "int", "col", ",", "int", "row", ",", "double", "xRes", ",", "double", "...
Calculate curvatures for a single cell. @param elevationIter the elevation map. @param planTangProf the array into which to insert the resulting [plan, tang, prof] curvatures. @param col the column to process. @param row the row to process. @param ncols the columns of the raster. @param nrows the rows of the raster. @...
[ "Calculate", "curvatures", "for", "a", "single", "cell", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/hmachine/src/main/java/org/hortonmachine/hmachine/modules/geomorphology/curvatures/OmsCurvaturesBivariate.java#L175-L211
Netflix/denominator
core/src/main/java/denominator/CredentialsConfiguration.java
CredentialsConfiguration.exceptionMessage
public static String exceptionMessage(Credentials input, denominator.Provider provider) { """ Use this method to generate a consistent error message when the credentials supplied are not valid for the provider. Typically, this will be the message of an {@code IllegalArgumentException} @param input nullable...
java
public static String exceptionMessage(Credentials input, denominator.Provider provider) { StringBuilder msg = new StringBuilder(); if (input == null || input == AnonymousCredentials.INSTANCE) { msg.append("no credentials supplied. "); } else { msg.append("incorrect credentials supplied. "); ...
[ "public", "static", "String", "exceptionMessage", "(", "Credentials", "input", ",", "denominator", ".", "Provider", "provider", ")", "{", "StringBuilder", "msg", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "input", "==", "null", "||", "input", "==...
Use this method to generate a consistent error message when the credentials supplied are not valid for the provider. Typically, this will be the message of an {@code IllegalArgumentException} @param input nullable credentials you know are invalid @param provider provider they are invalid for
[ "Use", "this", "method", "to", "generate", "a", "consistent", "error", "message", "when", "the", "credentials", "supplied", "are", "not", "valid", "for", "the", "provider", ".", "Typically", "this", "will", "be", "the", "message", "of", "an", "{", "@code", ...
train
https://github.com/Netflix/denominator/blob/c565e3b8c6043051252e0947029511f9ac5d306f/core/src/main/java/denominator/CredentialsConfiguration.java#L169-L193
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/LogRepositorySpaceAlert.java
LogRepositorySpaceAlert.setRepositoryInfo
public synchronized void setRepositoryInfo(LogRepositoryManager manager, File repositoryLocation, long repositorySpaceNeeded) throws IllegalArgumentException { """ Set a repository into the space alert for checking. In HPEL, the LogManager for log and the LogManager for Trace should set themselves as repositories...
java
public synchronized void setRepositoryInfo(LogRepositoryManager manager, File repositoryLocation, long repositorySpaceNeeded) throws IllegalArgumentException { if (manager == null) throw new IllegalArgumentException("Null manager passed to LogRepositorySpaceAlert.setRepositoryInfo") ; if (repositoryLocation == nu...
[ "public", "synchronized", "void", "setRepositoryInfo", "(", "LogRepositoryManager", "manager", ",", "File", "repositoryLocation", ",", "long", "repositorySpaceNeeded", ")", "throws", "IllegalArgumentException", "{", "if", "(", "manager", "==", "null", ")", "throw", "n...
Set a repository into the space alert for checking. In HPEL, the LogManager for log and the LogManager for Trace should set themselves as repositories to watch. This is done on the opening of each file. Thus, if a destination is moved, a file is rolled, or a server is started, the info will be updated @param reposito...
[ "Set", "a", "repository", "into", "the", "space", "alert", "for", "checking", ".", "In", "HPEL", "the", "LogManager", "for", "log", "and", "the", "LogManager", "for", "Trace", "should", "set", "themselves", "as", "repositories", "to", "watch", ".", "This", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/LogRepositorySpaceAlert.java#L144-L164
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java
CmsSitemapController.createSitemapSubEntry
public void createSitemapSubEntry(final CmsClientSitemapEntry parent, final String sitemapFolderType) { """ Creates a new sub-entry which is a subsitemap.<p> @param parent the parent entry @param sitemapFolderType the sitemap folder type """ CmsSitemapTreeItem item = CmsSitemapTreeItem.getItemById...
java
public void createSitemapSubEntry(final CmsClientSitemapEntry parent, final String sitemapFolderType) { CmsSitemapTreeItem item = CmsSitemapTreeItem.getItemById(parent.getId()); AsyncCallback<CmsClientSitemapEntry> callback = new AsyncCallback<CmsClientSitemapEntry>() { public void onFailu...
[ "public", "void", "createSitemapSubEntry", "(", "final", "CmsClientSitemapEntry", "parent", ",", "final", "String", "sitemapFolderType", ")", "{", "CmsSitemapTreeItem", "item", "=", "CmsSitemapTreeItem", ".", "getItemById", "(", "parent", ".", "getId", "(", ")", ")"...
Creates a new sub-entry which is a subsitemap.<p> @param parent the parent entry @param sitemapFolderType the sitemap folder type
[ "Creates", "a", "new", "sub", "-", "entry", "which", "is", "a", "subsitemap", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java#L608-L635
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/index/FeatureTableIndex.java
FeatureTableIndex.indexRows
private int indexRows(TableIndex tableIndex, FeatureResultSet resultSet) { """ Index the feature rows in the cursor @param tableIndex table index @param resultSet feature result @return count, -1 if no results or canceled """ int count = -1; try { while ((progress == null || progress.isActive()...
java
private int indexRows(TableIndex tableIndex, FeatureResultSet resultSet) { int count = -1; try { while ((progress == null || progress.isActive()) && resultSet.moveToNext()) { if (count < 0) { count++; } try { FeatureRow row = resultSet.getRow(); boolean indexed = index(tableInde...
[ "private", "int", "indexRows", "(", "TableIndex", "tableIndex", ",", "FeatureResultSet", "resultSet", ")", "{", "int", "count", "=", "-", "1", ";", "try", "{", "while", "(", "(", "progress", "==", "null", "||", "progress", ".", "isActive", "(", ")", ")",...
Index the feature rows in the cursor @param tableIndex table index @param resultSet feature result @return count, -1 if no results or canceled
[ "Index", "the", "feature", "rows", "in", "the", "cursor" ]
train
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/index/FeatureTableIndex.java#L160-L191
i-net-software/jlessc
src/com/inet/lib/less/FunctionExpression.java
FunctionExpression.getColorDigit
private int getColorDigit( int idx, CssFormatter formatter ) { """ Get the idx parameter from the parameter list as color digit. @param idx the index starting with 0 @param formatter current formatter @return the expression """ Expression expression = get( idx ); double d = expression.do...
java
private int getColorDigit( int idx, CssFormatter formatter ) { Expression expression = get( idx ); double d = expression.doubleValue( formatter ); if( expression.getDataType( formatter ) == PERCENT ) { d *= 2.55; } return colorDigit(d); }
[ "private", "int", "getColorDigit", "(", "int", "idx", ",", "CssFormatter", "formatter", ")", "{", "Expression", "expression", "=", "get", "(", "idx", ")", ";", "double", "d", "=", "expression", ".", "doubleValue", "(", "formatter", ")", ";", "if", "(", "...
Get the idx parameter from the parameter list as color digit. @param idx the index starting with 0 @param formatter current formatter @return the expression
[ "Get", "the", "idx", "parameter", "from", "the", "parameter", "list", "as", "color", "digit", "." ]
train
https://github.com/i-net-software/jlessc/blob/15b13e1637f6cc2e4d72df021e23ee0ca8d5e629/src/com/inet/lib/less/FunctionExpression.java#L899-L906
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/PersonGroupPersonsImpl.java
PersonGroupPersonsImpl.updateFace
public void updateFace(String personGroupId, UUID personId, UUID persistedFaceId, UpdateFaceOptionalParameter updateFaceOptionalParameter) { """ Update a person persisted face's userData field. @param personGroupId Id referencing a particular person group. @param personId Id referencing a particular person. @...
java
public void updateFace(String personGroupId, UUID personId, UUID persistedFaceId, UpdateFaceOptionalParameter updateFaceOptionalParameter) { updateFaceWithServiceResponseAsync(personGroupId, personId, persistedFaceId, updateFaceOptionalParameter).toBlocking().single().body(); }
[ "public", "void", "updateFace", "(", "String", "personGroupId", ",", "UUID", "personId", ",", "UUID", "persistedFaceId", ",", "UpdateFaceOptionalParameter", "updateFaceOptionalParameter", ")", "{", "updateFaceWithServiceResponseAsync", "(", "personGroupId", ",", "personId",...
Update a person persisted face's userData field. @param personGroupId Id referencing a particular person group. @param personId Id referencing a particular person. @param persistedFaceId Id referencing a particular persistedFaceId of an existing face. @param updateFaceOptionalParameter the object representing the opti...
[ "Update", "a", "person", "persisted", "face", "s", "userData", "field", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/PersonGroupPersonsImpl.java#L982-L984
apache/spark
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java
UnsafeRow.setDecimal
@Override public void setDecimal(int ordinal, Decimal value, int precision) { """ Updates the decimal column. Note: In order to support update a decimal with precision > 18, CAN NOT call setNullAt() for this column. """ assertIndexIsValid(ordinal); if (precision <= Decimal.MAX_LONG_DIGITS()) { ...
java
@Override public void setDecimal(int ordinal, Decimal value, int precision) { assertIndexIsValid(ordinal); if (precision <= Decimal.MAX_LONG_DIGITS()) { // compact format if (value == null) { setNullAt(ordinal); } else { setLong(ordinal, value.toUnscaledLong()); } }...
[ "@", "Override", "public", "void", "setDecimal", "(", "int", "ordinal", ",", "Decimal", "value", ",", "int", "precision", ")", "{", "assertIndexIsValid", "(", "ordinal", ")", ";", "if", "(", "precision", "<=", "Decimal", ".", "MAX_LONG_DIGITS", "(", ")", "...
Updates the decimal column. Note: In order to support update a decimal with precision > 18, CAN NOT call setNullAt() for this column.
[ "Updates", "the", "decimal", "column", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java#L264-L298
devnied/EMV-NFC-Paycard-Enrollment
library/src/main/java/com/github/devnied/emvnfccard/utils/TlvUtil.java
TlvUtil.getTagValueAsString
private static String getTagValueAsString(final ITag tag, final byte[] value) { """ Method used get Tag value as String @param tag tag type @param value tag value @return """ StringBuilder buf = new StringBuilder(); switch (tag.getTagValueType()) { case TEXT: buf.append("="); buf.append(new...
java
private static String getTagValueAsString(final ITag tag, final byte[] value) { StringBuilder buf = new StringBuilder(); switch (tag.getTagValueType()) { case TEXT: buf.append("="); buf.append(new String(value)); break; case NUMERIC: buf.append("NUMERIC"); break; case BINARY: buf.append("BI...
[ "private", "static", "String", "getTagValueAsString", "(", "final", "ITag", "tag", ",", "final", "byte", "[", "]", "value", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "switch", "(", "tag", ".", "getTagValueType", "(", ")"...
Method used get Tag value as String @param tag tag type @param value tag value @return
[ "Method", "used", "get", "Tag", "value", "as", "String" ]
train
https://github.com/devnied/EMV-NFC-Paycard-Enrollment/blob/bfbd3960708689154a7a75c8a9a934197d738a5b/library/src/main/java/com/github/devnied/emvnfccard/utils/TlvUtil.java#L127-L153
elki-project/elki
elki-precomputed/src/main/java/de/lmu/ifi/dbs/elki/distance/distancefunction/external/FileBasedSparseFloatDistanceFunction.java
FileBasedSparseFloatDistanceFunction.loadCache
protected void loadCache(int size, InputStream in) throws IOException { """ Fill cache from an input stream. @param size Expected size @param in Input stream @throws IOException """ // Expect a sparse matrix here cache = new Long2FloatOpenHashMap(size * 20); cache.defaultReturnValue(Float.POSI...
java
protected void loadCache(int size, InputStream in) throws IOException { // Expect a sparse matrix here cache = new Long2FloatOpenHashMap(size * 20); cache.defaultReturnValue(Float.POSITIVE_INFINITY); min = Integer.MAX_VALUE; max = Integer.MIN_VALUE; parser.parse(in, new DistanceCacheWriter() { ...
[ "protected", "void", "loadCache", "(", "int", "size", ",", "InputStream", "in", ")", "throws", "IOException", "{", "// Expect a sparse matrix here", "cache", "=", "new", "Long2FloatOpenHashMap", "(", "size", "*", "20", ")", ";", "cache", ".", "defaultReturnValue",...
Fill cache from an input stream. @param size Expected size @param in Input stream @throws IOException
[ "Fill", "cache", "from", "an", "input", "stream", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-precomputed/src/main/java/de/lmu/ifi/dbs/elki/distance/distancefunction/external/FileBasedSparseFloatDistanceFunction.java#L130-L156
pushtorefresh/storio
storio-common/src/main/java/com/pushtorefresh/storio3/internal/Checks.java
Checks.checkNotEmpty
public static void checkNotEmpty(@Nullable String value, @NonNull String message) { """ Checks that passed string is not null and not empty, throws {@link NullPointerException} or {@link IllegalStateException} with passed message if string is null or empty. @param value a string to check @param message exc...
java
public static void checkNotEmpty(@Nullable String value, @NonNull String message) { if (value == null) { throw new NullPointerException(message); } else if (value.length() == 0) { throw new IllegalStateException(message); } }
[ "public", "static", "void", "checkNotEmpty", "(", "@", "Nullable", "String", "value", ",", "@", "NonNull", "String", "message", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "message", ")", ";", "}", "...
Checks that passed string is not null and not empty, throws {@link NullPointerException} or {@link IllegalStateException} with passed message if string is null or empty. @param value a string to check @param message exception message if object is null
[ "Checks", "that", "passed", "string", "is", "not", "null", "and", "not", "empty", "throws", "{", "@link", "NullPointerException", "}", "or", "{", "@link", "IllegalStateException", "}", "with", "passed", "message", "if", "string", "is", "null", "or", "empty", ...
train
https://github.com/pushtorefresh/storio/blob/58f53d81bcc7b069c8bb271c46a90e37775abe8d/storio-common/src/main/java/com/pushtorefresh/storio3/internal/Checks.java#L38-L44
cuba-platform/yarg
core/modules/core/src/com/haulmont/yarg/formatters/impl/DocFormatter.java
DocFormatter.replaceAllAliasesInDocument
protected void replaceAllAliasesInDocument() { """ Replaces all aliases ${bandname.paramname} in document text. @throws com.haulmont.yarg.exception.ReportingException If there is not appropriate band or alias is bad """ XTextDocument xTextDocument = as(XTextDocument.class, xComponent); XRepl...
java
protected void replaceAllAliasesInDocument() { XTextDocument xTextDocument = as(XTextDocument.class, xComponent); XReplaceable xReplaceable = as(XReplaceable.class, xTextDocument); XSearchDescriptor searchDescriptor = xReplaceable.createSearchDescriptor(); searchDescriptor.setSearchStrin...
[ "protected", "void", "replaceAllAliasesInDocument", "(", ")", "{", "XTextDocument", "xTextDocument", "=", "as", "(", "XTextDocument", ".", "class", ",", "xComponent", ")", ";", "XReplaceable", "xReplaceable", "=", "as", "(", "XReplaceable", ".", "class", ",", "x...
Replaces all aliases ${bandname.paramname} in document text. @throws com.haulmont.yarg.exception.ReportingException If there is not appropriate band or alias is bad
[ "Replaces", "all", "aliases", "$", "{", "bandname", ".", "paramname", "}", "in", "document", "text", "." ]
train
https://github.com/cuba-platform/yarg/blob/d157286cbe29448f3e1f445e8c5dd88808351da0/core/modules/core/src/com/haulmont/yarg/formatters/impl/DocFormatter.java#L252-L284
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/RandomAccessFile.java
RandomAccessFile.readFully
public final void readFully(byte[] dst, int offset, int byteCount) throws IOException { """ Reads {@code byteCount} bytes from this stream and stores them in the byte array {@code dst} starting at {@code offset}. If {@code byteCount} is zero, then this method returns without reading any bytes. Otherwise, this me...
java
public final void readFully(byte[] dst, int offset, int byteCount) throws IOException { Arrays.checkOffsetAndCount(dst.length, offset, byteCount); while (byteCount > 0) { int result = read(dst, offset, byteCount); if (result < 0) { throw new EOFException(); ...
[ "public", "final", "void", "readFully", "(", "byte", "[", "]", "dst", ",", "int", "offset", ",", "int", "byteCount", ")", "throws", "IOException", "{", "Arrays", ".", "checkOffsetAndCount", "(", "dst", ".", "length", ",", "offset", ",", "byteCount", ")", ...
Reads {@code byteCount} bytes from this stream and stores them in the byte array {@code dst} starting at {@code offset}. If {@code byteCount} is zero, then this method returns without reading any bytes. Otherwise, this method blocks until {@code byteCount} bytes have been read. If insufficient bytes are available, {@co...
[ "Reads", "{", "@code", "byteCount", "}", "bytes", "from", "this", "stream", "and", "stores", "them", "in", "the", "byte", "array", "{", "@code", "dst", "}", "starting", "at", "{", "@code", "offset", "}", ".", "If", "{", "@code", "byteCount", "}", "is",...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/RandomAccessFile.java#L421-L431
LAW-Unimi/BUbiNG
src/it/unimi/di/law/bubing/util/Util.java
Util.toByteArrayList
public static ByteArrayList toByteArrayList(final String s, final ByteArrayList list) { """ Writes an ASCII string in a {@link ByteArrayList}. @param s an ASCII string. @param list a byte list that will contain the byte representation of {@code s}. @return {@code list}. @throws AssertionError if assertions a...
java
public static ByteArrayList toByteArrayList(final String s, final ByteArrayList list) { list.clear(); list.size(s.length()); final byte[] array = list.elements(); for (int i = list.size(); i-- != 0;) { assert s.charAt(i) < (char)0x80 : s.charAt(i); array[i] = (byte)(s.charAt(i) & 0x7F); } return list;...
[ "public", "static", "ByteArrayList", "toByteArrayList", "(", "final", "String", "s", ",", "final", "ByteArrayList", "list", ")", "{", "list", ".", "clear", "(", ")", ";", "list", ".", "size", "(", "s", ".", "length", "(", ")", ")", ";", "final", "byte"...
Writes an ASCII string in a {@link ByteArrayList}. @param s an ASCII string. @param list a byte list that will contain the byte representation of {@code s}. @return {@code list}. @throws AssertionError if assertions are enabled and some character of {@code s} is not ASCII.
[ "Writes", "an", "ASCII", "string", "in", "a", "{", "@link", "ByteArrayList", "}", "." ]
train
https://github.com/LAW-Unimi/BUbiNG/blob/e148acc90031a4f3967422705a9fb07ddaf155e4/src/it/unimi/di/law/bubing/util/Util.java#L230-L239
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/CustomerNoteUrl.java
CustomerNoteUrl.deleteAccountNoteUrl
public static MozuUrl deleteAccountNoteUrl(Integer accountId, Integer noteId) { """ Get Resource Url for DeleteAccountNote @param accountId Unique identifier of the customer account. @param noteId Unique identifier of a particular note to retrieve. @return String Resource Url """ UrlFormatter formatter...
java
public static MozuUrl deleteAccountNoteUrl(Integer accountId, Integer noteId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/notes/{noteId}"); formatter.formatUrl("accountId", accountId); formatter.formatUrl("noteId", noteId); return new MozuUrl(formatter.getResou...
[ "public", "static", "MozuUrl", "deleteAccountNoteUrl", "(", "Integer", "accountId", ",", "Integer", "noteId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/customer/accounts/{accountId}/notes/{noteId}\"", ")", ";", "formatter", "...
Get Resource Url for DeleteAccountNote @param accountId Unique identifier of the customer account. @param noteId Unique identifier of a particular note to retrieve. @return String Resource Url
[ "Get", "Resource", "Url", "for", "DeleteAccountNote" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/CustomerNoteUrl.java#L90-L96
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java
ReviewsImpl.createVideoReviewsWithServiceResponseAsync
public Observable<ServiceResponse<List<String>>> createVideoReviewsWithServiceResponseAsync(String teamName, String contentType, List<CreateVideoReviewsBodyItem> createVideoReviewsBody, CreateVideoReviewsOptionalParameter createVideoReviewsOptionalParameter) { """ The reviews created would show up for Reviewers on...
java
public Observable<ServiceResponse<List<String>>> createVideoReviewsWithServiceResponseAsync(String teamName, String contentType, List<CreateVideoReviewsBodyItem> createVideoReviewsBody, CreateVideoReviewsOptionalParameter createVideoReviewsOptionalParameter) { if (this.client.baseUrl() == null) { th...
[ "public", "Observable", "<", "ServiceResponse", "<", "List", "<", "String", ">", ">", ">", "createVideoReviewsWithServiceResponseAsync", "(", "String", "teamName", ",", "String", "contentType", ",", "List", "<", "CreateVideoReviewsBodyItem", ">", "createVideoReviewsBody...
The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. &lt;h3&gt;CallBack Schemas &lt;/h3&gt; &lt;h4&gt;Review Completion CallBack Sample&lt;/h4&gt; &lt;p&gt; {&lt;br/&gt; "ReviewId": "&lt;R...
[ "The", "reviews", "created", "would", "show", "up", "for", "Reviewers", "on", "your", "team", ".", "As", "Reviewers", "complete", "reviewing", "results", "of", "the", "Review", "would", "be", "POSTED", "(", "i", ".", "e", ".", "HTTP", "POST", ")", "on", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java#L2019-L2036
moparisthebest/beehive
beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/ControlBean.java
ControlBean.firePropertyChange
protected void firePropertyChange(PropertyKey propertyKey, Object oldValue, Object newValue) { """ Delivers a PropertyChangeEvent to any registered PropertyChangeListeners associated with the property referenced by the specified key. This method *should not* be synchronized, as the PropertyChangeSupport has it...
java
protected void firePropertyChange(PropertyKey propertyKey, Object oldValue, Object newValue) { // No change support instance means no listeners if (_changeSupport == null) return; _changeSupport.firePropertyChange(propertyKey.getPropertyName(), oldValue, newValue); }
[ "protected", "void", "firePropertyChange", "(", "PropertyKey", "propertyKey", ",", "Object", "oldValue", ",", "Object", "newValue", ")", "{", "// No change support instance means no listeners", "if", "(", "_changeSupport", "==", "null", ")", "return", ";", "_changeSuppo...
Delivers a PropertyChangeEvent to any registered PropertyChangeListeners associated with the property referenced by the specified key. This method *should not* be synchronized, as the PropertyChangeSupport has its own built in synchronization mechanisms.
[ "Delivers", "a", "PropertyChangeEvent", "to", "any", "registered", "PropertyChangeListeners", "associated", "with", "the", "property", "referenced", "by", "the", "specified", "key", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/ControlBean.java#L779-L786
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/tunnel/OutputStreamInterceptingFilter.java
OutputStreamInterceptingFilter.handleBlob
private GuacamoleInstruction handleBlob(GuacamoleInstruction instruction) { """ Handles a single "blob" instruction, decoding its base64 data, sending that data to the associated OutputStream, and ultimately dropping the "blob" instruction such that the client never receives it. If no OutputStream is associated...
java
private GuacamoleInstruction handleBlob(GuacamoleInstruction instruction) { // Verify all required arguments are present List<String> args = instruction.getArgs(); if (args.size() < 2) return instruction; // Pull associated stream String index = args.get(0); ...
[ "private", "GuacamoleInstruction", "handleBlob", "(", "GuacamoleInstruction", "instruction", ")", "{", "// Verify all required arguments are present", "List", "<", "String", ">", "args", "=", "instruction", ".", "getArgs", "(", ")", ";", "if", "(", "args", ".", "siz...
Handles a single "blob" instruction, decoding its base64 data, sending that data to the associated OutputStream, and ultimately dropping the "blob" instruction such that the client never receives it. If no OutputStream is associated with the stream index within the "blob" instruction, the instruction is passed through ...
[ "Handles", "a", "single", "blob", "instruction", "decoding", "its", "base64", "data", "sending", "that", "data", "to", "the", "associated", "OutputStream", "and", "ultimately", "dropping", "the", "blob", "instruction", "such", "that", "the", "client", "never", "...
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/OutputStreamInterceptingFilter.java#L113-L163
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/SpriteSheet.java
SpriteSheet.renderInUse
public void renderInUse(int x,int y,int sx,int sy) { """ Render a sprite when this sprite sheet is in use. @see #startUse() @see #endUse() @param x The x position to render the sprite at @param y The y position to render the sprite at @param sx The x location of the cell to render @param sy The y locatio...
java
public void renderInUse(int x,int y,int sx,int sy) { subImages[sx][sy].drawEmbedded(x, y, tw, th); }
[ "public", "void", "renderInUse", "(", "int", "x", ",", "int", "y", ",", "int", "sx", ",", "int", "sy", ")", "{", "subImages", "[", "sx", "]", "[", "sy", "]", ".", "drawEmbedded", "(", "x", ",", "y", ",", "tw", ",", "th", ")", ";", "}" ]
Render a sprite when this sprite sheet is in use. @see #startUse() @see #endUse() @param x The x position to render the sprite at @param y The y position to render the sprite at @param sx The x location of the cell to render @param sy The y location of the cell to render
[ "Render", "a", "sprite", "when", "this", "sprite", "sheet", "is", "in", "use", "." ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/SpriteSheet.java#L267-L269
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/FailoverGroupsInner.java
FailoverGroupsInner.getAsync
public Observable<FailoverGroupInner> getAsync(String resourceGroupName, String serverName, String failoverGroupName) { """ Gets a failover group. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @pa...
java
public Observable<FailoverGroupInner> getAsync(String resourceGroupName, String serverName, String failoverGroupName) { return getWithServiceResponseAsync(resourceGroupName, serverName, failoverGroupName).map(new Func1<ServiceResponse<FailoverGroupInner>, FailoverGroupInner>() { @Override ...
[ "public", "Observable", "<", "FailoverGroupInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "failoverGroupName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ",", ...
Gets a failover group. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server containing the failover group. @param failoverGroupName The name of the failover group. @throw...
[ "Gets", "a", "failover", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/FailoverGroupsInner.java#L159-L166
reapzor/FiloFirmata
src/main/java/com/bortbort/arduino/FiloFirmata/Firmata.java
Firmata.addMessageListener
public void addMessageListener(DigitalChannel channel, MessageListener<? extends Message> messageListener) { """ Add a messageListener to the Firmata object which will fire whenever a matching message is received over the SerialPort that corresponds to the given DigitalChannel. @param channel DigitalChannel to...
java
public void addMessageListener(DigitalChannel channel, MessageListener<? extends Message> messageListener) { addListener(channel.getIdentifier(), messageListener.getMessageType(), messageListener); }
[ "public", "void", "addMessageListener", "(", "DigitalChannel", "channel", ",", "MessageListener", "<", "?", "extends", "Message", ">", "messageListener", ")", "{", "addListener", "(", "channel", ".", "getIdentifier", "(", ")", ",", "messageListener", ".", "getMess...
Add a messageListener to the Firmata object which will fire whenever a matching message is received over the SerialPort that corresponds to the given DigitalChannel. @param channel DigitalChannel to listen on @param messageListener MessageListener object to handle a received Message event over the SerialPort.
[ "Add", "a", "messageListener", "to", "the", "Firmata", "object", "which", "will", "fire", "whenever", "a", "matching", "message", "is", "received", "over", "the", "SerialPort", "that", "corresponds", "to", "the", "given", "DigitalChannel", "." ]
train
https://github.com/reapzor/FiloFirmata/blob/39c26c1a577b8fff8690245e105cb62e02284f16/src/main/java/com/bortbort/arduino/FiloFirmata/Firmata.java#L185-L187
carewebframework/carewebframework-core
org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/context/ContextItems.java
ContextItems.lookupItemName
private String lookupItemName(String itemName, boolean autoAdd) { """ Performs a case-insensitive lookup of the item name in the index. @param itemName Item name @param autoAdd If true and item name not in index, add it. @return Item name as stored internally. If not already stored, returns the item name as i...
java
private String lookupItemName(String itemName, boolean autoAdd) { String indexedName = index.get(itemName.toLowerCase()); if (indexedName == null && autoAdd) { index.put(itemName.toLowerCase(), itemName); } return indexedName == null ? itemName : indexedName; }
[ "private", "String", "lookupItemName", "(", "String", "itemName", ",", "boolean", "autoAdd", ")", "{", "String", "indexedName", "=", "index", ".", "get", "(", "itemName", ".", "toLowerCase", "(", ")", ")", ";", "if", "(", "indexedName", "==", "null", "&&",...
Performs a case-insensitive lookup of the item name in the index. @param itemName Item name @param autoAdd If true and item name not in index, add it. @return Item name as stored internally. If not already stored, returns the item name as it was specified in itemName.
[ "Performs", "a", "case", "-", "insensitive", "lookup", "of", "the", "item", "name", "in", "the", "index", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/context/ContextItems.java#L67-L75
UrielCh/ovh-java-sdk
ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java
ApiOvhEmaildomain.domain_account_accountName_filter_name_changePriority_POST
public OvhTaskFilter domain_account_accountName_filter_name_changePriority_POST(String domain, String accountName, String name, Long priority) throws IOException { """ Change filter priority REST: POST /email/domain/{domain}/account/{accountName}/filter/{name}/changePriority @param priority [required] New prio...
java
public OvhTaskFilter domain_account_accountName_filter_name_changePriority_POST(String domain, String accountName, String name, Long priority) throws IOException { String qPath = "/email/domain/{domain}/account/{accountName}/filter/{name}/changePriority"; StringBuilder sb = path(qPath, domain, accountName, name); ...
[ "public", "OvhTaskFilter", "domain_account_accountName_filter_name_changePriority_POST", "(", "String", "domain", ",", "String", "accountName", ",", "String", "name", ",", "Long", "priority", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/domain/{dom...
Change filter priority REST: POST /email/domain/{domain}/account/{accountName}/filter/{name}/changePriority @param priority [required] New priority @param domain [required] Name of your domain name @param accountName [required] Name of account @param name [required] Filter name
[ "Change", "filter", "priority" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L650-L657
sd4324530/fastweixin
src/main/java/com/github/sd4324530/fastweixin/api/MaterialAPI.java
MaterialAPI.uploadMaterialFile
public UploadMaterialResponse uploadMaterialFile(File file, String title, String introduction) { """ 上传永久视频素材文件。 @param file 素材文件 @param title 素材标题 @param introduction 素材描述信息 @return 上传结果 """ UploadMaterialResponse response; String url = "http://api.weixin.qq.com/cgi-bin/material/add_materi...
java
public UploadMaterialResponse uploadMaterialFile(File file, String title, String introduction){ UploadMaterialResponse response; String url = "http://api.weixin.qq.com/cgi-bin/material/add_material?access_token=#"; BaseResponse r; if(StrUtil.isBlank(title)) { r = executePost(...
[ "public", "UploadMaterialResponse", "uploadMaterialFile", "(", "File", "file", ",", "String", "title", ",", "String", "introduction", ")", "{", "UploadMaterialResponse", "response", ";", "String", "url", "=", "\"http://api.weixin.qq.com/cgi-bin/material/add_material?access_to...
上传永久视频素材文件。 @param file 素材文件 @param title 素材标题 @param introduction 素材描述信息 @return 上传结果
[ "上传永久视频素材文件。" ]
train
https://github.com/sd4324530/fastweixin/blob/6bc0a7abfa23aad0dbad4c3123a47a7fb53f3447/src/main/java/com/github/sd4324530/fastweixin/api/MaterialAPI.java#L66-L81
alkacon/opencms-core
src/org/opencms/ui/apps/dbmanager/CmsPropertyTable.java
CmsPropertyTable.filterTable
public void filterTable(String search) { """ Filters the table according to given search string.<p> @param search string to be looked for. """ m_container.removeAllContainerFilters(); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(search)) { m_container.addContainerFilter(new Or(n...
java
public void filterTable(String search) { m_container.removeAllContainerFilters(); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(search)) { m_container.addContainerFilter(new Or(new SimpleStringFilter(TableColumn.Name, search, true, false))); } }
[ "public", "void", "filterTable", "(", "String", "search", ")", "{", "m_container", ".", "removeAllContainerFilters", "(", ")", ";", "if", "(", "CmsStringUtil", ".", "isNotEmptyOrWhitespaceOnly", "(", "search", ")", ")", "{", "m_container", ".", "addContainerFilter...
Filters the table according to given search string.<p> @param search string to be looked for.
[ "Filters", "the", "table", "according", "to", "given", "search", "string", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/dbmanager/CmsPropertyTable.java#L270-L276
apache/groovy
subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
NioGroovyMethods.eachFile
public static void eachFile(final Path self, final FileType fileType, @ClosureParams(value = SimpleType.class, options = "java.nio.file.Path") final Closure closure) throws IOException { """ Invokes the closure for each 'child' file in this 'parent' folder/directory. Both regular files and subfolders/subdirectori...
java
public static void eachFile(final Path self, final FileType fileType, @ClosureParams(value = SimpleType.class, options = "java.nio.file.Path") final Closure closure) throws IOException { //throws FileNotFoundException, IllegalArgumentException { checkDir(self); // TODO GroovyDoc doesn't parse t...
[ "public", "static", "void", "eachFile", "(", "final", "Path", "self", ",", "final", "FileType", "fileType", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"java.nio.file.Path\"", ")", "final", "Closure", "closu...
Invokes the closure for each 'child' file in this 'parent' folder/directory. Both regular files and subfolders/subdirectories can be processed depending on the fileType enum value. @param self a Path (that happens to be a folder/directory) @param fileType if normal files or directories or both should be processed ...
[ "Invokes", "the", "closure", "for", "each", "child", "file", "in", "this", "parent", "folder", "/", "directory", ".", "Both", "regular", "files", "and", "subfolders", "/", "subdirectories", "can", "be", "processed", "depending", "on", "the", "fileType", "enum"...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java#L859-L873
joniles/mpxj
src/main/java/net/sf/mpxj/TaskContainer.java
TaskContainer.synchroizeTaskIDToHierarchy
private int synchroizeTaskIDToHierarchy(Task parentTask, int currentID) { """ Called recursively to renumber child task IDs. @param parentTask parent task instance @param currentID current task ID @return updated current task ID """ for (Task task : parentTask.getChildTasks()) { task....
java
private int synchroizeTaskIDToHierarchy(Task parentTask, int currentID) { for (Task task : parentTask.getChildTasks()) { task.setID(Integer.valueOf(currentID++)); add(task); currentID = synchroizeTaskIDToHierarchy(task, currentID); } return currentID; }
[ "private", "int", "synchroizeTaskIDToHierarchy", "(", "Task", "parentTask", ",", "int", "currentID", ")", "{", "for", "(", "Task", "task", ":", "parentTask", ".", "getChildTasks", "(", ")", ")", "{", "task", ".", "setID", "(", "Integer", ".", "valueOf", "(...
Called recursively to renumber child task IDs. @param parentTask parent task instance @param currentID current task ID @return updated current task ID
[ "Called", "recursively", "to", "renumber", "child", "task", "IDs", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/TaskContainer.java#L142-L151
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/util/ClassHelper.java
ClassHelper.getClass
public static Class getClass(String className, boolean initialize) throws ClassNotFoundException { """ Retrieves the class object for the given qualified class name. @param className The qualified name of the class @param initialize Whether the class shall be initialized @return The class object """ ...
java
public static Class getClass(String className, boolean initialize) throws ClassNotFoundException { return Class.forName(className, initialize, getClassLoader()); }
[ "public", "static", "Class", "getClass", "(", "String", "className", ",", "boolean", "initialize", ")", "throws", "ClassNotFoundException", "{", "return", "Class", ".", "forName", "(", "className", ",", "initialize", ",", "getClassLoader", "(", ")", ")", ";", ...
Retrieves the class object for the given qualified class name. @param className The qualified name of the class @param initialize Whether the class shall be initialized @return The class object
[ "Retrieves", "the", "class", "object", "for", "the", "given", "qualified", "class", "name", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ClassHelper.java#L120-L123
OpenLiberty/open-liberty
dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/transport/iiop/asn1/x509/GeneralSubtree.java
GeneralSubtree.toASN1Object
public DERObject toASN1Object() { """ /* GeneralSubtree ::= SEQUENCE { base GeneralName, minimum [0] BaseDistance DEFAULT 0, maximum [1] BaseDistance OPTIONAL } """ ASN1EncodableVector v = new ASN1EncodableVector(); v.add(base); if (minim...
java
public DERObject toASN1Object() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(base); if (minimum != null) { v.add(new DERTaggedObject(false, 0, minimum)); } if (maximum != null) { v.add(new DERTaggedObject(false, 1, maxi...
[ "public", "DERObject", "toASN1Object", "(", ")", "{", "ASN1EncodableVector", "v", "=", "new", "ASN1EncodableVector", "(", ")", ";", "v", ".", "add", "(", "base", ")", ";", "if", "(", "minimum", "!=", "null", ")", "{", "v", ".", "add", "(", "new", "DE...
/* GeneralSubtree ::= SEQUENCE { base GeneralName, minimum [0] BaseDistance DEFAULT 0, maximum [1] BaseDistance OPTIONAL }
[ "/", "*", "GeneralSubtree", "::", "=", "SEQUENCE", "{", "base", "GeneralName", "minimum", "[", "0", "]", "BaseDistance", "DEFAULT", "0", "maximum", "[", "1", "]", "BaseDistance", "OPTIONAL", "}" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/transport/iiop/asn1/x509/GeneralSubtree.java#L121-L138
pressgang-ccms/PressGangCCMSCommonUtilities
src/main/java/org/jboss/pressgang/ccms/utils/common/HTTPUtilities.java
HTTPUtilities.writeOutContent
private static void writeOutContent(final byte[] data, final String filename, final String mime, final boolean asAttachment) { """ Used to send arbitrary to the user. @param data The contents of the file to send @param filename The name of the file. This is only useful if asAttachment is true @pa...
java
private static void writeOutContent(final byte[] data, final String filename, final String mime, final boolean asAttachment) { try { final HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse(); response.setContentTy...
[ "private", "static", "void", "writeOutContent", "(", "final", "byte", "[", "]", "data", ",", "final", "String", "filename", ",", "final", "String", "mime", ",", "final", "boolean", "asAttachment", ")", "{", "try", "{", "final", "HttpServletResponse", "response...
Used to send arbitrary to the user. @param data The contents of the file to send @param filename The name of the file. This is only useful if asAttachment is true @param mime The MIME type of the content @param asAttachment If true, the file will be downloaded. If false, it is up to the browser to ...
[ "Used", "to", "send", "arbitrary", "to", "the", "user", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSCommonUtilities/blob/5ebf5ed30a94c34c33f4708caa04a8da99cbb15c/src/main/java/org/jboss/pressgang/ccms/utils/common/HTTPUtilities.java#L76-L97
Red5/red5-server-common
src/main/java/org/red5/server/stream/ClientBroadcastStream.java
ClientBroadcastStream.onOOBControlMessage
public void onOOBControlMessage(IMessageComponent source, IPipe pipe, OOBControlMessage oobCtrlMsg) { """ Out-of-band control message handler @param source OOB message source @param pipe Pipe that used to send OOB message @param oobCtrlMsg Out-of-band control message """ String target = oobCtr...
java
public void onOOBControlMessage(IMessageComponent source, IPipe pipe, OOBControlMessage oobCtrlMsg) { String target = oobCtrlMsg.getTarget(); if ("ClientBroadcastStream".equals(target)) { String serviceName = oobCtrlMsg.getServiceName(); if ("chunkSize".equals(serviceName)) {...
[ "public", "void", "onOOBControlMessage", "(", "IMessageComponent", "source", ",", "IPipe", "pipe", ",", "OOBControlMessage", "oobCtrlMsg", ")", "{", "String", "target", "=", "oobCtrlMsg", ".", "getTarget", "(", ")", ";", "if", "(", "\"ClientBroadcastStream\"", "."...
Out-of-band control message handler @param source OOB message source @param pipe Pipe that used to send OOB message @param oobCtrlMsg Out-of-band control message
[ "Out", "-", "of", "-", "band", "control", "message", "handler" ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/stream/ClientBroadcastStream.java#L583-L596
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.sqlRestriction
public org.grails.datastore.mapping.query.api.Criteria sqlRestriction(String sqlRestriction, List<?> values) { """ Applies a sql restriction to the results to allow something like: @param sqlRestriction the sql restriction @param values jdbc parameters @return a Criteria instance """ if (!validate...
java
public org.grails.datastore.mapping.query.api.Criteria sqlRestriction(String sqlRestriction, List<?> values) { if (!validateSimpleExpression()) { throwRuntimeException(new IllegalArgumentException("Call to [sqlRestriction] with value [" + sqlRestriction + "] not allowed here."));...
[ "public", "org", ".", "grails", ".", "datastore", ".", "mapping", ".", "query", ".", "api", ".", "Criteria", "sqlRestriction", "(", "String", "sqlRestriction", ",", "List", "<", "?", ">", "values", ")", "{", "if", "(", "!", "validateSimpleExpression", "(",...
Applies a sql restriction to the results to allow something like: @param sqlRestriction the sql restriction @param values jdbc parameters @return a Criteria instance
[ "Applies", "a", "sql", "restriction", "to", "the", "results", "to", "allow", "something", "like", ":" ]
train
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L1158-L1178
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/text/StrBuilder.java
StrBuilder.deleteImpl
private void deleteImpl(final int startIndex, final int endIndex, final int len) { """ Internal method to delete a range without validation. @param startIndex the start index, must be valid @param endIndex the end index (exclusive), must be valid @param len the length, must be valid @throws IndexOutOfBoun...
java
private void deleteImpl(final int startIndex, final int endIndex, final int len) { System.arraycopy(buffer, endIndex, buffer, startIndex, size - endIndex); size -= len; }
[ "private", "void", "deleteImpl", "(", "final", "int", "startIndex", ",", "final", "int", "endIndex", ",", "final", "int", "len", ")", "{", "System", ".", "arraycopy", "(", "buffer", ",", "endIndex", ",", "buffer", ",", "startIndex", ",", "size", "-", "en...
Internal method to delete a range without validation. @param startIndex the start index, must be valid @param endIndex the end index (exclusive), must be valid @param len the length, must be valid @throws IndexOutOfBoundsException if any index is invalid
[ "Internal", "method", "to", "delete", "a", "range", "without", "validation", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/text/StrBuilder.java#L1789-L1792
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/intrinsic/ISOS.java
ISOS.transformScores
public static DoubleMinMax transformScores(WritableDoubleDataStore scores, DBIDs ids, double logPerp, double phi) { """ Transform scores @param scores Scores to transform @param ids DBIDs to process @param logPerp log perplexity @param phi Expected outlier rate @return Minimum and maximum scores """ ...
java
public static DoubleMinMax transformScores(WritableDoubleDataStore scores, DBIDs ids, double logPerp, double phi) { DoubleMinMax minmax = new DoubleMinMax(); double adj = (1 - phi) / phi; for(DBIDIter it = ids.iter(); it.valid(); it.advance()) { double or = FastMath.exp(-scores.doubleValue(it) * logPe...
[ "public", "static", "DoubleMinMax", "transformScores", "(", "WritableDoubleDataStore", "scores", ",", "DBIDs", "ids", ",", "double", "logPerp", ",", "double", "phi", ")", "{", "DoubleMinMax", "minmax", "=", "new", "DoubleMinMax", "(", ")", ";", "double", "adj", ...
Transform scores @param scores Scores to transform @param ids DBIDs to process @param logPerp log perplexity @param phi Expected outlier rate @return Minimum and maximum scores
[ "Transform", "scores" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/intrinsic/ISOS.java#L239-L249
casmi/casmi
src/main/java/casmi/graphics/element/Element.java
Element.setScale
public void setScale(double scaleX, double scaleY, double scaleZ) { """ Sets the scale of the Element @param scaleX The scale of the Element of x-axis direction @param scaleY The scale of the Element of y-axis direction @param scaleZ The scale of the Element of z-axis direction """ this.scaleX = scal...
java
public void setScale(double scaleX, double scaleY, double scaleZ) { this.scaleX = scaleX; this.scaleY = scaleY; this.scaleZ = scaleZ; }
[ "public", "void", "setScale", "(", "double", "scaleX", ",", "double", "scaleY", ",", "double", "scaleZ", ")", "{", "this", ".", "scaleX", "=", "scaleX", ";", "this", ".", "scaleY", "=", "scaleY", ";", "this", ".", "scaleZ", "=", "scaleZ", ";", "}" ]
Sets the scale of the Element @param scaleX The scale of the Element of x-axis direction @param scaleY The scale of the Element of y-axis direction @param scaleZ The scale of the Element of z-axis direction
[ "Sets", "the", "scale", "of", "the", "Element" ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Element.java#L627-L631
ManfredTremmel/gwt-bean-validators
gwtp-spring-integration/src/main/super/de/knightsoftnet/gwtp/spring/supersource/org/springframework/util/CollectionUtils.java
CollectionUtils.findValueOfType
@GwtIncompatible("incompatible method") @Nullable public static Object findValueOfType(final Collection<?> collection, final Class<?>[] types) { """ Find a single value of one of the given types in the given Collection: searching the Collection for a value of the first type, then searching for a value of the ...
java
@GwtIncompatible("incompatible method") @Nullable public static Object findValueOfType(final Collection<?> collection, final Class<?>[] types) { if (CollectionUtils.isEmpty(collection) || ObjectUtils.isEmpty(types)) { return null; } for (final Class<?> type : types) { final Object value = Co...
[ "@", "GwtIncompatible", "(", "\"incompatible method\"", ")", "@", "Nullable", "public", "static", "Object", "findValueOfType", "(", "final", "Collection", "<", "?", ">", "collection", ",", "final", "Class", "<", "?", ">", "[", "]", "types", ")", "{", "if", ...
Find a single value of one of the given types in the given Collection: searching the Collection for a value of the first type, then searching for a value of the second type, etc. @param collection the collection to search @param types the types to look for, in prioritized order @return a value of one of the given type...
[ "Find", "a", "single", "value", "of", "one", "of", "the", "given", "types", "in", "the", "given", "Collection", ":", "searching", "the", "Collection", "for", "a", "value", "of", "the", "first", "type", "then", "searching", "for", "a", "value", "of", "the...
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwtp-spring-integration/src/main/super/de/knightsoftnet/gwtp/spring/supersource/org/springframework/util/CollectionUtils.java#L272-L285
nakamura5akihito/six-util
src/main/java/jp/go/aist/six/util/core/xml/spring327/AbstractMarshaller.java
AbstractMarshaller.marshalDomResult
protected void marshalDomResult(Object graph, DOMResult domResult) throws XmlMappingException { """ Template method for handling {@code DOMResult}s. <p>This implementation delegates to {@code marshalDomNode}. @param graph the root of the object graph to marshal @param domResult the {@code DOMResult} @throws...
java
protected void marshalDomResult(Object graph, DOMResult domResult) throws XmlMappingException { if (domResult.getNode() == null) { try { synchronized (this.documentBuilderFactoryMonitor) { if (this.documentBuilderFactory == null) { this.documentBuilderFactory = createDocumentBuilderFactory(); }...
[ "protected", "void", "marshalDomResult", "(", "Object", "graph", ",", "DOMResult", "domResult", ")", "throws", "XmlMappingException", "{", "if", "(", "domResult", ".", "getNode", "(", ")", "==", "null", ")", "{", "try", "{", "synchronized", "(", "this", ".",...
Template method for handling {@code DOMResult}s. <p>This implementation delegates to {@code marshalDomNode}. @param graph the root of the object graph to marshal @param domResult the {@code DOMResult} @throws XmlMappingException if the given object cannot be marshalled to the result @throws IllegalArgumentException ...
[ "Template", "method", "for", "handling", "{" ]
train
https://github.com/nakamura5akihito/six-util/blob/a6db388a345e220cea2b1fa6324d15c80c6278b6/src/main/java/jp/go/aist/six/util/core/xml/spring327/AbstractMarshaller.java#L193-L210
OpenLiberty/open-liberty
dev/com.ibm.ws.session.cache/src/com/ibm/ws/session/store/cache/TypeConversion.java
TypeConversion.writeLongAsVarIntBytes
public static int writeLongAsVarIntBytes(long v, byte[] bytes, int offest) { """ Writes a long to the byte array in the Varint format. @param v - long value to write to the bytes buffer in the Varint format @param bytes - byte buffer to write to - must contain enough space for maximum length which is 10 bytes. ...
java
public static int writeLongAsVarIntBytes(long v, byte[] bytes, int offest) { int pos = offest; while (true) { if ((v & ~0x7FL) == 0) { bytes[pos++] = ((byte)v); return pos; } else { bytes[pos++] = (byte)((v & 0x7F) | 0x80); ...
[ "public", "static", "int", "writeLongAsVarIntBytes", "(", "long", "v", ",", "byte", "[", "]", "bytes", ",", "int", "offest", ")", "{", "int", "pos", "=", "offest", ";", "while", "(", "true", ")", "{", "if", "(", "(", "v", "&", "~", "0x7F", "L", "...
Writes a long to the byte array in the Varint format. @param v - long value to write to the bytes buffer in the Varint format @param bytes - byte buffer to write to - must contain enough space for maximum length which is 10 bytes. @param offset - the offset within the bytes buffer to start writing @return - returns the...
[ "Writes", "a", "long", "to", "the", "byte", "array", "in", "the", "Varint", "format", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.session.cache/src/com/ibm/ws/session/store/cache/TypeConversion.java#L221-L233
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/Image.java
Image.drawEmbedded
public void drawEmbedded(float x,float y,float width,float height) { """ Draw this image as part of a collection of images @param x The x location to draw the image at @param y The y location to draw the image at @param width The width to render the image at @param height The height to render the image at ...
java
public void drawEmbedded(float x,float y,float width,float height) { init(); if (corners == null) { GL.glTexCoord2f(textureOffsetX, textureOffsetY); GL.glVertex3f(x, y, 0); GL.glTexCoord2f(textureOffsetX, textureOffsetY + textureHeight); GL.glVertex3f(x, y + height, 0); GL.glTexCoord2f(...
[ "public", "void", "drawEmbedded", "(", "float", "x", ",", "float", "y", ",", "float", "width", ",", "float", "height", ")", "{", "init", "(", ")", ";", "if", "(", "corners", "==", "null", ")", "{", "GL", ".", "glTexCoord2f", "(", "textureOffsetX", ",...
Draw this image as part of a collection of images @param x The x location to draw the image at @param y The y location to draw the image at @param width The width to render the image at @param height The height to render the image at
[ "Draw", "this", "image", "as", "part", "of", "a", "collection", "of", "images" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/Image.java#L572-L600
sksamuel/scrimage
scrimage-filters/src/main/java/thirdparty/jhlabs/image/ArrayColormap.java
ArrayColormap.setColorRange
public void setColorRange(int firstIndex, int lastIndex, int color1, int color2) { """ Set a range of the colormap, interpolating between two colors. @param firstIndex the position of the first color @param lastIndex the position of the second color @param color1 the first color @param color2 the second color ...
java
public void setColorRange(int firstIndex, int lastIndex, int color1, int color2) { for (int i = firstIndex; i <= lastIndex; i++) map[i] = ImageMath.mixColors((float)(i-firstIndex)/(lastIndex-firstIndex), color1, color2); }
[ "public", "void", "setColorRange", "(", "int", "firstIndex", ",", "int", "lastIndex", ",", "int", "color1", ",", "int", "color2", ")", "{", "for", "(", "int", "i", "=", "firstIndex", ";", "i", "<=", "lastIndex", ";", "i", "++", ")", "map", "[", "i", ...
Set a range of the colormap, interpolating between two colors. @param firstIndex the position of the first color @param lastIndex the position of the second color @param color1 the first color @param color2 the second color
[ "Set", "a", "range", "of", "the", "colormap", "interpolating", "between", "two", "colors", "." ]
train
https://github.com/sksamuel/scrimage/blob/52dab448136e6657a71951b0e6b7d5e64dc979ac/scrimage-filters/src/main/java/thirdparty/jhlabs/image/ArrayColormap.java#L123-L126
feroult/yawp
yawp-core/src/main/java/io/yawp/commons/utils/ResourceFinder.java
ResourceFinder.mapAllStrings
public Map<String, String> mapAllStrings(String uri) throws IOException { """ Reads the contents of all non-directory URLs immediately under the specified location and returns them in a map keyed by the file name. <p/> Any URLs that cannot be read will cause an exception to be thrown. <p/> Example classpath: ...
java
public Map<String, String> mapAllStrings(String uri) throws IOException { Map<String, String> strings = new HashMap<>(); Map<String, URL> resourcesMap = getResourcesMap(uri); for (Iterator iterator = resourcesMap.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.En...
[ "public", "Map", "<", "String", ",", "String", ">", "mapAllStrings", "(", "String", "uri", ")", "throws", "IOException", "{", "Map", "<", "String", ",", "String", ">", "strings", "=", "new", "HashMap", "<>", "(", ")", ";", "Map", "<", "String", ",", ...
Reads the contents of all non-directory URLs immediately under the specified location and returns them in a map keyed by the file name. <p/> Any URLs that cannot be read will cause an exception to be thrown. <p/> Example classpath: <p/> META-INF/serializables/one META-INF/serializables/two META-INF/serializables/three ...
[ "Reads", "the", "contents", "of", "all", "non", "-", "directory", "URLs", "immediately", "under", "the", "specified", "location", "and", "returns", "them", "in", "a", "map", "keyed", "by", "the", "file", "name", ".", "<p", "/", ">", "Any", "URLs", "that"...
train
https://github.com/feroult/yawp/blob/b90deb905edd3fdb3009a5525e310cd17ead7f3d/yawp-core/src/main/java/io/yawp/commons/utils/ResourceFinder.java#L235-L246
jbundle/jbundle
base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBasePanel.java
HBasePanel.printScreen
public void printScreen(PrintWriter out, ResourceBundle reg) throws DBException { """ Print this screen's content area. @param out The out stream. @exception DBException File exception. """ String strParamHelp = this.getProperty(DBParams.HELP); // Display record if (strParamHelp ...
java
public void printScreen(PrintWriter out, ResourceBundle reg) throws DBException { String strParamHelp = this.getProperty(DBParams.HELP); // Display record if (strParamHelp != null) return; // Don't do this for help screens this.printHtmlStartForm(out); in...
[ "public", "void", "printScreen", "(", "PrintWriter", "out", ",", "ResourceBundle", "reg", ")", "throws", "DBException", "{", "String", "strParamHelp", "=", "this", ".", "getProperty", "(", "DBParams", ".", "HELP", ")", ";", "// Display record", "if", "(", "str...
Print this screen's content area. @param out The out stream. @exception DBException File exception.
[ "Print", "this", "screen", "s", "content", "area", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBasePanel.java#L137-L155
GerdHolz/TOVAL
src/de/invation/code/toval/types/DynamicMatrix.java
DynamicMatrix.getValue
public T getValue(E row, E col) { """ Returns the matrix entry specified by the given row and col keys (Matrix[row,col]). @param row Row-value of indexing type @param col Col-value of indexing type @return Value at matrix position [row,col] """ if(!rowKeys.containsKey(row)) return null; if(!colKey...
java
public T getValue(E row, E col) { if(!rowKeys.containsKey(row)) return null; if(!colKeys.containsKey(col)) return null; try{ get(rowKeys.get(row)).get(colKeys.get(col)); } catch(IndexOutOfBoundsException e){ return null; } return get(rowKeys.get(row)).get(colKeys.get(col)); }
[ "public", "T", "getValue", "(", "E", "row", ",", "E", "col", ")", "{", "if", "(", "!", "rowKeys", ".", "containsKey", "(", "row", ")", ")", "return", "null", ";", "if", "(", "!", "colKeys", ".", "containsKey", "(", "col", ")", ")", "return", "nul...
Returns the matrix entry specified by the given row and col keys (Matrix[row,col]). @param row Row-value of indexing type @param col Col-value of indexing type @return Value at matrix position [row,col]
[ "Returns", "the", "matrix", "entry", "specified", "by", "the", "given", "row", "and", "col", "keys", "(", "Matrix", "[", "row", "col", "]", ")", "." ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/types/DynamicMatrix.java#L63-L74
Jasig/uPortal
uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/SimpleLdapSecurityContext.java
SimpleLdapSecurityContext.getAttributeValue
private String getAttributeValue(Attributes attrs, int attribute) throws NamingException { """ Return a single value of an attribute from possibly multiple values, grossly ignoring anything else. If there are no values, then return an empty string. @param attrs LDAP query results @param attribute LDAP attribu...
java
private String getAttributeValue(Attributes attrs, int attribute) throws NamingException { NamingEnumeration values = null; String aValue = ""; if (!isAttribute(attribute)) return aValue; Attribute attrib = attrs.get(attributes[attribute]); if (attrib != null) { for (...
[ "private", "String", "getAttributeValue", "(", "Attributes", "attrs", ",", "int", "attribute", ")", "throws", "NamingException", "{", "NamingEnumeration", "values", "=", "null", ";", "String", "aValue", "=", "\"\"", ";", "if", "(", "!", "isAttribute", "(", "at...
Return a single value of an attribute from possibly multiple values, grossly ignoring anything else. If there are no values, then return an empty string. @param attrs LDAP query results @param attribute LDAP attribute we are interested in @return a single value of the attribute
[ "Return", "a", "single", "value", "of", "an", "attribute", "from", "possibly", "multiple", "values", "grossly", "ignoring", "anything", "else", ".", "If", "there", "are", "no", "values", "then", "return", "an", "empty", "string", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-security/uPortal-security-authn/src/main/java/org/apereo/portal/security/provider/SimpleLdapSecurityContext.java#L203-L215
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/br/br_replicateconfig.java
br_replicateconfig.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ br_replicateconfig_responses result = (br_replicateconfig_responses) se...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { br_replicateconfig_responses result = (br_replicateconfig_responses) service.get_payload_formatter().string_to_resource(br_replicateconfig_responses.class, response); if(result.errorcode != 0) { i...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "br_replicateconfig_responses", "result", "=", "(", "br_replicateconfig_responses", ")", "service", ".", "get_...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/br/br_replicateconfig.java#L157-L174
groovy/groovy-core
src/main/org/codehaus/groovy/vmplugin/v5/PluginDefaultGroovyMethods.java
PluginDefaultGroovyMethods.leftShift
public static StringBuilder leftShift(StringBuilder self, Object value) { """ Overloads the left shift operator to provide an easy way to append multiple objects as string representations to a StringBuilder. @param self a StringBuilder @param value a value to append @return the StringBuilder on which this o...
java
public static StringBuilder leftShift(StringBuilder self, Object value) { if (value instanceof CharSequence) return self.append((CharSequence)value); else return self.append(value); }
[ "public", "static", "StringBuilder", "leftShift", "(", "StringBuilder", "self", ",", "Object", "value", ")", "{", "if", "(", "value", "instanceof", "CharSequence", ")", "return", "self", ".", "append", "(", "(", "CharSequence", ")", "value", ")", ";", "else"...
Overloads the left shift operator to provide an easy way to append multiple objects as string representations to a StringBuilder. @param self a StringBuilder @param value a value to append @return the StringBuilder on which this operation was invoked
[ "Overloads", "the", "left", "shift", "operator", "to", "provide", "an", "easy", "way", "to", "append", "multiple", "objects", "as", "string", "representations", "to", "a", "StringBuilder", "." ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/vmplugin/v5/PluginDefaultGroovyMethods.java#L98-L103
wisdom-framework/wisdom-jcr
wisdom-jcr-core/src/main/java/org/wisdom/jcrom/runtime/JcrTools.java
JcrTools.registerAndAddMixinType
public static void registerAndAddMixinType(Session session, Node node, String mixin) throws RepositoryException { """ Register new mixin type if does not exists on workspace the add it to the given node @param session the JCR session @param node the node where to add the mixin @param mixin the mixin name to a...
java
public static void registerAndAddMixinType(Session session, Node node, String mixin) throws RepositoryException { registerMixinType(session, mixin); if (!Arrays.asList(node.getMixinNodeTypes()).contains(mixin)) { node.addMixin(mixin); } }
[ "public", "static", "void", "registerAndAddMixinType", "(", "Session", "session", ",", "Node", "node", ",", "String", "mixin", ")", "throws", "RepositoryException", "{", "registerMixinType", "(", "session", ",", "mixin", ")", ";", "if", "(", "!", "Arrays", "."...
Register new mixin type if does not exists on workspace the add it to the given node @param session the JCR session @param node the node where to add the mixin @param mixin the mixin name to add @throws RepositoryException
[ "Register", "new", "mixin", "type", "if", "does", "not", "exists", "on", "workspace", "the", "add", "it", "to", "the", "given", "node" ]
train
https://github.com/wisdom-framework/wisdom-jcr/blob/2711383dde2239a19b90c226b3fd2aecab5715e4/wisdom-jcr-core/src/main/java/org/wisdom/jcrom/runtime/JcrTools.java#L1008-L1013
apache/flink
flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java
DateTimeUtils.addMonths
public static int addMonths(int date, int m) { """ Adds a given number of months to a date, represented as the number of days since the epoch. """ int y0 = (int) DateTimeUtils.unixDateExtract(TimeUnitRange.YEAR, date); int m0 = (int) DateTimeUtils.unixDateExtract(TimeUnitRange.MONTH, date); int d0 = (in...
java
public static int addMonths(int date, int m) { int y0 = (int) DateTimeUtils.unixDateExtract(TimeUnitRange.YEAR, date); int m0 = (int) DateTimeUtils.unixDateExtract(TimeUnitRange.MONTH, date); int d0 = (int) DateTimeUtils.unixDateExtract(TimeUnitRange.DAY, date); int y = m / 12; y0 += y; m0 += m - y * 12; ...
[ "public", "static", "int", "addMonths", "(", "int", "date", ",", "int", "m", ")", "{", "int", "y0", "=", "(", "int", ")", "DateTimeUtils", ".", "unixDateExtract", "(", "TimeUnitRange", ".", "YEAR", ",", "date", ")", ";", "int", "m0", "=", "(", "int",...
Adds a given number of months to a date, represented as the number of days since the epoch.
[ "Adds", "a", "given", "number", "of", "months", "to", "a", "date", "represented", "as", "the", "number", "of", "days", "since", "the", "epoch", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java#L1070-L1086
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/BoundsOnRatiosInSampledSets.java
BoundsOnRatiosInSampledSets.getUpperBoundForBoverA
public static double getUpperBoundForBoverA(final long a, final long b, final double f) { """ Return the approximate upper bound based on a 95% confidence interval @param a See class javadoc @param b See class javadoc @param f the inclusion probability used to produce the set with size <i>a</i>. @return the ap...
java
public static double getUpperBoundForBoverA(final long a, final long b, final double f) { checkInputs(a, b, f); if (a == 0) { return 1.0; } if (f == 1.0) { return (double) b / a; } return approximateUpperBoundOnP(a, b, NUM_STD_DEVS * hackyAdjuster(f)); }
[ "public", "static", "double", "getUpperBoundForBoverA", "(", "final", "long", "a", ",", "final", "long", "b", ",", "final", "double", "f", ")", "{", "checkInputs", "(", "a", ",", "b", ",", "f", ")", ";", "if", "(", "a", "==", "0", ")", "{", "return...
Return the approximate upper bound based on a 95% confidence interval @param a See class javadoc @param b See class javadoc @param f the inclusion probability used to produce the set with size <i>a</i>. @return the approximate lower bound
[ "Return", "the", "approximate", "upper", "bound", "based", "on", "a", "95%", "confidence", "interval" ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/BoundsOnRatiosInSampledSets.java#L52-L57
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingprivateDatabase/src/main/java/net/minidev/ovh/api/ApiOvhHostingprivateDatabase.java
ApiOvhHostingprivateDatabase.serviceName_database_databaseName_dump_id_GET
public OvhDatabaseDump serviceName_database_databaseName_dump_id_GET(String serviceName, String databaseName, Long id) throws IOException { """ Get this object properties REST: GET /hosting/privateDatabase/{serviceName}/database/{databaseName}/dump/{id} @param serviceName [required] The internal name of your p...
java
public OvhDatabaseDump serviceName_database_databaseName_dump_id_GET(String serviceName, String databaseName, Long id) throws IOException { String qPath = "/hosting/privateDatabase/{serviceName}/database/{databaseName}/dump/{id}"; StringBuilder sb = path(qPath, serviceName, databaseName, id); String resp = exec(q...
[ "public", "OvhDatabaseDump", "serviceName_database_databaseName_dump_id_GET", "(", "String", "serviceName", ",", "String", "databaseName", ",", "Long", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/privateDatabase/{serviceName}/database/{databaseN...
Get this object properties REST: GET /hosting/privateDatabase/{serviceName}/database/{databaseName}/dump/{id} @param serviceName [required] The internal name of your private database @param databaseName [required] Database name @param id [required] Dump id
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingprivateDatabase/src/main/java/net/minidev/ovh/api/ApiOvhHostingprivateDatabase.java#L514-L519
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/FetchActiveFlowDao.java
FetchActiveFlowDao.fetchUnfinishedFlows
Map<Integer, Pair<ExecutionReference, ExecutableFlow>> fetchUnfinishedFlows() throws ExecutorManagerException { """ Fetch flows that are not in finished status, including both dispatched and non-dispatched flows. @return unfinished flows map @throws ExecutorManagerException the executor manager exceptio...
java
Map<Integer, Pair<ExecutionReference, ExecutableFlow>> fetchUnfinishedFlows() throws ExecutorManagerException { try { return this.dbOperator.query(FetchActiveExecutableFlows.FETCH_UNFINISHED_EXECUTABLE_FLOWS, new FetchActiveExecutableFlows()); } catch (final SQLException e) { throw n...
[ "Map", "<", "Integer", ",", "Pair", "<", "ExecutionReference", ",", "ExecutableFlow", ">", ">", "fetchUnfinishedFlows", "(", ")", "throws", "ExecutorManagerException", "{", "try", "{", "return", "this", ".", "dbOperator", ".", "query", "(", "FetchActiveExecutableF...
Fetch flows that are not in finished status, including both dispatched and non-dispatched flows. @return unfinished flows map @throws ExecutorManagerException the executor manager exception
[ "Fetch", "flows", "that", "are", "not", "in", "finished", "status", "including", "both", "dispatched", "and", "non", "-", "dispatched", "flows", "." ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/executor/FetchActiveFlowDao.java#L113-L121
huangp/entityunit
src/main/java/com/github/huangp/entityunit/maker/IntervalValuesMaker.java
IntervalValuesMaker.startFrom
public static <T> Maker<T> startFrom(T start, long difference) { """ Example: <pre> {@code public void canGetIntervalInteger() { Maker<Integer> maker = IntervalValuesMaker.startFrom(1, 2); assertThat(maker.value(), Matchers.equalTo(1)); assertThat(maker.value(), Matchers.equalTo(3)); assertThat(maker.valu...
java
public static <T> Maker<T> startFrom(T start, long difference) { if (Integer.class.isInstance(start)) { return new IntervalIntegerValuesMaker<T>(start, difference); } if (Long.class.isInstance(start)) { return new IntervalLongValuesMaker<T>(start, difference); } ...
[ "public", "static", "<", "T", ">", "Maker", "<", "T", ">", "startFrom", "(", "T", "start", ",", "long", "difference", ")", "{", "if", "(", "Integer", ".", "class", ".", "isInstance", "(", "start", ")", ")", "{", "return", "new", "IntervalIntegerValuesM...
Example: <pre> {@code public void canGetIntervalInteger() { Maker<Integer> maker = IntervalValuesMaker.startFrom(1, 2); assertThat(maker.value(), Matchers.equalTo(1)); assertThat(maker.value(), Matchers.equalTo(3)); assertThat(maker.value(), Matchers.equalTo(5)); } public void canGetIntervalLong() { Maker<Long> maker...
[ "Example", ":", "<pre", ">", "{", "@code" ]
train
https://github.com/huangp/entityunit/blob/1a09b530149d707dbff7ff46f5428d9db709a4b4/src/main/java/com/github/huangp/entityunit/maker/IntervalValuesMaker.java#L62-L76
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/filter/misc/AverageDownSampleOps.java
AverageDownSampleOps.downSampleSize
public static int downSampleSize( int length , int squareWidth ) { """ Computes the length of a down sampled image based on the original length and the square width @param length Length of side in input image @param squareWidth Width of region used to down sample images @return Length of side in down sampled im...
java
public static int downSampleSize( int length , int squareWidth ) { int ret = length/squareWidth; if( length%squareWidth != 0 ) ret++; return ret; }
[ "public", "static", "int", "downSampleSize", "(", "int", "length", ",", "int", "squareWidth", ")", "{", "int", "ret", "=", "length", "/", "squareWidth", ";", "if", "(", "length", "%", "squareWidth", "!=", "0", ")", "ret", "++", ";", "return", "ret", ";...
Computes the length of a down sampled image based on the original length and the square width @param length Length of side in input image @param squareWidth Width of region used to down sample images @return Length of side in down sampled image
[ "Computes", "the", "length", "of", "a", "down", "sampled", "image", "based", "on", "the", "original", "length", "and", "the", "square", "width" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/misc/AverageDownSampleOps.java#L48-L54
jeremylong/DependencyCheck
ant/src/main/java/org/owasp/dependencycheck/taskdefs/Purge.java
Purge.populateSettings
protected void populateSettings() throws BuildException { """ Takes the properties supplied and updates the dependency-check settings. Additionally, this sets the system properties required to change the proxy server, port, and connection timeout. @throws BuildException thrown if the properties file cannot be...
java
protected void populateSettings() throws BuildException { settings = new Settings(); try (InputStream taskProperties = this.getClass().getClassLoader().getResourceAsStream(PROPERTIES_FILE)) { settings.mergeProperties(taskProperties); } catch (IOException ex) { final Strin...
[ "protected", "void", "populateSettings", "(", ")", "throws", "BuildException", "{", "settings", "=", "new", "Settings", "(", ")", ";", "try", "(", "InputStream", "taskProperties", "=", "this", ".", "getClass", "(", ")", ".", "getClassLoader", "(", ")", ".", ...
Takes the properties supplied and updates the dependency-check settings. Additionally, this sets the system properties required to change the proxy server, port, and connection timeout. @throws BuildException thrown if the properties file cannot be read.
[ "Takes", "the", "properties", "supplied", "and", "updates", "the", "dependency", "-", "check", "settings", ".", "Additionally", "this", "sets", "the", "system", "properties", "required", "to", "change", "the", "proxy", "server", "port", "and", "connection", "tim...
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/ant/src/main/java/org/owasp/dependencycheck/taskdefs/Purge.java#L153-L173
cdk/cdk
legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java
GeometryTools.getClosestAtom
public static IAtom getClosestAtom(IAtomContainer atomCon, IAtom atom) { """ Returns the atom of the given molecule that is closest to the given atom (excluding itself). @param atomCon The molecule that is searched for the closest atom @param atom The atom to search around @return The atom that is ...
java
public static IAtom getClosestAtom(IAtomContainer atomCon, IAtom atom) { IAtom closestAtom = null; double min = Double.MAX_VALUE; Point2d atomPosition = atom.getPoint2d(); for (int i = 0; i < atomCon.getAtomCount(); i++) { IAtom currentAtom = atomCon.getAtom(i); i...
[ "public", "static", "IAtom", "getClosestAtom", "(", "IAtomContainer", "atomCon", ",", "IAtom", "atom", ")", "{", "IAtom", "closestAtom", "=", "null", ";", "double", "min", "=", "Double", ".", "MAX_VALUE", ";", "Point2d", "atomPosition", "=", "atom", ".", "ge...
Returns the atom of the given molecule that is closest to the given atom (excluding itself). @param atomCon The molecule that is searched for the closest atom @param atom The atom to search around @return The atom that is closest to the given coordinates
[ "Returns", "the", "atom", "of", "the", "given", "molecule", "that", "is", "closest", "to", "the", "given", "atom", "(", "excluding", "itself", ")", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java#L707-L722
Azure/azure-sdk-for-java
locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLocksInner.java
ManagementLocksInner.getByScope
public ManagementLockObjectInner getByScope(String scope, String lockName) { """ Get a management lock by scope. @param scope The scope for the lock. @param lockName The name of lock. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rej...
java
public ManagementLockObjectInner getByScope(String scope, String lockName) { return getByScopeWithServiceResponseAsync(scope, lockName).toBlocking().single().body(); }
[ "public", "ManagementLockObjectInner", "getByScope", "(", "String", "scope", ",", "String", "lockName", ")", "{", "return", "getByScopeWithServiceResponseAsync", "(", "scope", ",", "lockName", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")", ".", "body...
Get a management lock by scope. @param scope The scope for the lock. @param lockName The name of lock. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException all other wrapped checked exceptions if the reques...
[ "Get", "a", "management", "lock", "by", "scope", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLocksInner.java#L600-L602
Javacord/Javacord
javacord-api/src/main/java/org/javacord/api/entity/message/MessageBuilder.java
MessageBuilder.addFileAsSpoiler
public MessageBuilder addFileAsSpoiler(BufferedImage image, String fileName) { """ Adds a file to the message and marks it as spoiler. @param image The image to add as an attachment. @param fileName The file name of the image. @return The current instance in order to chain call methods. @see #addAttachmentAs...
java
public MessageBuilder addFileAsSpoiler(BufferedImage image, String fileName) { delegate.addFile(image, "SPOILER_" + fileName); return this; }
[ "public", "MessageBuilder", "addFileAsSpoiler", "(", "BufferedImage", "image", ",", "String", "fileName", ")", "{", "delegate", ".", "addFile", "(", "image", ",", "\"SPOILER_\"", "+", "fileName", ")", ";", "return", "this", ";", "}" ]
Adds a file to the message and marks it as spoiler. @param image The image to add as an attachment. @param fileName The file name of the image. @return The current instance in order to chain call methods. @see #addAttachmentAsSpoiler(BufferedImage, String)
[ "Adds", "a", "file", "to", "the", "message", "and", "marks", "it", "as", "spoiler", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-api/src/main/java/org/javacord/api/entity/message/MessageBuilder.java#L221-L224
GerdHolz/TOVAL
src/de/invation/code/toval/graphic/ui/VerticalLabelUI.java
VerticalLabelUI.getBaseline
@Override public int getBaseline(JComponent c, int width, int height) { """ Overridden to always return -1, since a vertical label does not have a meaningful baseline. @see ComponentUI#getBaseline(JComponent, int, int) """ super.getBaseline(c, width, height); return -1; }
java
@Override public int getBaseline(JComponent c, int width, int height) { super.getBaseline(c, width, height); return -1; }
[ "@", "Override", "public", "int", "getBaseline", "(", "JComponent", "c", ",", "int", "width", ",", "int", "height", ")", "{", "super", ".", "getBaseline", "(", "c", ",", "width", ",", "height", ")", ";", "return", "-", "1", ";", "}" ]
Overridden to always return -1, since a vertical label does not have a meaningful baseline. @see ComponentUI#getBaseline(JComponent, int, int)
[ "Overridden", "to", "always", "return", "-", "1", "since", "a", "vertical", "label", "does", "not", "have", "a", "meaningful", "baseline", "." ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/graphic/ui/VerticalLabelUI.java#L66-L70
liferay/com-liferay-commerce
commerce-product-type-virtual-service/src/main/java/com/liferay/commerce/product/type/virtual/service/persistence/impl/CPDefinitionVirtualSettingPersistenceImpl.java
CPDefinitionVirtualSettingPersistenceImpl.removeByUuid_C
@Override public void removeByUuid_C(String uuid, long companyId) { """ Removes all the cp definition virtual settings where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID """ for (CPDefinitionVirtualSetting cpDefinitionVirtualSetting : findByU...
java
@Override public void removeByUuid_C(String uuid, long companyId) { for (CPDefinitionVirtualSetting cpDefinitionVirtualSetting : findByUuid_C( uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpDefinitionVirtualSetting); } }
[ "@", "Override", "public", "void", "removeByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "for", "(", "CPDefinitionVirtualSetting", "cpDefinitionVirtualSetting", ":", "findByUuid_C", "(", "uuid", ",", "companyId", ",", "QueryUtil", ".", "ALL_...
Removes all the cp definition virtual settings where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID
[ "Removes", "all", "the", "cp", "definition", "virtual", "settings", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-type-virtual-service/src/main/java/com/liferay/commerce/product/type/virtual/service/persistence/impl/CPDefinitionVirtualSettingPersistenceImpl.java#L1424-L1430
duracloud/duracloud
storageprovider/src/main/java/org/duracloud/storage/domain/ContentByteRange.java
ContentByteRange.parseRange
protected void parseRange(String range) { """ Parses the Range HTTP header value. Only a single range is supported (others are dropped). @param range Range header included in HTTP request @throws IllegalArgumentException if range value is not valid """ String prefix = "bytes="; if (!range...
java
protected void parseRange(String range) { String prefix = "bytes="; if (!range.startsWith(prefix) || StringUtils.containsNone(range, "-")) { throw new IllegalArgumentException(getUsage(range)); } else { // Strip the prefix and drop all but the first range (if there i...
[ "protected", "void", "parseRange", "(", "String", "range", ")", "{", "String", "prefix", "=", "\"bytes=\"", ";", "if", "(", "!", "range", ".", "startsWith", "(", "prefix", ")", "||", "StringUtils", ".", "containsNone", "(", "range", ",", "\"-\"", ")", ")...
Parses the Range HTTP header value. Only a single range is supported (others are dropped). @param range Range header included in HTTP request @throws IllegalArgumentException if range value is not valid
[ "Parses", "the", "Range", "HTTP", "header", "value", ".", "Only", "a", "single", "range", "is", "supported", "(", "others", "are", "dropped", ")", "." ]
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/storageprovider/src/main/java/org/duracloud/storage/domain/ContentByteRange.java#L55-L76
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java
DocumentSubscriptions.createForRevisions
public <T> String createForRevisions(Class<T> clazz, SubscriptionCreationOptions options, String database) { """ Creates a data subscription in a database. The subscription will expose all documents that match the specified subscription options for a given type. @param options Subscription options @param clazz D...
java
public <T> String createForRevisions(Class<T> clazz, SubscriptionCreationOptions options, String database) { options = ObjectUtils.firstNonNull(options, new SubscriptionCreationOptions()); return create(ensureCriteria(options, clazz, true), database); }
[ "public", "<", "T", ">", "String", "createForRevisions", "(", "Class", "<", "T", ">", "clazz", ",", "SubscriptionCreationOptions", "options", ",", "String", "database", ")", "{", "options", "=", "ObjectUtils", ".", "firstNonNull", "(", "options", ",", "new", ...
Creates a data subscription in a database. The subscription will expose all documents that match the specified subscription options for a given type. @param options Subscription options @param clazz Document class @param <T> Document class @param database Target database @return created subscription
[ "Creates", "a", "data", "subscription", "in", "a", "database", ".", "The", "subscription", "will", "expose", "all", "documents", "that", "match", "the", "specified", "subscription", "options", "for", "a", "given", "type", "." ]
train
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java#L120-L123
mnlipp/jgrapes
org.jgrapes.io/src/org/jgrapes/io/PurgeTerminator.java
PurgeTerminator.onPurge
@Handler public void onPurge(Purge event, IOSubchannel channel) { """ Handles a {@link Purge} event by sending a {@link Close} event. @param event the event @param channel the channel """ // Needn't close this more than once event.stop(); channel.respond(new Close()); }
java
@Handler public void onPurge(Purge event, IOSubchannel channel) { // Needn't close this more than once event.stop(); channel.respond(new Close()); }
[ "@", "Handler", "public", "void", "onPurge", "(", "Purge", "event", ",", "IOSubchannel", "channel", ")", "{", "// Needn't close this more than once", "event", ".", "stop", "(", ")", ";", "channel", ".", "respond", "(", "new", "Close", "(", ")", ")", ";", "...
Handles a {@link Purge} event by sending a {@link Close} event. @param event the event @param channel the channel
[ "Handles", "a", "{", "@link", "Purge", "}", "event", "by", "sending", "a", "{", "@link", "Close", "}", "event", "." ]
train
https://github.com/mnlipp/jgrapes/blob/8b5d874935d84c34a52d3e3d3745e869b5203fa0/org.jgrapes.io/src/org/jgrapes/io/PurgeTerminator.java#L46-L51
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/StyleSet.java
StyleSet.setFont
public StyleSet setFont(Font font, boolean ignoreHead) { """ 设置全局字体 @param font 字体,可以通过{@link StyleUtil#createFont(Workbook, short, short, String)}创建 @param ignoreHead 是否跳过头部样式 @return this @since 4.1.0 """ if(false == ignoreHead) { this.headCellStyle.setFont(font); } this.cellStyle.setFont(...
java
public StyleSet setFont(Font font, boolean ignoreHead) { if(false == ignoreHead) { this.headCellStyle.setFont(font); } this.cellStyle.setFont(font); this.cellStyleForNumber.setFont(font); this.cellStyleForDate.setFont(font); return this; }
[ "public", "StyleSet", "setFont", "(", "Font", "font", ",", "boolean", "ignoreHead", ")", "{", "if", "(", "false", "==", "ignoreHead", ")", "{", "this", ".", "headCellStyle", ".", "setFont", "(", "font", ")", ";", "}", "this", ".", "cellStyle", ".", "se...
设置全局字体 @param font 字体,可以通过{@link StyleUtil#createFont(Workbook, short, short, String)}创建 @param ignoreHead 是否跳过头部样式 @return this @since 4.1.0
[ "设置全局字体" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/StyleSet.java#L162-L170
VoltDB/voltdb
src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java
SnapshotUtil.retrieveSnapshotFiles
public static void retrieveSnapshotFiles( File directory, Map<String, Snapshot> namedSnapshotMap, FileFilter filter, boolean validate, SnapshotPathType stype, VoltLogger logger) { """ Spider the provided directory applying the provided FileFil...
java
public static void retrieveSnapshotFiles( File directory, Map<String, Snapshot> namedSnapshotMap, FileFilter filter, boolean validate, SnapshotPathType stype, VoltLogger logger) { NamedSnapshots namedSnapshots = new NamedSnapshots(namedSna...
[ "public", "static", "void", "retrieveSnapshotFiles", "(", "File", "directory", ",", "Map", "<", "String", ",", "Snapshot", ">", "namedSnapshotMap", ",", "FileFilter", "filter", ",", "boolean", "validate", ",", "SnapshotPathType", "stype", ",", "VoltLogger", "logge...
Spider the provided directory applying the provided FileFilter. Optionally validate snapshot files. Return a summary of partition counts, partition information, files, digests etc. that can be used to determine if a valid restore plan exists. @param directory @param snapshots @param filter @param validate
[ "Spider", "the", "provided", "directory", "applying", "the", "provided", "FileFilter", ".", "Optionally", "validate", "snapshot", "files", ".", "Return", "a", "summary", "of", "partition", "counts", "partition", "information", "files", "digests", "etc", ".", "that...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/SnapshotUtil.java#L799-L809
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/Client.java
Client.deleteApplication
public boolean deleteApplication(String appName, String key) { """ Delete an existing application from the current Doradus tenant, including all of its tables and data. Because updates are idempotent, deleting an already-deleted application is acceptable. Hence, if no error is thrown, the result is always true. ...
java
public boolean deleteApplication(String appName, String key) { Utils.require(!m_restClient.isClosed(), "Client has been closed"); Utils.require(appName != null && appName.length() > 0, "appName"); try { // Send a DELETE request to "/_applications/{application}/{key}". ...
[ "public", "boolean", "deleteApplication", "(", "String", "appName", ",", "String", "key", ")", "{", "Utils", ".", "require", "(", "!", "m_restClient", ".", "isClosed", "(", ")", ",", "\"Client has been closed\"", ")", ";", "Utils", ".", "require", "(", "appN...
Delete an existing application from the current Doradus tenant, including all of its tables and data. Because updates are idempotent, deleting an already-deleted application is acceptable. Hence, if no error is thrown, the result is always true. An exception is thrown if an error occurs. @param appName Name of exist...
[ "Delete", "an", "existing", "application", "from", "the", "current", "Doradus", "tenant", "including", "all", "of", "its", "tables", "and", "data", ".", "Because", "updates", "are", "idempotent", "deleting", "an", "already", "-", "deleted", "application", "is", ...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/Client.java#L403-L426
Red5/red5-server-common
src/main/java/org/red5/server/net/rtmp/codec/RTMPProtocolDecoder.java
RTMPProtocolDecoder.decodeAction
private Invoke decodeAction(Encoding encoding, IoBuffer in, Header header) { """ Decode the 'action' for a supplied an Invoke. @param encoding AMF encoding @param in buffer @param header data header @return notify """ // for response, the action string and invokeId is always encoded as AMF0 w...
java
private Invoke decodeAction(Encoding encoding, IoBuffer in, Header header) { // for response, the action string and invokeId is always encoded as AMF0 we use the first byte to decide which encoding to use in.mark(); byte tmp = in.get(); in.reset(); Input input; if (...
[ "private", "Invoke", "decodeAction", "(", "Encoding", "encoding", ",", "IoBuffer", "in", ",", "Header", "header", ")", "{", "// for response, the action string and invokeId is always encoded as AMF0 we use the first byte to decide which encoding to use\r", "in", ".", "mark", "(",...
Decode the 'action' for a supplied an Invoke. @param encoding AMF encoding @param in buffer @param header data header @return notify
[ "Decode", "the", "action", "for", "a", "supplied", "an", "Invoke", "." ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/codec/RTMPProtocolDecoder.java#L752-L796
DiUS/pact-jvm
pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslWithProvider.java
PactDslWithProvider.given
public PactDslWithState given(String state, Map<String, Object> params) { """ Describe the state the provider needs to be in for the pact test to be verified. @param state Provider state @param params Data parameters for the state """ return new PactDslWithState(consumerPactBuilder, consumerPactBui...
java
public PactDslWithState given(String state, Map<String, Object> params) { return new PactDslWithState(consumerPactBuilder, consumerPactBuilder.getConsumerName(), providerName, new ProviderState(state, params), defaultRequestValues, defaultResponseValues); }
[ "public", "PactDslWithState", "given", "(", "String", "state", ",", "Map", "<", "String", ",", "Object", ">", "params", ")", "{", "return", "new", "PactDslWithState", "(", "consumerPactBuilder", ",", "consumerPactBuilder", ".", "getConsumerName", "(", ")", ",", ...
Describe the state the provider needs to be in for the pact test to be verified. @param state Provider state @param params Data parameters for the state
[ "Describe", "the", "state", "the", "provider", "needs", "to", "be", "in", "for", "the", "pact", "test", "to", "be", "verified", "." ]
train
https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslWithProvider.java#L37-L40
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/TypeFrameModelingVisitor.java
TypeFrameModelingVisitor.modelNormalInstruction
@Override public void modelNormalInstruction(Instruction ins, int numWordsConsumed, int numWordsProduced) { """ This is overridden only to ensure that we don't rely on the base class to handle instructions that produce stack operands. """ if (VERIFY_INTEGRITY) { if (numWordsProduced > ...
java
@Override public void modelNormalInstruction(Instruction ins, int numWordsConsumed, int numWordsProduced) { if (VERIFY_INTEGRITY) { if (numWordsProduced > 0) { throw new InvalidBytecodeException("missing visitor method for " + ins); } } super.modelNorm...
[ "@", "Override", "public", "void", "modelNormalInstruction", "(", "Instruction", "ins", ",", "int", "numWordsConsumed", ",", "int", "numWordsProduced", ")", "{", "if", "(", "VERIFY_INTEGRITY", ")", "{", "if", "(", "numWordsProduced", ">", "0", ")", "{", "throw...
This is overridden only to ensure that we don't rely on the base class to handle instructions that produce stack operands.
[ "This", "is", "overridden", "only", "to", "ensure", "that", "we", "don", "t", "rely", "on", "the", "base", "class", "to", "handle", "instructions", "that", "produce", "stack", "operands", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/TypeFrameModelingVisitor.java#L270-L278
youngmonkeys/ezyfox-sfs2x
src/main/java/com/tvd12/ezyfox/sfs2x/serverhandler/ServerReadyEventHandler.java
ServerReadyEventHandler.assignDataToHandler
protected void assignDataToHandler(ServerHandlerClass handler, Object instance) { """ Map configuration properties to handler object @param handler structure of handler class @param instance a handler instance """ if(getParentExtension().getConfigProperties() != null) { new ConfigPropertyDese...
java
protected void assignDataToHandler(ServerHandlerClass handler, Object instance) { if(getParentExtension().getConfigProperties() != null) { new ConfigPropertyDeserializer().deserialize( handler.getPropertiesClassWrapper(), instance, getParentExtension()....
[ "protected", "void", "assignDataToHandler", "(", "ServerHandlerClass", "handler", ",", "Object", "instance", ")", "{", "if", "(", "getParentExtension", "(", ")", ".", "getConfigProperties", "(", ")", "!=", "null", ")", "{", "new", "ConfigPropertyDeserializer", "("...
Map configuration properties to handler object @param handler structure of handler class @param instance a handler instance
[ "Map", "configuration", "properties", "to", "handler", "object" ]
train
https://github.com/youngmonkeys/ezyfox-sfs2x/blob/7e004033a3b551c3ae970a0c8f45db7b1ec144de/src/main/java/com/tvd12/ezyfox/sfs2x/serverhandler/ServerReadyEventHandler.java#L53-L60
labai/ted
ted-driver/src/main/java/ted/driver/sys/ConfigUtils.java
ConfigUtils.getInteger
static Integer getInteger(Properties properties, String key, Integer defaultValue) { """ returns int value of property or defaultValue if not found or invalid """ if (properties == null) return defaultValue; String value = properties.getProperty(key); if (value == null || value.isEmpty()) return de...
java
static Integer getInteger(Properties properties, String key, Integer defaultValue) { if (properties == null) return defaultValue; String value = properties.getProperty(key); if (value == null || value.isEmpty()) return defaultValue; int intVal; try { intVal = Integer.parseInt(value); } catch (Numbe...
[ "static", "Integer", "getInteger", "(", "Properties", "properties", ",", "String", "key", ",", "Integer", "defaultValue", ")", "{", "if", "(", "properties", "==", "null", ")", "return", "defaultValue", ";", "String", "value", "=", "properties", ".", "getProper...
returns int value of property or defaultValue if not found or invalid
[ "returns", "int", "value", "of", "property", "or", "defaultValue", "if", "not", "found", "or", "invalid" ]
train
https://github.com/labai/ted/blob/2ee197246a78d842c18d6780c48fd903b00608a6/ted-driver/src/main/java/ted/driver/sys/ConfigUtils.java#L185-L200
phax/ph-oton
ph-oton-html/src/main/java/com/helger/html/hc/html/metadata/HCHead.java
HCHead.addJSAt
@Nonnull public final HCHead addJSAt (@Nonnegative final int nIndex, @Nonnull final IHCNode aJS) { """ Append some JavaScript code at the specified index @param nIndex The index where the JS should be added (counting only JS elements) @param aJS The JS to be added. May not be <code>null</code>. @return th...
java
@Nonnull public final HCHead addJSAt (@Nonnegative final int nIndex, @Nonnull final IHCNode aJS) { ValueEnforcer.notNull (aJS, "JS"); if (!HCJSNodeDetector.isJSNode (aJS)) throw new IllegalArgumentException (aJS + " is not a valid JS node!"); m_aJS.add (nIndex, aJS); return this; }
[ "@", "Nonnull", "public", "final", "HCHead", "addJSAt", "(", "@", "Nonnegative", "final", "int", "nIndex", ",", "@", "Nonnull", "final", "IHCNode", "aJS", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aJS", ",", "\"JS\"", ")", ";", "if", "(", "!", "...
Append some JavaScript code at the specified index @param nIndex The index where the JS should be added (counting only JS elements) @param aJS The JS to be added. May not be <code>null</code>. @return this
[ "Append", "some", "JavaScript", "code", "at", "the", "specified", "index" ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-html/src/main/java/com/helger/html/hc/html/metadata/HCHead.java#L281-L289
Alluxio/alluxio
shell/src/main/java/alluxio/cli/LogLevel.java
LogLevel.logLevel
public static void logLevel(String[] args, AlluxioConfiguration alluxioConf) throws ParseException, IOException { """ Implements log level setting and getting. @param args list of arguments contains target, logName and level @param alluxioConf Alluxio configuration @exception ParseException if there is ...
java
public static void logLevel(String[] args, AlluxioConfiguration alluxioConf) throws ParseException, IOException { CommandLineParser parser = new DefaultParser(); CommandLine cmd = parser.parse(OPTIONS, args, true /* stopAtNonOption */); List<TargetInfo> targets = parseOptTarget(cmd, alluxioConf); ...
[ "public", "static", "void", "logLevel", "(", "String", "[", "]", "args", ",", "AlluxioConfiguration", "alluxioConf", ")", "throws", "ParseException", ",", "IOException", "{", "CommandLineParser", "parser", "=", "new", "DefaultParser", "(", ")", ";", "CommandLine",...
Implements log level setting and getting. @param args list of arguments contains target, logName and level @param alluxioConf Alluxio configuration @exception ParseException if there is an error in parsing
[ "Implements", "log", "level", "setting", "and", "getting", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/shell/src/main/java/alluxio/cli/LogLevel.java#L106-L118
wigforss/Ka-Commons-Reflection
src/main/java/org/kasource/commons/reflection/util/MethodUtils.java
MethodUtils.verifyMethodSignature
public static void verifyMethodSignature(Method method, Class<?> returnType, Class<?>... parameters) { """ Verify that the supplied method's signature matches return type and parameters types @param method Method to inspect @param returnType Return type to match @param parameters Parameter types to match ...
java
public static void verifyMethodSignature(Method method, Class<?> returnType, Class<?>... parameters) { if(method == null) { throw new IllegalArgumentException("Method is null"); } if (!method.getReturnType().equals(returnType)) { throw new IllegalArgumentException...
[ "public", "static", "void", "verifyMethodSignature", "(", "Method", "method", ",", "Class", "<", "?", ">", "returnType", ",", "Class", "<", "?", ">", "...", "parameters", ")", "{", "if", "(", "method", "==", "null", ")", "{", "throw", "new", "IllegalArgu...
Verify that the supplied method's signature matches return type and parameters types @param method Method to inspect @param returnType Return type to match @param parameters Parameter types to match @throws IllegalArgumentException if method fails to match return type or parameters types
[ "Verify", "that", "the", "supplied", "method", "s", "signature", "matches", "return", "type", "and", "parameters", "types" ]
train
https://github.com/wigforss/Ka-Commons-Reflection/blob/a80f7a164cd800089e4f4dd948ca6f0e7badcf33/src/main/java/org/kasource/commons/reflection/util/MethodUtils.java#L188-L205
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ServicesApi.java
ServicesApi.setGitLabCI
public void setGitLabCI(Object projectIdOrPath, String token, String projectCIUrl) throws GitLabApiException { """ Activates the gitlab-ci service for a project. <pre><code>GitLab Endpoint: PUT /projects/:id/services/gitlab-ci</code></pre> @param projectIdOrPath id, path of the project, or a Project instance...
java
public void setGitLabCI(Object projectIdOrPath, String token, String projectCIUrl) throws GitLabApiException { final Form formData = new Form(); formData.param("token", token); formData.param("project_url", projectCIUrl); put(Response.Status.OK, formData.asMap(), "projects", getProjectId...
[ "public", "void", "setGitLabCI", "(", "Object", "projectIdOrPath", ",", "String", "token", ",", "String", "projectCIUrl", ")", "throws", "GitLabApiException", "{", "final", "Form", "formData", "=", "new", "Form", "(", ")", ";", "formData", ".", "param", "(", ...
Activates the gitlab-ci service for a project. <pre><code>GitLab Endpoint: PUT /projects/:id/services/gitlab-ci</code></pre> @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path @param token for authentication @param projectCIUrl URL of the GitLab-CI projec...
[ "Activates", "the", "gitlab", "-", "ci", "service", "for", "a", "project", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ServicesApi.java#L33-L38
elibom/jogger
src/main/java/com/elibom/jogger/http/servlet/multipart/ParameterParser.java
ParameterParser.parse
public Map<String,String> parse(final char[] chars, char separator) { """ Extracts a map of name/value pairs from the given array of characters. Names are expected to be unique. @param chars the array of characters that contains a sequence of name/value pairs @param separator the name/value pairs separator ...
java
public Map<String,String> parse(final char[] chars, char separator) { if (chars == null) { return new HashMap<String,String>(); } return parse(chars, 0, chars.length, separator); }
[ "public", "Map", "<", "String", ",", "String", ">", "parse", "(", "final", "char", "[", "]", "chars", ",", "char", "separator", ")", "{", "if", "(", "chars", "==", "null", ")", "{", "return", "new", "HashMap", "<", "String", ",", "String", ">", "("...
Extracts a map of name/value pairs from the given array of characters. Names are expected to be unique. @param chars the array of characters that contains a sequence of name/value pairs @param separator the name/value pairs separator @return a map of name/value pairs
[ "Extracts", "a", "map", "of", "name", "/", "value", "pairs", "from", "the", "given", "array", "of", "characters", ".", "Names", "are", "expected", "to", "be", "unique", "." ]
train
https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/http/servlet/multipart/ParameterParser.java#L251-L256
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java
SipNamingContextListener.removeSipSessionsUtil
public static void removeSipSessionsUtil(Context envCtx, String appName, SipSessionsUtil sipSessionsUtil) { """ Removes the sip sessions util binding from the jndi mapping @param appName the application name subcontext @param sipSessionsUtil the sip sessions util to remove """ if(envCtx != null) { try...
java
public static void removeSipSessionsUtil(Context envCtx, String appName, SipSessionsUtil sipSessionsUtil) { if(envCtx != null) { try { javax.naming.Context sipContext = (javax.naming.Context)envCtx.lookup(SIP_SUBCONTEXT + "/" + appName); sipContext.unbind(SIP_SESSIONS_UTIL_JNDI_NAME); } catch (Nami...
[ "public", "static", "void", "removeSipSessionsUtil", "(", "Context", "envCtx", ",", "String", "appName", ",", "SipSessionsUtil", "sipSessionsUtil", ")", "{", "if", "(", "envCtx", "!=", "null", ")", "{", "try", "{", "javax", ".", "naming", ".", "Context", "si...
Removes the sip sessions util binding from the jndi mapping @param appName the application name subcontext @param sipSessionsUtil the sip sessions util to remove
[ "Removes", "the", "sip", "sessions", "util", "binding", "from", "the", "jndi", "mapping" ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java#L229-L238
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2Tag.java
ID3v2Tag.setUserDefinedTextFrame
public void setUserDefinedTextFrame(String description, String value) { """ Sets the data contained in the user defined text frame (TXXX). @param description a description of the data @param value the data for the frame """ try { byte[] b = new byte[description.length() + value.length() + 2]; int...
java
public void setUserDefinedTextFrame(String description, String value) { try { byte[] b = new byte[description.length() + value.length() + 2]; int bytesCopied = 0; b[bytesCopied++] = 0; System.arraycopy(description.getBytes(ENC_TYPE), 0, b, bytesCopied, description.length()); bytesCopied += descripti...
[ "public", "void", "setUserDefinedTextFrame", "(", "String", "description", ",", "String", "value", ")", "{", "try", "{", "byte", "[", "]", "b", "=", "new", "byte", "[", "description", ".", "length", "(", ")", "+", "value", ".", "length", "(", ")", "+",...
Sets the data contained in the user defined text frame (TXXX). @param description a description of the data @param value the data for the frame
[ "Sets", "the", "data", "contained", "in", "the", "user", "defined", "text", "frame", "(", "TXXX", ")", "." ]
train
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2Tag.java#L341-L360
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/UcsApi.java
UcsApi.identifyContact
public ApiSuccessResponse identifyContact(String id, IdentifyContactData identifyContactData) throws ApiException { """ Identify the contact for the interaction @param id id of the Interaction (required) @param identifyContactData (required) @return ApiSuccessResponse @throws ApiException If fail to call th...
java
public ApiSuccessResponse identifyContact(String id, IdentifyContactData identifyContactData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = identifyContactWithHttpInfo(id, identifyContactData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "identifyContact", "(", "String", "id", ",", "IdentifyContactData", "identifyContactData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "identifyContactWithHttpInfo", "(", "id", ",", "ide...
Identify the contact for the interaction @param id id of the Interaction (required) @param identifyContactData (required) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Identify", "the", "contact", "for", "the", "interaction" ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/UcsApi.java#L1409-L1412
twilio/twilio-java
src/main/java/com/twilio/base/Page.java
Page.fromJson
public static <T> Page<T> fromJson(String recordKey, String json, Class<T> recordType, ObjectMapper mapper) { """ Create a new page of data from a json blob. @param recordKey key which holds the records @param json json blob @param recordType resource type @param mapper json parser @param <T> record class t...
java
public static <T> Page<T> fromJson(String recordKey, String json, Class<T> recordType, ObjectMapper mapper) { try { List<T> results = new ArrayList<>(); JsonNode root = mapper.readTree(json); JsonNode records = root.get(recordKey); for (final JsonNode record : rec...
[ "public", "static", "<", "T", ">", "Page", "<", "T", ">", "fromJson", "(", "String", "recordKey", ",", "String", "json", ",", "Class", "<", "T", ">", "recordType", ",", "ObjectMapper", "mapper", ")", "{", "try", "{", "List", "<", "T", ">", "results",...
Create a new page of data from a json blob. @param recordKey key which holds the records @param json json blob @param recordType resource type @param mapper json parser @param <T> record class type @return a page of records of type T
[ "Create", "a", "new", "page", "of", "data", "from", "a", "json", "blob", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/base/Page.java#L124-L145
xiancloud/xian
xian-core/src/main/java/info/xiancloud/core/util/ClassGraphUtil.java
ClassGraphUtil.getNonAbstractSubClasses
@SuppressWarnings("all") synchronized public static <T> Set<Class<? extends T>> getNonAbstractSubClasses(Class<T> parentClass, String... packageNames) { """ Scan classpath for all concrete subclasses of specified interface or class @return all concrete subclasses of specified interface or class """ ...
java
@SuppressWarnings("all") synchronized public static <T> Set<Class<? extends T>> getNonAbstractSubClasses(Class<T> parentClass, String... packageNames) { return getNonAbstractSubClassInfoSet(parentClass, packageNames).stream().map(classInfo -> { try { //Here we must use parentClas...
[ "@", "SuppressWarnings", "(", "\"all\"", ")", "synchronized", "public", "static", "<", "T", ">", "Set", "<", "Class", "<", "?", "extends", "T", ">", ">", "getNonAbstractSubClasses", "(", "Class", "<", "T", ">", "parentClass", ",", "String", "...", "package...
Scan classpath for all concrete subclasses of specified interface or class @return all concrete subclasses of specified interface or class
[ "Scan", "classpath", "for", "all", "concrete", "subclasses", "of", "specified", "interface", "or", "class" ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/util/ClassGraphUtil.java#L50-L63