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
nextreports/nextreports-engine
src/ro/nextreports/engine/util/ReportUtil.java
ReportUtil.loadConvertedReport
public static Report loadConvertedReport(InputStream is) { """ Create a report object from an input stream Use this method if you know your report version does not need any conversion from older versions, otherwise see {@link #loadReport(InputStream)} @param is input stream @return the report object crea...
java
public static Report loadConvertedReport(InputStream is) { XStream xstream = XStreamFactory.createXStream(); InputStreamReader reader = null; try { reader = new InputStreamReader(is, "UTF-8"); return (Report) xstream.fromXML(reader); } catch (Exception e) { LOG.error(e.getMessage(), e); e.printStack...
[ "public", "static", "Report", "loadConvertedReport", "(", "InputStream", "is", ")", "{", "XStream", "xstream", "=", "XStreamFactory", ".", "createXStream", "(", ")", ";", "InputStreamReader", "reader", "=", "null", ";", "try", "{", "reader", "=", "new", "Input...
Create a report object from an input stream Use this method if you know your report version does not need any conversion from older versions, otherwise see {@link #loadReport(InputStream)} @param is input stream @return the report object created from the input stream or null if cannot be read
[ "Create", "a", "report", "object", "from", "an", "input", "stream" ]
train
https://github.com/nextreports/nextreports-engine/blob/a847575a9298b5fce63b88961190c5b83ddccc44/src/ro/nextreports/engine/util/ReportUtil.java#L109-L120
openbase/jul
extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/TimestampProcessor.java
TimestampProcessor.copyTimestamp
public static <M extends MessageOrBuilder> M copyTimestamp(final M sourceMessageOrBuilder, final M targetMessageOrBuilder) throws CouldNotPerformException { """ Method copies the timestamp field of the source message into the target message. In case of an error the original message is returned. @param <M> ...
java
public static <M extends MessageOrBuilder> M copyTimestamp(final M sourceMessageOrBuilder, final M targetMessageOrBuilder) throws CouldNotPerformException { return TimestampProcessor.updateTimestamp(TimestampProcessor.getTimestamp(sourceMessageOrBuilder, TimeUnit.MICROSECONDS), targetMessageOrBuilder , TimeUnit...
[ "public", "static", "<", "M", "extends", "MessageOrBuilder", ">", "M", "copyTimestamp", "(", "final", "M", "sourceMessageOrBuilder", ",", "final", "M", "targetMessageOrBuilder", ")", "throws", "CouldNotPerformException", "{", "return", "TimestampProcessor", ".", "upda...
Method copies the timestamp field of the source message into the target message. In case of an error the original message is returned. @param <M> the message type of the message to update. @param sourceMessageOrBuilder the message providing a timestamp. @param targetMessageOrBuilder the message offering a...
[ "Method", "copies", "the", "timestamp", "field", "of", "the", "source", "message", "into", "the", "target", "message", ".", "In", "case", "of", "an", "error", "the", "original", "message", "is", "returned", "." ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/TimestampProcessor.java#L218-L220
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDisplayLayoutPersistenceImpl.java
CPDisplayLayoutPersistenceImpl.removeByUuid_C
@Override public void removeByUuid_C(String uuid, long companyId) { """ Removes all the cp display layouts where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID """ for (CPDisplayLayout cpDisplayLayout : findByUuid_C(uuid, companyId, QueryUt...
java
@Override public void removeByUuid_C(String uuid, long companyId) { for (CPDisplayLayout cpDisplayLayout : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpDisplayLayout); } }
[ "@", "Override", "public", "void", "removeByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "for", "(", "CPDisplayLayout", "cpDisplayLayout", ":", "findByUuid_C", "(", "uuid", ",", "companyId", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryU...
Removes all the cp display layouts where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID
[ "Removes", "all", "the", "cp", "display", "layouts", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDisplayLayoutPersistenceImpl.java#L1400-L1406
brettwooldridge/NuProcess
src/main/java/com/zaxxer/nuprocess/codec/NuCharsetDecoder.java
NuCharsetDecoder.onOutput
public void onOutput(ByteBuffer buffer, boolean closed) { """ Implementation of {@link NuProcessHandler#onStdout(ByteBuffer, boolean)} or {@link NuProcessHandler#onStderr(ByteBuffer, boolean)} which decodes output data and forwards it to {@code handler}. @param buffer {@link ByteBuffer} which received bytes f...
java
public void onOutput(ByteBuffer buffer, boolean closed) { CoderResult coderResult = decoder.decode(buffer, charBuffer, /* endOfInput */ closed); charBuffer.flip(); this.handler.onDecode(charBuffer, closed, coderResult); charBuffer.compact(); }
[ "public", "void", "onOutput", "(", "ByteBuffer", "buffer", ",", "boolean", "closed", ")", "{", "CoderResult", "coderResult", "=", "decoder", ".", "decode", "(", "buffer", ",", "charBuffer", ",", "/* endOfInput */", "closed", ")", ";", "charBuffer", ".", "flip"...
Implementation of {@link NuProcessHandler#onStdout(ByteBuffer, boolean)} or {@link NuProcessHandler#onStderr(ByteBuffer, boolean)} which decodes output data and forwards it to {@code handler}. @param buffer {@link ByteBuffer} which received bytes from stdout or stderr @param closed true if stdout or stderr was closed,...
[ "Implementation", "of", "{", "@link", "NuProcessHandler#onStdout", "(", "ByteBuffer", "boolean", ")", "}", "or", "{", "@link", "NuProcessHandler#onStderr", "(", "ByteBuffer", "boolean", ")", "}", "which", "decodes", "output", "data", "and", "forwards", "it", "to",...
train
https://github.com/brettwooldridge/NuProcess/blob/d4abdd195367fce7375a0b45cb2f5eeff1c74d03/src/main/java/com/zaxxer/nuprocess/codec/NuCharsetDecoder.java#L84-L90
wanglinsong/thx-android
uia-client/src/main/java/com/android/uiautomator/stub/UiSelector.java
UiSelector.buildSelector
private UiSelector buildSelector(int selectorId, Object selectorValue) { """ Building a UiSelector always returns a new UiSelector and never modifies the existing UiSelector being used. """ if (selectorId == SELECTOR_CHILD || selectorId == SELECTOR_PARENT) { throw new UnsupportedOperationE...
java
private UiSelector buildSelector(int selectorId, Object selectorValue) { if (selectorId == SELECTOR_CHILD || selectorId == SELECTOR_PARENT) { throw new UnsupportedOperationException(); // selector.getLastSubSelector().mSelectorAttributes.put(selectorId, selectorValue); } else { ...
[ "private", "UiSelector", "buildSelector", "(", "int", "selectorId", ",", "Object", "selectorValue", ")", "{", "if", "(", "selectorId", "==", "SELECTOR_CHILD", "||", "selectorId", "==", "SELECTOR_PARENT", ")", "{", "throw", "new", "UnsupportedOperationException", "("...
Building a UiSelector always returns a new UiSelector and never modifies the existing UiSelector being used.
[ "Building", "a", "UiSelector", "always", "returns", "a", "new", "UiSelector", "and", "never", "modifies", "the", "existing", "UiSelector", "being", "used", "." ]
train
https://github.com/wanglinsong/thx-android/blob/4a98c4181b3e8876e688591737da37627c07e72b/uia-client/src/main/java/com/android/uiautomator/stub/UiSelector.java#L649-L657
wildfly/wildfly-core
patching/src/main/java/org/jboss/as/patching/metadata/ModificationBuilderTarget.java
ModificationBuilderTarget.modifyBundle
public T modifyBundle(final String moduleName, final String slot, final byte[] existingHash, final byte[] newHash) { """ Modify a bundle. @param moduleName the module name @param slot the module slot @param existingHash the existing hash @param newHash the new hash of the modified content @return the builde...
java
public T modifyBundle(final String moduleName, final String slot, final byte[] existingHash, final byte[] newHash) { final ContentItem item = createBundleItem(moduleName, slot, newHash); addContentModification(createContentModification(item, ModificationType.MODIFY, existingHash)); return return...
[ "public", "T", "modifyBundle", "(", "final", "String", "moduleName", ",", "final", "String", "slot", ",", "final", "byte", "[", "]", "existingHash", ",", "final", "byte", "[", "]", "newHash", ")", "{", "final", "ContentItem", "item", "=", "createBundleItem",...
Modify a bundle. @param moduleName the module name @param slot the module slot @param existingHash the existing hash @param newHash the new hash of the modified content @return the builder
[ "Modify", "a", "bundle", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/metadata/ModificationBuilderTarget.java#L87-L91
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/classify/LinearClassifierFactory.java
LinearClassifierFactory.trainSemiSupGE
public LinearClassifier<L,F> trainSemiSupGE(GeneralDataset<L, F> labeledDataset, List<? extends Datum<L, F>> unlabeledDataList, List<F> GEFeatures, double convexComboCoeff) { """ Trains the linear classifier using Generalized Expectation criteria as described in <tt>Generalized Expectation Criteria for Semi Super...
java
public LinearClassifier<L,F> trainSemiSupGE(GeneralDataset<L, F> labeledDataset, List<? extends Datum<L, F>> unlabeledDataList, List<F> GEFeatures, double convexComboCoeff) { LogConditionalObjectiveFunction<L, F> objective = new LogConditionalObjectiveFunction<L, F>(labeledDataset, new LogPrior(LogPrior.LogPriorTy...
[ "public", "LinearClassifier", "<", "L", ",", "F", ">", "trainSemiSupGE", "(", "GeneralDataset", "<", "L", ",", "F", ">", "labeledDataset", ",", "List", "<", "?", "extends", "Datum", "<", "L", ",", "F", ">", ">", "unlabeledDataList", ",", "List", "<", "...
Trains the linear classifier using Generalized Expectation criteria as described in <tt>Generalized Expectation Criteria for Semi Supervised Learning of Conditional Random Fields</tt>, Mann and McCallum, ACL 2008. The original algorithm is proposed for CRFs but has been adopted to LinearClassifier (which is a simpler s...
[ "Trains", "the", "linear", "classifier", "using", "Generalized", "Expectation", "criteria", "as", "described", "in", "<tt", ">", "Generalized", "Expectation", "Criteria", "for", "Semi", "Supervised", "Learning", "of", "Conditional", "Random", "Fields<", "/", "tt", ...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/classify/LinearClassifierFactory.java#L174-L181
BellaDati/belladati-sdk-api
src/main/java/com/belladati/sdk/dataset/data/DataTable.java
DataTable.createBasicInstance
public static DataTable createBasicInstance(String firstColumn, String... otherColumns) { """ Creates a new instance with the given column setup. At least one column must be specified in the table. Rows are allowed to be empty. <p> Columns should be unique, but the table doesn't enforce this. @param firstCol...
java
public static DataTable createBasicInstance(String firstColumn, String... otherColumns) { List<String> list = new ArrayList<String>(); list.add(firstColumn); list.addAll(Arrays.asList(otherColumns)); return createBasicInstance(list); }
[ "public", "static", "DataTable", "createBasicInstance", "(", "String", "firstColumn", ",", "String", "...", "otherColumns", ")", "{", "List", "<", "String", ">", "list", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "list", ".", "add", "(", ...
Creates a new instance with the given column setup. At least one column must be specified in the table. Rows are allowed to be empty. <p> Columns should be unique, but the table doesn't enforce this. @param firstColumn first column @param otherColumns additional, optional columns @return basic instance
[ "Creates", "a", "new", "instance", "with", "the", "given", "column", "setup", ".", "At", "least", "one", "column", "must", "be", "specified", "in", "the", "table", ".", "Rows", "are", "allowed", "to", "be", "empty", ".", "<p", ">", "Columns", "should", ...
train
https://github.com/BellaDati/belladati-sdk-api/blob/ec45a42048d8255838ad0200aa6784a8e8a121c1/src/main/java/com/belladati/sdk/dataset/data/DataTable.java#L40-L45
jtrfp/javamod
src/main/java/de/quippy/javamod/main/gui/components/VUMeterPanel.java
VUMeterPanel.componentWasResized
protected void componentWasResized(int newTop, int newLeft, int newWidth, int newHeight) { """ Is called when the component is resized @see de.quippy.javamod.main.gui.components.MeterPanelBase#componentWasResized() """ rampDownValue = (float)getDesiredFPS()/1000F; maxPeakLevelRampDownDelay = rampDownValue...
java
protected void componentWasResized(int newTop, int newLeft, int newWidth, int newHeight) { rampDownValue = (float)getDesiredFPS()/1000F; maxPeakLevelRampDownDelay = rampDownValue/100f; maxPeakLevelRampDownValue = 0; myAnzLines = newHeight>>1; color = new Color[myAnzLines]; colorLow = new Color[myAnzLin...
[ "protected", "void", "componentWasResized", "(", "int", "newTop", ",", "int", "newLeft", ",", "int", "newWidth", ",", "int", "newHeight", ")", "{", "rampDownValue", "=", "(", "float", ")", "getDesiredFPS", "(", ")", "/", "1000F", ";", "maxPeakLevelRampDownDela...
Is called when the component is resized @see de.quippy.javamod.main.gui.components.MeterPanelBase#componentWasResized()
[ "Is", "called", "when", "the", "component", "is", "resized" ]
train
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/main/gui/components/VUMeterPanel.java#L68-L85
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperator.java
WindowOperator.emitWindowContents
@SuppressWarnings("unchecked") private void emitWindowContents(W window, ACC contents) throws Exception { """ Emits the contents of the given window using the {@link InternalWindowFunction}. """ timestampedCollector.setAbsoluteTimestamp(window.maxTimestamp()); processContext.window = window; userFunctio...
java
@SuppressWarnings("unchecked") private void emitWindowContents(W window, ACC contents) throws Exception { timestampedCollector.setAbsoluteTimestamp(window.maxTimestamp()); processContext.window = window; userFunction.process(triggerContext.key, window, processContext, contents, timestampedCollector); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "emitWindowContents", "(", "W", "window", ",", "ACC", "contents", ")", "throws", "Exception", "{", "timestampedCollector", ".", "setAbsoluteTimestamp", "(", "window", ".", "maxTimestamp", "(", ...
Emits the contents of the given window using the {@link InternalWindowFunction}.
[ "Emits", "the", "contents", "of", "the", "given", "window", "using", "the", "{" ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperator.java#L542-L547
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.extractColumn
public static DMatrixSparseCSC extractColumn(DMatrixSparseCSC A , int column , @Nullable DMatrixSparseCSC out ) { """ Extracts a column from A and stores it into out. @param A (Input) Source matrix. not modified. @param column The column in A @param out (Output, Optional) Storage for column vector @return Th...
java
public static DMatrixSparseCSC extractColumn(DMatrixSparseCSC A , int column , @Nullable DMatrixSparseCSC out ) { if( out == null ) out = new DMatrixSparseCSC(1,1,1); int idx0 = A.col_idx[column]; int idx1 = A.col_idx[column+1]; out.reshape(A.numRows,1,idx1-idx0); ...
[ "public", "static", "DMatrixSparseCSC", "extractColumn", "(", "DMatrixSparseCSC", "A", ",", "int", "column", ",", "@", "Nullable", "DMatrixSparseCSC", "out", ")", "{", "if", "(", "out", "==", "null", ")", "out", "=", "new", "DMatrixSparseCSC", "(", "1", ",",...
Extracts a column from A and stores it into out. @param A (Input) Source matrix. not modified. @param column The column in A @param out (Output, Optional) Storage for column vector @return The column of A.
[ "Extracts", "a", "column", "from", "A", "and", "stores", "it", "into", "out", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L1137-L1155
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/UserResourcesImpl.java
UserResourcesImpl.promoteAlternateEmail
public AlternateEmail promoteAlternateEmail(long userId, long altEmailId) throws SmartsheetException { """ Promote and alternate email to primary. @param userId id of the user @param altEmailId alternate email id @return alternateEmail of the primary @throws IllegalArgumentException if any argument is null o...
java
public AlternateEmail promoteAlternateEmail(long userId, long altEmailId) throws SmartsheetException { HttpRequest request = createHttpRequest(smartsheet.getBaseURI().resolve( "users/" + userId + "/alternateemails/" + altEmailId + "/makeprimary"), HttpMethod.POST); Object obj = null; ...
[ "public", "AlternateEmail", "promoteAlternateEmail", "(", "long", "userId", ",", "long", "altEmailId", ")", "throws", "SmartsheetException", "{", "HttpRequest", "request", "=", "createHttpRequest", "(", "smartsheet", ".", "getBaseURI", "(", ")", ".", "resolve", "(",...
Promote and alternate email to primary. @param userId id of the user @param altEmailId alternate email id @return alternateEmail of the primary @throws IllegalArgumentException if any argument is null or empty string @throws InvalidRequestException if there is any problem with the REST API request @throws Authorizatio...
[ "Promote", "and", "alternate", "email", "to", "primary", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/UserResourcesImpl.java#L346-L367
trellis-ldp/trellis
core/http/src/main/java/org/trellisldp/http/impl/DeleteHandler.java
DeleteHandler.initialize
public ResponseBuilder initialize(final Resource parent, final Resource resource) { """ Initialze the handler with a Trellis resource. @param parent the parent resource @param resource the Trellis resource @return a response builder """ // Check that the persistence layer supports LDP-R i...
java
public ResponseBuilder initialize(final Resource parent, final Resource resource) { // Check that the persistence layer supports LDP-R if (MISSING_RESOURCE.equals(resource)) { // Can't delete a non-existent resources throw new NotFoundException(); } else if (DELETED_RESO...
[ "public", "ResponseBuilder", "initialize", "(", "final", "Resource", "parent", ",", "final", "Resource", "resource", ")", "{", "// Check that the persistence layer supports LDP-R", "if", "(", "MISSING_RESOURCE", ".", "equals", "(", "resource", ")", ")", "{", "// Can't...
Initialze the handler with a Trellis resource. @param parent the parent resource @param resource the Trellis resource @return a response builder
[ "Initialze", "the", "handler", "with", "a", "Trellis", "resource", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/core/http/src/main/java/org/trellisldp/http/impl/DeleteHandler.java#L80-L102
JM-Lab/utils-elasticsearch
src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchIndex.java
JMElasticsearchIndex.upsertData
public UpdateResponse upsertData(Map<String, ?> source, String index, String type, String id) { """ Upsert data update response. @param source the source @param index the index @param type the type @param id the id @return the update response """ return upsertQuery(buildPrepar...
java
public UpdateResponse upsertData(Map<String, ?> source, String index, String type, String id) { return upsertQuery(buildPrepareUpsert(index, type, id, source)); }
[ "public", "UpdateResponse", "upsertData", "(", "Map", "<", "String", ",", "?", ">", "source", ",", "String", "index", ",", "String", "type", ",", "String", "id", ")", "{", "return", "upsertQuery", "(", "buildPrepareUpsert", "(", "index", ",", "type", ",", ...
Upsert data update response. @param source the source @param index the index @param type the type @param id the id @return the update response
[ "Upsert", "data", "update", "response", "." ]
train
https://github.com/JM-Lab/utils-elasticsearch/blob/6ccec90e1e51d65d2af5efbb6d7b9f9bad90e638/src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchIndex.java#L118-L121
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/SepaUtil.java
SepaUtil.sumBtgValueObject
public static Value sumBtgValueObject(HashMap<String, String> properties) { """ Liefert ein Value-Objekt mit den Summen des Auftrages. @param properties Auftrags-Properties. @return das Value-Objekt mit der Summe. """ Integer maxIndex = maxIndex(properties); BigDecimal btg = sumBtgValue(pro...
java
public static Value sumBtgValueObject(HashMap<String, String> properties) { Integer maxIndex = maxIndex(properties); BigDecimal btg = sumBtgValue(properties, maxIndex); String curr = properties.get(insertIndex("btg.curr", maxIndex == null ? null : 0)); return new Value(btg, curr); }
[ "public", "static", "Value", "sumBtgValueObject", "(", "HashMap", "<", "String", ",", "String", ">", "properties", ")", "{", "Integer", "maxIndex", "=", "maxIndex", "(", "properties", ")", ";", "BigDecimal", "btg", "=", "sumBtgValue", "(", "properties", ",", ...
Liefert ein Value-Objekt mit den Summen des Auftrages. @param properties Auftrags-Properties. @return das Value-Objekt mit der Summe.
[ "Liefert", "ein", "Value", "-", "Objekt", "mit", "den", "Summen", "des", "Auftrages", "." ]
train
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/SepaUtil.java#L171-L176
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/parallel/ParallelMapIterate.java
ParallelMapIterate.forEachKeyValue
public static <K, V> void forEachKeyValue(Map<K, V> map, Procedure2<? super K, ? super V> procedure2) { """ A parallel form of forEachKeyValue. @see MapIterate#forEachKeyValue(Map, Procedure2) @see ParallelIterate """ ParallelMapIterate.forEachKeyValue(map, procedure2, 2, map.size()); }
java
public static <K, V> void forEachKeyValue(Map<K, V> map, Procedure2<? super K, ? super V> procedure2) { ParallelMapIterate.forEachKeyValue(map, procedure2, 2, map.size()); }
[ "public", "static", "<", "K", ",", "V", ">", "void", "forEachKeyValue", "(", "Map", "<", "K", ",", "V", ">", "map", ",", "Procedure2", "<", "?", "super", "K", ",", "?", "super", "V", ">", "procedure2", ")", "{", "ParallelMapIterate", ".", "forEachKey...
A parallel form of forEachKeyValue. @see MapIterate#forEachKeyValue(Map, Procedure2) @see ParallelIterate
[ "A", "parallel", "form", "of", "forEachKeyValue", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/parallel/ParallelMapIterate.java#L48-L51
sarxos/win-registry
src/main/java/com/github/sarxos/winreg/WindowsRegistry.java
WindowsRegistry.writeStringValue
public void writeStringValue(HKey hk, String key, String valueName, String value) throws RegistryException { """ Write a value in a given key/value name @param hk the HKEY to be used @param key the key to be written @param valueName the value name @param value the value @throws RegistryException when someth...
java
public void writeStringValue(HKey hk, String key, String valueName, String value) throws RegistryException { try { ReflectedMethods.writeStringValue(hk.root(), hk.hex(), key, valueName, value); } catch (Exception e) { throw new RegistryException("Cannot write " + valueName + " value " + value + " in key "...
[ "public", "void", "writeStringValue", "(", "HKey", "hk", ",", "String", "key", ",", "String", "valueName", ",", "String", "value", ")", "throws", "RegistryException", "{", "try", "{", "ReflectedMethods", ".", "writeStringValue", "(", "hk", ".", "root", "(", ...
Write a value in a given key/value name @param hk the HKEY to be used @param key the key to be written @param valueName the value name @param value the value @throws RegistryException when something is not right
[ "Write", "a", "value", "in", "a", "given", "key", "/", "value", "name" ]
train
https://github.com/sarxos/win-registry/blob/5ccbe2157ae0ee894de7c41bec4bd7b1e0f5c437/src/main/java/com/github/sarxos/winreg/WindowsRegistry.java#L156-L162
buschmais/jqa-core-framework
scanner/src/main/java/com/buschmais/jqassistant/core/scanner/impl/ScannerImpl.java
ScannerImpl.pushDesriptor
private <D extends Descriptor> void pushDesriptor(Class<D> type, D descriptor) { """ Push the given descriptor with all it's types to the context. @param descriptor The descriptor. @param <D> The descriptor type. """ if (descriptor != null) { scannerContext.push(type, descriptor); ...
java
private <D extends Descriptor> void pushDesriptor(Class<D> type, D descriptor) { if (descriptor != null) { scannerContext.push(type, descriptor); scannerContext.setCurrentDescriptor(descriptor); } }
[ "private", "<", "D", "extends", "Descriptor", ">", "void", "pushDesriptor", "(", "Class", "<", "D", ">", "type", ",", "D", "descriptor", ")", "{", "if", "(", "descriptor", "!=", "null", ")", "{", "scannerContext", ".", "push", "(", "type", ",", "descri...
Push the given descriptor with all it's types to the context. @param descriptor The descriptor. @param <D> The descriptor type.
[ "Push", "the", "given", "descriptor", "with", "all", "it", "s", "types", "to", "the", "context", "." ]
train
https://github.com/buschmais/jqa-core-framework/blob/0e63ff509cfe52f9063539a23d5f9f183b2ea4a5/scanner/src/main/java/com/buschmais/jqassistant/core/scanner/impl/ScannerImpl.java#L186-L191
dropbox/dropbox-sdk-java
src/main/java/com/dropbox/core/json/JsonReader.java
JsonReader.readTags
public static String[] readTags(JsonParser parser) throws IOException, JsonReadException { """ Helper to read and parse the optional ".tag" field. If one is found, positions the parser at the next field (or the closing brace); otherwise leaves the parser position unchanged. Returns null if there isn't a ...
java
public static String[] readTags(JsonParser parser) throws IOException, JsonReadException { if (parser.getCurrentToken() != JsonToken.FIELD_NAME) { return null; } if (!".tag".equals(parser.getCurrentName())) { return null; } parser.nextToken(); ...
[ "public", "static", "String", "[", "]", "readTags", "(", "JsonParser", "parser", ")", "throws", "IOException", ",", "JsonReadException", "{", "if", "(", "parser", ".", "getCurrentToken", "(", ")", "!=", "JsonToken", ".", "FIELD_NAME", ")", "{", "return", "nu...
Helper to read and parse the optional ".tag" field. If one is found, positions the parser at the next field (or the closing brace); otherwise leaves the parser position unchanged. Returns null if there isn't a ".tag" field; otherwise an array of strings (the tags). Initially the parser must be positioned right after th...
[ "Helper", "to", "read", "and", "parse", "the", "optional", ".", "tag", "field", ".", "If", "one", "is", "found", "positions", "the", "parser", "at", "the", "next", "field", "(", "or", "the", "closing", "brace", ")", ";", "otherwise", "leaves", "the", "...
train
https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/json/JsonReader.java#L68-L84
michael-rapp/AndroidMaterialDialog
library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java
DialogRootView.createScrollViewScrollListener
@NonNull private ScrollListener createScrollViewScrollListener() { """ Creates and returns a listener, which allows to observe when the scroll view, which is contained by the dialog, is scrolled. @return The listener, which has been created, as an instance of the type {@link OnScrollChangedListener}. The ...
java
@NonNull private ScrollListener createScrollViewScrollListener() { return new ScrollListener() { @Override public void onScrolled(final boolean scrolledToTop, final boolean scrolledToBottom) { adaptDividerVisibilities(scrolledToTop, scrolledToBottom, true); ...
[ "@", "NonNull", "private", "ScrollListener", "createScrollViewScrollListener", "(", ")", "{", "return", "new", "ScrollListener", "(", ")", "{", "@", "Override", "public", "void", "onScrolled", "(", "final", "boolean", "scrolledToTop", ",", "final", "boolean", "scr...
Creates and returns a listener, which allows to observe when the scroll view, which is contained by the dialog, is scrolled. @return The listener, which has been created, as an instance of the type {@link OnScrollChangedListener}. The listener may not be null
[ "Creates", "and", "returns", "a", "listener", "which", "allows", "to", "observe", "when", "the", "scroll", "view", "which", "is", "contained", "by", "the", "dialog", "is", "scrolled", "." ]
train
https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L845-L855
Appendium/flatpack
flatpack/src/main/java/net/sf/flatpack/util/ParserUtils.java
ParserUtils.getPZMetaDataFromFile
public static MetaData getPZMetaDataFromFile(final String line, final char delimiter, final char qualifier, final Parser p, final boolean addSuffixToDuplicateColumnNames) { """ Returns a list of ColumnMetaData objects. This is for use with delimited files. The first line of the file which contains da...
java
public static MetaData getPZMetaDataFromFile(final String line, final char delimiter, final char qualifier, final Parser p, final boolean addSuffixToDuplicateColumnNames) { final List<ColumnMetaData> results = new ArrayList<>(); final Set<String> dupCheck = new HashSet<>(); fin...
[ "public", "static", "MetaData", "getPZMetaDataFromFile", "(", "final", "String", "line", ",", "final", "char", "delimiter", ",", "final", "char", "qualifier", ",", "final", "Parser", "p", ",", "final", "boolean", "addSuffixToDuplicateColumnNames", ")", "{", "final...
Returns a list of ColumnMetaData objects. This is for use with delimited files. The first line of the file which contains data will be used as the column names @param line @param delimiter @param qualifier @param p PZParser used to specify additional option when working with the ColumnMetaData. Can be null @param addS...
[ "Returns", "a", "list", "of", "ColumnMetaData", "objects", ".", "This", "is", "for", "use", "with", "delimited", "files", ".", "The", "first", "line", "of", "the", "file", "which", "contains", "data", "will", "be", "used", "as", "the", "column", "names" ]
train
https://github.com/Appendium/flatpack/blob/5e09875d97db7038e3ba6af9468f5313d99b0082/flatpack/src/main/java/net/sf/flatpack/util/ParserUtils.java#L399-L425
Stratio/bdt
src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java
ElasticSearchUtils.existsMapping
public boolean existsMapping(String indexName, String mappingName) { """ Check if a mapping exists in an expecific index. @param indexName @param mappingName @return true if the mapping exists and false in other case """ ClusterStateResponse resp = this.client.admin().cluster().prepareState().exec...
java
public boolean existsMapping(String indexName, String mappingName) { ClusterStateResponse resp = this.client.admin().cluster().prepareState().execute().actionGet(); if (resp.getState().getMetaData().index(indexName) == null) { return false; } ImmutableOpenMap<String, Mapping...
[ "public", "boolean", "existsMapping", "(", "String", "indexName", ",", "String", "mappingName", ")", "{", "ClusterStateResponse", "resp", "=", "this", ".", "client", ".", "admin", "(", ")", ".", "cluster", "(", ")", ".", "prepareState", "(", ")", ".", "exe...
Check if a mapping exists in an expecific index. @param indexName @param mappingName @return true if the mapping exists and false in other case
[ "Check", "if", "a", "mapping", "exists", "in", "an", "expecific", "index", "." ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/ElasticSearchUtils.java#L200-L212
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/algo/CoreGraphAlgorithms.java
CoreGraphAlgorithms.loadDegrees
public int[] loadDegrees(String relName, Direction direction) { """ /* private int[] loadDegrees(ReadOperations ops, PrimitiveLongIterator nodeIds, int size, int relType, Direction direction) { int[] degrees = new int[size]; Arrays.fill(degrees,-1); while (nodeIds.hasNext()) { long nodeId = nodeIds.next(); ...
java
public int[] loadDegrees(String relName, Direction direction) { int relType = relName == null ? ANY_RELATIONSHIP_TYPE : ktx.tokenRead().relationshipType(relName); return loadDegrees(relType, direction); }
[ "public", "int", "[", "]", "loadDegrees", "(", "String", "relName", ",", "Direction", "direction", ")", "{", "int", "relType", "=", "relName", "==", "null", "?", "ANY_RELATIONSHIP_TYPE", ":", "ktx", ".", "tokenRead", "(", ")", ".", "relationshipType", "(", ...
/* private int[] loadDegrees(ReadOperations ops, PrimitiveLongIterator nodeIds, int size, int relType, Direction direction) { int[] degrees = new int[size]; Arrays.fill(degrees,-1); while (nodeIds.hasNext()) { long nodeId = nodeIds.next(); degrees[mapId(nodeId)] = relType == ANY_RELATIONSHIP_TYPE ? ops.nodeGetDegree(n...
[ "/", "*", "private", "int", "[]", "loadDegrees", "(", "ReadOperations", "ops", "PrimitiveLongIterator", "nodeIds", "int", "size", "int", "relType", "Direction", "direction", ")", "{", "int", "[]", "degrees", "=", "new", "int", "[", "size", "]", ";", "Arrays"...
train
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/algo/CoreGraphAlgorithms.java#L228-L231
casmi/casmi
src/main/java/casmi/graphics/element/Polygon.java
Polygon.vertex
public void vertex(double x, double y, double z) { """ Adds the corner of Polygon. @param x The x-coordinate of a new added corner. @param y The y-coordinate of a new added corner. @param z The z-coordinate of a new added corner. """ MODE = LINES_3D; this.cornerX.add(x); this.corne...
java
public void vertex(double x, double y, double z) { MODE = LINES_3D; this.cornerX.add(x); this.cornerY.add(y); this.cornerZ.add(z); setNumberOfCorner(this.cornerX.size()); calcG(); }
[ "public", "void", "vertex", "(", "double", "x", ",", "double", "y", ",", "double", "z", ")", "{", "MODE", "=", "LINES_3D", ";", "this", ".", "cornerX", ".", "add", "(", "x", ")", ";", "this", ".", "cornerY", ".", "add", "(", "y", ")", ";", "thi...
Adds the corner of Polygon. @param x The x-coordinate of a new added corner. @param y The y-coordinate of a new added corner. @param z The z-coordinate of a new added corner.
[ "Adds", "the", "corner", "of", "Polygon", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Polygon.java#L87-L94
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/socks/Proxy.java
Proxy.setDefaultProxy
public static void setDefaultProxy(String hostName,int port,String user) throws UnknownHostException { """ Sets SOCKS4 proxy as default. @param hostName Host name on which SOCKS4 server is running. @param port Port on which SOCKS4 server is running. @param user Username to use for c...
java
public static void setDefaultProxy(String hostName,int port,String user) throws UnknownHostException{ defaultProxy = new Socks4Proxy(hostName,port,user); }
[ "public", "static", "void", "setDefaultProxy", "(", "String", "hostName", ",", "int", "port", ",", "String", "user", ")", "throws", "UnknownHostException", "{", "defaultProxy", "=", "new", "Socks4Proxy", "(", "hostName", ",", "port", ",", "user", ")", ";", "...
Sets SOCKS4 proxy as default. @param hostName Host name on which SOCKS4 server is running. @param port Port on which SOCKS4 server is running. @param user Username to use for communications with proxy.
[ "Sets", "SOCKS4", "proxy", "as", "default", "." ]
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/socks/Proxy.java#L205-L208
bbottema/simple-java-mail
modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageHelper.java
MimeMessageHelper.getBodyPartFromDatasource
private static BodyPart getBodyPartFromDatasource(final AttachmentResource attachmentResource, final String dispositionType) throws MessagingException { """ Helper method which generates a {@link BodyPart} from an {@link AttachmentResource} (from its {@link DataSource}) and a disposition type ({@link Part#INLI...
java
private static BodyPart getBodyPartFromDatasource(final AttachmentResource attachmentResource, final String dispositionType) throws MessagingException { final BodyPart attachmentPart = new MimeBodyPart(); // setting headers isn't working nicely using the javax mail API, so let's do that manually final String r...
[ "private", "static", "BodyPart", "getBodyPartFromDatasource", "(", "final", "AttachmentResource", "attachmentResource", ",", "final", "String", "dispositionType", ")", "throws", "MessagingException", "{", "final", "BodyPart", "attachmentPart", "=", "new", "MimeBodyPart", ...
Helper method which generates a {@link BodyPart} from an {@link AttachmentResource} (from its {@link DataSource}) and a disposition type ({@link Part#INLINE} or {@link Part#ATTACHMENT}). With this the attachment data can be converted into objects that fit in the email structure. <p> For every attachment and embedded im...
[ "Helper", "method", "which", "generates", "a", "{", "@link", "BodyPart", "}", "from", "an", "{", "@link", "AttachmentResource", "}", "(", "from", "its", "{", "@link", "DataSource", "}", ")", "and", "a", "disposition", "type", "(", "{", "@link", "Part#INLIN...
train
https://github.com/bbottema/simple-java-mail/blob/b03635328aeecd525e35eddfef8f5b9a184559d8/modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageHelper.java#L228-L241
RKumsher/utils
src/main/java/com/github/rkumsher/collection/ArrayUtils.java
ArrayUtils.randomFrom
@SafeVarargs public static <T> T randomFrom(T[] array, T... excludes) { """ Returns a random element from the given array that's not in the values to exclude. @param array array to return random element from @param excludes values to exclude @param <T> the type of elements in the given array @return random...
java
@SafeVarargs public static <T> T randomFrom(T[] array, T... excludes) { return randomFrom(array, Arrays.asList(excludes)); }
[ "@", "SafeVarargs", "public", "static", "<", "T", ">", "T", "randomFrom", "(", "T", "[", "]", "array", ",", "T", "...", "excludes", ")", "{", "return", "randomFrom", "(", "array", ",", "Arrays", ".", "asList", "(", "excludes", ")", ")", ";", "}" ]
Returns a random element from the given array that's not in the values to exclude. @param array array to return random element from @param excludes values to exclude @param <T> the type of elements in the given array @return random element from the given array that's not in the values to exclude @throws IllegalArgumen...
[ "Returns", "a", "random", "element", "from", "the", "given", "array", "that", "s", "not", "in", "the", "values", "to", "exclude", "." ]
train
https://github.com/RKumsher/utils/blob/fcdb190569cd0288249bf4b46fd418f8c01d1caf/src/main/java/com/github/rkumsher/collection/ArrayUtils.java#L40-L43
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/SimpleTimeZone.java
SimpleTimeZone.setStartRule
public void setStartRule(int startMonth, int startDay, int startDayOfWeek, int startTime) { """ Sets the daylight saving time start rule. For example, if daylight saving time starts on the first Sunday in April at 2 am in local wall clock time, you can set the start rule by calling: <pre><code>setStartRule(Cale...
java
public void setStartRule(int startMonth, int startDay, int startDayOfWeek, int startTime) { this.startMonth = startMonth; this.startDay = startDay; this.startDayOfWeek = startDayOfWeek; this.startTime = startTime; startTimeMode = WALL_TIME; decodeStartRule(); ...
[ "public", "void", "setStartRule", "(", "int", "startMonth", ",", "int", "startDay", ",", "int", "startDayOfWeek", ",", "int", "startTime", ")", "{", "this", ".", "startMonth", "=", "startMonth", ";", "this", ".", "startDay", "=", "startDay", ";", "this", "...
Sets the daylight saving time start rule. For example, if daylight saving time starts on the first Sunday in April at 2 am in local wall clock time, you can set the start rule by calling: <pre><code>setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 2*60*60*1000);</code></pre> @param startMonth The daylight saving ...
[ "Sets", "the", "daylight", "saving", "time", "start", "rule", ".", "For", "example", "if", "daylight", "saving", "time", "starts", "on", "the", "first", "Sunday", "in", "April", "at", "2", "am", "in", "local", "wall", "clock", "time", "you", "can", "set"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/SimpleTimeZone.java#L385-L394
gwtplus/google-gin
src/main/java/com/google/gwt/inject/client/multibindings/GinMultibinder.java
GinMultibinder.newSetBinder
public static <T> GinMultibinder<T> newSetBinder(GinBinder binder, Class<T> type) { """ Returns a new multibinder that collects instances of {@code type} in a {@link java.util.Set} that is itself bound with no binding annotation. """ return newSetBinder(binder, TypeLiteral.get(type)); }
java
public static <T> GinMultibinder<T> newSetBinder(GinBinder binder, Class<T> type) { return newSetBinder(binder, TypeLiteral.get(type)); }
[ "public", "static", "<", "T", ">", "GinMultibinder", "<", "T", ">", "newSetBinder", "(", "GinBinder", "binder", ",", "Class", "<", "T", ">", "type", ")", "{", "return", "newSetBinder", "(", "binder", ",", "TypeLiteral", ".", "get", "(", "type", ")", ")...
Returns a new multibinder that collects instances of {@code type} in a {@link java.util.Set} that is itself bound with no binding annotation.
[ "Returns", "a", "new", "multibinder", "that", "collects", "instances", "of", "{" ]
train
https://github.com/gwtplus/google-gin/blob/595e61ee0d2fa508815c016e924ec0e5cea2a2aa/src/main/java/com/google/gwt/inject/client/multibindings/GinMultibinder.java#L65-L67
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/util/GraphUtils.java
GraphUtils.toDot
public static <D> String toDot(Iterable<? extends TarjanNode<D>> nodes, String name, String header) { """ Debugging: dot representation of a set of connected nodes. The resulting dot representation will use {@code Node.toString} to display node labels and {@code Node.printDependency} to display edge labels. The ...
java
public static <D> String toDot(Iterable<? extends TarjanNode<D>> nodes, String name, String header) { StringBuilder buf = new StringBuilder(); buf.append(String.format("digraph %s {\n", name)); buf.append(String.format("label = \"%s\";\n", header)); //dump nodes for (TarjanNode<D...
[ "public", "static", "<", "D", ">", "String", "toDot", "(", "Iterable", "<", "?", "extends", "TarjanNode", "<", "D", ">", ">", "nodes", ",", "String", "name", ",", "String", "header", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", "...
Debugging: dot representation of a set of connected nodes. The resulting dot representation will use {@code Node.toString} to display node labels and {@code Node.printDependency} to display edge labels. The resulting representation is also customizable with a graph name and a header.
[ "Debugging", ":", "dot", "representation", "of", "a", "set", "of", "connected", "nodes", ".", "The", "resulting", "dot", "representation", "will", "use", "{" ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/util/GraphUtils.java#L177-L196
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java
ManagementGraph.getInputVertex
public ManagementVertex getInputVertex(final int stage, final int index) { """ Returns the input vertex with the specified index for the given stage. @param stage the index of the stage @param index the index of the input vertex to return @return the input vertex with the specified index or <code>null</code...
java
public ManagementVertex getInputVertex(final int stage, final int index) { if (stage >= this.stages.size()) { return null; } return this.stages.get(stage).getInputManagementVertex(index); }
[ "public", "ManagementVertex", "getInputVertex", "(", "final", "int", "stage", ",", "final", "int", "index", ")", "{", "if", "(", "stage", ">=", "this", ".", "stages", ".", "size", "(", ")", ")", "{", "return", "null", ";", "}", "return", "this", ".", ...
Returns the input vertex with the specified index for the given stage. @param stage the index of the stage @param index the index of the input vertex to return @return the input vertex with the specified index or <code>null</code> if no input vertex with such an index exists in that stage
[ "Returns", "the", "input", "vertex", "with", "the", "specified", "index", "for", "the", "given", "stage", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java#L290-L297
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamFilenameHelper.java
DatastreamFilenameHelper.addContentDispositionHeader
public final void addContentDispositionHeader(Context context, String pid, String dsID, String download, Date asOfDateTime, MIMETypedStream stream) throws Exception { """ Add a content disposition header to a MIMETypedStream based on configuration preferences. Header by default specifies "inline"; if download=tru...
java
public final void addContentDispositionHeader(Context context, String pid, String dsID, String download, Date asOfDateTime, MIMETypedStream stream) throws Exception { String headerValue = null; String filename = null; // is downloading requested? if (download != null && download.equals(...
[ "public", "final", "void", "addContentDispositionHeader", "(", "Context", "context", ",", "String", "pid", ",", "String", "dsID", ",", "String", "download", ",", "Date", "asOfDateTime", ",", "MIMETypedStream", "stream", ")", "throws", "Exception", "{", "String", ...
Add a content disposition header to a MIMETypedStream based on configuration preferences. Header by default specifies "inline"; if download=true then "attachment" is specified. @param context @param pid @param dsID @param download true if file is to be downloaded @param asOfDateTime @param stream @throws Exception
[ "Add", "a", "content", "disposition", "header", "to", "a", "MIMETypedStream", "based", "on", "configuration", "preferences", ".", "Header", "by", "default", "specifies", "inline", ";", "if", "download", "=", "true", "then", "attachment", "is", "specified", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamFilenameHelper.java#L181-L210
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/com/sshtools/sftp/SftpClient.java
SftpClient.getFiles
public SftpFile[] getFiles(String remote, String local) throws FileNotFoundException, SftpStatusException, SshException, TransferCancelledException { """ Download the remote files into the local file. @param remote @param local @return SftpFile[] @throws FileNotFoundException @throws SftpStatusExc...
java
public SftpFile[] getFiles(String remote, String local) throws FileNotFoundException, SftpStatusException, SshException, TransferCancelledException { return getFiles(remote, local, false); }
[ "public", "SftpFile", "[", "]", "getFiles", "(", "String", "remote", ",", "String", "local", ")", "throws", "FileNotFoundException", ",", "SftpStatusException", ",", "SshException", ",", "TransferCancelledException", "{", "return", "getFiles", "(", "remote", ",", ...
Download the remote files into the local file. @param remote @param local @return SftpFile[] @throws FileNotFoundException @throws SftpStatusException @throws SshException @throws TransferCancelledException
[ "Download", "the", "remote", "files", "into", "the", "local", "file", "." ]
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/sftp/SftpClient.java#L2972-L2976
UrielCh/ovh-java-sdk
ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/ApiOvhPrice.java
ApiOvhPrice.hosting_web_ssl_sslName_GET
public OvhPrice hosting_web_ssl_sslName_GET(net.minidev.ovh.api.price.hosting.web.OvhSslEnum sslName) throws IOException { """ Get the price for hosted ssl option REST: GET /price/hosting/web/ssl/{sslName} @param sslName [required] Ssl """ String qPath = "/price/hosting/web/ssl/{sslName}"; StringBuilde...
java
public OvhPrice hosting_web_ssl_sslName_GET(net.minidev.ovh.api.price.hosting.web.OvhSslEnum sslName) throws IOException { String qPath = "/price/hosting/web/ssl/{sslName}"; StringBuilder sb = path(qPath, sslName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhPrice.class); }
[ "public", "OvhPrice", "hosting_web_ssl_sslName_GET", "(", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "price", ".", "hosting", ".", "web", ".", "OvhSslEnum", "sslName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/price/hosting/web/ssl/...
Get the price for hosted ssl option REST: GET /price/hosting/web/ssl/{sslName} @param sslName [required] Ssl
[ "Get", "the", "price", "for", "hosted", "ssl", "option" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/ApiOvhPrice.java#L245-L250
jbundle/jbundle
base/remote/src/main/java/org/jbundle/base/remote/proxy/BaseHolder.java
BaseHolder.doProcess
public void doProcess(InputStream in, PrintWriter out, Map<String, Object> properties) throws RemoteException { """ Handle the command send from my client peer. @param in The (optional) Inputstream to get the params from. @param out The stream to write the results. @param properties Temporary session pr...
java
public void doProcess(InputStream in, PrintWriter out, Map<String, Object> properties) throws RemoteException { Utility.getLogger().warning("Command not handled: " + this.getProperty(REMOTE_COMMAND, properties)); }
[ "public", "void", "doProcess", "(", "InputStream", "in", ",", "PrintWriter", "out", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "throws", "RemoteException", "{", "Utility", ".", "getLogger", "(", ")", ".", "warning", "(", "\"Command not...
Handle the command send from my client peer. @param in The (optional) Inputstream to get the params from. @param out The stream to write the results. @param properties Temporary session properties.
[ "Handle", "the", "command", "send", "from", "my", "client", "peer", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/proxy/BaseHolder.java#L111-L115
gsi-upm/Shanks
shanks-core/src/main/java/es/upm/dit/gsi/shanks/agent/capability/movement/Location.java
Location.isNearTo
public boolean isNearTo(Double2D location, double distance) { """ Compare two locations and return if the locations are near or not @param location Location to compare with @param distance The distance between two locations @return true is the real distance is lower or equals than the distance parameter "...
java
public boolean isNearTo(Double2D location, double distance) { if (this.is2DLocation()) { return this.getLocation2D().distance(location) < distance; } else { return false; } }
[ "public", "boolean", "isNearTo", "(", "Double2D", "location", ",", "double", "distance", ")", "{", "if", "(", "this", ".", "is2DLocation", "(", ")", ")", "{", "return", "this", ".", "getLocation2D", "(", ")", ".", "distance", "(", "location", ")", "<", ...
Compare two locations and return if the locations are near or not @param location Location to compare with @param distance The distance between two locations @return true is the real distance is lower or equals than the distance parameter
[ "Compare", "two", "locations", "and", "return", "if", "the", "locations", "are", "near", "or", "not" ]
train
https://github.com/gsi-upm/Shanks/blob/35d87a81c22731f4f83bbd0571c9c6d466bd16be/shanks-core/src/main/java/es/upm/dit/gsi/shanks/agent/capability/movement/Location.java#L153-L159
Jasig/uPortal
uPortal-rendering/src/main/java/org/apereo/portal/portlet/rendering/PortletEventQueue.java
PortletEventQueue.offerEvent
public void offerEvent(IPortletWindowId portletWindowId, QueuedEvent event) { """ Queue an {@link Event} for the specified {@link IPortletWindowId} """ Queue<QueuedEvent> events = resolvedEventQueues.get(portletWindowId); if (events == null) { events = Concurrent...
java
public void offerEvent(IPortletWindowId portletWindowId, QueuedEvent event) { Queue<QueuedEvent> events = resolvedEventQueues.get(portletWindowId); if (events == null) { events = ConcurrentMapUtils.putIfAbsent( resolvedEventQueues, ...
[ "public", "void", "offerEvent", "(", "IPortletWindowId", "portletWindowId", ",", "QueuedEvent", "event", ")", "{", "Queue", "<", "QueuedEvent", ">", "events", "=", "resolvedEventQueues", ".", "get", "(", "portletWindowId", ")", ";", "if", "(", "events", "==", ...
Queue an {@link Event} for the specified {@link IPortletWindowId}
[ "Queue", "an", "{" ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/portlet/rendering/PortletEventQueue.java#L61-L72
jsonld-java/jsonld-java
core/src/main/java/com/github/jsonldjava/core/JsonLdProcessor.java
JsonLdProcessor.toRDF
public static Object toRDF(Object input, JsonLdTripleCallback callback) throws JsonLdError { """ Outputs the RDF dataset found in the given JSON-LD object, using the default {@link JsonLdOptions}. @param input the JSON-LD input. @param callback A callback that is called when the input has been converted to ...
java
public static Object toRDF(Object input, JsonLdTripleCallback callback) throws JsonLdError { return toRDF(input, callback, new JsonLdOptions("")); }
[ "public", "static", "Object", "toRDF", "(", "Object", "input", ",", "JsonLdTripleCallback", "callback", ")", "throws", "JsonLdError", "{", "return", "toRDF", "(", "input", ",", "callback", ",", "new", "JsonLdOptions", "(", "\"\"", ")", ")", ";", "}" ]
Outputs the RDF dataset found in the given JSON-LD object, using the default {@link JsonLdOptions}. @param input the JSON-LD input. @param callback A callback that is called when the input has been converted to Quads (null to use options.format instead). @return A JSON-LD object. @throws JsonLdError If there is an err...
[ "Outputs", "the", "RDF", "dataset", "found", "in", "the", "given", "JSON", "-", "LD", "object", "using", "the", "default", "{", "@link", "JsonLdOptions", "}", "." ]
train
https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/JsonLdProcessor.java#L571-L573
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/PublicanPODocBookBuilder.java
PublicanPODocBookBuilder.buildPOTopic
protected void buildPOTopic(final POBuildData buildData, final SpecTopic specTopic, final String filePathAndName) throws BuildProcessingException { """ Builds the POT/PO files for a topic. @param buildData Information and data structures for the build. @param specTopic T...
java
protected void buildPOTopic(final POBuildData buildData, final SpecTopic specTopic, final String filePathAndName) throws BuildProcessingException { if (specTopic != null) { final Map<String, TranslationDetails> translations = new LinkedHashMap<String, TranslationDetails>(); ...
[ "protected", "void", "buildPOTopic", "(", "final", "POBuildData", "buildData", ",", "final", "SpecTopic", "specTopic", ",", "final", "String", "filePathAndName", ")", "throws", "BuildProcessingException", "{", "if", "(", "specTopic", "!=", "null", ")", "{", "final...
Builds the POT/PO files for a topic. @param buildData Information and data structures for the build. @param specTopic The spec topic to create the POT/PO files for. @param filePathAndName The path and filename for the topic relative to the locale directory. @throws BuildProcessingEx...
[ "Builds", "the", "POT", "/", "PO", "files", "for", "a", "topic", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/PublicanPODocBookBuilder.java#L925-L934
xerial/larray
larray-buffer/src/main/java/xerial/larray/buffer/LBufferAPI.java
LBufferAPI.readFrom
public int readFrom(byte[] src, int srcOffset, long destOffset, int length) { """ Read the given source byte array, then overwrite this buffer's contents @param src source byte array @param srcOffset offset in source byte array to read from @param destOffset offset in this buffer to read to @param length max...
java
public int readFrom(byte[] src, int srcOffset, long destOffset, int length) { int readLen = (int) Math.min(src.length - srcOffset, Math.min(size() - destOffset, length)); ByteBuffer b = toDirectByteBuffer(destOffset, readLen); b.position(0); b.put(src, srcOffset, readLen); return...
[ "public", "int", "readFrom", "(", "byte", "[", "]", "src", ",", "int", "srcOffset", ",", "long", "destOffset", ",", "int", "length", ")", "{", "int", "readLen", "=", "(", "int", ")", "Math", ".", "min", "(", "src", ".", "length", "-", "srcOffset", ...
Read the given source byte array, then overwrite this buffer's contents @param src source byte array @param srcOffset offset in source byte array to read from @param destOffset offset in this buffer to read to @param length max number of bytes to read @return the number of bytes read
[ "Read", "the", "given", "source", "byte", "array", "then", "overwrite", "this", "buffer", "s", "contents" ]
train
https://github.com/xerial/larray/blob/9a1462623c0e56ca67c5341ea29832963c29479f/larray-buffer/src/main/java/xerial/larray/buffer/LBufferAPI.java#L371-L377
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseConnectionPoliciesInner.java
DatabaseConnectionPoliciesInner.getAsync
public Observable<DatabaseConnectionPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) { """ Gets a database's connection policy, which is used with table auditing. Table auditing is deprecated, use blob auditing instead. @param resourceGroupName The name of the resource gro...
java
public Observable<DatabaseConnectionPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) { return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<DatabaseConnectionPolicyInner>, DatabaseConnectionPolicyInner>() { ...
[ "public", "Observable", "<", "DatabaseConnectionPolicyInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ...
Gets a database's connection policy, which is used with table auditing. Table auditing is deprecated, use blob auditing instead. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of...
[ "Gets", "a", "database", "s", "connection", "policy", "which", "is", "used", "with", "table", "auditing", ".", "Table", "auditing", "is", "deprecated", "use", "blob", "auditing", "instead", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseConnectionPoliciesInner.java#L105-L112
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.signAsync
public Observable<KeyOperationResult> signAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeySignatureAlgorithm algorithm, byte[] value) { """ Creates a signature from a digest using the specified key. The SIGN operation is applicable to asymmetric and symmetric keys stored in Azure Key Vault...
java
public Observable<KeyOperationResult> signAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeySignatureAlgorithm algorithm, byte[] value) { return signWithServiceResponseAsync(vaultBaseUrl, keyName, keyVersion, algorithm, value).map(new Func1<ServiceResponse<KeyOperationResult>, KeyOperation...
[ "public", "Observable", "<", "KeyOperationResult", ">", "signAsync", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ",", "String", "keyVersion", ",", "JsonWebKeySignatureAlgorithm", "algorithm", ",", "byte", "[", "]", "value", ")", "{", "return", "signWi...
Creates a signature from a digest using the specified key. The SIGN operation is applicable to asymmetric and symmetric keys stored in Azure Key Vault since this operation uses the private portion of the key. This operation requires the keys/sign permission. @param vaultBaseUrl The vault name, for example https://myva...
[ "Creates", "a", "signature", "from", "a", "digest", "using", "the", "specified", "key", ".", "The", "SIGN", "operation", "is", "applicable", "to", "asymmetric", "and", "symmetric", "keys", "stored", "in", "Azure", "Key", "Vault", "since", "this", "operation", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L2403-L2410
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Holiday.java
Holiday.firstBetween
@Override public Date firstBetween(Date start, Date end) { """ Return the first occurrence of this holiday that is on or after the given start date and before the given end date. @param start Only occurrences on or after this date are returned. @param end Only occurrences before this date are returned. ...
java
@Override public Date firstBetween(Date start, Date end) { return rule.firstBetween(start, end); }
[ "@", "Override", "public", "Date", "firstBetween", "(", "Date", "start", ",", "Date", "end", ")", "{", "return", "rule", ".", "firstBetween", "(", "start", ",", "end", ")", ";", "}" ]
Return the first occurrence of this holiday that is on or after the given start date and before the given end date. @param start Only occurrences on or after this date are returned. @param end Only occurrences before this date are returned. @return The date on which this event occurs, or null if it does not oc...
[ "Return", "the", "first", "occurrence", "of", "this", "holiday", "that", "is", "on", "or", "after", "the", "given", "start", "date", "and", "before", "the", "given", "end", "date", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Holiday.java#L92-L95
akarnokd/ixjava
src/main/java/ix/Ix.java
Ix.orderedMerge
public static <T extends Comparable<? super T>> Ix<T> orderedMerge(Iterable<? extends Iterable<? extends T>> sources) { """ Merges self-comparable items from an Iterable sequence of Iterable sequences, picking the smallest item from all those inner Iterables until all sources complete. @param <T> the value type ...
java
public static <T extends Comparable<? super T>> Ix<T> orderedMerge(Iterable<? extends Iterable<? extends T>> sources) { return orderedMerge(sources, SelfComparator.INSTANCE); }
[ "public", "static", "<", "T", "extends", "Comparable", "<", "?", "super", "T", ">", ">", "Ix", "<", "T", ">", "orderedMerge", "(", "Iterable", "<", "?", "extends", "Iterable", "<", "?", "extends", "T", ">", ">", "sources", ")", "{", "return", "ordere...
Merges self-comparable items from an Iterable sequence of Iterable sequences, picking the smallest item from all those inner Iterables until all sources complete. @param <T> the value type @param sources the Iterable sequence of Iterables of self-comparable items @return the new Ix instance @since 1.0
[ "Merges", "self", "-", "comparable", "items", "from", "an", "Iterable", "sequence", "of", "Iterable", "sequences", "picking", "the", "smallest", "item", "from", "all", "those", "inner", "Iterables", "until", "all", "sources", "complete", "." ]
train
https://github.com/akarnokd/ixjava/blob/add721bba550c36541faa450e40a975bb65e78d7/src/main/java/ix/Ix.java#L409-L411
redisson/redisson
redisson/src/main/java/org/redisson/api/CronSchedule.java
CronSchedule.weeklyOnDayAndHourAndMinute
public static CronSchedule weeklyOnDayAndHourAndMinute(int hour, int minute, Integer... daysOfWeek) { """ Creates cron expression which schedule task execution every given days of the week at the given time. Use Calendar object constants to define day. @param hour of schedule @param minute of schedule @para...
java
public static CronSchedule weeklyOnDayAndHourAndMinute(int hour, int minute, Integer... daysOfWeek) { if (daysOfWeek == null || daysOfWeek.length == 0) { throw new IllegalArgumentException("You must specify at least one day of week."); } String expression = String.format("0 %d %d ? ...
[ "public", "static", "CronSchedule", "weeklyOnDayAndHourAndMinute", "(", "int", "hour", ",", "int", "minute", ",", "Integer", "...", "daysOfWeek", ")", "{", "if", "(", "daysOfWeek", "==", "null", "||", "daysOfWeek", ".", "length", "==", "0", ")", "{", "throw"...
Creates cron expression which schedule task execution every given days of the week at the given time. Use Calendar object constants to define day. @param hour of schedule @param minute of schedule @param daysOfWeek - Calendar object constants @return object
[ "Creates", "cron", "expression", "which", "schedule", "task", "execution", "every", "given", "days", "of", "the", "week", "at", "the", "given", "time", ".", "Use", "Calendar", "object", "constants", "to", "define", "day", "." ]
train
https://github.com/redisson/redisson/blob/d3acc0249b2d5d658d36d99e2c808ce49332ea44/redisson/src/main/java/org/redisson/api/CronSchedule.java#L75-L86
facebook/fresco
imagepipeline-base/src/main/java/com/facebook/imageutils/TiffUtil.java
TiffUtil.readTiffHeader
private static int readTiffHeader(InputStream is, int length, TiffHeader tiffHeader) throws IOException { """ Reads the TIFF header to the provided structure. @param is the input stream of TIFF data @param length length of the TIFF data @return remaining length of the data on success, 0 on failure @throw...
java
private static int readTiffHeader(InputStream is, int length, TiffHeader tiffHeader) throws IOException { if (length <= 8) { return 0; } // read the byte order tiffHeader.byteOrder = StreamProcessor.readPackedInt(is, 4, false); length -= 4; if (tiffHeader.byteOrder != TIFF_BYTE_ORDE...
[ "private", "static", "int", "readTiffHeader", "(", "InputStream", "is", ",", "int", "length", ",", "TiffHeader", "tiffHeader", ")", "throws", "IOException", "{", "if", "(", "length", "<=", "8", ")", "{", "return", "0", ";", "}", "// read the byte order", "ti...
Reads the TIFF header to the provided structure. @param is the input stream of TIFF data @param length length of the TIFF data @return remaining length of the data on success, 0 on failure @throws IOException
[ "Reads", "the", "TIFF", "header", "to", "the", "provided", "structure", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline-base/src/main/java/com/facebook/imageutils/TiffUtil.java#L92-L117
liferay/com-liferay-commerce
commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationAttachmentPersistenceImpl.java
CommerceNotificationAttachmentPersistenceImpl.findAll
@Override public List<CommerceNotificationAttachment> findAll() { """ Returns all the commerce notification attachments. @return the commerce notification attachments """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceNotificationAttachment> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceNotificationAttachment", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce notification attachments. @return the commerce notification attachments
[ "Returns", "all", "the", "commerce", "notification", "attachments", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationAttachmentPersistenceImpl.java#L2713-L2716
zandero/rest.vertx
src/main/java/com/zandero/rest/AnnotationProcessor.java
AnnotationProcessor.getClassMethod
private static String getClassMethod(Class clazz, Method method) { """ Helper to convert class/method to String for reporting purposes @param clazz holding method @param method method in class @return class.method(type arg0, type arg1 .. type argN) """ StringBuilder builder = new StringBuilder(); builde...
java
private static String getClassMethod(Class clazz, Method method) { StringBuilder builder = new StringBuilder(); builder.append(clazz.getName()).append(".").append(method.getName()); builder.append("("); if (method.getParameterCount() > 0) { for (int i = 0; i < method.getParameterCount(); i++) { Parameter...
[ "private", "static", "String", "getClassMethod", "(", "Class", "clazz", ",", "Method", "method", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "builder", ".", "append", "(", "clazz", ".", "getName", "(", ")", ")", ".", ...
Helper to convert class/method to String for reporting purposes @param clazz holding method @param method method in class @return class.method(type arg0, type arg1 .. type argN)
[ "Helper", "to", "convert", "class", "/", "method", "to", "String", "for", "reporting", "purposes" ]
train
https://github.com/zandero/rest.vertx/blob/ba458720cf59e076953eab9dac7227eeaf9e58ce/src/main/java/com/zandero/rest/AnnotationProcessor.java#L251-L267
undertow-io/undertow
core/src/main/java/io/undertow/websockets/core/WebSocketUtils.java
WebSocketUtils.initiateTransfer
@Deprecated public static <I extends StreamSourceChannel, O extends StreamSinkChannel> void initiateTransfer(final I source, final O sink, final ChannelListener<? super I> sourceListener, final ChannelListener<? super O> sinkListener, final ChannelExceptionHandler<? super I> readExceptionHandler, final ChannelExcep...
java
@Deprecated public static <I extends StreamSourceChannel, O extends StreamSinkChannel> void initiateTransfer(final I source, final O sink, final ChannelListener<? super I> sourceListener, final ChannelListener<? super O> sinkListener, final ChannelExceptionHandler<? super I> readExceptionHandler, final ChannelExcep...
[ "@", "Deprecated", "public", "static", "<", "I", "extends", "StreamSourceChannel", ",", "O", "extends", "StreamSinkChannel", ">", "void", "initiateTransfer", "(", "final", "I", "source", ",", "final", "O", "sink", ",", "final", "ChannelListener", "<", "?", "su...
Initiate a low-copy transfer between two stream channels. The pool should be a direct buffer pool for best performance. @param source the source channel @param sink the target channel @param sourceListener the source listener to set and call when the transfer is complete, or {@c...
[ "Initiate", "a", "low", "-", "copy", "transfer", "between", "two", "stream", "channels", ".", "The", "pool", "should", "be", "a", "direct", "buffer", "pool", "for", "best", "performance", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/websockets/core/WebSocketUtils.java#L232-L235
NordicSemiconductor/Android-DFU-Library
dfu/src/main/java/no/nordicsemi/android/dfu/SecureDfuImpl.java
SecureDfuImpl.getStatusCode
private int getStatusCode(final byte[] response, final int request) throws UnknownResponseException { """ Checks whether the response received is valid and returns the status code. @param response the response received from the DFU device. @param request the expected Op Code @return the status code @throws ...
java
private int getStatusCode(final byte[] response, final int request) throws UnknownResponseException { if (response == null || response.length < 3 || response[0] != OP_CODE_RESPONSE_CODE_KEY || response[1] != request || (response[2] != DFU_STATUS_SUCCESS && response[2] != SecureDfuError.OP_CODE_NOT_SUPPORTED...
[ "private", "int", "getStatusCode", "(", "final", "byte", "[", "]", "response", ",", "final", "int", "request", ")", "throws", "UnknownResponseException", "{", "if", "(", "response", "==", "null", "||", "response", ".", "length", "<", "3", "||", "response", ...
Checks whether the response received is valid and returns the status code. @param response the response received from the DFU device. @param request the expected Op Code @return the status code @throws UnknownResponseException if response was not valid
[ "Checks", "whether", "the", "response", "received", "is", "valid", "and", "returns", "the", "status", "code", "." ]
train
https://github.com/NordicSemiconductor/Android-DFU-Library/blob/ec14c8c522bebe801a9a4c3dfbbeb1f53262c03f/dfu/src/main/java/no/nordicsemi/android/dfu/SecureDfuImpl.java#L704-L717
YahooArchive/samoa
samoa-api/src/main/java/com/yahoo/labs/samoa/learners/classifiers/trees/ModelAggregatorProcessor.java
ModelAggregatorProcessor.attemptToSplit
private void attemptToSplit(ActiveLearningNode activeLearningNode, FoundNode foundNode) { """ Helper method to represent a split attempt @param activeLearningNode The corresponding active learning node which will be split @param foundNode The data structure to represents the filtering of the instance using the ...
java
private void attemptToSplit(ActiveLearningNode activeLearningNode, FoundNode foundNode){ //Increment the split ID this.splitId++; //Schedule time-out thread ScheduledFuture<?> timeOutHandler = this.executor.schedule(new AggregationTimeOutHandler(this.splitId, this.timedOutSplittingNodes), this.timeOut, ...
[ "private", "void", "attemptToSplit", "(", "ActiveLearningNode", "activeLearningNode", ",", "FoundNode", "foundNode", ")", "{", "//Increment the split ID", "this", ".", "splitId", "++", ";", "//Schedule time-out thread", "ScheduledFuture", "<", "?", ">", "timeOutHandler", ...
Helper method to represent a split attempt @param activeLearningNode The corresponding active learning node which will be split @param foundNode The data structure to represents the filtering of the instance using the tree model.
[ "Helper", "method", "to", "represent", "a", "split", "attempt" ]
train
https://github.com/YahooArchive/samoa/blob/540a2c30167ac85c432b593baabd5ca97e7e8a0f/samoa-api/src/main/java/com/yahoo/labs/samoa/learners/classifiers/trees/ModelAggregatorProcessor.java#L461-L476
xvik/generics-resolver
src/main/java/ru/vyarus/java/generics/resolver/util/TypeToStringUtils.java
TypeToStringUtils.toStringWithGenerics
public static String toStringWithGenerics(final Class<?> type, final Map<String, Type> generics) { """ Formats class as {@code Class<generics>}. Only actual class generics are rendered. Intended to be used for error reporting. <p> Note: if class is inned class, outer class is not printed! @param type cla...
java
public static String toStringWithGenerics(final Class<?> type, final Map<String, Type> generics) { // provided generics may contain outer type generics, but we will render only required generics final Map<String, Type> actual = GenericsUtils.extractTypeGenerics(type, generics); return toStringTy...
[ "public", "static", "String", "toStringWithGenerics", "(", "final", "Class", "<", "?", ">", "type", ",", "final", "Map", "<", "String", ",", "Type", ">", "generics", ")", "{", "// provided generics may contain outer type generics, but we will render only required generics...
Formats class as {@code Class<generics>}. Only actual class generics are rendered. Intended to be used for error reporting. <p> Note: if class is inned class, outer class is not printed! @param type class class to print with generics @param generics known generics map class generics map @return generified class st...
[ "Formats", "class", "as", "{", "@code", "Class<generics", ">", "}", ".", "Only", "actual", "class", "generics", "are", "rendered", ".", "Intended", "to", "be", "used", "for", "error", "reporting", ".", "<p", ">", "Note", ":", "if", "class", "is", "inned"...
train
https://github.com/xvik/generics-resolver/blob/d7d9d2783265df1178230e8f0b7cb6d853b67a7b/src/main/java/ru/vyarus/java/generics/resolver/util/TypeToStringUtils.java#L113-L117
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WTable.java
WTable.setSort
protected void setSort(final int index, final boolean ascending) { """ For rendering purposes only - has no effect on model. @param index the sort column index, or -1 for no sort. @param ascending true for ascending order, false for descending """ WTableComponentModel model = getOrCreateComponentModel();...
java
protected void setSort(final int index, final boolean ascending) { WTableComponentModel model = getOrCreateComponentModel(); model.sortColIndex = index; model.sortAscending = ascending; }
[ "protected", "void", "setSort", "(", "final", "int", "index", ",", "final", "boolean", "ascending", ")", "{", "WTableComponentModel", "model", "=", "getOrCreateComponentModel", "(", ")", ";", "model", ".", "sortColIndex", "=", "index", ";", "model", ".", "sort...
For rendering purposes only - has no effect on model. @param index the sort column index, or -1 for no sort. @param ascending true for ascending order, false for descending
[ "For", "rendering", "purposes", "only", "-", "has", "no", "effect", "on", "model", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WTable.java#L1136-L1140
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/connectionmanager/ccm/Context.java
Context.registerConnection
void registerConnection(ConnectionManager cm, ConnectionListener cl, Object c) { """ Register a connection @param cm The connection manager @param cl The connection listener @param c The connection """ if (cmToCl == null) cmToCl = new HashMap<ConnectionManager, List<ConnectionListener>>(); ...
java
void registerConnection(ConnectionManager cm, ConnectionListener cl, Object c) { if (cmToCl == null) cmToCl = new HashMap<ConnectionManager, List<ConnectionListener>>(); List<ConnectionListener> l = cmToCl.get(cm); if (l == null) l = new ArrayList<ConnectionListener>(1); ...
[ "void", "registerConnection", "(", "ConnectionManager", "cm", ",", "ConnectionListener", "cl", ",", "Object", "c", ")", "{", "if", "(", "cmToCl", "==", "null", ")", "cmToCl", "=", "new", "HashMap", "<", "ConnectionManager", ",", "List", "<", "ConnectionListene...
Register a connection @param cm The connection manager @param cl The connection listener @param c The connection
[ "Register", "a", "connection" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/connectionmanager/ccm/Context.java#L68-L91
trustathsh/ifmapj
src/main/java/util/CanonicalXML.java
CanonicalXML.toCanonicalXml3
public String toCanonicalXml3(TransformerFactory factory, XMLReader resultParser, String inxml, boolean stripSpace) throws Exception { """ Create canonical XML silently, throwing exceptions rather than displaying messages. This version of the method uses the Saxon identityTransformer rather than parsing direct...
java
public String toCanonicalXml3(TransformerFactory factory, XMLReader resultParser, String inxml, boolean stripSpace) throws Exception { mStrip = stripSpace; mOut = new StringWriter(); Transformer t = factory.newTransformer(); SAXSource ss = new SAXSource(resultParser, new InputSource(new StringReader(inxml)))...
[ "public", "String", "toCanonicalXml3", "(", "TransformerFactory", "factory", ",", "XMLReader", "resultParser", ",", "String", "inxml", ",", "boolean", "stripSpace", ")", "throws", "Exception", "{", "mStrip", "=", "stripSpace", ";", "mOut", "=", "new", "StringWrite...
Create canonical XML silently, throwing exceptions rather than displaying messages. This version of the method uses the Saxon identityTransformer rather than parsing directly, because for some reason we seem to be able to get XML 1.1 to work this way.
[ "Create", "canonical", "XML", "silently", "throwing", "exceptions", "rather", "than", "displaying", "messages", ".", "This", "version", "of", "the", "method", "uses", "the", "Saxon", "identityTransformer", "rather", "than", "parsing", "directly", "because", "for", ...
train
https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/util/CanonicalXML.java#L147-L158
infinispan/infinispan
core/src/main/java/org/infinispan/factories/components/ComponentMetadataRepo.java
ComponentMetadataRepo.injectFactoryForComponent
@Deprecated public void injectFactoryForComponent(Class<?> componentType, Class<?> factoryType) { """ Inject a factory for a given component type. @param componentType Component type that the factory will produce @param factoryType Factory that produces the given type of components @deprecated For testing ...
java
@Deprecated public void injectFactoryForComponent(Class<?> componentType, Class<?> factoryType) { factories.put(componentType.getName(), factoryType.getName()); }
[ "@", "Deprecated", "public", "void", "injectFactoryForComponent", "(", "Class", "<", "?", ">", "componentType", ",", "Class", "<", "?", ">", "factoryType", ")", "{", "factories", ".", "put", "(", "componentType", ".", "getName", "(", ")", ",", "factoryType",...
Inject a factory for a given component type. @param componentType Component type that the factory will produce @param factoryType Factory that produces the given type of components @deprecated For testing purposes only.
[ "Inject", "a", "factory", "for", "a", "given", "component", "type", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/factories/components/ComponentMetadataRepo.java#L195-L198
virgo47/javasimon
console-embed/src/main/java/org/javasimon/console/action/DetailPlugin.java
DetailPlugin.executeHtml
public DetailHtmlBuilder executeHtml(ActionContext context, DetailHtmlBuilder htmlBuilder, StringifierFactory htmlStringifierFactory, Simon simon) throws IOException { """ Callback for flat HTML rendering. @param context Context (Request, parameters...) @param htmlBuilder HTML Builder (Response generation help...
java
public DetailHtmlBuilder executeHtml(ActionContext context, DetailHtmlBuilder htmlBuilder, StringifierFactory htmlStringifierFactory, Simon simon) throws IOException { return htmlBuilder; }
[ "public", "DetailHtmlBuilder", "executeHtml", "(", "ActionContext", "context", ",", "DetailHtmlBuilder", "htmlBuilder", ",", "StringifierFactory", "htmlStringifierFactory", ",", "Simon", "simon", ")", "throws", "IOException", "{", "return", "htmlBuilder", ";", "}" ]
Callback for flat HTML rendering. @param context Context (Request, parameters...) @param htmlBuilder HTML Builder (Response generation helper) @param simon Simon to render.
[ "Callback", "for", "flat", "HTML", "rendering", "." ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/console-embed/src/main/java/org/javasimon/console/action/DetailPlugin.java#L39-L41
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.setSasDefinitionAsync
public ServiceFuture<SasDefinitionBundle> setSasDefinitionAsync(String vaultBaseUrl, String storageAccountName, String sasDefinitionName, String templateUri, SasTokenType sasType, String validityPeriod, final ServiceCallback<SasDefinitionBundle> serviceCallback) { """ Creates or updates a new SAS definition for th...
java
public ServiceFuture<SasDefinitionBundle> setSasDefinitionAsync(String vaultBaseUrl, String storageAccountName, String sasDefinitionName, String templateUri, SasTokenType sasType, String validityPeriod, final ServiceCallback<SasDefinitionBundle> serviceCallback) { return ServiceFuture.fromResponse(setSasDefinit...
[ "public", "ServiceFuture", "<", "SasDefinitionBundle", ">", "setSasDefinitionAsync", "(", "String", "vaultBaseUrl", ",", "String", "storageAccountName", ",", "String", "sasDefinitionName", ",", "String", "templateUri", ",", "SasTokenType", "sasType", ",", "String", "val...
Creates or updates a new SAS definition for the specified storage account. This operation requires the storage/setsas permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param storageAccountName The name of the storage account. @param sasDefinitionName The name of the SAS defi...
[ "Creates", "or", "updates", "a", "new", "SAS", "definition", "for", "the", "specified", "storage", "account", ".", "This", "operation", "requires", "the", "storage", "/", "setsas", "permission", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L11271-L11273
eurekaclinical/protempa
protempa-dsb-relationaldb/src/main/java/org/protempa/backend/dsb/relationaldb/JDBCDateTimeTimestampPositionParser.java
JDBCDateTimeTimestampPositionParser.toPosition
@Override public Long toPosition(ResultSet resultSet, int columnIndex, int colType) throws SQLException { """ Parses a date/time into a PROTEMPA position. For types date, time and timestamp it calls the corresponding method in {@link ResultSet}. For other types, it calls {@link ResultSet#getTimes...
java
@Override public Long toPosition(ResultSet resultSet, int columnIndex, int colType) throws SQLException { Date result; switch (colType) { case Types.DATE: result = resultSet.getDate(columnIndex); break; case Types.TIME: ...
[ "@", "Override", "public", "Long", "toPosition", "(", "ResultSet", "resultSet", ",", "int", "columnIndex", ",", "int", "colType", ")", "throws", "SQLException", "{", "Date", "result", ";", "switch", "(", "colType", ")", "{", "case", "Types", ".", "DATE", "...
Parses a date/time into a PROTEMPA position. For types date, time and timestamp it calls the corresponding method in {@link ResultSet}. For other types, it calls {@link ResultSet#getTimestamp(int)} and lets the JDBC driver attempt to parse a date. @param resultSet a {@link ResultSet}. Cannot be <code>null</code>. @par...
[ "Parses", "a", "date", "/", "time", "into", "a", "PROTEMPA", "position", ".", "For", "types", "date", "time", "and", "timestamp", "it", "calls", "the", "corresponding", "method", "in", "{", "@link", "ResultSet", "}", ".", "For", "other", "types", "it", "...
train
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-dsb-relationaldb/src/main/java/org/protempa/backend/dsb/relationaldb/JDBCDateTimeTimestampPositionParser.java#L80-L105
xvik/dropwizard-guicey
src/main/java/ru/vyarus/dropwizard/guice/module/context/debug/util/RenderUtils.java
RenderUtils.renderInstaller
public static String renderInstaller(final Class<FeatureInstaller> type, final List<String> markers) { """ Render installer line. Assuming installer class always ends with Installer and by removing this postfix and converting rest to lower case we can get human readable installer name. Result may be worse for mu...
java
public static String renderInstaller(final Class<FeatureInstaller> type, final List<String> markers) { return String.format("%-20s %-38s %s", FeatureUtils.getInstallerExtName(type), brackets(renderClass(type)), markers(markers)); }
[ "public", "static", "String", "renderInstaller", "(", "final", "Class", "<", "FeatureInstaller", ">", "type", ",", "final", "List", "<", "String", ">", "markers", ")", "{", "return", "String", ".", "format", "(", "\"%-20s %-38s %s\"", ",", "FeatureUtils", ".",...
Render installer line. Assuming installer class always ends with Installer and by removing this postfix and converting rest to lower case we can get human readable installer name. Result may be worse for multi-word cases, but anyway it's pretty readable. <p> Format: human-readable-installer-name (installer-class) *mark...
[ "Render", "installer", "line", ".", "Assuming", "installer", "class", "always", "ends", "with", "Installer", "and", "by", "removing", "this", "postfix", "and", "converting", "rest", "to", "lower", "case", "we", "can", "get", "human", "readable", "installer", "...
train
https://github.com/xvik/dropwizard-guicey/blob/dd39ad77283555be21f606d5ebf0f11207a733d4/src/main/java/ru/vyarus/dropwizard/guice/module/context/debug/util/RenderUtils.java#L37-L40
TheHortonMachine/hortonmachine
hmachine/src/main/java/org/hortonmachine/hmachine/modules/hydrogeomorphology/debrisvandre/OmsDebrisVandre.java
OmsDebrisVandre.moveToNextTriggerpoint
private boolean moveToNextTriggerpoint( RandomIter triggerIter, RandomIter flowIter, int[] flowDirColRow ) { """ Moves the flowDirColRow variable to the next trigger point. @param triggerIter @param flowDirColRow @return <code>true</code> if a new trigger was found, <code>false</code> if the exit was reached....
java
private boolean moveToNextTriggerpoint( RandomIter triggerIter, RandomIter flowIter, int[] flowDirColRow ) { double tmpFlowValue = flowIter.getSampleDouble(flowDirColRow[0], flowDirColRow[1], 0); if (tmpFlowValue == 10) { return false; } if (!ModelsEngine.go_downstream(flowDi...
[ "private", "boolean", "moveToNextTriggerpoint", "(", "RandomIter", "triggerIter", ",", "RandomIter", "flowIter", ",", "int", "[", "]", "flowDirColRow", ")", "{", "double", "tmpFlowValue", "=", "flowIter", ".", "getSampleDouble", "(", "flowDirColRow", "[", "0", "]"...
Moves the flowDirColRow variable to the next trigger point. @param triggerIter @param flowDirColRow @return <code>true</code> if a new trigger was found, <code>false</code> if the exit was reached.
[ "Moves", "the", "flowDirColRow", "variable", "to", "the", "next", "trigger", "point", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/hmachine/src/main/java/org/hortonmachine/hmachine/modules/hydrogeomorphology/debrisvandre/OmsDebrisVandre.java#L641-L659
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/CDCQueryResponseDeserializer.java
CDCQueryResponseDeserializer.getQueryResponse
private QueryResponse getQueryResponse(JsonNode jsonNode) throws IOException { """ Method to deserialize the QueryResponse object @param jsonNode @return QueryResponse """ ObjectMapper mapper = new ObjectMapper(); SimpleModule simpleModule = new SimpleModule("QueryResponseDeserializer", new Version(1,...
java
private QueryResponse getQueryResponse(JsonNode jsonNode) throws IOException { ObjectMapper mapper = new ObjectMapper(); SimpleModule simpleModule = new SimpleModule("QueryResponseDeserializer", new Version(1, 0, 0, null)); simpleModule.addDeserializer(QueryResponse.class, new QueryResponseDeserializer()); ma...
[ "private", "QueryResponse", "getQueryResponse", "(", "JsonNode", "jsonNode", ")", "throws", "IOException", "{", "ObjectMapper", "mapper", "=", "new", "ObjectMapper", "(", ")", ";", "SimpleModule", "simpleModule", "=", "new", "SimpleModule", "(", "\"QueryResponseDeseri...
Method to deserialize the QueryResponse object @param jsonNode @return QueryResponse
[ "Method", "to", "deserialize", "the", "QueryResponse", "object" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/CDCQueryResponseDeserializer.java#L125-L134
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java
DBEntitySequenceFactory.toIteratorCategory
static String toIteratorCategory(String type, String link, List<String> fields) { """ Converts an iterator category and the link name to a child iterator category. Iterator category is represented as String: "Type.link1.link2...". For instance "Message.Sender.Person" @param type parent iterator category @para...
java
static String toIteratorCategory(String type, String link, List<String> fields) { return toEntityCategory(type + "." + link, fields); //return type + '.' + link; }
[ "static", "String", "toIteratorCategory", "(", "String", "type", ",", "String", "link", ",", "List", "<", "String", ">", "fields", ")", "{", "return", "toEntityCategory", "(", "type", "+", "\".\"", "+", "link", ",", "fields", ")", ";", "//return type + '.' +...
Converts an iterator category and the link name to a child iterator category. Iterator category is represented as String: "Type.link1.link2...". For instance "Message.Sender.Person" @param type parent iterator category @param link link name @return child iterator category
[ "Converts", "an", "iterator", "category", "and", "the", "link", "name", "to", "a", "child", "iterator", "category", ".", "Iterator", "category", "is", "represented", "as", "String", ":", "Type", ".", "link1", ".", "link2", "...", ".", "For", "instance", "M...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java#L506-L509
mgm-tp/jfunk
jfunk-common/src/main/java/com/mgmtp/jfunk/common/random/MathRandom.java
MathRandom.getDate
public Date getDate(final long min, final long max) { """ Returns a random date in the range of [min, max]. @param min minimum value for generated date (in milliseconds) @param max maximum value for generated date (in milliseconds) """ long millis = getLong(min, max); return DateUtils.truncate(new ...
java
public Date getDate(final long min, final long max) { long millis = getLong(min, max); return DateUtils.truncate(new Date(millis), Calendar.DATE); }
[ "public", "Date", "getDate", "(", "final", "long", "min", ",", "final", "long", "max", ")", "{", "long", "millis", "=", "getLong", "(", "min", ",", "max", ")", ";", "return", "DateUtils", ".", "truncate", "(", "new", "Date", "(", "millis", ")", ",", ...
Returns a random date in the range of [min, max]. @param min minimum value for generated date (in milliseconds) @param max maximum value for generated date (in milliseconds)
[ "Returns", "a", "random", "date", "in", "the", "range", "of", "[", "min", "max", "]", "." ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/random/MathRandom.java#L165-L168
btrplace/scheduler
api/src/main/java/org/btrplace/model/view/NamingService.java
NamingService.substituteVM
@Override public boolean substituteVM(VM curId, VM nextId) { """ Re-associate the name of a registered VM to a new VM. @param curId the current VM identifier @param nextId the new VM identifier @return {@code true} if the re-association succeeded or if there is no VM {@code curId} registered. {@code fal...
java
@Override public boolean substituteVM(VM curId, VM nextId) { if (VM.TYPE.equals(elemId)) { if (rev.containsKey(nextId)) { //the new id already exists. It is a failure scenario. return false; } String fqn = rev.remove(curId); if...
[ "@", "Override", "public", "boolean", "substituteVM", "(", "VM", "curId", ",", "VM", "nextId", ")", "{", "if", "(", "VM", ".", "TYPE", ".", "equals", "(", "elemId", ")", ")", "{", "if", "(", "rev", ".", "containsKey", "(", "nextId", ")", ")", "{", ...
Re-associate the name of a registered VM to a new VM. @param curId the current VM identifier @param nextId the new VM identifier @return {@code true} if the re-association succeeded or if there is no VM {@code curId} registered. {@code false} if {@code nextId} is already associated to a name
[ "Re", "-", "associate", "the", "name", "of", "a", "registered", "VM", "to", "a", "new", "VM", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/api/src/main/java/org/btrplace/model/view/NamingService.java#L130-L146
Stratio/cassandra-lucene-index
plugin/src/main/java/com/stratio/cassandra/lucene/schema/SchemaAnalyzer.java
SchemaAnalyzer.getAnalyzer
protected static Analyzer getAnalyzer(Map<String, Analyzer> analyzers, String name) { """ Returns the {@link Analyzer} identified by the specified name. If there is no analyzer with the specified name, then it will be interpreted as a class name and it will be instantiated by reflection. @param analyzers the p...
java
protected static Analyzer getAnalyzer(Map<String, Analyzer> analyzers, String name) { if (StringUtils.isBlank(name)) { throw new IndexException("Not empty analyzer name required"); } Analyzer analyzer = analyzers.get(name); if (analyzer == null) { analyzer = Stand...
[ "protected", "static", "Analyzer", "getAnalyzer", "(", "Map", "<", "String", ",", "Analyzer", ">", "analyzers", ",", "String", "name", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "name", ")", ")", "{", "throw", "new", "IndexException", "(", ...
Returns the {@link Analyzer} identified by the specified name. If there is no analyzer with the specified name, then it will be interpreted as a class name and it will be instantiated by reflection. @param analyzers the per field analyzers to be used @param name the name of the {@link Analyzer} to be returned @return ...
[ "Returns", "the", "{", "@link", "Analyzer", "}", "identified", "by", "the", "specified", "name", ".", "If", "there", "is", "no", "analyzer", "with", "the", "specified", "name", "then", "it", "will", "be", "interpreted", "as", "a", "class", "name", "and", ...
train
https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/plugin/src/main/java/com/stratio/cassandra/lucene/schema/SchemaAnalyzer.java#L73-L89
CloudSlang/cs-actions
cs-powershell/src/main/java/io/cloudslang/content/utils/XMLUtils.java
XMLUtils.parseXml
public static String parseXml(String xml, String expression) throws ParserConfigurationException, IOException, XPathExpressionException, SAXException { """ Parse the content of the given xml input and evaluates the given XPath expression. @param xml The xml source. @param expression The XPath expression...
java
public static String parseXml(String xml, String expression) throws ParserConfigurationException, IOException, XPathExpressionException, SAXException { DocumentBuilder builder = ResourceLoader.getDocumentBuilder(); Document document; try { document = builder.parse(new InputSource(new...
[ "public", "static", "String", "parseXml", "(", "String", "xml", ",", "String", "expression", ")", "throws", "ParserConfigurationException", ",", "IOException", ",", "XPathExpressionException", ",", "SAXException", "{", "DocumentBuilder", "builder", "=", "ResourceLoader"...
Parse the content of the given xml input and evaluates the given XPath expression. @param xml The xml source. @param expression The XPath expression. @return Evaluate the XPath expression and return the result as a String. @throws ParserConfigurationException @throws IOException @throws XPathExpressionException...
[ "Parse", "the", "content", "of", "the", "given", "xml", "input", "and", "evaluates", "the", "given", "XPath", "expression", "." ]
train
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/utils/XMLUtils.java#L53-L63
aws/aws-sdk-java
jmespath-java/src/main/java/com/amazonaws/jmespath/JmesPathEvaluationVisitor.java
JmesPathEvaluationVisitor.visit
@Override public JsonNode visit(JmesPathAndExpression andExpression, JsonNode input) throws InvalidTypeException { """ And expression will evaluate to either the left expression or the right expression. If the expression on the left hand side is a truth-like value, then the value on the right hand side is r...
java
@Override public JsonNode visit(JmesPathAndExpression andExpression, JsonNode input) throws InvalidTypeException { JsonNode lhsNode = andExpression.getLhsExpr().accept(this, input); JsonNode rhsNode = andExpression.getRhsExpr().accept(this, input); if (lhsNode == BooleanNode.TRUE) { ...
[ "@", "Override", "public", "JsonNode", "visit", "(", "JmesPathAndExpression", "andExpression", ",", "JsonNode", "input", ")", "throws", "InvalidTypeException", "{", "JsonNode", "lhsNode", "=", "andExpression", ".", "getLhsExpr", "(", ")", ".", "accept", "(", "this...
And expression will evaluate to either the left expression or the right expression. If the expression on the left hand side is a truth-like value, then the value on the right hand side is returned. Otherwise the result of the expression on the left hand side is returned. @param andExpression JmesPath and-expression ty...
[ "And", "expression", "will", "evaluate", "to", "either", "the", "left", "expression", "or", "the", "right", "expression", ".", "If", "the", "expression", "on", "the", "left", "hand", "side", "is", "a", "truth", "-", "like", "value", "then", "the", "value",...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/jmespath-java/src/main/java/com/amazonaws/jmespath/JmesPathEvaluationVisitor.java#L300-L309
icode/ameba
src/main/java/ameba/lib/Fibers.java
Fibers.runInFiberChecked
public static <V, X extends Exception> V runInFiberChecked(SuspendableCallable<V> target, Class<X> exceptionType) throws X, InterruptedException { """ Runs an action in a new fiber, awaits the fiber's termination, and returns its result. Unlike {@link #runInFiber(SuspendableCallable) runInFiber} this method does ...
java
public static <V, X extends Exception> V runInFiberChecked(SuspendableCallable<V> target, Class<X> exceptionType) throws X, InterruptedException { return FiberUtil.runInFiberChecked(target, exceptionType); }
[ "public", "static", "<", "V", ",", "X", "extends", "Exception", ">", "V", "runInFiberChecked", "(", "SuspendableCallable", "<", "V", ">", "target", ",", "Class", "<", "X", ">", "exceptionType", ")", "throws", "X", ",", "InterruptedException", "{", "return", ...
Runs an action in a new fiber, awaits the fiber's termination, and returns its result. Unlike {@link #runInFiber(SuspendableCallable) runInFiber} this method does not throw {@link ExecutionException}, but wraps any checked exception thrown by the operation in a {@link RuntimeException}. The new fiber is scheduled by th...
[ "Runs", "an", "action", "in", "a", "new", "fiber", "awaits", "the", "fiber", "s", "termination", "and", "returns", "its", "result", ".", "Unlike", "{", "@link", "#runInFiber", "(", "SuspendableCallable", ")", "runInFiber", "}", "this", "method", "does", "not...
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/lib/Fibers.java#L358-L360
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/Criteria.java
Criteria.addNotEqualToField
public void addNotEqualToField(String attribute, String fieldName) { """ Adds and equals (=) criteria for field comparison. The field name will be translated into the appropriate columnName by SqlStatement. <br> name <> boss.name @param attribute The field name to be used @param fieldName The field na...
java
public void addNotEqualToField(String attribute, String fieldName) { // PAW // SelectionCriteria c = FieldCriteria.buildNotEqualToCriteria(attribute, fieldName, getAlias()); SelectionCriteria c = FieldCriteria.buildNotEqualToCriteria(attribute, fieldName, getUserAlias(attribute)); addSelect...
[ "public", "void", "addNotEqualToField", "(", "String", "attribute", ",", "String", "fieldName", ")", "{", "// PAW\r", "// SelectionCriteria c = FieldCriteria.buildNotEqualToCriteria(attribute, fieldName, getAlias());\r", "SelectionCriteria", "c", "=", "FieldCriteria", ".", "build...
Adds and equals (=) criteria for field comparison. The field name will be translated into the appropriate columnName by SqlStatement. <br> name <> boss.name @param attribute The field name to be used @param fieldName The field name to compare with
[ "Adds", "and", "equals", "(", "=", ")", "criteria", "for", "field", "comparison", ".", "The", "field", "name", "will", "be", "translated", "into", "the", "appropriate", "columnName", "by", "SqlStatement", ".", "<br", ">", "name", "<", ">", "boss", ".", "...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/Criteria.java#L357-L363
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabsInner.java
LabsInner.getAsync
public Observable<LabInner> getAsync(String resourceGroupName, String labAccountName, String labName) { """ Get lab. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labName The name of the lab. @throws IllegalArgumentException thrown if param...
java
public Observable<LabInner> getAsync(String resourceGroupName, String labAccountName, String labName) { return getWithServiceResponseAsync(resourceGroupName, labAccountName, labName).map(new Func1<ServiceResponse<LabInner>, LabInner>() { @Override public LabInner call(ServiceResponse<Lab...
[ "public", "Observable", "<", "LabInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ",", "String", "labName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "labAccountName", ",", "labName",...
Get lab. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labName The name of the lab. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the LabInner object
[ "Get", "lab", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabsInner.java#L407-L414
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/NodeReportsInner.java
NodeReportsInner.getContentAsync
public Observable<Object> getContentAsync(String resourceGroupName, String automationAccountName, String nodeId, String reportId) { """ Retrieve the Dsc node reports by node id and report id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation accou...
java
public Observable<Object> getContentAsync(String resourceGroupName, String automationAccountName, String nodeId, String reportId) { return getContentWithServiceResponseAsync(resourceGroupName, automationAccountName, nodeId, reportId).map(new Func1<ServiceResponse<Object>, Object>() { @Override ...
[ "public", "Observable", "<", "Object", ">", "getContentAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "nodeId", ",", "String", "reportId", ")", "{", "return", "getContentWithServiceResponseAsync", "(", "resourceGroupNa...
Retrieve the Dsc node reports by node id and report id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param nodeId The Dsc node id. @param reportId The report id. @throws IllegalArgumentException thrown if parameters fail the validation @ret...
[ "Retrieve", "the", "Dsc", "node", "reports", "by", "node", "id", "and", "report", "id", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/NodeReportsInner.java#L474-L481
line/armeria
zipkin/src/main/java/com/linecorp/armeria/internal/tracing/SpanContextUtil.java
SpanContextUtil.closeSpan
public static void closeSpan(Span span, RequestLog log) { """ Adds logging tags to the provided {@link Span} and closes it when the log is finished. The span cannot be used further after this method has been called. """ SpanTags.addTags(span, log); span.finish(wallTimeMicros(log, log.responseE...
java
public static void closeSpan(Span span, RequestLog log) { SpanTags.addTags(span, log); span.finish(wallTimeMicros(log, log.responseEndTimeNanos())); }
[ "public", "static", "void", "closeSpan", "(", "Span", "span", ",", "RequestLog", "log", ")", "{", "SpanTags", ".", "addTags", "(", "span", ",", "log", ")", ";", "span", ".", "finish", "(", "wallTimeMicros", "(", "log", ",", "log", ".", "responseEndTimeNa...
Adds logging tags to the provided {@link Span} and closes it when the log is finished. The span cannot be used further after this method has been called.
[ "Adds", "logging", "tags", "to", "the", "provided", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/zipkin/src/main/java/com/linecorp/armeria/internal/tracing/SpanContextUtil.java#L38-L41
ozimov/cirneco
hamcrest/hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/collect/IsIterableContainingInAnyOrder.java
IsIterableContainingInAnyOrder.containsInAnyOrder
public static <T> Matcher<Iterable<? extends T>> containsInAnyOrder(final Iterable<T> items) { """ <p>Creates an order agnostic matcher for {@linkplain Iterable}s that matches when a single pass over the examined {@linkplain Iterable} yields a series of items, each logically equal to one item anywhere in the spec...
java
public static <T> Matcher<Iterable<? extends T>> containsInAnyOrder(final Iterable<T> items) { final Collection<Matcher<? super T>> matchers = new ArrayList<>(); for (final T item : items) { matchers.add(equalTo(item)); } return new IsIterableContainingInAnyOrder<T>(matchers...
[ "public", "static", "<", "T", ">", "Matcher", "<", "Iterable", "<", "?", "extends", "T", ">", ">", "containsInAnyOrder", "(", "final", "Iterable", "<", "T", ">", "items", ")", "{", "final", "Collection", "<", "Matcher", "<", "?", "super", "T", ">", "...
<p>Creates an order agnostic matcher for {@linkplain Iterable}s that matches when a single pass over the examined {@linkplain Iterable} yields a series of items, each logically equal to one item anywhere in the specified items. For a positive match, the examined iterable must be of the same length as the number of spec...
[ "<p", ">", "Creates", "an", "order", "agnostic", "matcher", "for", "{", "@linkplain", "Iterable", "}", "s", "that", "matches", "when", "a", "single", "pass", "over", "the", "examined", "{", "@linkplain", "Iterable", "}", "yields", "a", "series", "of", "ite...
train
https://github.com/ozimov/cirneco/blob/78ad782da0a2256634cfbebb2f97ed78c993b999/hamcrest/hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/collect/IsIterableContainingInAnyOrder.java#L38-L45
aws/aws-sdk-java
aws-java-sdk-workdocs/src/main/java/com/amazonaws/services/workdocs/model/DocumentVersionMetadata.java
DocumentVersionMetadata.withThumbnail
public DocumentVersionMetadata withThumbnail(java.util.Map<String, String> thumbnail) { """ <p> The thumbnail of the document. </p> @param thumbnail The thumbnail of the document. @return Returns a reference to this object so that method calls can be chained together. """ setThumbnail(thumbnail)...
java
public DocumentVersionMetadata withThumbnail(java.util.Map<String, String> thumbnail) { setThumbnail(thumbnail); return this; }
[ "public", "DocumentVersionMetadata", "withThumbnail", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "thumbnail", ")", "{", "setThumbnail", "(", "thumbnail", ")", ";", "return", "this", ";", "}" ]
<p> The thumbnail of the document. </p> @param thumbnail The thumbnail of the document. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "thumbnail", "of", "the", "document", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-workdocs/src/main/java/com/amazonaws/services/workdocs/model/DocumentVersionMetadata.java#L618-L621
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javadoc/RootDocImpl.java
RootDocImpl.setPackages
private void setPackages(DocEnv env, List<String> packages) { """ Initialize packages information. @param env the compilation environment @param packages a list of package names (String) """ ListBuffer<PackageDocImpl> packlist = new ListBuffer<PackageDocImpl>(); for (String name : packages)...
java
private void setPackages(DocEnv env, List<String> packages) { ListBuffer<PackageDocImpl> packlist = new ListBuffer<PackageDocImpl>(); for (String name : packages) { PackageDocImpl pkg = env.lookupPackage(name); if (pkg != null) { pkg.isIncluded = true; ...
[ "private", "void", "setPackages", "(", "DocEnv", "env", ",", "List", "<", "String", ">", "packages", ")", "{", "ListBuffer", "<", "PackageDocImpl", ">", "packlist", "=", "new", "ListBuffer", "<", "PackageDocImpl", ">", "(", ")", ";", "for", "(", "String", ...
Initialize packages information. @param env the compilation environment @param packages a list of package names (String)
[ "Initialize", "packages", "information", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javadoc/RootDocImpl.java#L139-L151
cdk/cdk
storage/io/src/main/java/org/openscience/cdk/io/cml/CMLReactionModule.java
CMLReactionModule.getMoleculeFromID
private IAtomContainer getMoleculeFromID(IAtomContainerSet molSet, String id) { """ Get the IAtomContainer contained in a IAtomContainerSet object with a ID. @param molSet The IAtomContainerSet @param id The ID the look @return The IAtomContainer with the ID """ for (IAtomContainer...
java
private IAtomContainer getMoleculeFromID(IAtomContainerSet molSet, String id) { for (IAtomContainer mol : molSet.atomContainers()) { if (mol.getID().equals(id)) return mol; } return null; }
[ "private", "IAtomContainer", "getMoleculeFromID", "(", "IAtomContainerSet", "molSet", ",", "String", "id", ")", "{", "for", "(", "IAtomContainer", "mol", ":", "molSet", ".", "atomContainers", "(", ")", ")", "{", "if", "(", "mol", ".", "getID", "(", ")", "....
Get the IAtomContainer contained in a IAtomContainerSet object with a ID. @param molSet The IAtomContainerSet @param id The ID the look @return The IAtomContainer with the ID
[ "Get", "the", "IAtomContainer", "contained", "in", "a", "IAtomContainerSet", "object", "with", "a", "ID", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/cml/CMLReactionModule.java#L188-L193
jMotif/SAX
src/main/java/net/seninp/jmotif/sax/datastructure/SAXRecords.java
SAXRecords.getSAXString
public String getSAXString(String separatorToken) { """ Get the SAX string of this whole collection. @param separatorToken The separator token to use for the string. @return The whole data as a string. """ StringBuffer sb = new StringBuffer(); ArrayList<Integer> index = new ArrayList<Integer>(); ...
java
public String getSAXString(String separatorToken) { StringBuffer sb = new StringBuffer(); ArrayList<Integer> index = new ArrayList<Integer>(); index.addAll(this.realTSindex.keySet()); Collections.sort(index, new Comparator<Integer>() { public int compare(Integer int1, Integer int2) { retur...
[ "public", "String", "getSAXString", "(", "String", "separatorToken", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "ArrayList", "<", "Integer", ">", "index", "=", "new", "ArrayList", "<", "Integer", ">", "(", ")", ";", "index",...
Get the SAX string of this whole collection. @param separatorToken The separator token to use for the string. @return The whole data as a string.
[ "Get", "the", "SAX", "string", "of", "this", "whole", "collection", "." ]
train
https://github.com/jMotif/SAX/blob/39ee07a69facaa330def5130b8790aeda85f1061/src/main/java/net/seninp/jmotif/sax/datastructure/SAXRecords.java#L198-L211
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java
EnumConstantBuilder.buildTagInfo
public void buildTagInfo(XMLNode node, Content enumConstantsTree) { """ Build the tag information. @param node the XML element that specifies which components to document @param enumConstantsTree the content tree to which the documentation will be added """ writer.addTags( (FieldDoc...
java
public void buildTagInfo(XMLNode node, Content enumConstantsTree) { writer.addTags( (FieldDoc) enumConstants.get(currentEnumConstantsIndex), enumConstantsTree); }
[ "public", "void", "buildTagInfo", "(", "XMLNode", "node", ",", "Content", "enumConstantsTree", ")", "{", "writer", ".", "addTags", "(", "(", "FieldDoc", ")", "enumConstants", ".", "get", "(", "currentEnumConstantsIndex", ")", ",", "enumConstantsTree", ")", ";", ...
Build the tag information. @param node the XML element that specifies which components to document @param enumConstantsTree the content tree to which the documentation will be added
[ "Build", "the", "tag", "information", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java#L217-L221
alkacon/opencms-core
src/org/opencms/importexport/CmsImportVersion7.java
CmsImportVersion7.importUserInfo
public void importUserInfo(String infoName, String infoType, String infoValue) { """ Creates a new additional information entry for the current user.<p> @param infoName the name of the additional information entry @param infoType the type of the additional information entry @param infoValue the value of the a...
java
public void importUserInfo(String infoName, String infoType, String infoValue) { if (m_userInfos == null) { m_userInfos = new HashMap<String, Object>(); } try { m_userInfos.put(infoName, CmsDataTypeUtil.dataImport(infoValue, infoType)); } catch (Throwable e) { ...
[ "public", "void", "importUserInfo", "(", "String", "infoName", ",", "String", "infoType", ",", "String", "infoValue", ")", "{", "if", "(", "m_userInfos", "==", "null", ")", "{", "m_userInfos", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ...
Creates a new additional information entry for the current user.<p> @param infoName the name of the additional information entry @param infoType the type of the additional information entry @param infoValue the value of the additional information entry
[ "Creates", "a", "new", "additional", "information", "entry", "for", "the", "current", "user", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/CmsImportVersion7.java#L2102-L2114
threerings/nenya
core/src/main/java/com/threerings/resource/ResourceManager.java
ResourceManager.removeModificationObserver
public void removeModificationObserver (String path, ModificationObserver obs) { """ Removes a modification observer from the list maintained for the specified resource. """ ObservedResource resource = _observed.get(path); if (resource != null) { resource.observers.remove(obs); ...
java
public void removeModificationObserver (String path, ModificationObserver obs) { ObservedResource resource = _observed.get(path); if (resource != null) { resource.observers.remove(obs); } }
[ "public", "void", "removeModificationObserver", "(", "String", "path", ",", "ModificationObserver", "obs", ")", "{", "ObservedResource", "resource", "=", "_observed", ".", "get", "(", "path", ")", ";", "if", "(", "resource", "!=", "null", ")", "{", "resource",...
Removes a modification observer from the list maintained for the specified resource.
[ "Removes", "a", "modification", "observer", "from", "the", "list", "maintained", "for", "the", "specified", "resource", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/resource/ResourceManager.java#L743-L749
mikepenz/FastAdapter
library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/ActionModeHelper.java
ActionModeHelper.onLongClick
public ActionMode onLongClick(AppCompatActivity act, int position) { """ implements the basic behavior of a CAB and multi select behavior onLongClick @param act the current Activity @param position the position of the clicked item @return the initialized ActionMode or null if nothing was done """ ...
java
public ActionMode onLongClick(AppCompatActivity act, int position) { if (mActionMode == null && mFastAdapter.getItem(position).isSelectable()) { //may check if actionMode is already displayed mActionMode = act.startSupportActionMode(mInternalCallback); //we have to select thi...
[ "public", "ActionMode", "onLongClick", "(", "AppCompatActivity", "act", ",", "int", "position", ")", "{", "if", "(", "mActionMode", "==", "null", "&&", "mFastAdapter", ".", "getItem", "(", "position", ")", ".", "isSelectable", "(", ")", ")", "{", "//may chec...
implements the basic behavior of a CAB and multi select behavior onLongClick @param act the current Activity @param position the position of the clicked item @return the initialized ActionMode or null if nothing was done
[ "implements", "the", "basic", "behavior", "of", "a", "CAB", "and", "multi", "select", "behavior", "onLongClick" ]
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/ActionModeHelper.java#L146-L158
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/TagLink.java
TagLink.sortCandidateList
private void sortCandidateList(ArrayList list) { """ sortCandidateList sort a list of candidate pair of tokens. @param tokenArray String[] @return float[] """ java.util.Collections.sort(list, new java.util.Comparator() { public int compare(Object o1, Object o2) { // First sort, by scor...
java
private void sortCandidateList(ArrayList list) { java.util.Collections.sort(list, new java.util.Comparator() { public int compare(Object o1, Object o2) { // First sort, by score in index double scoreT = ( (Candidates) o1).getScore(), scoreU = ( (Candidates) o2).getScore(); ...
[ "private", "void", "sortCandidateList", "(", "ArrayList", "list", ")", "{", "java", ".", "util", ".", "Collections", ".", "sort", "(", "list", ",", "new", "java", ".", "util", ".", "Comparator", "(", ")", "{", "public", "int", "compare", "(", "Object", ...
sortCandidateList sort a list of candidate pair of tokens. @param tokenArray String[] @return float[]
[ "sortCandidateList", "sort", "a", "list", "of", "candidate", "pair", "of", "tokens", "." ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/TagLink.java#L416-L432
jamesagnew/hapi-fhir
hapi-fhir-narrativegenerator/src/main/java/ca/uhn/fhir/narrative/template/tags/Raw.java
Raw.render
@Override public Object render(Map<String, Object> context, LNode... nodes) { """ /* temporarily disable tag processing to avoid syntax conflicts. """ return nodes[0].render(context); }
java
@Override public Object render(Map<String, Object> context, LNode... nodes) { return nodes[0].render(context); }
[ "@", "Override", "public", "Object", "render", "(", "Map", "<", "String", ",", "Object", ">", "context", ",", "LNode", "...", "nodes", ")", "{", "return", "nodes", "[", "0", "]", ".", "render", "(", "context", ")", ";", "}" ]
/* temporarily disable tag processing to avoid syntax conflicts.
[ "/", "*", "temporarily", "disable", "tag", "processing", "to", "avoid", "syntax", "conflicts", "." ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-narrativegenerator/src/main/java/ca/uhn/fhir/narrative/template/tags/Raw.java#L12-L15
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/menu/JBaseMenuScreen.java
JBaseMenuScreen.makeMenuButton
public JComponent makeMenuButton(FieldList record) { """ Create the button/panel for this menu item. @param record The menu record. @return The component to add to this panel. """ String strDescription = this.getMenuName(record); String strLink = this.getMenuLink(record); String strI...
java
public JComponent makeMenuButton(FieldList record) { String strDescription = this.getMenuName(record); String strLink = this.getMenuLink(record); String strIcon = this.getMenuIcon(record); strIcon = Util.getImageFilename(strIcon, "icons"); JUnderlinedButton button = null; ...
[ "public", "JComponent", "makeMenuButton", "(", "FieldList", "record", ")", "{", "String", "strDescription", "=", "this", ".", "getMenuName", "(", "record", ")", ";", "String", "strLink", "=", "this", ".", "getMenuLink", "(", "record", ")", ";", "String", "st...
Create the button/panel for this menu item. @param record The menu record. @return The component to add to this panel.
[ "Create", "the", "button", "/", "panel", "for", "this", "menu", "item", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/menu/JBaseMenuScreen.java#L227-L255
infinispan/infinispan
core/src/main/java/org/infinispan/factories/AbstractComponentRegistry.java
AbstractComponentRegistry.getOrCreateComponent
protected <T> T getOrCreateComponent(Class<T> componentClass) { """ Retrieves a component if one exists, and if not, attempts to find a factory capable of constructing the component (factories annotated with the {@link DefaultFactoryFor} annotation that is capable of creating the component class). <p/> If an i...
java
protected <T> T getOrCreateComponent(Class<T> componentClass) { return getComponent(componentClass, componentClass.getName()); }
[ "protected", "<", "T", ">", "T", "getOrCreateComponent", "(", "Class", "<", "T", ">", "componentClass", ")", "{", "return", "getComponent", "(", "componentClass", ",", "componentClass", ".", "getName", "(", ")", ")", ";", "}" ]
Retrieves a component if one exists, and if not, attempts to find a factory capable of constructing the component (factories annotated with the {@link DefaultFactoryFor} annotation that is capable of creating the component class). <p/> If an instance needs to be constructed, dependencies are then automatically wired in...
[ "Retrieves", "a", "component", "if", "one", "exists", "and", "if", "not", "attempts", "to", "find", "a", "factory", "capable", "of", "constructing", "the", "component", "(", "factories", "annotated", "with", "the", "{", "@link", "DefaultFactoryFor", "}", "anno...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/factories/AbstractComponentRegistry.java#L162-L164
samskivert/pythagoras
src/main/java/pythagoras/f/Quaternion.java
Quaternion.fromAngles
public Quaternion fromAngles (float x, float y, float z) { """ Sets this quaternion to one that first rotates about x by the specified number of radians, then rotates about y, then about z. """ // TODO: it may be more convenient to define the angles in the opposite order (first z, // then y, t...
java
public Quaternion fromAngles (float x, float y, float z) { // TODO: it may be more convenient to define the angles in the opposite order (first z, // then y, then x) float hx = x * 0.5f, hy = y * 0.5f, hz = z * 0.5f; float sz = FloatMath.sin(hz), cz = FloatMath.cos(hz); float sy ...
[ "public", "Quaternion", "fromAngles", "(", "float", "x", ",", "float", "y", ",", "float", "z", ")", "{", "// TODO: it may be more convenient to define the angles in the opposite order (first z,", "// then y, then x)", "float", "hx", "=", "x", "*", "0.5f", ",", "hy", "...
Sets this quaternion to one that first rotates about x by the specified number of radians, then rotates about y, then about z.
[ "Sets", "this", "quaternion", "to", "one", "that", "first", "rotates", "about", "x", "by", "the", "specified", "number", "of", "radians", "then", "rotates", "about", "y", "then", "about", "z", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/f/Quaternion.java#L214-L227
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java
ClustersInner.getByResourceGroup
public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { """ Gets the specified cluster. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorRe...
java
public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); }
[ "public", "ClusterInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "clusterName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "clusterName", ")", ".", "toBlocking", "(", ")", ".", "sing...
Gets the specified cluster. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is rejected by server @throws RuntimeException all other wrappe...
[ "Gets", "the", "specified", "cluster", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java#L664-L666
defei/codelogger-utils
src/main/java/org/codelogger/utils/ValueUtils.java
ValueUtils.getValue
public static Long getValue(final Long value, final Long defaultValue) { """ Returns defaultValue if given value is null; else returns it self. @param value value to be test. @param defaultValue default value to return if given value is null. @return defaultValue if given value is null; else returns it self. ...
java
public static Long getValue(final Long value, final Long defaultValue) { return value == null ? defaultValue : value; }
[ "public", "static", "Long", "getValue", "(", "final", "Long", "value", ",", "final", "Long", "defaultValue", ")", "{", "return", "value", "==", "null", "?", "defaultValue", ":", "value", ";", "}" ]
Returns defaultValue if given value is null; else returns it self. @param value value to be test. @param defaultValue default value to return if given value is null. @return defaultValue if given value is null; else returns it self.
[ "Returns", "defaultValue", "if", "given", "value", "is", "null", ";", "else", "returns", "it", "self", "." ]
train
https://github.com/defei/codelogger-utils/blob/d906f5d217b783c7ae3e53442cd6fb87b20ecc0a/src/main/java/org/codelogger/utils/ValueUtils.java#L39-L42
Azure/azure-sdk-for-java
redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/PatchSchedulesInner.java
PatchSchedulesInner.createOrUpdateAsync
public Observable<RedisPatchScheduleInner> createOrUpdateAsync(String resourceGroupName, String name, List<ScheduleEntry> scheduleEntries) { """ Create or replace the patching schedule for Redis cache (requires Premium SKU). @param resourceGroupName The name of the resource group. @param name The name of the R...
java
public Observable<RedisPatchScheduleInner> createOrUpdateAsync(String resourceGroupName, String name, List<ScheduleEntry> scheduleEntries) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, scheduleEntries).map(new Func1<ServiceResponse<RedisPatchScheduleInner>, RedisPatchScheduleInner>() ...
[ "public", "Observable", "<", "RedisPatchScheduleInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "name", ",", "List", "<", "ScheduleEntry", ">", "scheduleEntries", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "...
Create or replace the patching schedule for Redis cache (requires Premium SKU). @param resourceGroupName The name of the resource group. @param name The name of the Redis cache. @param scheduleEntries List of patch schedules for a Redis cache. @throws IllegalArgumentException thrown if parameters fail the validation @...
[ "Create", "or", "replace", "the", "patching", "schedule", "for", "Redis", "cache", "(", "requires", "Premium", "SKU", ")", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/PatchSchedulesInner.java#L249-L256
umano/AndroidSlidingUpPanel
library/src/main/java/com/sothree/slidinguppanel/ViewDragHelper.java
ViewDragHelper.flingCapturedView
public void flingCapturedView(int minLeft, int minTop, int maxLeft, int maxTop) { """ Settle the captured view based on standard free-moving fling behavior. The caller should invoke {@link #continueSettling(boolean)} on each subsequent frame to continue the motion until it returns false. @param minLeft Minimu...
java
public void flingCapturedView(int minLeft, int minTop, int maxLeft, int maxTop) { if (!mReleaseInProgress) { throw new IllegalStateException("Cannot flingCapturedView outside of a call to " + "Callback#onViewReleased"); } mScroller.fling(mCapturedView.getLeft(), ...
[ "public", "void", "flingCapturedView", "(", "int", "minLeft", ",", "int", "minTop", ",", "int", "maxLeft", ",", "int", "maxTop", ")", "{", "if", "(", "!", "mReleaseInProgress", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Cannot flingCapturedView o...
Settle the captured view based on standard free-moving fling behavior. The caller should invoke {@link #continueSettling(boolean)} on each subsequent frame to continue the motion until it returns false. @param minLeft Minimum X position for the view's left edge @param minTop Minimum Y position for the view's top edge ...
[ "Settle", "the", "captured", "view", "based", "on", "standard", "free", "-", "moving", "fling", "behavior", ".", "The", "caller", "should", "invoke", "{", "@link", "#continueSettling", "(", "boolean", ")", "}", "on", "each", "subsequent", "frame", "to", "con...
train
https://github.com/umano/AndroidSlidingUpPanel/blob/45a460435b07e764138a700328836cafc1ed5c42/library/src/main/java/com/sothree/slidinguppanel/ViewDragHelper.java#L720-L732
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
Resolve.resolveMemberReference
Pair<Symbol, ReferenceLookupHelper> resolveMemberReference(Env<AttrContext> env, JCMemberReference referenceTree, Type site, Name name, List<Type> argtypes, ...
java
Pair<Symbol, ReferenceLookupHelper> resolveMemberReference(Env<AttrContext> env, JCMemberReference referenceTree, Type site, Name name, List<Type> argtypes, ...
[ "Pair", "<", "Symbol", ",", "ReferenceLookupHelper", ">", "resolveMemberReference", "(", "Env", "<", "AttrContext", ">", "env", ",", "JCMemberReference", "referenceTree", ",", "Type", "site", ",", "Name", "name", ",", "List", "<", "Type", ">", "argtypes", ",",...
Resolution of member references is typically done as a single overload resolution step, where the argument types A are inferred from the target functional descriptor. If the member reference is a method reference with a type qualifier, a two-step lookup process is performed. The first step uses the expected argument l...
[ "Resolution", "of", "member", "references", "is", "typically", "done", "as", "a", "single", "overload", "resolution", "step", "where", "the", "argument", "types", "A", "are", "inferred", "from", "the", "target", "functional", "descriptor", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java#L2920-L2964
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDifferentIndividualsAxiomImpl_CustomFieldSerializer.java
OWLDifferentIndividualsAxiomImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDifferentIndividualsAxiomImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link c...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDifferentIndividualsAxiomImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLDifferentIndividualsAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}...
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDifferentIndividualsAxiomImpl_CustomFieldSerializer.java#L95-L98
jMotif/GI
src/main/java/net/seninp/gi/clusterrule/DistanceComputation.java
DistanceComputation.eculideanDistNormEAbandon
protected double eculideanDistNormEAbandon(double[] ts1, double[] ts2, double bsfDist) { """ Normalized early abandoned Euclidean distance. @param ts1 the first series. @param ts2 the second series. @param bsfDist the distance value (used for early abandon). @return the distance value. """ double di...
java
protected double eculideanDistNormEAbandon(double[] ts1, double[] ts2, double bsfDist) { double dist = 0; double tsLen = ts1.length; double bsf = Math.pow(tsLen * bsfDist, 2); for (int i = 0; i < ts1.length; i++) { double diff = ts1[i] - ts2[i]; dist += Math.pow(diff, 2); ...
[ "protected", "double", "eculideanDistNormEAbandon", "(", "double", "[", "]", "ts1", ",", "double", "[", "]", "ts2", ",", "double", "bsfDist", ")", "{", "double", "dist", "=", "0", ";", "double", "tsLen", "=", "ts1", ".", "length", ";", "double", "bsf", ...
Normalized early abandoned Euclidean distance. @param ts1 the first series. @param ts2 the second series. @param bsfDist the distance value (used for early abandon). @return the distance value.
[ "Normalized", "early", "abandoned", "Euclidean", "distance", "." ]
train
https://github.com/jMotif/GI/blob/381212dd4f193246a6df82bd46f0d2bcd04a68d6/src/main/java/net/seninp/gi/clusterrule/DistanceComputation.java#L52-L67
resilience4j/resilience4j
resilience4j-prometheus/src/main/java/io/github/resilience4j/prometheus/BulkheadExports.java
BulkheadExports.ofBulkhead
public static BulkheadExports ofBulkhead(String prefix, Bulkhead bulkhead) { """ Creates a new instance of {@link BulkheadExports} with default metrics names prefix and a bulkhead as a source. @param prefix the prefix of metrics names @param bulkhead the bulkhead """ return new BulkheadExports(pre...
java
public static BulkheadExports ofBulkhead(String prefix, Bulkhead bulkhead) { return new BulkheadExports(prefix, Array.of(bulkhead)); }
[ "public", "static", "BulkheadExports", "ofBulkhead", "(", "String", "prefix", ",", "Bulkhead", "bulkhead", ")", "{", "return", "new", "BulkheadExports", "(", "prefix", ",", "Array", ".", "of", "(", "bulkhead", ")", ")", ";", "}" ]
Creates a new instance of {@link BulkheadExports} with default metrics names prefix and a bulkhead as a source. @param prefix the prefix of metrics names @param bulkhead the bulkhead
[ "Creates", "a", "new", "instance", "of", "{", "@link", "BulkheadExports", "}", "with", "default", "metrics", "names", "prefix", "and", "a", "bulkhead", "as", "a", "source", "." ]
train
https://github.com/resilience4j/resilience4j/blob/fa843d30f531c00f0c3dc218b65a7f2bb51af336/resilience4j-prometheus/src/main/java/io/github/resilience4j/prometheus/BulkheadExports.java#L129-L131
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/f/FundamentalLinear8.java
FundamentalLinear8.process
protected boolean process(DMatrixRMaj A, DMatrixRMaj F ) { """ Computes the SVD of A and extracts the essential/fundamental matrix from its null space """ if( !solverNull.process(A,1,F) ) return true; F.numRows = 3; F.numCols = 3; return false; }
java
protected boolean process(DMatrixRMaj A, DMatrixRMaj F ) { if( !solverNull.process(A,1,F) ) return true; F.numRows = 3; F.numCols = 3; return false; }
[ "protected", "boolean", "process", "(", "DMatrixRMaj", "A", ",", "DMatrixRMaj", "F", ")", "{", "if", "(", "!", "solverNull", ".", "process", "(", "A", ",", "1", ",", "F", ")", ")", "return", "true", ";", "F", ".", "numRows", "=", "3", ";", "F", "...
Computes the SVD of A and extracts the essential/fundamental matrix from its null space
[ "Computes", "the", "SVD", "of", "A", "and", "extracts", "the", "essential", "/", "fundamental", "matrix", "from", "its", "null", "space" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/f/FundamentalLinear8.java#L94-L102
joniles/mpxj
src/main/java/net/sf/mpxj/Resource.java
Resource.setEnterpriseText
public void setEnterpriseText(int index, String value) { """ Set an enterprise field value. @param index field index @param value field value """ set(selectField(ResourceFieldLists.ENTERPRISE_TEXT, index), value); }
java
public void setEnterpriseText(int index, String value) { set(selectField(ResourceFieldLists.ENTERPRISE_TEXT, index), value); }
[ "public", "void", "setEnterpriseText", "(", "int", "index", ",", "String", "value", ")", "{", "set", "(", "selectField", "(", "ResourceFieldLists", ".", "ENTERPRISE_TEXT", ",", "index", ")", ",", "value", ")", ";", "}" ]
Set an enterprise field value. @param index field index @param value field value
[ "Set", "an", "enterprise", "field", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Resource.java#L2161-L2164
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/base/base_resource.java
base_resource.delete_resource
protected base_resource[] delete_resource(nitro_service service) throws Exception { """ Use this method to perform a delete operation on MPS resource. @param service nitro_service object @return status of the operation performed. @throws Exception API exception is thrown. """ if (!service.isLogin()) ...
java
protected base_resource[] delete_resource(nitro_service service) throws Exception { if (!service.isLogin()) service.login(); String str = nitro_util.object_to_string_withoutquotes(this); String response = _delete(service, str); return get_nitro_response(service, response); }
[ "protected", "base_resource", "[", "]", "delete_resource", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "if", "(", "!", "service", ".", "isLogin", "(", ")", ")", "service", ".", "login", "(", ")", ";", "String", "str", "=", "nitro_util...
Use this method to perform a delete operation on MPS resource. @param service nitro_service object @return status of the operation performed. @throws Exception API exception is thrown.
[ "Use", "this", "method", "to", "perform", "a", "delete", "operation", "on", "MPS", "resource", "." ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/base/base_resource.java#L269-L278
alibaba/jstorm
jstorm-core/src/main/java/com/alibaba/jstorm/daemon/nimbus/ServiceHandler.java
ServiceHandler.setupZkTaskInfo
public void setupZkTaskInfo(Map<Object, Object> conf, String topologyId, StormClusterState stormClusterState) throws Exception { """ generate TaskInfo for every bolt or spout in ZK /ZK/tasks/topoologyId/xxx """ Map<Integer, TaskInfo> taskToTaskInfo = mkTaskComponentAssignments(conf, topologyId); ...
java
public void setupZkTaskInfo(Map<Object, Object> conf, String topologyId, StormClusterState stormClusterState) throws Exception { Map<Integer, TaskInfo> taskToTaskInfo = mkTaskComponentAssignments(conf, topologyId); // mkdir /ZK/taskbeats/topoologyId int masterId = NimbusUtils.getTopologyMasterI...
[ "public", "void", "setupZkTaskInfo", "(", "Map", "<", "Object", ",", "Object", ">", "conf", ",", "String", "topologyId", ",", "StormClusterState", "stormClusterState", ")", "throws", "Exception", "{", "Map", "<", "Integer", ",", "TaskInfo", ">", "taskToTaskInfo"...
generate TaskInfo for every bolt or spout in ZK /ZK/tasks/topoologyId/xxx
[ "generate", "TaskInfo", "for", "every", "bolt", "or", "spout", "in", "ZK", "/", "ZK", "/", "tasks", "/", "topoologyId", "/", "xxx" ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/com/alibaba/jstorm/daemon/nimbus/ServiceHandler.java#L1688-L1702
deeplearning4j/deeplearning4j
datavec/datavec-arrow/src/main/java/org/datavec/arrow/ArrowConverter.java
ArrowConverter.toArrowWritables
public static ArrowWritableRecordBatch toArrowWritables(List<FieldVector> fieldVectors,Schema schema) { """ Convert the input field vectors (the input data) and the given schema to a proper list of writables. @param fieldVectors the field vectors to use @param schema the schema to use @return the equivalent da...
java
public static ArrowWritableRecordBatch toArrowWritables(List<FieldVector> fieldVectors,Schema schema) { ArrowWritableRecordBatch arrowWritableRecordBatch = new ArrowWritableRecordBatch(fieldVectors,schema); return arrowWritableRecordBatch; }
[ "public", "static", "ArrowWritableRecordBatch", "toArrowWritables", "(", "List", "<", "FieldVector", ">", "fieldVectors", ",", "Schema", "schema", ")", "{", "ArrowWritableRecordBatch", "arrowWritableRecordBatch", "=", "new", "ArrowWritableRecordBatch", "(", "fieldVectors", ...
Convert the input field vectors (the input data) and the given schema to a proper list of writables. @param fieldVectors the field vectors to use @param schema the schema to use @return the equivalent datavec batch given the input data
[ "Convert", "the", "input", "field", "vectors", "(", "the", "input", "data", ")", "and", "the", "given", "schema", "to", "a", "proper", "list", "of", "writables", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-arrow/src/main/java/org/datavec/arrow/ArrowConverter.java#L337-L340