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
zandero/mail
src/main/java/com/zandero/mail/MailMessage.java
MailMessage.defaultFrom
public MailMessage defaultFrom(String email, String name) { """ Sets from email address only if not already set @param email target email address @param name target name associated with email address @return mail message """ if (StringUtils.isNullOrEmptyTrimmed(fromEmail)) { from(email, name); } ...
java
public MailMessage defaultFrom(String email, String name) { if (StringUtils.isNullOrEmptyTrimmed(fromEmail)) { from(email, name); } if (!StringUtils.isNullOrEmptyTrimmed(email) && StringUtils.equals(fromEmail, email.trim(), true) && StringUtils.isNullOrEmptyTrimmed(fromName)) { from(email, nam...
[ "public", "MailMessage", "defaultFrom", "(", "String", "email", ",", "String", "name", ")", "{", "if", "(", "StringUtils", ".", "isNullOrEmptyTrimmed", "(", "fromEmail", ")", ")", "{", "from", "(", "email", ",", "name", ")", ";", "}", "if", "(", "!", "...
Sets from email address only if not already set @param email target email address @param name target name associated with email address @return mail message
[ "Sets", "from", "email", "address", "only", "if", "not", "already", "set" ]
train
https://github.com/zandero/mail/blob/2e30fe99e1dde755113bd4652b01033c0583f8a6/src/main/java/com/zandero/mail/MailMessage.java#L242-L255
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java
VirtualMachinesInner.convertToManagedDisks
public OperationStatusResponseInner convertToManagedDisks(String resourceGroupName, String vmName) { """ Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. @param resourceGroupName The name of the resource group. @param vmNa...
java
public OperationStatusResponseInner convertToManagedDisks(String resourceGroupName, String vmName) { return convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); }
[ "public", "OperationStatusResponseInner", "convertToManagedDisks", "(", "String", "resourceGroupName", ",", "String", "vmName", ")", "{", "return", "convertToManagedDisksWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmName", ")", ".", "toBlocking", "(", ")", ...
Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine. @throws IllegalArgumentException thrown if parameters fail the validation @th...
[ "Converts", "virtual", "machine", "disks", "from", "blob", "-", "based", "to", "managed", "disks", ".", "Virtual", "machine", "must", "be", "stop", "-", "deallocated", "before", "invoking", "this", "operation", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java#L1134-L1136
facebookarchive/hadoop-20
src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/servers/HadoopLocationWizard.java
HadoopLocationWizard.createConfCheckButton
private Button createConfCheckButton(SelectionListener listener, Composite parent, ConfProp prop, String text) { """ Create a SWT Checked Button component for the given {@link ConfProp} boolean configuration property. @param listener @param parent @param prop @return """ Button button = new B...
java
private Button createConfCheckButton(SelectionListener listener, Composite parent, ConfProp prop, String text) { Button button = new Button(parent, SWT.CHECK); button.setText(text); button.setData("hProp", prop); button.setSelection(location.getConfProp(prop).equalsIgnoreCase("yes")); button....
[ "private", "Button", "createConfCheckButton", "(", "SelectionListener", "listener", ",", "Composite", "parent", ",", "ConfProp", "prop", ",", "String", "text", ")", "{", "Button", "button", "=", "new", "Button", "(", "parent", ",", "SWT", ".", "CHECK", ")", ...
Create a SWT Checked Button component for the given {@link ConfProp} boolean configuration property. @param listener @param parent @param prop @return
[ "Create", "a", "SWT", "Checked", "Button", "component", "for", "the", "given", "{", "@link", "ConfProp", "}", "boolean", "configuration", "property", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/servers/HadoopLocationWizard.java#L518-L528
mcxiaoke/Android-Next
core/src/main/java/com/mcxiaoke/next/utils/IOUtils.java
IOUtils.skipFully
public static void skipFully(Reader input, long toSkip) throws IOException { """ Skip the requested number of characters or fail if there are not enough left. <p/> This allows for the possibility that {@link Reader#skip(long)} may not skip as many characters as requested (most likely because of reaching EOF). ...
java
public static void skipFully(Reader input, long toSkip) throws IOException { long skipped = skip(input, toSkip); if (skipped != toSkip) { throw new EOFException("Chars to skip: " + toSkip + " actual: " + skipped); } }
[ "public", "static", "void", "skipFully", "(", "Reader", "input", ",", "long", "toSkip", ")", "throws", "IOException", "{", "long", "skipped", "=", "skip", "(", "input", ",", "toSkip", ")", ";", "if", "(", "skipped", "!=", "toSkip", ")", "{", "throw", "...
Skip the requested number of characters or fail if there are not enough left. <p/> This allows for the possibility that {@link Reader#skip(long)} may not skip as many characters as requested (most likely because of reaching EOF). @param input stream to skip @param toSkip the number of characters to skip @throws IOExc...
[ "Skip", "the", "requested", "number", "of", "characters", "or", "fail", "if", "there", "are", "not", "enough", "left", ".", "<p", "/", ">", "This", "allows", "for", "the", "possibility", "that", "{", "@link", "Reader#skip", "(", "long", ")", "}", "may", ...
train
https://github.com/mcxiaoke/Android-Next/blob/1bfdf99d0b81a849aa0fa6697c53ed673151ca39/core/src/main/java/com/mcxiaoke/next/utils/IOUtils.java#L869-L874
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/br/br_configurealert.java
br_configurealert.configurealert
public static br_configurealert configurealert(nitro_service client, br_configurealert resource) throws Exception { """ <pre> Use this operation to configure alerts on Repeater Instances. </pre> """ return ((br_configurealert[]) resource.perform_operation(client, "configurealert"))[0]; }
java
public static br_configurealert configurealert(nitro_service client, br_configurealert resource) throws Exception { return ((br_configurealert[]) resource.perform_operation(client, "configurealert"))[0]; }
[ "public", "static", "br_configurealert", "configurealert", "(", "nitro_service", "client", ",", "br_configurealert", "resource", ")", "throws", "Exception", "{", "return", "(", "(", "br_configurealert", "[", "]", ")", "resource", ".", "perform_operation", "(", "clie...
<pre> Use this operation to configure alerts on Repeater Instances. </pre>
[ "<pre", ">", "Use", "this", "operation", "to", "configure", "alerts", "on", "Repeater", "Instances", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/br/br_configurealert.java#L126-L129
Cleveroad/LoopBar
LoopBar-widget/src/main/java/com/cleveroad/loopbar/widget/LoopBarView.java
LoopBarView.selectItem
@SuppressWarnings("unused") public void selectItem(int position, boolean invokeListeners) { """ Select item by it's position @param position int value of item position to select @param invokeListeners boolean value for invoking listeners """ IOperationItem item = mOuterAdapter.getItem(po...
java
@SuppressWarnings("unused") public void selectItem(int position, boolean invokeListeners) { IOperationItem item = mOuterAdapter.getItem(position); IOperationItem oldHidedItem = mOuterAdapter.getItem(mRealHidedPosition); int realPosition = mOuterAdapter.normalizePosition(position); /...
[ "@", "SuppressWarnings", "(", "\"unused\"", ")", "public", "void", "selectItem", "(", "int", "position", ",", "boolean", "invokeListeners", ")", "{", "IOperationItem", "item", "=", "mOuterAdapter", ".", "getItem", "(", "position", ")", ";", "IOperationItem", "ol...
Select item by it's position @param position int value of item position to select @param invokeListeners boolean value for invoking listeners
[ "Select", "item", "by", "it", "s", "position" ]
train
https://github.com/Cleveroad/LoopBar/blob/6ff5e0b35e637202202f9b4ca141195bdcfd5697/LoopBar-widget/src/main/java/com/cleveroad/loopbar/widget/LoopBarView.java#L778-L810
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java
NumberUtil.appendRange
public static Collection<Integer> appendRange(int start, int stop, Collection<Integer> values) { """ 将给定范围内的整数添加到已有集合中,步进为1 @param start 开始(包含) @param stop 结束(包含) @param values 集合 @return 集合 """ return appendRange(start, stop, 1, values); }
java
public static Collection<Integer> appendRange(int start, int stop, Collection<Integer> values) { return appendRange(start, stop, 1, values); }
[ "public", "static", "Collection", "<", "Integer", ">", "appendRange", "(", "int", "start", ",", "int", "stop", ",", "Collection", "<", "Integer", ">", "values", ")", "{", "return", "appendRange", "(", "start", ",", "stop", ",", "1", ",", "values", ")", ...
将给定范围内的整数添加到已有集合中,步进为1 @param start 开始(包含) @param stop 结束(包含) @param values 集合 @return 集合
[ "将给定范围内的整数添加到已有集合中,步进为1" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L1343-L1345
aerogear/aerogear-android-core
library/src/main/java/org/jboss/aerogear/android/core/reflection/Property.java
Property.setValue
public void setValue(Object instance, Object value) { """ Set new value @param instance Instance to set new value @param value new value """ try { setMethod.invoke(instance, value); } catch (Exception e) { throw new PropertyNotFoundException(klass, getType(), fieldNa...
java
public void setValue(Object instance, Object value) { try { setMethod.invoke(instance, value); } catch (Exception e) { throw new PropertyNotFoundException(klass, getType(), fieldName); } }
[ "public", "void", "setValue", "(", "Object", "instance", ",", "Object", "value", ")", "{", "try", "{", "setMethod", ".", "invoke", "(", "instance", ",", "value", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "PropertyNotFoundEx...
Set new value @param instance Instance to set new value @param value new value
[ "Set", "new", "value" ]
train
https://github.com/aerogear/aerogear-android-core/blob/3be24a79dd3d2792804935572bb672ff8714e6aa/library/src/main/java/org/jboss/aerogear/android/core/reflection/Property.java#L139-L146
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/FileUtils.java
FileUtils.copyFileStreams
public static void copyFileStreams(final File fromFile, final File toFile) throws IOException { """ Copy a file from one location to another, and set the modification time to match. (Uses java Streams). @param fromFile source file @param toFile dest file @throws IOException on io error """ if (!...
java
public static void copyFileStreams(final File fromFile, final File toFile) throws IOException { if (!fromFile.exists()) { return; } Files.copy(fromFile.toPath(), toFile.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES); }
[ "public", "static", "void", "copyFileStreams", "(", "final", "File", "fromFile", ",", "final", "File", "toFile", ")", "throws", "IOException", "{", "if", "(", "!", "fromFile", ".", "exists", "(", ")", ")", "{", "return", ";", "}", "Files", ".", "copy", ...
Copy a file from one location to another, and set the modification time to match. (Uses java Streams). @param fromFile source file @param toFile dest file @throws IOException on io error
[ "Copy", "a", "file", "from", "one", "location", "to", "another", "and", "set", "the", "modification", "time", "to", "match", ".", "(", "Uses", "java", "Streams", ")", "." ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/FileUtils.java#L64-L72
grpc/grpc-java
api/src/main/java/io/grpc/Status.java
Status.augmentDescription
public Status augmentDescription(String additionalDetail) { """ Create a derived instance of {@link Status} augmenting the current description with additional detail. Leading and trailing whitespace may be removed; this may change in the future. """ if (additionalDetail == null) { return this; ...
java
public Status augmentDescription(String additionalDetail) { if (additionalDetail == null) { return this; } else if (this.description == null) { return new Status(this.code, additionalDetail, this.cause); } else { return new Status(this.code, this.description + "\n" + additionalDetail, this...
[ "public", "Status", "augmentDescription", "(", "String", "additionalDetail", ")", "{", "if", "(", "additionalDetail", "==", "null", ")", "{", "return", "this", ";", "}", "else", "if", "(", "this", ".", "description", "==", "null", ")", "{", "return", "new"...
Create a derived instance of {@link Status} augmenting the current description with additional detail. Leading and trailing whitespace may be removed; this may change in the future.
[ "Create", "a", "derived", "instance", "of", "{" ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/api/src/main/java/io/grpc/Status.java#L478-L486
micronaut-projects/micronaut-core
core/src/main/java/io/micronaut/core/cli/CommandLineParser.java
CommandLineParser.processOption
protected String processOption(DefaultCommandLine cl, String arg) { """ Process the passed in options. @param cl cl @param arg arg @return argument processed """ if (arg.length() < 2) { return null; } if (arg.charAt(1) == 'D' && arg.contains("=")) { processSy...
java
protected String processOption(DefaultCommandLine cl, String arg) { if (arg.length() < 2) { return null; } if (arg.charAt(1) == 'D' && arg.contains("=")) { processSystemArg(cl, arg); return null; } arg = (arg.charAt(1) == '-' ? arg.substring(...
[ "protected", "String", "processOption", "(", "DefaultCommandLine", "cl", ",", "String", "arg", ")", "{", "if", "(", "arg", ".", "length", "(", ")", "<", "2", ")", "{", "return", "null", ";", "}", "if", "(", "arg", ".", "charAt", "(", "1", ")", "=="...
Process the passed in options. @param cl cl @param arg arg @return argument processed
[ "Process", "the", "passed", "in", "options", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/cli/CommandLineParser.java#L153-L185
icode/ameba
src/main/java/ameba/core/Addon.java
Addon.subscribeSystemEvent
protected static <E extends Event> void subscribeSystemEvent(Class<E> eventClass, final Listener<E> listener) { """ <p>subscribeSystemEvent.</p> @param eventClass a {@link java.lang.Class} object. @param listener a {@link ameba.event.Listener} object. @param <E> a E object. """ SystemEventBus.su...
java
protected static <E extends Event> void subscribeSystemEvent(Class<E> eventClass, final Listener<E> listener) { SystemEventBus.subscribe(eventClass, listener); }
[ "protected", "static", "<", "E", "extends", "Event", ">", "void", "subscribeSystemEvent", "(", "Class", "<", "E", ">", "eventClass", ",", "final", "Listener", "<", "E", ">", "listener", ")", "{", "SystemEventBus", ".", "subscribe", "(", "eventClass", ",", ...
<p>subscribeSystemEvent.</p> @param eventClass a {@link java.lang.Class} object. @param listener a {@link ameba.event.Listener} object. @param <E> a E object.
[ "<p", ">", "subscribeSystemEvent", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/core/Addon.java#L83-L85
h2oai/h2o-3
h2o-core/src/main/java/water/api/RequestServer.java
RequestServer.maybeLogRequest
private static boolean maybeLogRequest(RequestUri uri, Properties header, Properties parms) { """ Log the request (unless it's an overly common one). @return flag whether the request parameters might be sensitive or not """ LogFilterLevel level = LogFilterLevel.LOG; for (HttpLogFilter f : _filters) ...
java
private static boolean maybeLogRequest(RequestUri uri, Properties header, Properties parms) { LogFilterLevel level = LogFilterLevel.LOG; for (HttpLogFilter f : _filters) level = level.reduce(f.filter(uri, header, parms)); switch (level) { case DO_NOT_LOG: return false; // do not log the...
[ "private", "static", "boolean", "maybeLogRequest", "(", "RequestUri", "uri", ",", "Properties", "header", ",", "Properties", "parms", ")", "{", "LogFilterLevel", "level", "=", "LogFilterLevel", ".", "LOG", ";", "for", "(", "HttpLogFilter", "f", ":", "_filters", ...
Log the request (unless it's an overly common one). @return flag whether the request parameters might be sensitive or not
[ "Log", "the", "request", "(", "unless", "it", "s", "an", "overly", "common", "one", ")", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/api/RequestServer.java#L532-L546
finmath/finmath-lib
src/main/java/net/finmath/montecarlo/interestrate/products/LIBORBond.java
LIBORBond.getValue
@Override public RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException { """ This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value c...
java
@Override public RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException { if(evaluationTime > maturity) { return new Scalar(0); } return model.getLIBOR(evaluationTime, evaluationTime, maturity).mult(maturity - evaluationTime).add(1.0).invert(); ...
[ "@", "Override", "public", "RandomVariable", "getValue", "(", "double", "evaluationTime", ",", "LIBORModelMonteCarloSimulationModel", "model", ")", "throws", "CalculationException", "{", "if", "(", "evaluationTime", ">", "maturity", ")", "{", "return", "new", "Scalar"...
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value conditional to evalutationTime, for a Monte-Carlo simulation this is the (sum of) value discounted to evaluation time. Cashflows prior evaluationTime...
[ "This", "method", "returns", "the", "value", "random", "variable", "of", "the", "product", "within", "the", "specified", "model", "evaluated", "at", "a", "given", "evalutationTime", ".", "Note", ":", "For", "a", "lattice", "this", "is", "often", "the", "valu...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/interestrate/products/LIBORBond.java#L43-L50
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/iomanager/IOManagerAsync.java
IOManagerAsync.createBulkBlockChannelReader
@Override public BulkBlockChannelReader createBulkBlockChannelReader(FileIOChannel.ID channelID, List<MemorySegment> targetSegments, int numBlocks) throws IOException { """ Creates a block channel reader that reads all blocks from the given channel directly in one bulk. The reader draws segments to read the b...
java
@Override public BulkBlockChannelReader createBulkBlockChannelReader(FileIOChannel.ID channelID, List<MemorySegment> targetSegments, int numBlocks) throws IOException { checkState(!isShutdown.get(), "I/O-Manager is shut down."); return new AsynchronousBulkBlockReader(channelID, this.readers[channelID.getThread...
[ "@", "Override", "public", "BulkBlockChannelReader", "createBulkBlockChannelReader", "(", "FileIOChannel", ".", "ID", "channelID", ",", "List", "<", "MemorySegment", ">", "targetSegments", ",", "int", "numBlocks", ")", "throws", "IOException", "{", "checkState", "(", ...
Creates a block channel reader that reads all blocks from the given channel directly in one bulk. The reader draws segments to read the blocks into from a supplied list, which must contain as many segments as the channel has blocks. After the reader is done, the list with the full segments can be obtained from the read...
[ "Creates", "a", "block", "channel", "reader", "that", "reads", "all", "blocks", "from", "the", "given", "channel", "directly", "in", "one", "bulk", ".", "The", "reader", "draws", "segments", "to", "read", "the", "blocks", "into", "from", "a", "supplied", "...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/iomanager/IOManagerAsync.java#L264-L270
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/SFSUtilities.java
SFSUtilities.getTableEnvelope
public static Envelope getTableEnvelope(Connection connection, TableLocation location, String geometryField) throws SQLException { """ Merge the bounding box of all geometries inside the provided table. @param connection Active connection (not closed by this function) @param location Location of th...
java
public static Envelope getTableEnvelope(Connection connection, TableLocation location, String geometryField) throws SQLException { if(geometryField==null || geometryField.isEmpty()) { List<String> geometryFields = getGeometryFields(connection, location); if(geometryFields.isE...
[ "public", "static", "Envelope", "getTableEnvelope", "(", "Connection", "connection", ",", "TableLocation", "location", ",", "String", "geometryField", ")", "throws", "SQLException", "{", "if", "(", "geometryField", "==", "null", "||", "geometryField", ".", "isEmpty"...
Merge the bounding box of all geometries inside the provided table. @param connection Active connection (not closed by this function) @param location Location of the table @param geometryField Geometry field or empty string (take the first geometry field) @return Envelope of the table @throws SQLException If the tab...
[ "Merge", "the", "bounding", "box", "of", "all", "geometries", "inside", "the", "provided", "table", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/SFSUtilities.java#L212-L229
btrplace/scheduler
json/src/main/java/org/btrplace/json/JSONs.java
JSONs.requiredBoolean
public static boolean requiredBoolean(JSONObject o, String id) throws JSONConverterException { """ Read an expected boolean. @param o the object to parse @param id the id in the map that should point to the boolean @return the boolean @throws org.btrplace.json.JSONConverterException if the key does not poin...
java
public static boolean requiredBoolean(JSONObject o, String id) throws JSONConverterException { checkKeys(o, id); Object x = o.get(id); if (!(x instanceof Boolean)) { throw new JSONConverterException("Boolean expected at key '" + id + "' but was '" + x.getClass() + "'."); } ...
[ "public", "static", "boolean", "requiredBoolean", "(", "JSONObject", "o", ",", "String", "id", ")", "throws", "JSONConverterException", "{", "checkKeys", "(", "o", ",", "id", ")", ";", "Object", "x", "=", "o", ".", "get", "(", "id", ")", ";", "if", "("...
Read an expected boolean. @param o the object to parse @param id the id in the map that should point to the boolean @return the boolean @throws org.btrplace.json.JSONConverterException if the key does not point to a boolean
[ "Read", "an", "expected", "boolean", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/JSONs.java#L175-L182
apache/reef
lang/java/reef-common/src/main/java/org/apache/reef/driver/restart/EvaluatorRestartInfo.java
EvaluatorRestartInfo.createFailedEvaluatorInfo
public static EvaluatorRestartInfo createFailedEvaluatorInfo(final String evaluatorId) { """ Creates an {@link EvaluatorRestartInfo} object that represents the information of an evaluator that has failed on driver restart. """ final ResourceRecoverEvent resourceRecoverEvent = ResourceEventImpl.ne...
java
public static EvaluatorRestartInfo createFailedEvaluatorInfo(final String evaluatorId) { final ResourceRecoverEvent resourceRecoverEvent = ResourceEventImpl.newRecoveryBuilder().setIdentifier(evaluatorId).build(); return new EvaluatorRestartInfo(resourceRecoverEvent, EvaluatorRestartState.FAILED); }
[ "public", "static", "EvaluatorRestartInfo", "createFailedEvaluatorInfo", "(", "final", "String", "evaluatorId", ")", "{", "final", "ResourceRecoverEvent", "resourceRecoverEvent", "=", "ResourceEventImpl", ".", "newRecoveryBuilder", "(", ")", ".", "setIdentifier", "(", "ev...
Creates an {@link EvaluatorRestartInfo} object that represents the information of an evaluator that has failed on driver restart.
[ "Creates", "an", "{" ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-common/src/main/java/org/apache/reef/driver/restart/EvaluatorRestartInfo.java#L60-L66
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/jdbc/PgPreparedStatement.java
PgPreparedStatement.bindLiteral
protected void bindLiteral(int paramIndex, String s, int oid) throws SQLException { """ Note if s is a String it should be escaped by the caller to avoid SQL injection attacks. It is not done here for efficiency reasons as most calls to this method do not require escaping as the source of the string is known saf...
java
protected void bindLiteral(int paramIndex, String s, int oid) throws SQLException { preparedParameters.setLiteralParameter(paramIndex, s, oid); }
[ "protected", "void", "bindLiteral", "(", "int", "paramIndex", ",", "String", "s", ",", "int", "oid", ")", "throws", "SQLException", "{", "preparedParameters", ".", "setLiteralParameter", "(", "paramIndex", ",", "s", ",", "oid", ")", ";", "}" ]
Note if s is a String it should be escaped by the caller to avoid SQL injection attacks. It is not done here for efficiency reasons as most calls to this method do not require escaping as the source of the string is known safe (i.e. {@code Integer.toString()}) @param paramIndex parameter index @param s value (the valu...
[ "Note", "if", "s", "is", "a", "String", "it", "should", "be", "escaped", "by", "the", "caller", "to", "avoid", "SQL", "injection", "attacks", ".", "It", "is", "not", "done", "here", "for", "efficiency", "reasons", "as", "most", "calls", "to", "this", "...
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/jdbc/PgPreparedStatement.java#L984-L986
morimekta/utils
io-util/src/main/java/net/morimekta/util/io/BinaryReader.java
BinaryReader.expectUInt16
public int expectUInt16() throws IOException { """ Read an unsigned short from the input stream. @return The number read. @throws IOException If no number to read. """ int b1 = in.read(); if (b1 < 0) { throw new IOException("Missing byte 1 to expected uint16"); } ...
java
public int expectUInt16() throws IOException { int b1 = in.read(); if (b1 < 0) { throw new IOException("Missing byte 1 to expected uint16"); } int b2 = in.read(); if (b2 < 0) { throw new IOException("Missing byte 2 to expected uint16"); } r...
[ "public", "int", "expectUInt16", "(", ")", "throws", "IOException", "{", "int", "b1", "=", "in", ".", "read", "(", ")", ";", "if", "(", "b1", "<", "0", ")", "{", "throw", "new", "IOException", "(", "\"Missing byte 1 to expected uint16\"", ")", ";", "}", ...
Read an unsigned short from the input stream. @return The number read. @throws IOException If no number to read.
[ "Read", "an", "unsigned", "short", "from", "the", "input", "stream", "." ]
train
https://github.com/morimekta/utils/blob/dc987485902f1a7d58169c89c61db97425a6226d/io-util/src/main/java/net/morimekta/util/io/BinaryReader.java#L279-L289
grpc/grpc-java
stub/src/main/java/io/grpc/stub/ClientCalls.java
ClientCalls.asyncBidiStreamingCall
public static <ReqT, RespT> StreamObserver<ReqT> asyncBidiStreamingCall( ClientCall<ReqT, RespT> call, StreamObserver<RespT> responseObserver) { """ Executes a bidirectional-streaming call. The {@code call} should not be already started. After calling this method, {@code call} should no longer be used. ...
java
public static <ReqT, RespT> StreamObserver<ReqT> asyncBidiStreamingCall( ClientCall<ReqT, RespT> call, StreamObserver<RespT> responseObserver) { return asyncStreamingRequestCall(call, responseObserver, true); }
[ "public", "static", "<", "ReqT", ",", "RespT", ">", "StreamObserver", "<", "ReqT", ">", "asyncBidiStreamingCall", "(", "ClientCall", "<", "ReqT", ",", "RespT", ">", "call", ",", "StreamObserver", "<", "RespT", ">", "responseObserver", ")", "{", "return", "as...
Executes a bidirectional-streaming call. The {@code call} should not be already started. After calling this method, {@code call} should no longer be used. @return request stream observer.
[ "Executes", "a", "bidirectional", "-", "streaming", "call", ".", "The", "{", "@code", "call", "}", "should", "not", "be", "already", "started", ".", "After", "calling", "this", "method", "{", "@code", "call", "}", "should", "no", "longer", "be", "used", ...
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/stub/src/main/java/io/grpc/stub/ClientCalls.java#L96-L99
Alexey1Gavrilov/ExpectIt
expectit-core/src/main/java/net/sf/expectit/filter/Filters.java
Filters.replaceInString
public static Filter replaceInString(final String regexp, final String replacement) { """ Equivalent to {@link #replaceInString(java.util.regex.Pattern, String)} but takes the regular expression as string and default overlap in 80 characters. @param regexp the regular expression @param replacement the s...
java
public static Filter replaceInString(final String regexp, final String replacement) { return replaceInString(Pattern.compile(regexp), replacement, DEFAULT_FILTER_OVERLAP); }
[ "public", "static", "Filter", "replaceInString", "(", "final", "String", "regexp", ",", "final", "String", "replacement", ")", "{", "return", "replaceInString", "(", "Pattern", ".", "compile", "(", "regexp", ")", ",", "replacement", ",", "DEFAULT_FILTER_OVERLAP", ...
Equivalent to {@link #replaceInString(java.util.regex.Pattern, String)} but takes the regular expression as string and default overlap in 80 characters. @param regexp the regular expression @param replacement the string to be substituted for each match @return the filter
[ "Equivalent", "to", "{", "@link", "#replaceInString", "(", "java", ".", "util", ".", "regex", ".", "Pattern", "String", ")", "}", "but", "takes", "the", "regular", "expression", "as", "string", "and", "default", "overlap", "in", "80", "characters", "." ]
train
https://github.com/Alexey1Gavrilov/ExpectIt/blob/5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3/expectit-core/src/main/java/net/sf/expectit/filter/Filters.java#L114-L116
casbin/jcasbin
src/main/java/org/casbin/jcasbin/main/Enforcer.java
Enforcer.deletePermissionForUser
public boolean deletePermissionForUser(String user, String... permission) { """ deletePermissionForUser deletes a permission for a user or role. Returns false if the user or role does not have the permission (aka not affected). @param user the user. @param permission the permission, usually be (obj, act). It ...
java
public boolean deletePermissionForUser(String user, String... permission) { List<String> params = new ArrayList<>(); params.add(user); Collections.addAll(params, permission); return removePolicy(params); }
[ "public", "boolean", "deletePermissionForUser", "(", "String", "user", ",", "String", "...", "permission", ")", "{", "List", "<", "String", ">", "params", "=", "new", "ArrayList", "<>", "(", ")", ";", "params", ".", "add", "(", "user", ")", ";", "Collect...
deletePermissionForUser deletes a permission for a user or role. Returns false if the user or role does not have the permission (aka not affected). @param user the user. @param permission the permission, usually be (obj, act). It is actually the rule without the subject. @return succeeds or not.
[ "deletePermissionForUser", "deletes", "a", "permission", "for", "a", "user", "or", "role", ".", "Returns", "false", "if", "the", "user", "or", "role", "does", "not", "have", "the", "permission", "(", "aka", "not", "affected", ")", "." ]
train
https://github.com/casbin/jcasbin/blob/b46d7a756b6c39cdb17e0600607e5fcdc66edd11/src/main/java/org/casbin/jcasbin/main/Enforcer.java#L280-L287
undera/jmeter-plugins
tools/synthesis/src/main/java/kg/apc/jmeter/vizualizers/SynthesisReportGui.java
SynthesisReportGui.getAllDataAsTable
public static DefaultTableModel getAllDataAsTable(ObjectTableModel model, Format[] formats, String[] columns) { """ Present data in javax.swing.table.DefaultTableModel form. @param model {@link ObjectTableModel} @param formats Array of {@link Format} array can contain null formatters in this case value is ad...
java
public static DefaultTableModel getAllDataAsTable(ObjectTableModel model, Format[] formats, String[] columns) { final List<List<Object>> table = getAllTableData(model, formats); final DefaultTableModel tableModel = new DefaultTableModel(); for (String header : columns) { tableModel...
[ "public", "static", "DefaultTableModel", "getAllDataAsTable", "(", "ObjectTableModel", "model", ",", "Format", "[", "]", "formats", ",", "String", "[", "]", "columns", ")", "{", "final", "List", "<", "List", "<", "Object", ">", ">", "table", "=", "getAllTabl...
Present data in javax.swing.table.DefaultTableModel form. @param model {@link ObjectTableModel} @param formats Array of {@link Format} array can contain null formatters in this case value is added as is @param columns Columns headers @return data in table form
[ "Present", "data", "in", "javax", ".", "swing", ".", "table", ".", "DefaultTableModel", "form", "." ]
train
https://github.com/undera/jmeter-plugins/blob/416d2a77249ab921c7e4134c3e6a9639901ef7e8/tools/synthesis/src/main/java/kg/apc/jmeter/vizualizers/SynthesisReportGui.java#L467-L481
samskivert/samskivert
src/main/java/com/samskivert/util/Config.java
Config.getValue
public int getValue (String name, int defval) { """ Fetches and returns the value for the specified configuration property. If the value is not specified in the associated properties file, the supplied default value is returned instead. If the property specified in the file is poorly formatted (not and integer, ...
java
public int getValue (String name, int defval) { String val = _props.getProperty(name); if (val != null) { try { return Integer.decode(val).intValue(); // handles base 10, hex values, etc. } catch (NumberFormatException nfe) { log.warning("Malfo...
[ "public", "int", "getValue", "(", "String", "name", ",", "int", "defval", ")", "{", "String", "val", "=", "_props", ".", "getProperty", "(", "name", ")", ";", "if", "(", "val", "!=", "null", ")", "{", "try", "{", "return", "Integer", ".", "decode", ...
Fetches and returns the value for the specified configuration property. If the value is not specified in the associated properties file, the supplied default value is returned instead. If the property specified in the file is poorly formatted (not and integer, not in proper array specification), a warning message will ...
[ "Fetches", "and", "returns", "the", "value", "for", "the", "specified", "configuration", "property", ".", "If", "the", "value", "is", "not", "specified", "in", "the", "associated", "properties", "file", "the", "supplied", "default", "value", "is", "returned", ...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/Config.java#L110-L121
Azure/azure-sdk-for-java
streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/OutputsInner.java
OutputsInner.listByStreamingJobAsync
public Observable<Page<OutputInner>> listByStreamingJobAsync(final String resourceGroupName, final String jobName) { """ Lists all of the outputs under the specified streaming job. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resour...
java
public Observable<Page<OutputInner>> listByStreamingJobAsync(final String resourceGroupName, final String jobName) { return listByStreamingJobWithServiceResponseAsync(resourceGroupName, jobName) .map(new Func1<ServiceResponse<Page<OutputInner>>, Page<OutputInner>>() { @Override ...
[ "public", "Observable", "<", "Page", "<", "OutputInner", ">", ">", "listByStreamingJobAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "jobName", ")", "{", "return", "listByStreamingJobWithServiceResponseAsync", "(", "resourceGroupName", ",",...
Lists all of the outputs under the specified streaming job. @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 jobName The name of the streaming job. @throws IllegalArgumentException thrown if parameter...
[ "Lists", "all", "of", "the", "outputs", "under", "the", "specified", "streaming", "job", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/OutputsInner.java#L745-L753
b3log/latke
latke-core/src/main/java/org/b3log/latke/servlet/RequestContext.java
RequestContext.renderJSONValue
public RequestContext renderJSONValue(final String name, final Object obj) { """ Renders with {"name", obj}. @param name the specified name @param obj the specified object @return this context """ if (renderer instanceof JsonRenderer) { final JsonRenderer r = (JsonRenderer) renderer; ...
java
public RequestContext renderJSONValue(final String name, final Object obj) { if (renderer instanceof JsonRenderer) { final JsonRenderer r = (JsonRenderer) renderer; final JSONObject ret = r.getJSONObject(); ret.put(name, obj); } return this; }
[ "public", "RequestContext", "renderJSONValue", "(", "final", "String", "name", ",", "final", "Object", "obj", ")", "{", "if", "(", "renderer", "instanceof", "JsonRenderer", ")", "{", "final", "JsonRenderer", "r", "=", "(", "JsonRenderer", ")", "renderer", ";",...
Renders with {"name", obj}. @param name the specified name @param obj the specified object @return this context
[ "Renders", "with", "{", "name", "obj", "}", "." ]
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/b3log/latke/servlet/RequestContext.java#L528-L537
trustathsh/ifmapj
src/main/java/de/hshannover/f4/trust/ifmapj/messages/Requests.java
Requests.createPublishDelete
public static PublishDelete createPublishDelete(Identifier i1, String filter) { """ Create a new {@link PublishDelete} instance for a specific {@link Identifier} in order to delete its metadata that matches the given filter. @param i1 the {@link Identifier} that is the target of the delete request @param filt...
java
public static PublishDelete createPublishDelete(Identifier i1, String filter) { return createPublishDelete(i1, null, filter); }
[ "public", "static", "PublishDelete", "createPublishDelete", "(", "Identifier", "i1", ",", "String", "filter", ")", "{", "return", "createPublishDelete", "(", "i1", ",", "null", ",", "filter", ")", ";", "}" ]
Create a new {@link PublishDelete} instance for a specific {@link Identifier} in order to delete its metadata that matches the given filter. @param i1 the {@link Identifier} that is the target of the delete request @param filter a filter that expresses the metadata that shall be deleted @return the new {@link PublishD...
[ "Create", "a", "new", "{", "@link", "PublishDelete", "}", "instance", "for", "a", "specific", "{", "@link", "Identifier", "}", "in", "order", "to", "delete", "its", "metadata", "that", "matches", "the", "given", "filter", "." ]
train
https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj/messages/Requests.java#L590-L592
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/trace/Span.java
Span.putAttribute
public void putAttribute(String key, AttributeValue value) { """ Sets an attribute to the {@code Span}. If the {@code Span} previously contained a mapping for the key, the old value is replaced by the specified value. @param key the key for this attribute. @param value the value for this attribute. @since 0....
java
public void putAttribute(String key, AttributeValue value) { // Not final because for performance reasons we want to override this in the implementation. // Also a default implementation is needed to not break the compatibility (users may extend this // for testing). Utils.checkNotNull(key, "key"); ...
[ "public", "void", "putAttribute", "(", "String", "key", ",", "AttributeValue", "value", ")", "{", "// Not final because for performance reasons we want to override this in the implementation.", "// Also a default implementation is needed to not break the compatibility (users may extend this"...
Sets an attribute to the {@code Span}. If the {@code Span} previously contained a mapping for the key, the old value is replaced by the specified value. @param key the key for this attribute. @param value the value for this attribute. @since 0.6
[ "Sets", "an", "attribute", "to", "the", "{", "@code", "Span", "}", ".", "If", "the", "{", "@code", "Span", "}", "previously", "contained", "a", "mapping", "for", "the", "key", "the", "old", "value", "is", "replaced", "by", "the", "specified", "value", ...
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/trace/Span.java#L95-L102
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.pressImage
public static void pressImage(ImageInputStream srcStream, ImageOutputStream destStream, Image pressImg, int x, int y, float alpha) throws IORuntimeException { """ 给图片添加图片水印<br> 此方法并不关闭流 @param srcStream 源图像流 @param destStream 目标图像流 @param pressImg 水印图片,可以使用{@link ImageIO#read(File)}方法读取文件 @param x 修正值。 默认在中...
java
public static void pressImage(ImageInputStream srcStream, ImageOutputStream destStream, Image pressImg, int x, int y, float alpha) throws IORuntimeException { pressImage(read(srcStream), destStream, pressImg, x, y, alpha); }
[ "public", "static", "void", "pressImage", "(", "ImageInputStream", "srcStream", ",", "ImageOutputStream", "destStream", ",", "Image", "pressImg", ",", "int", "x", ",", "int", "y", ",", "float", "alpha", ")", "throws", "IORuntimeException", "{", "pressImage", "("...
给图片添加图片水印<br> 此方法并不关闭流 @param srcStream 源图像流 @param destStream 目标图像流 @param pressImg 水印图片,可以使用{@link ImageIO#read(File)}方法读取文件 @param x 修正值。 默认在中间,偏移量相对于中间偏移 @param y 修正值。 默认在中间,偏移量相对于中间偏移 @param alpha 透明度:alpha 必须是范围 [0.0, 1.0] 之内(包含边界值)的一个浮点数字 @throws IORuntimeException IO异常
[ "给图片添加图片水印<br", ">", "此方法并不关闭流" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L907-L909
osmdroid/osmdroid
osmdroid-android/src/main/java/org/osmdroid/views/Projection.java
Projection.fromPixels
public IGeoPoint fromPixels(final int pPixelX, final int pPixelY, final GeoPoint pReuse) { """ note: if {@link MapView#setHorizontalMapRepetitionEnabled(boolean)} or {@link MapView#setVerticalMapRepetitionEnabled(boolean)} is false, then this can return values that beyond the max extents of the world. This may o...
java
public IGeoPoint fromPixels(final int pPixelX, final int pPixelY, final GeoPoint pReuse) { return fromPixels(pPixelX, pPixelY, pReuse, false); }
[ "public", "IGeoPoint", "fromPixels", "(", "final", "int", "pPixelX", ",", "final", "int", "pPixelY", ",", "final", "GeoPoint", "pReuse", ")", "{", "return", "fromPixels", "(", "pPixelX", ",", "pPixelY", ",", "pReuse", ",", "false", ")", ";", "}" ]
note: if {@link MapView#setHorizontalMapRepetitionEnabled(boolean)} or {@link MapView#setVerticalMapRepetitionEnabled(boolean)} is false, then this can return values that beyond the max extents of the world. This may or may not be desired. <a href="https://github.com/osmdroid/osmdroid/pull/722">https://github.com/osmdr...
[ "note", ":", "if", "{" ]
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-android/src/main/java/org/osmdroid/views/Projection.java#L163-L165
aws/aws-sdk-java
aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/model/CreateJobTemplateRequest.java
CreateJobTemplateRequest.withTags
public CreateJobTemplateRequest withTags(java.util.Map<String, String> tags) { """ The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key. @param tags The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a...
java
public CreateJobTemplateRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "CreateJobTemplateRequest", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key. @param tags The tags that you want to add to the resource. You can tag resources with a key-value pair or with only a key. @return Returns a reference to this object so that method calls can be chained togeth...
[ "The", "tags", "that", "you", "want", "to", "add", "to", "the", "resource", ".", "You", "can", "tag", "resources", "with", "a", "key", "-", "value", "pair", "or", "with", "only", "a", "key", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/model/CreateJobTemplateRequest.java#L370-L373
zxing/zxing
core/src/main/java/com/google/zxing/pdf417/PDF417Writer.java
PDF417Writer.bitMatrixFromEncoder
private static BitMatrix bitMatrixFromEncoder(PDF417 encoder, String contents, int errorCorrectionLevel, int width, int height, ...
java
private static BitMatrix bitMatrixFromEncoder(PDF417 encoder, String contents, int errorCorrectionLevel, int width, int height, ...
[ "private", "static", "BitMatrix", "bitMatrixFromEncoder", "(", "PDF417", "encoder", ",", "String", "contents", ",", "int", "errorCorrectionLevel", ",", "int", "width", ",", "int", "height", ",", "int", "margin", ")", "throws", "WriterException", "{", "encoder", ...
Takes encoder, accounts for width/height, and retrieves bit matrix
[ "Takes", "encoder", "accounts", "for", "width", "/", "height", "and", "retrieves", "bit", "matrix" ]
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/pdf417/PDF417Writer.java#L101-L136
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_easyHunting_serviceName_timeConditions_conditions_conditionId_PUT
public void billingAccount_easyHunting_serviceName_timeConditions_conditions_conditionId_PUT(String billingAccount, String serviceName, Long conditionId, OvhEasyHuntingTimeConditions body) throws IOException { """ Alter this object properties REST: PUT /telephony/{billingAccount}/easyHunting/{serviceName}/timeC...
java
public void billingAccount_easyHunting_serviceName_timeConditions_conditions_conditionId_PUT(String billingAccount, String serviceName, Long conditionId, OvhEasyHuntingTimeConditions body) throws IOException { String qPath = "/telephony/{billingAccount}/easyHunting/{serviceName}/timeConditions/conditions/{conditionId...
[ "public", "void", "billingAccount_easyHunting_serviceName_timeConditions_conditions_conditionId_PUT", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "conditionId", ",", "OvhEasyHuntingTimeConditions", "body", ")", "throws", "IOException", "{", "Stri...
Alter this object properties REST: PUT /telephony/{billingAccount}/easyHunting/{serviceName}/timeConditions/conditions/{conditionId} @param body [required] New object properties @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param conditionId [required]
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L3341-L3345
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/QueryResult.java
QueryResult.withLastEvaluatedKey
public QueryResult withLastEvaluatedKey(java.util.Map<String, AttributeValue> lastEvaluatedKey) { """ <p> The primary key of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request. </p> <p> If <code>LastEvalu...
java
public QueryResult withLastEvaluatedKey(java.util.Map<String, AttributeValue> lastEvaluatedKey) { setLastEvaluatedKey(lastEvaluatedKey); return this; }
[ "public", "QueryResult", "withLastEvaluatedKey", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "AttributeValue", ">", "lastEvaluatedKey", ")", "{", "setLastEvaluatedKey", "(", "lastEvaluatedKey", ")", ";", "return", "this", ";", "}" ]
<p> The primary key of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request. </p> <p> If <code>LastEvaluatedKey</code> is empty, then the "last page" of results has been processed and there is no more data to be retr...
[ "<p", ">", "The", "primary", "key", "of", "the", "item", "where", "the", "operation", "stopped", "inclusive", "of", "the", "previous", "result", "set", ".", "Use", "this", "value", "to", "start", "a", "new", "operation", "excluding", "this", "value", "in",...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/QueryResult.java#L431-L434
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java
HBaseUtils.mergePuts
public static Put mergePuts(byte[] keyBytes, List<Put> putList) { """ Given a list of puts, create a new put with the values in each put merged together. It is expected that no puts have a value for the same fully qualified column. Return the new put. @param key The key of the new put. @param putList The l...
java
public static Put mergePuts(byte[] keyBytes, List<Put> putList) { Put put = new Put(keyBytes); for (Put putToMerge : putList) { Map<byte[], List<KeyValue>> familyMap = (Map<byte[], List<KeyValue>>) GET_FAMILY_MAP_METHOD.invoke(putToMerge); for (List<KeyValue> keyValueList : familyM...
[ "public", "static", "Put", "mergePuts", "(", "byte", "[", "]", "keyBytes", ",", "List", "<", "Put", ">", "putList", ")", "{", "Put", "put", "=", "new", "Put", "(", "keyBytes", ")", ";", "for", "(", "Put", "putToMerge", ":", "putList", ")", "{", "Ma...
Given a list of puts, create a new put with the values in each put merged together. It is expected that no puts have a value for the same fully qualified column. Return the new put. @param key The key of the new put. @param putList The list of puts to merge @return the new Put instance
[ "Given", "a", "list", "of", "puts", "create", "a", "new", "put", "with", "the", "values", "in", "each", "put", "merged", "together", ".", "It", "is", "expected", "that", "no", "puts", "have", "a", "value", "for", "the", "same", "fully", "qualified", "c...
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java#L65-L80
awltech/org.parallelj
parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/launching/Launcher.java
Launcher.newLaunch
public <T> Launch<T> newLaunch(Class<? extends T> programClass) throws LaunchException { """ Create a new instance of {@link Launch} for a {@link org.parallelj.Program Program} execution. @param programClass The class of the {@link org.parallelj.Program Program}. @return a {@link Launch} instance. @t...
java
public <T> Launch<T> newLaunch(Class<? extends T> programClass) throws LaunchException { return newLaunch(programClass, null); }
[ "public", "<", "T", ">", "Launch", "<", "T", ">", "newLaunch", "(", "Class", "<", "?", "extends", "T", ">", "programClass", ")", "throws", "LaunchException", "{", "return", "newLaunch", "(", "programClass", ",", "null", ")", ";", "}" ]
Create a new instance of {@link Launch} for a {@link org.parallelj.Program Program} execution. @param programClass The class of the {@link org.parallelj.Program Program}. @return a {@link Launch} instance. @throws LaunchException
[ "Create", "a", "new", "instance", "of", "{", "@link", "Launch", "}", "for", "a", "{", "@link", "org", ".", "parallelj", ".", "Program", "Program", "}", "execution", "." ]
train
https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/launching/Launcher.java#L69-L72
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.serviceName_option_option_DELETE
public void serviceName_option_option_DELETE(String serviceName, net.minidev.ovh.api.dedicated.server.OvhOptionEnum option) throws IOException { """ Release a given option REST: DELETE /dedicated/server/{serviceName}/option/{option} @param serviceName [required] The internal name of your dedicated server @par...
java
public void serviceName_option_option_DELETE(String serviceName, net.minidev.ovh.api.dedicated.server.OvhOptionEnum option) throws IOException { String qPath = "/dedicated/server/{serviceName}/option/{option}"; StringBuilder sb = path(qPath, serviceName, option); exec(qPath, "DELETE", sb.toString(), null); }
[ "public", "void", "serviceName_option_option_DELETE", "(", "String", "serviceName", ",", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "dedicated", ".", "server", ".", "OvhOptionEnum", "option", ")", "throws", "IOException", "{", "String", "qPath", "=", ...
Release a given option REST: DELETE /dedicated/server/{serviceName}/option/{option} @param serviceName [required] The internal name of your dedicated server @param option [required] The option name
[ "Release", "a", "given", "option" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L1571-L1575
michael-rapp/AndroidUtil
library/src/main/java/de/mrapp/android/util/view/ExpandableGridView.java
ExpandableGridView.createItemLongClickListener
private OnItemLongClickListener createItemLongClickListener() { """ Creates and returns a listener, which allows to delegate, when any item of the grid view has been long-clicked, to the appropriate listeners. @return The listener, which has been created, as an instance of the type {@link OnItemLongClickListe...
java
private OnItemLongClickListener createItemLongClickListener() { return new OnItemLongClickListener() { @Override public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) { Pair<Integer, Integer> it...
[ "private", "OnItemLongClickListener", "createItemLongClickListener", "(", ")", "{", "return", "new", "OnItemLongClickListener", "(", ")", "{", "@", "Override", "public", "boolean", "onItemLongClick", "(", "AdapterView", "<", "?", ">", "parent", ",", "View", "view", ...
Creates and returns a listener, which allows to delegate, when any item of the grid view has been long-clicked, to the appropriate listeners. @return The listener, which has been created, as an instance of the type {@link OnItemLongClickListener}
[ "Creates", "and", "returns", "a", "listener", "which", "allows", "to", "delegate", "when", "any", "item", "of", "the", "grid", "view", "has", "been", "long", "-", "clicked", "to", "the", "appropriate", "listeners", "." ]
train
https://github.com/michael-rapp/AndroidUtil/blob/67ec0e5732344eeb4d946dd1f96d782939e449f4/library/src/main/java/de/mrapp/android/util/view/ExpandableGridView.java#L362-L386
algolia/instantsearch-android
core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java
Searcher.addFacetRefinement
@SuppressWarnings( { """ Adds a facet refinement for the next queries. <p> <b>This method resets the current page to 0.</b> @param attribute the facet name. @param values an eventual list of values to refine on. @param isDisjunctive if {@code true}, the facet will be added as a disjunctive facet....
java
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users public Searcher addFacetRefinement(@NonNull String attribute, @Nullable List<String> values, boolean isDisjunctive) { if (values == null) { values = new ArrayList<>(); } if (isDisjunctive) { disjunctiv...
[ "@", "SuppressWarnings", "(", "{", "\"WeakerAccess\"", ",", "\"unused\"", "}", ")", "// For library users", "public", "Searcher", "addFacetRefinement", "(", "@", "NonNull", "String", "attribute", ",", "@", "Nullable", "List", "<", "String", ">", "values", ",", "...
Adds a facet refinement for the next queries. <p> <b>This method resets the current page to 0.</b> @param attribute the facet name. @param values an eventual list of values to refine on. @param isDisjunctive if {@code true}, the facet will be added as a disjunctive facet.
[ "Adds", "a", "facet", "refinement", "for", "the", "next", "queries", ".", "<p", ">", "<b", ">", "This", "method", "resets", "the", "current", "page", "to", "0", ".", "<", "/", "b", ">" ]
train
https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java#L562-L577
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Flowable.java
Flowable.concatMapCompletable
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.FULL) public final Completable concatMapCompletable(Function<? super T, ? extends CompletableSource> mapper, int prefetch) { """ Maps the upstream items into {@link CompletableSource}s and subscribes to the...
java
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.FULL) public final Completable concatMapCompletable(Function<? super T, ? extends CompletableSource> mapper, int prefetch) { ObjectHelper.requireNonNull(mapper, "mapper is null"); ObjectHelper.ve...
[ "@", "CheckReturnValue", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "@", "BackpressureSupport", "(", "BackpressureKind", ".", "FULL", ")", "public", "final", "Completable", "concatMapCompletable", "(", "Function", "<", "?", "super", "T", "...
Maps the upstream items into {@link CompletableSource}s and subscribes to them one after the other completes. <p> <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/concatMap.png" alt=""> <dl> <dt><b>Backpressure:</b></dt> <dd>The operator expects the upstream to support...
[ "Maps", "the", "upstream", "items", "into", "{" ]
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Flowable.java#L7182-L7189
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/core/ServerParams.java
ServerParams.getModuleParam
public Object getModuleParam(String moduleName, String paramName) { """ Get the value of the given parameter name belonging to the given module name. If no such module/parameter name is known, null is returned. Otherwise, the parsed parameter is returned as an Object. This may be a String, Map, or List depending...
java
public Object getModuleParam(String moduleName, String paramName) { Map<String, Object> moduleParams = getModuleParams(moduleName); if (moduleParams == null) { return null; } return moduleParams.get(paramName); }
[ "public", "Object", "getModuleParam", "(", "String", "moduleName", ",", "String", "paramName", ")", "{", "Map", "<", "String", ",", "Object", ">", "moduleParams", "=", "getModuleParams", "(", "moduleName", ")", ";", "if", "(", "moduleParams", "==", "null", "...
Get the value of the given parameter name belonging to the given module name. If no such module/parameter name is known, null is returned. Otherwise, the parsed parameter is returned as an Object. This may be a String, Map, or List depending on the parameter's structure. @param moduleName Name of module to get para...
[ "Get", "the", "value", "of", "the", "given", "parameter", "name", "belonging", "to", "the", "given", "module", "name", ".", "If", "no", "such", "module", "/", "parameter", "name", "is", "known", "null", "is", "returned", ".", "Otherwise", "the", "parsed", ...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/ServerParams.java#L295-L301
sarxos/webcam-capture
webcam-capture/src/main/java/com/github/sarxos/webcam/Webcam.java
Webcam.getWebcams
public static List<Webcam> getWebcams(long timeout) throws TimeoutException, WebcamException { """ Get list of webcams to use. This method will wait given time interval for webcam devices to be discovered. Time argument is given in milliseconds. @param timeout the time to wait for webcam devices to be discover...
java
public static List<Webcam> getWebcams(long timeout) throws TimeoutException, WebcamException { if (timeout < 0) { throw new IllegalArgumentException(String.format("Timeout cannot be negative (%d)", timeout)); } return getWebcams(timeout, TimeUnit.MILLISECONDS); }
[ "public", "static", "List", "<", "Webcam", ">", "getWebcams", "(", "long", "timeout", ")", "throws", "TimeoutException", ",", "WebcamException", "{", "if", "(", "timeout", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "String", ".", "f...
Get list of webcams to use. This method will wait given time interval for webcam devices to be discovered. Time argument is given in milliseconds. @param timeout the time to wait for webcam devices to be discovered @return List of webcams existing in the ssytem @throws TimeoutException when timeout occurs @throws Webc...
[ "Get", "list", "of", "webcams", "to", "use", ".", "This", "method", "will", "wait", "given", "time", "interval", "for", "webcam", "devices", "to", "be", "discovered", ".", "Time", "argument", "is", "given", "in", "milliseconds", "." ]
train
https://github.com/sarxos/webcam-capture/blob/efbdae04f9ba48db9ec621e94a9bcd6f031882c8/webcam-capture/src/main/java/com/github/sarxos/webcam/Webcam.java#L862-L867
kiegroup/drools
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/FEELImpl.java
FEELImpl.newEvaluationContext
public EvaluationContextImpl newEvaluationContext(ClassLoader cl, Collection<FEELEventListener> listeners, Map<String, Object> inputVariables) { """ Creates a new EvaluationContext with the supplied classloader, and the supplied parameters listeners and inputVariables """ FEELEventListenersManager even...
java
public EvaluationContextImpl newEvaluationContext(ClassLoader cl, Collection<FEELEventListener> listeners, Map<String, Object> inputVariables) { FEELEventListenersManager eventsManager = getEventsManager(listeners); EvaluationContextImpl ctx = new EvaluationContextImpl(cl, eventsManager, inputVariables....
[ "public", "EvaluationContextImpl", "newEvaluationContext", "(", "ClassLoader", "cl", ",", "Collection", "<", "FEELEventListener", ">", "listeners", ",", "Map", "<", "String", ",", "Object", ">", "inputVariables", ")", "{", "FEELEventListenersManager", "eventsManager", ...
Creates a new EvaluationContext with the supplied classloader, and the supplied parameters listeners and inputVariables
[ "Creates", "a", "new", "EvaluationContext", "with", "the", "supplied", "classloader", "and", "the", "supplied", "parameters", "listeners", "and", "inputVariables" ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/FEELImpl.java#L177-L190
aws/aws-sdk-java
aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/model/S3Location.java
S3Location.withTagging
public S3Location withTagging(java.util.Map<String, String> tagging) { """ <p> The tag-set that is applied to the job results. </p> @param tagging The tag-set that is applied to the job results. @return Returns a reference to this object so that method calls can be chained together. """ setTaggi...
java
public S3Location withTagging(java.util.Map<String, String> tagging) { setTagging(tagging); return this; }
[ "public", "S3Location", "withTagging", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tagging", ")", "{", "setTagging", "(", "tagging", ")", ";", "return", "this", ";", "}" ]
<p> The tag-set that is applied to the job results. </p> @param tagging The tag-set that is applied to the job results. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "tag", "-", "set", "that", "is", "applied", "to", "the", "job", "results", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/model/S3Location.java#L361-L364
eduarddrenth/ConfigurableReports
src/main/java/com/vectorprint/report/itext/DefaultElementProducer.java
DefaultElementProducer.createAnchor
public Anchor createAnchor(Object data, Collection<? extends BaseStyler> stylers) throws VectorPrintException { """ Create a Anchor, style it and add the data @param data @param stylers @return @throws VectorPrintException """ return initTextElementArray(styleHelper.style(new Anchor(Float.NaN), dat...
java
public Anchor createAnchor(Object data, Collection<? extends BaseStyler> stylers) throws VectorPrintException { return initTextElementArray(styleHelper.style(new Anchor(Float.NaN), data, stylers), data, stylers); }
[ "public", "Anchor", "createAnchor", "(", "Object", "data", ",", "Collection", "<", "?", "extends", "BaseStyler", ">", "stylers", ")", "throws", "VectorPrintException", "{", "return", "initTextElementArray", "(", "styleHelper", ".", "style", "(", "new", "Anchor", ...
Create a Anchor, style it and add the data @param data @param stylers @return @throws VectorPrintException
[ "Create", "a", "Anchor", "style", "it", "and", "add", "the", "data" ]
train
https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/DefaultElementProducer.java#L237-L239
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/property/PropertyAccessorHelper.java
PropertyAccessorHelper.getString
public static String getString(Object from, Field field) { """ Gets the string. @param from the from @param field the field @return the string @throws PropertyAccessException the property access exception """ PropertyAccessor<?> accessor = PropertyAccessorFactory.getPropertyAccessor(field...
java
public static String getString(Object from, Field field) { PropertyAccessor<?> accessor = PropertyAccessorFactory.getPropertyAccessor(field); Object object = getObject(from, field); return object != null ? accessor.toString(object) : null; }
[ "public", "static", "String", "getString", "(", "Object", "from", ",", "Field", "field", ")", "{", "PropertyAccessor", "<", "?", ">", "accessor", "=", "PropertyAccessorFactory", ".", "getPropertyAccessor", "(", "field", ")", ";", "Object", "object", "=", "getO...
Gets the string. @param from the from @param field the field @return the string @throws PropertyAccessException the property access exception
[ "Gets", "the", "string", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/property/PropertyAccessorHelper.java#L193-L198
thombergs/docx-stamper
src/main/java/org/wickedsource/docxstamper/util/RunUtil.java
RunUtil.setText
public static void setText(R run, String text) { """ Sets the text of the given run to the given value. @param run the run whose text to change. @param text the text to set. """ run.getContent().clear(); Text textObj = factory.createText(); textObj.setSpace("preserve"); tex...
java
public static void setText(R run, String text) { run.getContent().clear(); Text textObj = factory.createText(); textObj.setSpace("preserve"); textObj.setValue(text); textObj.setSpace("preserve"); // make the text preserve spaces run.getContent().add(textObj); }
[ "public", "static", "void", "setText", "(", "R", "run", ",", "String", "text", ")", "{", "run", ".", "getContent", "(", ")", ".", "clear", "(", ")", ";", "Text", "textObj", "=", "factory", ".", "createText", "(", ")", ";", "textObj", ".", "setSpace",...
Sets the text of the given run to the given value. @param run the run whose text to change. @param text the text to set.
[ "Sets", "the", "text", "of", "the", "given", "run", "to", "the", "given", "value", "." ]
train
https://github.com/thombergs/docx-stamper/blob/f1a7e3e92a59abaffac299532fe49450c3b041eb/src/main/java/org/wickedsource/docxstamper/util/RunUtil.java#L67-L74
alipay/sofa-rpc
core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AllConnectConnectionHolder.java
AllConnectConnectionHolder.subHealthToRetry
protected void subHealthToRetry(ProviderInfo providerInfo, ClientTransport transport) { """ 从亚健康丢到重试列表 @param providerInfo Provider @param transport 连接 """ providerLock.lock(); try { if (subHealthConnections.remove(providerInfo) != null) { retryConnections.put...
java
protected void subHealthToRetry(ProviderInfo providerInfo, ClientTransport transport) { providerLock.lock(); try { if (subHealthConnections.remove(providerInfo) != null) { retryConnections.put(providerInfo, transport); } } finally { providerLoc...
[ "protected", "void", "subHealthToRetry", "(", "ProviderInfo", "providerInfo", ",", "ClientTransport", "transport", ")", "{", "providerLock", ".", "lock", "(", ")", ";", "try", "{", "if", "(", "subHealthConnections", ".", "remove", "(", "providerInfo", ")", "!=",...
从亚健康丢到重试列表 @param providerInfo Provider @param transport 连接
[ "从亚健康丢到重试列表" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AllConnectConnectionHolder.java#L234-L243
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/property/GeoPackageJavaProperties.java
GeoPackageJavaProperties.getColorProperty
public static Color getColorProperty(String key, boolean required) { """ Get a color by key @param key key @param required required flag @return property value """ Color value = null; String redProperty = key + JavaPropertyConstants.PROPERTY_DIVIDER + JavaPropertyConstants.COLOR_RED; String g...
java
public static Color getColorProperty(String key, boolean required) { Color value = null; String redProperty = key + JavaPropertyConstants.PROPERTY_DIVIDER + JavaPropertyConstants.COLOR_RED; String greenProperty = key + JavaPropertyConstants.PROPERTY_DIVIDER + JavaPropertyConstants.COLOR_GREEN; String b...
[ "public", "static", "Color", "getColorProperty", "(", "String", "key", ",", "boolean", "required", ")", "{", "Color", "value", "=", "null", ";", "String", "redProperty", "=", "key", "+", "JavaPropertyConstants", ".", "PROPERTY_DIVIDER", "+", "JavaPropertyConstants...
Get a color by key @param key key @param required required flag @return property value
[ "Get", "a", "color", "by", "key" ]
train
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/property/GeoPackageJavaProperties.java#L287-L308
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/multilayer/MultiLayerNetwork.java
MultiLayerNetwork.calculateGradients
public Pair<Gradient,INDArray> calculateGradients(@NonNull INDArray features, @NonNull INDArray label, INDArray fMask, INDArray labelMask) { """ Calculate parameter gradients and input activation gradients given the input and labels, and optionally mask arrays ...
java
public Pair<Gradient,INDArray> calculateGradients(@NonNull INDArray features, @NonNull INDArray label, INDArray fMask, INDArray labelMask) { try{ return calculateGradientsHelper(features, label, fMask, labelMask); } catch (OutOfMemoryErro...
[ "public", "Pair", "<", "Gradient", ",", "INDArray", ">", "calculateGradients", "(", "@", "NonNull", "INDArray", "features", ",", "@", "NonNull", "INDArray", "label", ",", "INDArray", "fMask", ",", "INDArray", "labelMask", ")", "{", "try", "{", "return", "cal...
Calculate parameter gradients and input activation gradients given the input and labels, and optionally mask arrays @param features Features for gradient calculation @param label Labels for gradient @param fMask Features mask array (may be null) @param labelMask Label mask array (may be null) @return A pair o...
[ "Calculate", "parameter", "gradients", "and", "input", "activation", "gradients", "given", "the", "input", "and", "labels", "and", "optionally", "mask", "arrays" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/multilayer/MultiLayerNetwork.java#L1708-L1716
lessthanoptimal/BoofCV
integration/boofcv-ffmpeg/src/main/java/org/bytedeco/copiedstuff/Java2DFrameConverter.java
Java2DFrameConverter.getFrame
public Frame getFrame(BufferedImage image, double gamma, boolean flipChannels) { """ Returns a Frame based on a BufferedImage, given gamma, and inverted channels flag. """ if (image == null) { return null; } SampleModel sm = image.getSampleModel(); int depth = 0, numChannels = sm.getNumBands(); sw...
java
public Frame getFrame(BufferedImage image, double gamma, boolean flipChannels) { if (image == null) { return null; } SampleModel sm = image.getSampleModel(); int depth = 0, numChannels = sm.getNumBands(); switch (image.getType()) { case BufferedImage.TYPE_INT_RGB: case BufferedImage.TYPE_INT_ARGB: ...
[ "public", "Frame", "getFrame", "(", "BufferedImage", "image", ",", "double", "gamma", ",", "boolean", "flipChannels", ")", "{", "if", "(", "image", "==", "null", ")", "{", "return", "null", ";", "}", "SampleModel", "sm", "=", "image", ".", "getSampleModel"...
Returns a Frame based on a BufferedImage, given gamma, and inverted channels flag.
[ "Returns", "a", "Frame", "based", "on", "a", "BufferedImage", "given", "gamma", "and", "inverted", "channels", "flag", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-ffmpeg/src/main/java/org/bytedeco/copiedstuff/Java2DFrameConverter.java#L680-L712
operasoftware/operaprestodriver
src/com/opera/core/systems/arguments/OperaArgument.java
OperaArgument.hasSwitch
private static Boolean hasSwitch(String key, String sign) { """ Determines whether given argument key contains given argument sign. @param key the argument key to check @param sign the sign to check for @return true if key contains sign as first characters, false otherwise @see OperaArgumentSign """ ...
java
private static Boolean hasSwitch(String key, String sign) { return (key.length() > sign.length()) && key.substring(0, sign.length()).equals(sign); }
[ "private", "static", "Boolean", "hasSwitch", "(", "String", "key", ",", "String", "sign", ")", "{", "return", "(", "key", ".", "length", "(", ")", ">", "sign", ".", "length", "(", ")", ")", "&&", "key", ".", "substring", "(", "0", ",", "sign", ".",...
Determines whether given argument key contains given argument sign. @param key the argument key to check @param sign the sign to check for @return true if key contains sign as first characters, false otherwise @see OperaArgumentSign
[ "Determines", "whether", "given", "argument", "key", "contains", "given", "argument", "sign", "." ]
train
https://github.com/operasoftware/operaprestodriver/blob/1ccceda80f1c1a0489171d17dcaa6e7b18fb4c01/src/com/opera/core/systems/arguments/OperaArgument.java#L137-L139
zaproxy/zaproxy
src/org/zaproxy/zap/view/StandardFieldsDialog.java
StandardFieldsDialog.createTabScrollable
protected JScrollPane createTabScrollable(String tabLabel, JPanel tabPanel) { """ Creates and returns a {@link JScrollPane} for the given panel. Called when a tab is {@link #setTabScrollable(String, boolean) set to be scrollable}. <p> By default this method returns a {@code JScrollPane} that has the vertical an...
java
protected JScrollPane createTabScrollable(String tabLabel, JPanel tabPanel) { return new JScrollPane(tabPanel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); }
[ "protected", "JScrollPane", "createTabScrollable", "(", "String", "tabLabel", ",", "JPanel", "tabPanel", ")", "{", "return", "new", "JScrollPane", "(", "tabPanel", ",", "JScrollPane", ".", "VERTICAL_SCROLLBAR_AS_NEEDED", ",", "JScrollPane", ".", "HORIZONTAL_SCROLLBAR_AS...
Creates and returns a {@link JScrollPane} for the given panel. Called when a tab is {@link #setTabScrollable(String, boolean) set to be scrollable}. <p> By default this method returns a {@code JScrollPane} that has the vertical and horizontal scrollbars shown as needed. @param tabLabel the label of the tab, as set dur...
[ "Creates", "and", "returns", "a", "{", "@link", "JScrollPane", "}", "for", "the", "given", "panel", ".", "Called", "when", "a", "tab", "is", "{", "@link", "#setTabScrollable", "(", "String", "boolean", ")", "set", "to", "be", "scrollable", "}", ".", "<p"...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/StandardFieldsDialog.java#L1939-L1941
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/config/jmx/JawrApplicationConfigManager.java
JawrApplicationConfigManager.getStringValue
public String getStringValue(String property) { """ Returns the string value of the configuration managers @param property the property to retrieve @return the string value of the configuration managers """ final List<JawrConfigManagerMBean> mBeans = getInitializedConfigurationManagers(); try { i...
java
public String getStringValue(String property) { final List<JawrConfigManagerMBean> mBeans = getInitializedConfigurationManagers(); try { if (mBeans.size() == 3) { if (areEquals(getProperty(jsMBean, property), getProperty(cssMBean, property), getProperty(binaryMBean, property))) { return getPro...
[ "public", "String", "getStringValue", "(", "String", "property", ")", "{", "final", "List", "<", "JawrConfigManagerMBean", ">", "mBeans", "=", "getInitializedConfigurationManagers", "(", ")", ";", "try", "{", "if", "(", "mBeans", ".", "size", "(", ")", "==", ...
Returns the string value of the configuration managers @param property the property to retrieve @return the string value of the configuration managers
[ "Returns", "the", "string", "value", "of", "the", "configuration", "managers" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/config/jmx/JawrApplicationConfigManager.java#L512-L547
d-sauer/JCalcAPI
src/main/java/org/jdice/calc/Properties.java
Properties.getInheritedScale
public static int getInheritedScale(AbstractCalculator calc, Num value) { """ If {@link Num} don't define scale then use scale from {@link AbstractCalculator} instance. Othervise use default scale {@link Properties#DEFAULT_SCALE} @param calc @param value """ if (value.getScale() == null) { ...
java
public static int getInheritedScale(AbstractCalculator calc, Num value) { if (value.getScale() == null) { if (calc != null && calc.getScale() != null) return calc.getScale(); else return Properties.DEFAULT_SCALE; } else ...
[ "public", "static", "int", "getInheritedScale", "(", "AbstractCalculator", "calc", ",", "Num", "value", ")", "{", "if", "(", "value", ".", "getScale", "(", ")", "==", "null", ")", "{", "if", "(", "calc", "!=", "null", "&&", "calc", ".", "getScale", "("...
If {@link Num} don't define scale then use scale from {@link AbstractCalculator} instance. Othervise use default scale {@link Properties#DEFAULT_SCALE} @param calc @param value
[ "If", "{", "@link", "Num", "}", "don", "t", "define", "scale", "then", "use", "scale", "from", "{", "@link", "AbstractCalculator", "}", "instance", ".", "Othervise", "use", "default", "scale", "{", "@link", "Properties#DEFAULT_SCALE", "}" ]
train
https://github.com/d-sauer/JCalcAPI/blob/36ae1f9adfe611a6f1bd8ef87cf1dc0ec88ac035/src/main/java/org/jdice/calc/Properties.java#L435-L444
geomajas/geomajas-project-server
plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java
PdfContext.drawImage
public void drawImage(Image img, Rectangle rect, Rectangle clipRect) { """ Draws the specified image with the first rectangle's bounds, clipping with the second one and adding transparency. @param img image @param rect rectangle @param clipRect clipping bounds """ drawImage(img, rect, clipRect, 1); }
java
public void drawImage(Image img, Rectangle rect, Rectangle clipRect) { drawImage(img, rect, clipRect, 1); }
[ "public", "void", "drawImage", "(", "Image", "img", ",", "Rectangle", "rect", ",", "Rectangle", "clipRect", ")", "{", "drawImage", "(", "img", ",", "rect", ",", "clipRect", ",", "1", ")", ";", "}" ]
Draws the specified image with the first rectangle's bounds, clipping with the second one and adding transparency. @param img image @param rect rectangle @param clipRect clipping bounds
[ "Draws", "the", "specified", "image", "with", "the", "first", "rectangle", "s", "bounds", "clipping", "with", "the", "second", "one", "and", "adding", "transparency", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java#L389-L391
box/box-java-sdk
src/main/java/com/box/sdk/BoxStoragePolicyAssignment.java
BoxStoragePolicyAssignment.getAssignmentForTarget
public static BoxStoragePolicyAssignment.Info getAssignmentForTarget(final BoxAPIConnection api, String resolvedForType, String resolvedForID) { """ Returns a BoxStoragePolicyAssignment information. @param api the API connecti...
java
public static BoxStoragePolicyAssignment.Info getAssignmentForTarget(final BoxAPIConnection api, String resolvedForType, String resolvedForID) { QueryStringBuilder builder = new QueryStringBuilder(); builder.appendParam("resolved_f...
[ "public", "static", "BoxStoragePolicyAssignment", ".", "Info", "getAssignmentForTarget", "(", "final", "BoxAPIConnection", "api", ",", "String", "resolvedForType", ",", "String", "resolvedForID", ")", "{", "QueryStringBuilder", "builder", "=", "new", "QueryStringBuilder",...
Returns a BoxStoragePolicyAssignment information. @param api the API connection to be used by the resource. @param resolvedForType the assigned entity type for the storage policy. @param resolvedForID the assigned entity id for the storage policy. @return information about this {@link BoxStorageP...
[ "Returns", "a", "BoxStoragePolicyAssignment", "information", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxStoragePolicyAssignment.java#L88-L103
Samsung/GearVRf
GVRf/Extensions/3DCursor/3DCursorLibrary/src/main/java/org/gearvrf/io/cursor3d/CursorManager.java
CursorManager.updateCursorsInScene
private void updateCursorsInScene(GVRScene scene, boolean add) { """ Add or remove the active cursors from the provided scene. @param scene The GVRScene. @param add <code>true</code> for add, <code>false</code> to remove """ synchronized (mCursors) { for (Cursor cursor : mCursors) { ...
java
private void updateCursorsInScene(GVRScene scene, boolean add) { synchronized (mCursors) { for (Cursor cursor : mCursors) { if (cursor.isActive()) { if (add) { addCursorToScene(cursor); } else { r...
[ "private", "void", "updateCursorsInScene", "(", "GVRScene", "scene", ",", "boolean", "add", ")", "{", "synchronized", "(", "mCursors", ")", "{", "for", "(", "Cursor", "cursor", ":", "mCursors", ")", "{", "if", "(", "cursor", ".", "isActive", "(", ")", ")...
Add or remove the active cursors from the provided scene. @param scene The GVRScene. @param add <code>true</code> for add, <code>false</code> to remove
[ "Add", "or", "remove", "the", "active", "cursors", "from", "the", "provided", "scene", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/3DCursor/3DCursorLibrary/src/main/java/org/gearvrf/io/cursor3d/CursorManager.java#L621-L633
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.getAward
public GitlabAward getAward(GitlabIssue issue, Integer awardId) throws IOException { """ Get a specific award for an issue @param issue @param awardId @throws IOException on gitlab api call error """ String tailUrl = GitlabProject.URL + "/" + issue.getProjectId() + GitlabIssue.URL + "/" + issue.ge...
java
public GitlabAward getAward(GitlabIssue issue, Integer awardId) throws IOException { String tailUrl = GitlabProject.URL + "/" + issue.getProjectId() + GitlabIssue.URL + "/" + issue.getId() + GitlabAward.URL + "/" + awardId; return retrieve().to(tailUrl, GitlabAward.class); }
[ "public", "GitlabAward", "getAward", "(", "GitlabIssue", "issue", ",", "Integer", "awardId", ")", "throws", "IOException", "{", "String", "tailUrl", "=", "GitlabProject", ".", "URL", "+", "\"/\"", "+", "issue", ".", "getProjectId", "(", ")", "+", "GitlabIssue"...
Get a specific award for an issue @param issue @param awardId @throws IOException on gitlab api call error
[ "Get", "a", "specific", "award", "for", "an", "issue" ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L3518-L3523
headius/invokebinder
src/main/java/com/headius/invokebinder/SmartHandle.java
SmartHandle.dropLast
public SmartHandle dropLast(String newName, Class<?> type) { """ Drop an argument from the handle at the end, returning a new SmartHandle. @param newName name of the argument @param type type of the argument @return a new SmartHandle with the additional argument """ return new SmartHandle(signatu...
java
public SmartHandle dropLast(String newName, Class<?> type) { return new SmartHandle(signature.appendArg(newName, type), MethodHandles.dropArguments(handle, signature.argOffset(newName), type)); }
[ "public", "SmartHandle", "dropLast", "(", "String", "newName", ",", "Class", "<", "?", ">", "type", ")", "{", "return", "new", "SmartHandle", "(", "signature", ".", "appendArg", "(", "newName", ",", "type", ")", ",", "MethodHandles", ".", "dropArguments", ...
Drop an argument from the handle at the end, returning a new SmartHandle. @param newName name of the argument @param type type of the argument @return a new SmartHandle with the additional argument
[ "Drop", "an", "argument", "from", "the", "handle", "at", "the", "end", "returning", "a", "new", "SmartHandle", "." ]
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/SmartHandle.java#L204-L206
grpc/grpc-java
stub/src/main/java/io/grpc/stub/MetadataUtils.java
MetadataUtils.attachHeaders
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1789") public static <T extends AbstractStub<T>> T attachHeaders(T stub, Metadata extraHeaders) { """ Attaches a set of request headers to a stub. @param stub to bind the headers to. @param extraHeaders the headers to be passed by each call on the re...
java
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1789") public static <T extends AbstractStub<T>> T attachHeaders(T stub, Metadata extraHeaders) { return stub.withInterceptors(newAttachHeadersInterceptor(extraHeaders)); }
[ "@", "ExperimentalApi", "(", "\"https://github.com/grpc/grpc-java/issues/1789\"", ")", "public", "static", "<", "T", "extends", "AbstractStub", "<", "T", ">", ">", "T", "attachHeaders", "(", "T", "stub", ",", "Metadata", "extraHeaders", ")", "{", "return", "stub",...
Attaches a set of request headers to a stub. @param stub to bind the headers to. @param extraHeaders the headers to be passed by each call on the returned stub. @return an implementation of the stub with {@code extraHeaders} bound to each call.
[ "Attaches", "a", "set", "of", "request", "headers", "to", "a", "stub", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/stub/src/main/java/io/grpc/stub/MetadataUtils.java#L47-L50
nohana/Amalgam
amalgam/src/main/java/com/amalgam/app/SupportSimpleAlertDialogFragment.java
SupportSimpleAlertDialogFragment.newInstance
public static SupportSimpleAlertDialogFragment newInstance(int titleResId, int messageResId) { """ Construct {@link com.amalgam.app.SupportSimpleAlertDialogFragment} with the specified message and title resource. @param titleResId to show as an alert dialog title. @param messageResId to show on alert dialog @re...
java
public static SupportSimpleAlertDialogFragment newInstance(int titleResId, int messageResId) { SupportSimpleAlertDialogFragment fragment = new SupportSimpleAlertDialogFragment(); Bundle args = new Bundle(); args.putInt(ARGS_MESSAGE_RES, messageResId); args.putInt(ARGS_TITLE_RES, titleRes...
[ "public", "static", "SupportSimpleAlertDialogFragment", "newInstance", "(", "int", "titleResId", ",", "int", "messageResId", ")", "{", "SupportSimpleAlertDialogFragment", "fragment", "=", "new", "SupportSimpleAlertDialogFragment", "(", ")", ";", "Bundle", "args", "=", "...
Construct {@link com.amalgam.app.SupportSimpleAlertDialogFragment} with the specified message and title resource. @param titleResId to show as an alert dialog title. @param messageResId to show on alert dialog @return simplified alert dialog fragment.
[ "Construct", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/app/SupportSimpleAlertDialogFragment.java#L58-L65
syphr42/prom
src/main/java/org/syphr/prom/PropertiesManager.java
PropertiesManager.getEnumProperty
public <E extends Enum<E>> E getEnumProperty(T property, Class<E> type) throws IllegalArgumentException { """ Retrieve the value of the given property as an Enum constant of the given type.<br> <br> Note that this method requires the Enum constants to all have upper case names (following Java naming convention...
java
public <E extends Enum<E>> E getEnumProperty(T property, Class<E> type) throws IllegalArgumentException { return Enum.valueOf(type, getProperty(property).toUpperCase()); }
[ "public", "<", "E", "extends", "Enum", "<", "E", ">", ">", "E", "getEnumProperty", "(", "T", "property", ",", "Class", "<", "E", ">", "type", ")", "throws", "IllegalArgumentException", "{", "return", "Enum", ".", "valueOf", "(", "type", ",", "getProperty...
Retrieve the value of the given property as an Enum constant of the given type.<br> <br> Note that this method requires the Enum constants to all have upper case names (following Java naming conventions). This allows for case insensitivity in the properties file. @param <E> the type of Enum that will be returned @para...
[ "Retrieve", "the", "value", "of", "the", "given", "property", "as", "an", "Enum", "constant", "of", "the", "given", "type", ".", "<br", ">", "<br", ">", "Note", "that", "this", "method", "requires", "the", "Enum", "constants", "to", "all", "have", "upper...
train
https://github.com/syphr42/prom/blob/074d67c4ebb3afb0b163fcb0bc4826ee577ac803/src/main/java/org/syphr/prom/PropertiesManager.java#L582-L585
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/dom2dtm/DOM2DTM.java
DOM2DTM.getNodeData
protected static void getNodeData(Node node, FastStringBuffer buf) { """ Retrieve the text content of a DOM subtree, appending it into a user-supplied FastStringBuffer object. Note that attributes are not considered part of the content of an element. <p> There are open questions regarding whitespace stripping....
java
protected static void getNodeData(Node node, FastStringBuffer buf) { switch (node.getNodeType()) { case Node.DOCUMENT_FRAGMENT_NODE : case Node.DOCUMENT_NODE : case Node.ELEMENT_NODE : { for (Node child = node.getFirstChild(); null != child; child = child.getNextSibling())...
[ "protected", "static", "void", "getNodeData", "(", "Node", "node", ",", "FastStringBuffer", "buf", ")", "{", "switch", "(", "node", ".", "getNodeType", "(", ")", ")", "{", "case", "Node", ".", "DOCUMENT_FRAGMENT_NODE", ":", "case", "Node", ".", "DOCUMENT_NOD...
Retrieve the text content of a DOM subtree, appending it into a user-supplied FastStringBuffer object. Note that attributes are not considered part of the content of an element. <p> There are open questions regarding whitespace stripping. Currently we make no special effort in that regard, since the standard DOM doesn'...
[ "Retrieve", "the", "text", "content", "of", "a", "DOM", "subtree", "appending", "it", "into", "a", "user", "-", "supplied", "FastStringBuffer", "object", ".", "Note", "that", "attributes", "are", "not", "considered", "part", "of", "the", "content", "of", "an...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/dom2dtm/DOM2DTM.java#L916-L944
antopen/alipay-sdk-java
src/main/java/com/alipay/api/internal/util/XmlUtils.java
XmlUtils.validateXml
public static void validateXml(Node doc, File schemaFile) throws AlipayApiException { """ Validates the element tree context via given XML schema file. @param doc the XML document to validate @param schemaFile the XML schema file instance @throws ApiException error occurs if the schema file not exists ""...
java
public static void validateXml(Node doc, File schemaFile) throws AlipayApiException { validateXml(doc, getInputStream(schemaFile)); }
[ "public", "static", "void", "validateXml", "(", "Node", "doc", ",", "File", "schemaFile", ")", "throws", "AlipayApiException", "{", "validateXml", "(", "doc", ",", "getInputStream", "(", "schemaFile", ")", ")", ";", "}" ]
Validates the element tree context via given XML schema file. @param doc the XML document to validate @param schemaFile the XML schema file instance @throws ApiException error occurs if the schema file not exists
[ "Validates", "the", "element", "tree", "context", "via", "given", "XML", "schema", "file", "." ]
train
https://github.com/antopen/alipay-sdk-java/blob/e82aeac7d0239330ee173c7e393596e51e41c1cd/src/main/java/com/alipay/api/internal/util/XmlUtils.java#L524-L527
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java
HBaseUtils.mergePutActions
public static PutAction mergePutActions(byte[] keyBytes, List<PutAction> putActionList) { """ Given a list of PutActions, create a new PutAction with the values in each put merged together. It is expected that no puts have a value for the same fully qualified column. Return the new PutAction. @param key...
java
public static PutAction mergePutActions(byte[] keyBytes, List<PutAction> putActionList) { VersionCheckAction checkAction = null; List<Put> putsToMerge = new ArrayList<Put>(); for (PutAction putActionToMerge : putActionList) { putsToMerge.add(putActionToMerge.getPut()); VersionCheckAction c...
[ "public", "static", "PutAction", "mergePutActions", "(", "byte", "[", "]", "keyBytes", ",", "List", "<", "PutAction", ">", "putActionList", ")", "{", "VersionCheckAction", "checkAction", "=", "null", ";", "List", "<", "Put", ">", "putsToMerge", "=", "new", "...
Given a list of PutActions, create a new PutAction with the values in each put merged together. It is expected that no puts have a value for the same fully qualified column. Return the new PutAction. @param key The key of the new put. @param putActionList The list of PutActions to merge @return the new PutAction insta...
[ "Given", "a", "list", "of", "PutActions", "create", "a", "new", "PutAction", "with", "the", "values", "in", "each", "put", "merged", "together", ".", "It", "is", "expected", "that", "no", "puts", "have", "a", "value", "for", "the", "same", "fully", "qual...
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java#L93-L106
Alluxio/alluxio
core/server/worker/src/main/java/alluxio/worker/block/UnderFileSystemBlockStore.java
UnderFileSystemBlockStore.getBlockInfo
private BlockInfo getBlockInfo(long sessionId, long blockId) throws BlockDoesNotExistException { """ Gets the {@link UnderFileSystemBlockMeta} for a session ID and block ID pair. @param sessionId the session ID @param blockId the block ID @return the {@link UnderFileSystemBlockMeta} instance @throws BlockDoe...
java
private BlockInfo getBlockInfo(long sessionId, long blockId) throws BlockDoesNotExistException { Key key = new Key(sessionId, blockId); BlockInfo blockInfo = mBlocks.get(key); if (blockInfo == null) { throw new BlockDoesNotExistException(ExceptionMessage.UFS_BLOCK_DOES_NOT_EXIST_FOR_SESSION, ...
[ "private", "BlockInfo", "getBlockInfo", "(", "long", "sessionId", ",", "long", "blockId", ")", "throws", "BlockDoesNotExistException", "{", "Key", "key", "=", "new", "Key", "(", "sessionId", ",", "blockId", ")", ";", "BlockInfo", "blockInfo", "=", "mBlocks", "...
Gets the {@link UnderFileSystemBlockMeta} for a session ID and block ID pair. @param sessionId the session ID @param blockId the block ID @return the {@link UnderFileSystemBlockMeta} instance @throws BlockDoesNotExistException if the UFS block does not exist in the {@link UnderFileSystemBlockStore}
[ "Gets", "the", "{", "@link", "UnderFileSystemBlockMeta", "}", "for", "a", "session", "ID", "and", "block", "ID", "pair", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/worker/src/main/java/alluxio/worker/block/UnderFileSystemBlockStore.java#L257-L265
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePolynomialMath.java
QrCodePolynomialMath.correctDCH
public static int correctDCH( int N , int messageNoMask , int generator , int totalBits, int dataBits) { """ Applies a brute force algorithm to find the message which has the smallest hamming distance. if two messages have the same distance -1 is returned. @param N Number of possible messages. 32 or 64 @param m...
java
public static int correctDCH( int N , int messageNoMask , int generator , int totalBits, int dataBits) { int bestHamming = 255; int bestMessage = -1; int errorBits = totalBits-dataBits; // exhaustively check all possibilities for (int i = 0; i < N; i++) { int test = i << errorBits; test = test ^ bitPo...
[ "public", "static", "int", "correctDCH", "(", "int", "N", ",", "int", "messageNoMask", ",", "int", "generator", ",", "int", "totalBits", ",", "int", "dataBits", ")", "{", "int", "bestHamming", "=", "255", ";", "int", "bestMessage", "=", "-", "1", ";", ...
Applies a brute force algorithm to find the message which has the smallest hamming distance. if two messages have the same distance -1 is returned. @param N Number of possible messages. 32 or 64 @param messageNoMask The observed message with mask removed @param generator Generator polynomial @param totalBits Total numb...
[ "Applies", "a", "brute", "force", "algorithm", "to", "find", "the", "message", "which", "has", "the", "smallest", "hamming", "distance", ".", "if", "two", "messages", "have", "the", "same", "distance", "-", "1", "is", "returned", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePolynomialMath.java#L120-L143
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/JobInProgress.java
JobInProgress.refreshTaskCountsAndWaitTime
protected void refreshTaskCountsAndWaitTime(TaskType type, long now) { """ Refresh runningTasks, neededTasks and pendingTasks counters @param type TaskType to refresh """ TaskInProgress[] allTips = getTasks(type); int finishedTips = 0; int runningTips = 0; int runningTaskAttempts = 0; long...
java
protected void refreshTaskCountsAndWaitTime(TaskType type, long now) { TaskInProgress[] allTips = getTasks(type); int finishedTips = 0; int runningTips = 0; int runningTaskAttempts = 0; long totalWaitTime = 0; long jobStartTime = this.getStartTime(); for (TaskInProgress tip : allTips) { ...
[ "protected", "void", "refreshTaskCountsAndWaitTime", "(", "TaskType", "type", ",", "long", "now", ")", "{", "TaskInProgress", "[", "]", "allTips", "=", "getTasks", "(", "type", ")", ";", "int", "finishedTips", "=", "0", ";", "int", "runningTips", "=", "0", ...
Refresh runningTasks, neededTasks and pendingTasks counters @param type TaskType to refresh
[ "Refresh", "runningTasks", "neededTasks", "and", "pendingTasks", "counters" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/JobInProgress.java#L3847-L3882
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java
Calendar.weekNumber
protected int weekNumber(int desiredDay, int dayOfPeriod, int dayOfWeek) { """ Returns the week number of a day, within a period. This may be the week number in a year or the week number in a month. Usually this will be a value &gt;= 1, but if some initial days of the period are excluded from week 1, because {@...
java
protected int weekNumber(int desiredDay, int dayOfPeriod, int dayOfWeek) { // Determine the day of the week of the first day of the period // in question (either a year or a month). Zero represents the // first day of the week on this calendar. int periodStartDayOfWeek = (dayOfWeek ...
[ "protected", "int", "weekNumber", "(", "int", "desiredDay", ",", "int", "dayOfPeriod", ",", "int", "dayOfWeek", ")", "{", "// Determine the day of the week of the first day of the period", "// in question (either a year or a month). Zero represents the", "// first day of the week on...
Returns the week number of a day, within a period. This may be the week number in a year or the week number in a month. Usually this will be a value &gt;= 1, but if some initial days of the period are excluded from week 1, because {@link #getMinimalDaysInFirstWeek getMinimalDaysInFirstWeek} is &gt; 1, then the week num...
[ "Returns", "the", "week", "number", "of", "a", "day", "within", "a", "period", ".", "This", "may", "be", "the", "week", "number", "in", "a", "year", "or", "the", "week", "number", "in", "a", "month", ".", "Usually", "this", "will", "be", "a", "value"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L3828-L3847
openbase/jul
extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java
LabelProcessor.getLabelByLanguage
public static String getLabelByLanguage(final String languageCode, final LabelOrBuilder label) throws NotAvailableException { """ Get the first label for a languageCode from a label type. This method will call {@link #getLabelListByLanguage(String, LabelOrBuilder)} to extract the list of labels for the languageC...
java
public static String getLabelByLanguage(final String languageCode, final LabelOrBuilder label) throws NotAvailableException { final List<String> labelList = getLabelListByLanguage(languageCode, label); if (labelList.isEmpty()) { throw new NotAvailableException("Label for Language[" + languag...
[ "public", "static", "String", "getLabelByLanguage", "(", "final", "String", "languageCode", ",", "final", "LabelOrBuilder", "label", ")", "throws", "NotAvailableException", "{", "final", "List", "<", "String", ">", "labelList", "=", "getLabelListByLanguage", "(", "l...
Get the first label for a languageCode from a label type. This method will call {@link #getLabelListByLanguage(String, LabelOrBuilder)} to extract the list of labels for the languageCode and then return its first entry. @param languageCode the languageCode which is checked @param label the label type which is s...
[ "Get", "the", "first", "label", "for", "a", "languageCode", "from", "a", "label", "type", ".", "This", "method", "will", "call", "{", "@link", "#getLabelListByLanguage", "(", "String", "LabelOrBuilder", ")", "}", "to", "extract", "the", "list", "of", "labels...
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java#L291-L297
milaboratory/milib
src/main/java/com/milaboratory/util/HashFunctions.java
HashFunctions.MurmurHash2
public static int MurmurHash2(int c, int seed) { """ MurmurHash hash function integer. <p/> <h3>Links</h3> <a href="http://sites.google.com/site/murmurhash/">http://sites.google.com/site/murmurhash/</a><br/> <a href="http://dmy999.com/article/50/murmurhash-2-java-port">http://dmy999.com/article/50/murmurhash-2-ja...
java
public static int MurmurHash2(int c, int seed) { // 'm' and 'r' are mixing constants generated offline. // They're not really 'magic', they just happen to work well. int m = 0x5bd1e995; // Initialize the hash to a 'random' value int h = seed ^ 4; c *= m; c ^= c >>...
[ "public", "static", "int", "MurmurHash2", "(", "int", "c", ",", "int", "seed", ")", "{", "// 'm' and 'r' are mixing constants generated offline.", "// They're not really 'magic', they just happen to work well.", "int", "m", "=", "0x5bd1e995", ";", "// Initialize the hash to a '...
MurmurHash hash function integer. <p/> <h3>Links</h3> <a href="http://sites.google.com/site/murmurhash/">http://sites.google.com/site/murmurhash/</a><br/> <a href="http://dmy999.com/article/50/murmurhash-2-java-port">http://dmy999.com/article/50/murmurhash-2-java-port</a><br/> <a href="http://en.wikipedia.org/wiki/Murm...
[ "MurmurHash", "hash", "function", "integer", ".", "<p", "/", ">", "<h3", ">", "Links<", "/", "h3", ">", "<a", "href", "=", "http", ":", "//", "sites", ".", "google", ".", "com", "/", "site", "/", "murmurhash", "/", ">", "http", ":", "//", "sites", ...
train
https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/util/HashFunctions.java#L397-L412
mcaserta/spring-crypto-utils
src/main/java/com/springcryptoutils/core/key/PublicKeyRegistryByAliasImpl.java
PublicKeyRegistryByAliasImpl.get
public PublicKey get(KeyStoreChooser keyStoreChooser, PublicKeyChooserByAlias publicKeyChooserByAlias) { """ Returns the selected public key or null if not found. @param keyStoreChooser the keystore chooser @param publicKeyChooserByAlias the public key chooser by alias @return the selected public key ...
java
public PublicKey get(KeyStoreChooser keyStoreChooser, PublicKeyChooserByAlias publicKeyChooserByAlias) { CacheKey cacheKey = new CacheKey(keyStoreChooser.getKeyStoreName(), publicKeyChooserByAlias.getAlias()); PublicKey retrievedPublicKey = cache.get(cacheKey); if (retrievedPublicKey != null) {...
[ "public", "PublicKey", "get", "(", "KeyStoreChooser", "keyStoreChooser", ",", "PublicKeyChooserByAlias", "publicKeyChooserByAlias", ")", "{", "CacheKey", "cacheKey", "=", "new", "CacheKey", "(", "keyStoreChooser", ".", "getKeyStoreName", "(", ")", ",", "publicKeyChooser...
Returns the selected public key or null if not found. @param keyStoreChooser the keystore chooser @param publicKeyChooserByAlias the public key chooser by alias @return the selected public key or null if not found
[ "Returns", "the", "selected", "public", "key", "or", "null", "if", "not", "found", "." ]
train
https://github.com/mcaserta/spring-crypto-utils/blob/1dbf6211542fb1e3f9297941d691e7e89cc72c46/src/main/java/com/springcryptoutils/core/key/PublicKeyRegistryByAliasImpl.java#L53-L81
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/util/Resource.java
Resource.newResource
public static Resource newResource(URL url) throws IOException { """ Construct a resource from a url. @param url A URL. @return A Resource object. """ if (url==null) return null; String urls=url.toExternalForm(); if( urls.startsWith( "file:")) { ...
java
public static Resource newResource(URL url) throws IOException { if (url==null) return null; String urls=url.toExternalForm(); if( urls.startsWith( "file:")) { try { FileResource fileResource= new FileResource(url); ...
[ "public", "static", "Resource", "newResource", "(", "URL", "url", ")", "throws", "IOException", "{", "if", "(", "url", "==", "null", ")", "return", "null", ";", "String", "urls", "=", "url", ".", "toExternalForm", "(", ")", ";", "if", "(", "urls", ".",...
Construct a resource from a url. @param url A URL. @return A Resource object.
[ "Construct", "a", "resource", "from", "a", "url", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/Resource.java#L47-L77
IBM/ibm-cos-sdk-java
ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/aspera/transfer/TransferListener.java
TransferListener.getInstance
public static TransferListener getInstance(String xferId, AsperaTransaction transaction) { """ Returns TransferListener instance and associates an AsperaTransaction with a Transfer ID. On change of transfer status or bytes transferred the TransferLsitener will fire a progress change event to all progress listene...
java
public static TransferListener getInstance(String xferId, AsperaTransaction transaction) { if(instance == null) { instance = new TransferListener(); } if(transactions.get(xferId) != null) { transactions.get(xferId).add(transaction); } else { List<AsperaTransaction> transferTransactions = new ArrayList...
[ "public", "static", "TransferListener", "getInstance", "(", "String", "xferId", ",", "AsperaTransaction", "transaction", ")", "{", "if", "(", "instance", "==", "null", ")", "{", "instance", "=", "new", "TransferListener", "(", ")", ";", "}", "if", "(", "tran...
Returns TransferListener instance and associates an AsperaTransaction with a Transfer ID. On change of transfer status or bytes transferred the TransferLsitener will fire a progress change event to all progress listeners attached to the AsperaTransaction. @param xferId @param transaction @return
[ "Returns", "TransferListener", "instance", "and", "associates", "an", "AsperaTransaction", "with", "a", "Transfer", "ID", ".", "On", "change", "of", "transfer", "status", "or", "bytes", "transferred", "the", "TransferLsitener", "will", "fire", "a", "progress", "ch...
train
https://github.com/IBM/ibm-cos-sdk-java/blob/d0bb2dd754c328a05e7dba8dc42e28b271b6daf2/ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/aspera/transfer/TransferListener.java#L80-L94
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineExtensionsInner.java
VirtualMachineExtensionsInner.createOrUpdateAsync
public Observable<VirtualMachineExtensionInner> createOrUpdateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionInner extensionParameters) { """ The operation to create or update the extension. @param resourceGroupName The name of the resource group. @param vmName Th...
java
public Observable<VirtualMachineExtensionInner> createOrUpdateAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionInner extensionParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).map(new Func1<Se...
[ "public", "Observable", "<", "VirtualMachineExtensionInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "vmName", ",", "String", "vmExtensionName", ",", "VirtualMachineExtensionInner", "extensionParameters", ")", "{", "return", "createOrU...
The operation to create or update the extension. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine where the extension should be created or updated. @param vmExtensionName The name of the virtual machine extension. @param extensionParameters Parameters supplied to t...
[ "The", "operation", "to", "create", "or", "update", "the", "extension", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineExtensionsInner.java#L131-L138
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/MutableDictionary.java
MutableDictionary.setData
@NonNull @Override public MutableDictionary setData(Map<String, Object> data) { """ Set a dictionary as a content. Allowed value types are List, Date, Map, Number, null, String, Array, Blob, and Dictionary. The List and Map must contain only the above types. Setting the new dictionary content will replac...
java
@NonNull @Override public MutableDictionary setData(Map<String, Object> data) { synchronized (lock) { internalDict.clear(); for (Map.Entry<String, Object> entry : data.entrySet()) { internalDict.set( entry.getKey(), new MVal...
[ "@", "NonNull", "@", "Override", "public", "MutableDictionary", "setData", "(", "Map", "<", "String", ",", "Object", ">", "data", ")", "{", "synchronized", "(", "lock", ")", "{", "internalDict", ".", "clear", "(", ")", ";", "for", "(", "Map", ".", "Ent...
Set a dictionary as a content. Allowed value types are List, Date, Map, Number, null, String, Array, Blob, and Dictionary. The List and Map must contain only the above types. Setting the new dictionary content will replace the current data including the existing Array and Dictionary objects. @param data the dictionary...
[ "Set", "a", "dictionary", "as", "a", "content", ".", "Allowed", "value", "types", "are", "List", "Date", "Map", "Number", "null", "String", "Array", "Blob", "and", "Dictionary", ".", "The", "List", "and", "Map", "must", "contain", "only", "the", "above", ...
train
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/MutableDictionary.java#L74-L86
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildTasksInner.java
BuildTasksInner.listSourceRepositoryPropertiesAsync
public Observable<SourceRepositoryPropertiesInner> listSourceRepositoryPropertiesAsync(String resourceGroupName, String registryName, String buildTaskName) { """ Get the source control properties for a build task. @param resourceGroupName The name of the resource group to which the container registry belongs. ...
java
public Observable<SourceRepositoryPropertiesInner> listSourceRepositoryPropertiesAsync(String resourceGroupName, String registryName, String buildTaskName) { return listSourceRepositoryPropertiesWithServiceResponseAsync(resourceGroupName, registryName, buildTaskName).map(new Func1<ServiceResponse<SourceReposito...
[ "public", "Observable", "<", "SourceRepositoryPropertiesInner", ">", "listSourceRepositoryPropertiesAsync", "(", "String", "resourceGroupName", ",", "String", "registryName", ",", "String", "buildTaskName", ")", "{", "return", "listSourceRepositoryPropertiesWithServiceResponseAsy...
Get the source control properties for a build task. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param buildTaskName The name of the container registry build task. @throws IllegalArgumentException thrown if par...
[ "Get", "the", "source", "control", "properties", "for", "a", "build", "task", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildTasksInner.java#L1014-L1021
jqno/equalsverifier
src/main/java/nl/jqno/equalsverifier/internal/prefabvalues/FactoryCache.java
FactoryCache.put
public <T> void put(String typeName, PrefabValueFactory<T> factory) { """ Adds the given factory to the cache and associates it with the given type name. @param <T> Should match {@code typeName}. @param typeName The fully qualified name of the type. @param factory The factory to associate with {@code typeNam...
java
public <T> void put(String typeName, PrefabValueFactory<T> factory) { if (typeName != null) { cache.put(typeName, factory); } }
[ "public", "<", "T", ">", "void", "put", "(", "String", "typeName", ",", "PrefabValueFactory", "<", "T", ">", "factory", ")", "{", "if", "(", "typeName", "!=", "null", ")", "{", "cache", ".", "put", "(", "typeName", ",", "factory", ")", ";", "}", "}...
Adds the given factory to the cache and associates it with the given type name. @param <T> Should match {@code typeName}. @param typeName The fully qualified name of the type. @param factory The factory to associate with {@code typeName}
[ "Adds", "the", "given", "factory", "to", "the", "cache", "and", "associates", "it", "with", "the", "given", "type", "name", "." ]
train
https://github.com/jqno/equalsverifier/blob/25d73c9cb801c8b20b257d1d1283ac6e0585ef1d/src/main/java/nl/jqno/equalsverifier/internal/prefabvalues/FactoryCache.java#L41-L45
structurizr/java
structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java
DocumentationTemplate.addSection
public Section addSection(SoftwareSystem softwareSystem, String title, Format format, String content) { """ Adds a section relating to a {@link SoftwareSystem}. @param softwareSystem the {@link SoftwareSystem} the documentation content relates to @param title the section title @param format ...
java
public Section addSection(SoftwareSystem softwareSystem, String title, Format format, String content) { return add(softwareSystem, title, format, content); }
[ "public", "Section", "addSection", "(", "SoftwareSystem", "softwareSystem", ",", "String", "title", ",", "Format", "format", ",", "String", "content", ")", "{", "return", "add", "(", "softwareSystem", ",", "title", ",", "format", ",", "content", ")", ";", "}...
Adds a section relating to a {@link SoftwareSystem}. @param softwareSystem the {@link SoftwareSystem} the documentation content relates to @param title the section title @param format the {@link Format} of the documentation content @param content a String containing the documentatio...
[ "Adds", "a", "section", "relating", "to", "a", "{", "@link", "SoftwareSystem", "}", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java#L87-L89
evant/binding-collection-adapter
bindingcollectionadapter-recyclerview/src/main/java/me/tatarka/bindingcollectionadapter2/collections/DiffObservableList.java
DiffObservableList.calculateDiff
@NonNull public DiffUtil.DiffResult calculateDiff(@NonNull final List<T> newItems) { """ Calculates the list of update operations that can convert this list into the given one. @param newItems The items that this list will be set to. @return A DiffResult that contains the information about the edit sequenc...
java
@NonNull public DiffUtil.DiffResult calculateDiff(@NonNull final List<T> newItems) { final ArrayList<T> frozenList; synchronized (LIST_LOCK) { frozenList = new ArrayList<>(list); } return doCalculateDiff(frozenList, newItems); }
[ "@", "NonNull", "public", "DiffUtil", ".", "DiffResult", "calculateDiff", "(", "@", "NonNull", "final", "List", "<", "T", ">", "newItems", ")", "{", "final", "ArrayList", "<", "T", ">", "frozenList", ";", "synchronized", "(", "LIST_LOCK", ")", "{", "frozen...
Calculates the list of update operations that can convert this list into the given one. @param newItems The items that this list will be set to. @return A DiffResult that contains the information about the edit sequence to covert this list into the given one.
[ "Calculates", "the", "list", "of", "update", "operations", "that", "can", "convert", "this", "list", "into", "the", "given", "one", "." ]
train
https://github.com/evant/binding-collection-adapter/blob/f669eda0a7002128bb504dcba012c51531f1bedd/bindingcollectionadapter-recyclerview/src/main/java/me/tatarka/bindingcollectionadapter2/collections/DiffObservableList.java#L82-L89
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/sc/scparameter.java
scparameter.get
public static scparameter get(nitro_service service, options option) throws Exception { """ Use this API to fetch all the scparameter resources that are configured on netscaler. """ scparameter obj = new scparameter(); scparameter[] response = (scparameter[])obj.get_resources(service,option); return res...
java
public static scparameter get(nitro_service service, options option) throws Exception{ scparameter obj = new scparameter(); scparameter[] response = (scparameter[])obj.get_resources(service,option); return response[0]; }
[ "public", "static", "scparameter", "get", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "scparameter", "obj", "=", "new", "scparameter", "(", ")", ";", "scparameter", "[", "]", "response", "=", "(", "scparameter", ...
Use this API to fetch all the scparameter resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "scparameter", "resources", "that", "are", "configured", "on", "netscaler", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/sc/scparameter.java#L150-L154
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.getInteger
@PublicEvolving public int getInteger(ConfigOption<Integer> configOption, int overrideDefault) { """ Returns the value associated with the given config option as an integer. If no value is mapped under any key of the option, it returns the specified default instead of the option's default value. @param confi...
java
@PublicEvolving public int getInteger(ConfigOption<Integer> configOption, int overrideDefault) { Object o = getRawValueFromOption(configOption); if (o == null) { return overrideDefault; } return convertToInt(o, configOption.defaultValue()); }
[ "@", "PublicEvolving", "public", "int", "getInteger", "(", "ConfigOption", "<", "Integer", ">", "configOption", ",", "int", "overrideDefault", ")", "{", "Object", "o", "=", "getRawValueFromOption", "(", "configOption", ")", ";", "if", "(", "o", "==", "null", ...
Returns the value associated with the given config option as an integer. If no value is mapped under any key of the option, it returns the specified default instead of the option's default value. @param configOption The configuration option @param overrideDefault The value to return if no value was mapper for any key ...
[ "Returns", "the", "value", "associated", "with", "the", "given", "config", "option", "as", "an", "integer", ".", "If", "no", "value", "is", "mapped", "under", "any", "key", "of", "the", "option", "it", "returns", "the", "specified", "default", "instead", "...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L234-L241
weld/core
impl/src/main/java/org/jboss/weld/bean/proxy/ProxyFactory.java
ProxyFactory.createInterceptorBody
protected void createInterceptorBody(ClassMethod classMethod, MethodInformation method, ClassMethod staticConstructor) { """ Creates the given method on the proxy class where the implementation forwards the call directly to the method handler. <p/> the generated bytecode is equivalent to: <p/> return (RetType...
java
protected void createInterceptorBody(ClassMethod classMethod, MethodInformation method, ClassMethod staticConstructor) { invokeMethodHandler(classMethod, method, true, DEFAULT_METHOD_RESOLVER, staticConstructor); }
[ "protected", "void", "createInterceptorBody", "(", "ClassMethod", "classMethod", ",", "MethodInformation", "method", ",", "ClassMethod", "staticConstructor", ")", "{", "invokeMethodHandler", "(", "classMethod", ",", "method", ",", "true", ",", "DEFAULT_METHOD_RESOLVER", ...
Creates the given method on the proxy class where the implementation forwards the call directly to the method handler. <p/> the generated bytecode is equivalent to: <p/> return (RetType) methodHandler.invoke(this,param1,param2); @param classMethod the class method @param method any JLR method @return the method b...
[ "Creates", "the", "given", "method", "on", "the", "proxy", "class", "where", "the", "implementation", "forwards", "the", "call", "directly", "to", "the", "method", "handler", ".", "<p", "/", ">", "the", "generated", "bytecode", "is", "equivalent", "to", ":",...
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/bean/proxy/ProxyFactory.java#L732-L734
SonarSource/sonarqube
server/sonar-db-dao/src/main/java/org/sonar/db/measure/LiveMeasureDao.java
LiveMeasureDao.sumNclocOfBiggestLongLivingBranch
public long sumNclocOfBiggestLongLivingBranch(DbSession dbSession, SumNclocDbQuery dbQuery) { """ Example: If Main Branch = 0 LOCs (provisioned but never analyzed) and the "largest long-lived branch" is 120 LOCs, I'm expecting to consider the value 120. If Main Branch = 100 LOCs and the "largest long-lived branc...
java
public long sumNclocOfBiggestLongLivingBranch(DbSession dbSession, SumNclocDbQuery dbQuery) { Long ncloc = mapper(dbSession).sumNclocOfBiggestLongLivingBranch( NCLOC_KEY, KeyType.BRANCH, BranchType.LONG, dbQuery.getOrganizationUuid(), dbQuery.getOnlyPrivateProjects(), dbQuery.getProjectUuidToExclude()); r...
[ "public", "long", "sumNclocOfBiggestLongLivingBranch", "(", "DbSession", "dbSession", ",", "SumNclocDbQuery", "dbQuery", ")", "{", "Long", "ncloc", "=", "mapper", "(", "dbSession", ")", ".", "sumNclocOfBiggestLongLivingBranch", "(", "NCLOC_KEY", ",", "KeyType", ".", ...
Example: If Main Branch = 0 LOCs (provisioned but never analyzed) and the "largest long-lived branch" is 120 LOCs, I'm expecting to consider the value 120. If Main Branch = 100 LOCs and the "largest long-lived branch" is 120 LOCs, I'm expecting to consider the value 120. If Main Branch = 100 LOCs and the "largest long-...
[ "Example", ":", "If", "Main", "Branch", "=", "0", "LOCs", "(", "provisioned", "but", "never", "analyzed", ")", "and", "the", "largest", "long", "-", "lived", "branch", "is", "120", "LOCs", "I", "m", "expecting", "to", "consider", "the", "value", "120", ...
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-dao/src/main/java/org/sonar/db/measure/LiveMeasureDao.java#L105-L109
Netflix/Nicobar
nicobar-core/src/main/java/com/netflix/nicobar/core/module/GraphUtils.java
GraphUtils.swapVertices
public static <V> void swapVertices(DirectedGraph<V, DefaultEdge> graph, Map<V, Set<V>> alternates) { """ replace the vertices in the graph with an alternate set of vertices. @param graph graph to be mutated @param alternates alternate vertices to insert into the graph. map of vertices to their direct dependents...
java
public static <V> void swapVertices(DirectedGraph<V, DefaultEdge> graph, Map<V, Set<V>> alternates) { Objects.requireNonNull(graph,"graph"); Objects.requireNonNull(alternates, "alternates"); // add all of the new vertices to prep for linking addAllVertices(graph, alternates.keySet()); ...
[ "public", "static", "<", "V", ">", "void", "swapVertices", "(", "DirectedGraph", "<", "V", ",", "DefaultEdge", ">", "graph", ",", "Map", "<", "V", ",", "Set", "<", "V", ">", ">", "alternates", ")", "{", "Objects", ".", "requireNonNull", "(", "graph", ...
replace the vertices in the graph with an alternate set of vertices. @param graph graph to be mutated @param alternates alternate vertices to insert into the graph. map of vertices to their direct dependents.
[ "replace", "the", "vertices", "in", "the", "graph", "with", "an", "alternate", "set", "of", "vertices", "." ]
train
https://github.com/Netflix/Nicobar/blob/507173dcae4a86a955afc3df222a855862fab8d7/nicobar-core/src/main/java/com/netflix/nicobar/core/module/GraphUtils.java#L43-L71
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDNN.java
SDNN.sigmoidDerivative
public SDVariable sigmoidDerivative(SDVariable x, SDVariable wrt) { """ Element-wise sigmoid function derivative: dL/dIn given input and dL/dOut @param x Input Variable @param wrt Gradient at the output - dL/dOut. Must have same shape as the input @return Output variable """ return sigmoidDeriva...
java
public SDVariable sigmoidDerivative(SDVariable x, SDVariable wrt) { return sigmoidDerivative(null, x, wrt); }
[ "public", "SDVariable", "sigmoidDerivative", "(", "SDVariable", "x", ",", "SDVariable", "wrt", ")", "{", "return", "sigmoidDerivative", "(", "null", ",", "x", ",", "wrt", ")", ";", "}" ]
Element-wise sigmoid function derivative: dL/dIn given input and dL/dOut @param x Input Variable @param wrt Gradient at the output - dL/dOut. Must have same shape as the input @return Output variable
[ "Element", "-", "wise", "sigmoid", "function", "derivative", ":", "dL", "/", "dIn", "given", "input", "and", "dL", "/", "dOut" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDNN.java#L538-L540
classgraph/classgraph
src/main/java/io/github/classgraph/ResourceList.java
ResourceList.forEachByteBuffer
public void forEachByteBuffer(final ByteBufferConsumer byteBufferConsumer, final boolean ignoreIOExceptions) { """ Read each {@link Resource} in this {@link ResourceList} as a {@link ByteBuffer}, pass the {@link ByteBuffer} to the given {@link InputStreamConsumer}, then release the {@link ByteBuffer} after the {...
java
public void forEachByteBuffer(final ByteBufferConsumer byteBufferConsumer, final boolean ignoreIOExceptions) { for (final Resource resource : this) { try { final ByteBuffer byteBuffer = resource.read(); byteBufferConsumer.accept(resource, byteBuffer); } ca...
[ "public", "void", "forEachByteBuffer", "(", "final", "ByteBufferConsumer", "byteBufferConsumer", ",", "final", "boolean", "ignoreIOExceptions", ")", "{", "for", "(", "final", "Resource", "resource", ":", "this", ")", "{", "try", "{", "final", "ByteBuffer", "byteBu...
Read each {@link Resource} in this {@link ResourceList} as a {@link ByteBuffer}, pass the {@link ByteBuffer} to the given {@link InputStreamConsumer}, then release the {@link ByteBuffer} after the {@link ByteBufferConsumer} returns, by calling {@link Resource#close()}. @param byteBufferConsumer The {@link ByteBufferCo...
[ "Read", "each", "{", "@link", "Resource", "}", "in", "this", "{", "@link", "ResourceList", "}", "as", "a", "{", "@link", "ByteBuffer", "}", "pass", "the", "{", "@link", "ByteBuffer", "}", "to", "the", "given", "{", "@link", "InputStreamConsumer", "}", "t...
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ResourceList.java#L447-L460
apereo/cas
support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java
LdapUtils.executeDeleteOperation
public static boolean executeDeleteOperation(final ConnectionFactory connectionFactory, final LdapEntry entry) { """ Execute delete operation boolean. @param connectionFactory the connection factory @param entry the entry @return true/false """ try (val connection = createConnection(co...
java
public static boolean executeDeleteOperation(final ConnectionFactory connectionFactory, final LdapEntry entry) { try (val connection = createConnection(connectionFactory)) { val delete = new DeleteOperation(connection); val request = new DeleteRequest(entry.getDn()); request....
[ "public", "static", "boolean", "executeDeleteOperation", "(", "final", "ConnectionFactory", "connectionFactory", ",", "final", "LdapEntry", "entry", ")", "{", "try", "(", "val", "connection", "=", "createConnection", "(", "connectionFactory", ")", ")", "{", "val", ...
Execute delete operation boolean. @param connectionFactory the connection factory @param entry the entry @return true/false
[ "Execute", "delete", "operation", "boolean", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java#L417-L428
lessthanoptimal/BoofCV
integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java
SimpleCamera2Activity.configureTransform
private void configureTransform(int viewWidth, int viewHeight) { """ Configures the necessary {@link Matrix} transformation to `mTextureView`. This method should not to be called until the camera preview size is determined in openCamera, or until the size of `mTextureView` is fixed. @param viewWidth The widt...
java
private void configureTransform(int viewWidth, int viewHeight) { int cameraWidth,cameraHeight; try { open.mLock.lock(); if (null == mTextureView || null == open.mCameraSize) { return; } cameraWidth = open.mCameraSize.getWidth(); cameraHeight = open.mCameraSize.getHeight(); } finally { open.m...
[ "private", "void", "configureTransform", "(", "int", "viewWidth", ",", "int", "viewHeight", ")", "{", "int", "cameraWidth", ",", "cameraHeight", ";", "try", "{", "open", ".", "mLock", ".", "lock", "(", ")", ";", "if", "(", "null", "==", "mTextureView", "...
Configures the necessary {@link Matrix} transformation to `mTextureView`. This method should not to be called until the camera preview size is determined in openCamera, or until the size of `mTextureView` is fixed. @param viewWidth The width of `mTextureView` @param viewHeight The height of `mTextureView`
[ "Configures", "the", "necessary", "{", "@link", "Matrix", "}", "transformation", "to", "mTextureView", ".", "This", "method", "should", "not", "to", "be", "called", "until", "the", "camera", "preview", "size", "is", "determined", "in", "openCamera", "or", "unt...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera2/SimpleCamera2Activity.java#L728-L757
OpenLiberty/open-liberty
dev/com.ibm.ws.concurrent.mp.1.0/src/com/ibm/ws/concurrent/mp/ThreadContextBuilderImpl.java
ThreadContextBuilderImpl.failOnOverlapOfClearedPropagatedUnchanged
private void failOnOverlapOfClearedPropagatedUnchanged(Set<String> cleared, Set<String> propagated, Set<String> unchanged) { """ Fail with error identifying the overlap(s) in context types between any two of: cleared, propagated, unchanged. @throws IllegalStateException identifying the overlap. """ ...
java
private void failOnOverlapOfClearedPropagatedUnchanged(Set<String> cleared, Set<String> propagated, Set<String> unchanged) { HashSet<String> overlap = new HashSet<String>(cleared); overlap.retainAll(propagated); HashSet<String> s = new HashSet<String>(cleared); s.retainAll(unchanged); ...
[ "private", "void", "failOnOverlapOfClearedPropagatedUnchanged", "(", "Set", "<", "String", ">", "cleared", ",", "Set", "<", "String", ">", "propagated", ",", "Set", "<", "String", ">", "unchanged", ")", "{", "HashSet", "<", "String", ">", "overlap", "=", "ne...
Fail with error identifying the overlap(s) in context types between any two of: cleared, propagated, unchanged. @throws IllegalStateException identifying the overlap.
[ "Fail", "with", "error", "identifying", "the", "overlap", "(", "s", ")", "in", "context", "types", "between", "any", "two", "of", ":", "cleared", "propagated", "unchanged", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.concurrent.mp.1.0/src/com/ibm/ws/concurrent/mp/ThreadContextBuilderImpl.java#L136-L148
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/xml/IronjacamarXmlGen.java
IronjacamarXmlGen.getPropsString
private void getPropsString(StringBuilder strProps, List<ConfigPropType> propsList, int indent) { """ generate properties String @param strProps the string property @param propsList the properties list @param indent how much indent """ for (ConfigPropType props : propsList) { for ...
java
private void getPropsString(StringBuilder strProps, List<ConfigPropType> propsList, int indent) { for (ConfigPropType props : propsList) { for (int i = 0; i < indent; i++) strProps.append(" "); strProps.append("<config-property name=\""); strProps.append(props.getNa...
[ "private", "void", "getPropsString", "(", "StringBuilder", "strProps", ",", "List", "<", "ConfigPropType", ">", "propsList", ",", "int", "indent", ")", "{", "for", "(", "ConfigPropType", "props", ":", "propsList", ")", "{", "for", "(", "int", "i", "=", "0"...
generate properties String @param strProps the string property @param propsList the properties list @param indent how much indent
[ "generate", "properties", "String" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/xml/IronjacamarXmlGen.java#L140-L153
podio/podio-java
src/main/java/com/podio/app/AppAPI.java
AppAPI.getField
public ApplicationField getField(int appId, String externalId) { """ Returns a single field from an app. @param appId The id of the app the field is on @param externalId The id of the field to be returned @return The definition and current configuration of the requested field """ return getResourceFac...
java
public ApplicationField getField(int appId, String externalId) { return getResourceFactory().getApiResource( "/app/" + appId + "/field/" + externalId).get( ApplicationField.class); }
[ "public", "ApplicationField", "getField", "(", "int", "appId", ",", "String", "externalId", ")", "{", "return", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/app/\"", "+", "appId", "+", "\"/field/\"", "+", "externalId", ")", ".", "get", "(", ...
Returns a single field from an app. @param appId The id of the app the field is on @param externalId The id of the field to be returned @return The definition and current configuration of the requested field
[ "Returns", "a", "single", "field", "from", "an", "app", "." ]
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/app/AppAPI.java#L159-L163
js-lib-com/commons
src/main/java/js/converter/LocaleConverter.java
LocaleConverter.asObject
@Override public <T> T asObject(String string, Class<T> valueType) throws IllegalArgumentException { """ Create locale instance from ISO-639 language and ISO-3166 country code, for example en-US. @throws IllegalArgumentException if given string argument is not well formatted. """ // at this point value...
java
@Override public <T> T asObject(String string, Class<T> valueType) throws IllegalArgumentException { // at this point value type is guaranteed to be a Locale int dashIndex = string.indexOf('-'); if (dashIndex == -1) { throw new IllegalArgumentException(String.format("Cannot convert |%s| to locale instanc...
[ "@", "Override", "public", "<", "T", ">", "T", "asObject", "(", "String", "string", ",", "Class", "<", "T", ">", "valueType", ")", "throws", "IllegalArgumentException", "{", "// at this point value type is guaranteed to be a Locale\r", "int", "dashIndex", "=", "stri...
Create locale instance from ISO-639 language and ISO-3166 country code, for example en-US. @throws IllegalArgumentException if given string argument is not well formatted.
[ "Create", "locale", "instance", "from", "ISO", "-", "639", "language", "and", "ISO", "-", "3166", "country", "code", "for", "example", "en", "-", "US", "." ]
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/converter/LocaleConverter.java#L24-L32
igniterealtime/Smack
smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/AgentSession.java
AgentSession.setStatus
public void setStatus(Presence.Mode presenceMode, String status) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Sets the agent's current status with the workgroup. The presence mode affects how offers are routed to the agent. The possible presence modes with thei...
java
public void setStatus(Presence.Mode presenceMode, String status) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { if (!online) { throw new IllegalStateException("Cannot set status when the agent is not online."); } if (presenceMode == nul...
[ "public", "void", "setStatus", "(", "Presence", ".", "Mode", "presenceMode", ",", "String", "status", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "if", "(", "!", "online", ")", "{...
Sets the agent's current status with the workgroup. The presence mode affects how offers are routed to the agent. The possible presence modes with their meanings are as follows:<ul> <li>Presence.Mode.AVAILABLE -- (Default) the agent is available for more chats (equivalent to Presence.Mode.CHAT). <li>Presence.Mode.DO_N...
[ "Sets", "the", "agent", "s", "current", "status", "with", "the", "workgroup", ".", "The", "presence", "mode", "affects", "how", "offers", "are", "routed", "to", "the", "agent", ".", "The", "possible", "presence", "modes", "with", "their", "meanings", "are", ...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/AgentSession.java#L471-L494
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java
TableWorks.setColDefaultExpression
void setColDefaultExpression(int colIndex, Expression def) { """ performs the work for changing the default value of a column @param colIndex int @param def Expression """ if (def == null) { table.checkColumnInFKConstraint(colIndex, Constraint.SET_DEFAULT); } table.set...
java
void setColDefaultExpression(int colIndex, Expression def) { if (def == null) { table.checkColumnInFKConstraint(colIndex, Constraint.SET_DEFAULT); } table.setDefaultExpression(colIndex, def); }
[ "void", "setColDefaultExpression", "(", "int", "colIndex", ",", "Expression", "def", ")", "{", "if", "(", "def", "==", "null", ")", "{", "table", ".", "checkColumnInFKConstraint", "(", "colIndex", ",", "Constraint", ".", "SET_DEFAULT", ")", ";", "}", "table"...
performs the work for changing the default value of a column @param colIndex int @param def Expression
[ "performs", "the", "work", "for", "changing", "the", "default", "value", "of", "a", "column" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java#L1066-L1073
haraldk/TwelveMonkeys
common/common-image/src/main/java/com/twelvemonkeys/image/MagickUtil.java
MagickUtil.toMagick
public static MagickImage toMagick(BufferedImage pImage) throws MagickException { """ Converts a {@code BufferedImage} to a {@code MagickImage}. <p/> The conversion depends on {@code pImage}'s {@code ColorModel}: <dl> <dt>{@code IndexColorModel} with 1 bit b/w</dt> <dd>{@code MagickImage} of type {@code Image...
java
public static MagickImage toMagick(BufferedImage pImage) throws MagickException { if (pImage == null) { throw new IllegalArgumentException("image == null"); } long start = 0L; if (DEBUG) { start = System.currentTimeMillis(); } try { ...
[ "public", "static", "MagickImage", "toMagick", "(", "BufferedImage", "pImage", ")", "throws", "MagickException", "{", "if", "(", "pImage", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"image == null\"", ")", ";", "}", "long", "start...
Converts a {@code BufferedImage} to a {@code MagickImage}. <p/> The conversion depends on {@code pImage}'s {@code ColorModel}: <dl> <dt>{@code IndexColorModel} with 1 bit b/w</dt> <dd>{@code MagickImage} of type {@code ImageType.BilevelType}</dd> <dt>{@code IndexColorModel} &gt; 1 bit,</dt> <dd>{@code MagickImage} of t...
[ "Converts", "a", "{", "@code", "BufferedImage", "}", "to", "a", "{", "@code", "MagickImage", "}", ".", "<p", "/", ">", "The", "conversion", "depends", "on", "{", "@code", "pImage", "}", "s", "{", "@code", "ColorModel", "}", ":", "<dl", ">", "<dt", ">...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-image/src/main/java/com/twelvemonkeys/image/MagickUtil.java#L222-L261
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.createInput
@PublicEvolving public <OUT> DataStreamSource<OUT> createInput(InputFormat<OUT, ?> inputFormat) { """ Generic method to create an input data stream with {@link org.apache.flink.api.common.io.InputFormat}. <p>Since all data streams need specific information about their types, this method needs to determine the ...
java
@PublicEvolving public <OUT> DataStreamSource<OUT> createInput(InputFormat<OUT, ?> inputFormat) { return createInput(inputFormat, TypeExtractor.getInputFormatTypes(inputFormat)); }
[ "@", "PublicEvolving", "public", "<", "OUT", ">", "DataStreamSource", "<", "OUT", ">", "createInput", "(", "InputFormat", "<", "OUT", ",", "?", ">", "inputFormat", ")", "{", "return", "createInput", "(", "inputFormat", ",", "TypeExtractor", ".", "getInputForma...
Generic method to create an input data stream with {@link org.apache.flink.api.common.io.InputFormat}. <p>Since all data streams need specific information about their types, this method needs to determine the type of the data produced by the input format. It will attempt to determine the data type by reflection, unles...
[ "Generic", "method", "to", "create", "an", "input", "data", "stream", "with", "{", "@link", "org", ".", "apache", ".", "flink", ".", "api", ".", "common", ".", "io", ".", "InputFormat", "}", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L1299-L1302
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/util/Maps2.java
Maps2.putIntoSetMap
public static <K, V> void putIntoSetMap(K key, V value, Map<? super K, Set<V>> map) { """ Puts a value into a map that supports lists as values. The list is created on-demand. """ Set<V> list = map.get(key); if (list == null) { list = Sets.newHashSetWithExpectedSize(2); map.put(key, list); } lis...
java
public static <K, V> void putIntoSetMap(K key, V value, Map<? super K, Set<V>> map) { Set<V> list = map.get(key); if (list == null) { list = Sets.newHashSetWithExpectedSize(2); map.put(key, list); } list.add(value); }
[ "public", "static", "<", "K", ",", "V", ">", "void", "putIntoSetMap", "(", "K", "key", ",", "V", "value", ",", "Map", "<", "?", "super", "K", ",", "Set", "<", "V", ">", ">", "map", ")", "{", "Set", "<", "V", ">", "list", "=", "map", ".", "g...
Puts a value into a map that supports lists as values. The list is created on-demand.
[ "Puts", "a", "value", "into", "a", "map", "that", "supports", "lists", "as", "values", ".", "The", "list", "is", "created", "on", "-", "demand", "." ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/util/Maps2.java#L71-L78