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 |
|---|---|---|---|---|---|---|---|---|---|---|
messagebird/java-rest-api | api/src/main/java/com/messagebird/MessageBirdClient.java | MessageBirdClient.viewTranscription | public TranscriptionResponse viewTranscription(String callID, String legId, String recordingId, Integer page, Integer pageSize) throws UnauthorizedException, GeneralException {
"""
Function to view recording by call id, leg id and recording id
@param callID Voice call ID
@param legId Leg ID
@param ... | java | public TranscriptionResponse viewTranscription(String callID, String legId, String recordingId, Integer page, Integer pageSize) throws UnauthorizedException, GeneralException {
if (callID == null) {
throw new IllegalArgumentException("Voice call ID must be specified.");
}
if (legId ... | [
"public",
"TranscriptionResponse",
"viewTranscription",
"(",
"String",
"callID",
",",
"String",
"legId",
",",
"String",
"recordingId",
",",
"Integer",
"page",
",",
"Integer",
"pageSize",
")",
"throws",
"UnauthorizedException",
",",
"GeneralException",
"{",
"if",
"("... | Function to view recording by call id, leg id and recording id
@param callID Voice call ID
@param legId Leg ID
@param recordingId Recording ID
@return TranscriptionResponseList
@throws UnauthorizedException if client is unauthorized
@throws GeneralException general exception | [
"Function",
"to",
"view",
"recording",
"by",
"call",
"id",
"leg",
"id",
"and",
"recording",
"id"
] | train | https://github.com/messagebird/java-rest-api/blob/f92cd93afff413e6dc12aa6e41e69f26cbae8941/api/src/main/java/com/messagebird/MessageBirdClient.java#L1130-L1154 |
RobotiumTech/robotium | robotium-solo/src/main/java/com/robotium/solo/WebUtils.java | WebUtils.getWebElements | public ArrayList<WebElement> getWebElements(final By by, boolean onlySufficientlyVisbile) {
"""
Returns an ArrayList of WebElements of the specified By object currently shown in the active WebView.
@param by the By object. Examples are By.id("id") and By.name("name")
@param onlySufficientlyVisible true if only... | java | public ArrayList<WebElement> getWebElements(final By by, boolean onlySufficientlyVisbile){
boolean javaScriptWasExecuted = executeJavaScript(by, false);
if(config.useJavaScriptToClickWebElements){
if(!javaScriptWasExecuted){
return new ArrayList<WebElement>();
}
return webElementCreator.getWebElemen... | [
"public",
"ArrayList",
"<",
"WebElement",
">",
"getWebElements",
"(",
"final",
"By",
"by",
",",
"boolean",
"onlySufficientlyVisbile",
")",
"{",
"boolean",
"javaScriptWasExecuted",
"=",
"executeJavaScript",
"(",
"by",
",",
"false",
")",
";",
"if",
"(",
"config",
... | Returns an ArrayList of WebElements of the specified By object currently shown in the active WebView.
@param by the By object. Examples are By.id("id") and By.name("name")
@param onlySufficientlyVisible true if only sufficiently visible {@link WebElement} objects should be returned
@return an {@code ArrayList} of the ... | [
"Returns",
"an",
"ArrayList",
"of",
"WebElements",
"of",
"the",
"specified",
"By",
"object",
"currently",
"shown",
"in",
"the",
"active",
"WebView",
"."
] | train | https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/WebUtils.java#L106-L117 |
code4everything/util | src/main/java/com/zhazhapan/util/Checker.java | Checker.check | public static <T> T check(T value, T elseValue, boolean res) {
"""
自定义检查
@param value res为true返回的值
@param elseValue res为false返回的值
@param res {@link Boolean}
@param <T> 值类型
@return 结果
@since 1.0.8
"""
return res ? value : elseValue;
} | java | public static <T> T check(T value, T elseValue, boolean res) {
return res ? value : elseValue;
} | [
"public",
"static",
"<",
"T",
">",
"T",
"check",
"(",
"T",
"value",
",",
"T",
"elseValue",
",",
"boolean",
"res",
")",
"{",
"return",
"res",
"?",
"value",
":",
"elseValue",
";",
"}"
] | 自定义检查
@param value res为true返回的值
@param elseValue res为false返回的值
@param res {@link Boolean}
@param <T> 值类型
@return 结果
@since 1.0.8 | [
"自定义检查"
] | train | https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/Checker.java#L1420-L1422 |
indeedeng/util | util-core/src/main/java/com/indeed/util/core/reference/AtomicSharedReference.java | AtomicSharedReference.map | public synchronized @Nullable <Z> Z map(Function<T, Z> f) {
"""
Call some function f on the reference we are storing.
Saving the value of T after this call returns is COMPLETELY UNSAFE. Don't do it.
@param f lambda(T x)
@param <Z> Return type; <? extends Object>
@return result of f
"""
if... | java | public synchronized @Nullable <Z> Z map(Function<T, Z> f) {
if (ref == null) {
return f.apply(null);
} else {
return f.apply(ref.get());
}
} | [
"public",
"synchronized",
"@",
"Nullable",
"<",
"Z",
">",
"Z",
"map",
"(",
"Function",
"<",
"T",
",",
"Z",
">",
"f",
")",
"{",
"if",
"(",
"ref",
"==",
"null",
")",
"{",
"return",
"f",
".",
"apply",
"(",
"null",
")",
";",
"}",
"else",
"{",
"re... | Call some function f on the reference we are storing.
Saving the value of T after this call returns is COMPLETELY UNSAFE. Don't do it.
@param f lambda(T x)
@param <Z> Return type; <? extends Object>
@return result of f | [
"Call",
"some",
"function",
"f",
"on",
"the",
"reference",
"we",
"are",
"storing",
".",
"Saving",
"the",
"value",
"of",
"T",
"after",
"this",
"call",
"returns",
"is",
"COMPLETELY",
"UNSAFE",
".",
"Don",
"t",
"do",
"it",
"."
] | train | https://github.com/indeedeng/util/blob/332008426cf14b57e7fc3e817d9423e3f84fb922/util-core/src/main/java/com/indeed/util/core/reference/AtomicSharedReference.java#L131-L137 |
khuxtable/seaglass | src/main/java/com/seaglasslookandfeel/ui/SeaGlassTabbedPaneUI.java | SeaGlassTabbedPaneUI.getContext | public SeaGlassContext getContext(JComponent c, Region subregion) {
"""
Create a SynthContext for the component and subregion. Use the current
state.
@param c the component.
@param subregion the subregion.
@return the newly created SynthContext.
"""
return getContext(c, subregion, get... | java | public SeaGlassContext getContext(JComponent c, Region subregion) {
return getContext(c, subregion, getComponentState(c));
} | [
"public",
"SeaGlassContext",
"getContext",
"(",
"JComponent",
"c",
",",
"Region",
"subregion",
")",
"{",
"return",
"getContext",
"(",
"c",
",",
"subregion",
",",
"getComponentState",
"(",
"c",
")",
")",
";",
"}"
] | Create a SynthContext for the component and subregion. Use the current
state.
@param c the component.
@param subregion the subregion.
@return the newly created SynthContext. | [
"Create",
"a",
"SynthContext",
"for",
"the",
"component",
"and",
"subregion",
".",
"Use",
"the",
"current",
"state",
"."
] | train | https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassTabbedPaneUI.java#L428-L430 |
LearnLib/automatalib | commons/util/src/main/java/net/automatalib/commons/util/UnionFindRemSP.java | UnionFindRemSP.link | @Override
public int link(int x, int y) {
"""
Unites two given sets. Note that the behavior of this method is not specified if the given parameters are normal
elements and no set identifiers.
@param x
the first set
@param y
the second set
@return the identifier of the resulting set (either {@code x} ... | java | @Override
public int link(int x, int y) {
if (x < y) {
p[x] = y;
return y;
}
p[y] = x;
return x;
} | [
"@",
"Override",
"public",
"int",
"link",
"(",
"int",
"x",
",",
"int",
"y",
")",
"{",
"if",
"(",
"x",
"<",
"y",
")",
"{",
"p",
"[",
"x",
"]",
"=",
"y",
";",
"return",
"y",
";",
"}",
"p",
"[",
"y",
"]",
"=",
"x",
";",
"return",
"x",
";",... | Unites two given sets. Note that the behavior of this method is not specified if the given parameters are normal
elements and no set identifiers.
@param x
the first set
@param y
the second set
@return the identifier of the resulting set (either {@code x} or {@code y}) | [
"Unites",
"two",
"given",
"sets",
".",
"Note",
"that",
"the",
"behavior",
"of",
"this",
"method",
"is",
"not",
"specified",
"if",
"the",
"given",
"parameters",
"are",
"normal",
"elements",
"and",
"no",
"set",
"identifiers",
"."
] | train | https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/commons/util/src/main/java/net/automatalib/commons/util/UnionFindRemSP.java#L140-L148 |
baasbox/Android-SDK | library/src/main/java/com/baasbox/android/BaasUser.java | BaasUser.saveSync | public BaasResult<BaasUser> saveSync() {
"""
Synchronously saves the updates made to the current user.
@return the result of the request
"""
BaasBox box = BaasBox.getDefaultChecked();
SaveUser task = new SaveUser(box, this, RequestOptions.DEFAULT, null);
return box.submitSync(task);
... | java | public BaasResult<BaasUser> saveSync() {
BaasBox box = BaasBox.getDefaultChecked();
SaveUser task = new SaveUser(box, this, RequestOptions.DEFAULT, null);
return box.submitSync(task);
} | [
"public",
"BaasResult",
"<",
"BaasUser",
">",
"saveSync",
"(",
")",
"{",
"BaasBox",
"box",
"=",
"BaasBox",
".",
"getDefaultChecked",
"(",
")",
";",
"SaveUser",
"task",
"=",
"new",
"SaveUser",
"(",
"box",
",",
"this",
",",
"RequestOptions",
".",
"DEFAULT",
... | Synchronously saves the updates made to the current user.
@return the result of the request | [
"Synchronously",
"saves",
"the",
"updates",
"made",
"to",
"the",
"current",
"user",
"."
] | train | https://github.com/baasbox/Android-SDK/blob/6bb2203246b885b2ad63a7bfaf37c83caf15e0d8/library/src/main/java/com/baasbox/android/BaasUser.java#L915-L919 |
cloudendpoints/endpoints-management-java | endpoints-control/src/main/java/com/google/api/control/aggregator/MetricValues.java | MetricValues.putMetricValue | public static Hasher putMetricValue(Hasher h, MetricValue value) {
"""
Updates {@code h} with the contents of {@code value}.
@param h a {@link Hasher}
@param value a {@code MetricValue} to be added to the hash
@return the {@code Hasher}, to allow fluent-style usage
"""
Signing.putLabels(h, value.getLa... | java | public static Hasher putMetricValue(Hasher h, MetricValue value) {
Signing.putLabels(h, value.getLabelsMap());
return h;
} | [
"public",
"static",
"Hasher",
"putMetricValue",
"(",
"Hasher",
"h",
",",
"MetricValue",
"value",
")",
"{",
"Signing",
".",
"putLabels",
"(",
"h",
",",
"value",
".",
"getLabelsMap",
"(",
")",
")",
";",
"return",
"h",
";",
"}"
] | Updates {@code h} with the contents of {@code value}.
@param h a {@link Hasher}
@param value a {@code MetricValue} to be added to the hash
@return the {@code Hasher}, to allow fluent-style usage | [
"Updates",
"{",
"@code",
"h",
"}",
"with",
"the",
"contents",
"of",
"{",
"@code",
"value",
"}",
"."
] | train | https://github.com/cloudendpoints/endpoints-management-java/blob/5bbf20ddadbbd51b890049e3c338c28abe2c9f94/endpoints-control/src/main/java/com/google/api/control/aggregator/MetricValues.java#L47-L50 |
EMCECS/nfs-client-java | src/main/java/com/emc/ecs/nfsclient/rpc/Xdr.java | Xdr.putByteArray | public void putByteArray(byte[] b, int boff, int len) {
"""
Put a counted array of bytes into the buffer
@param b
byte array
@param boff
offset into byte array
@param len
number of bytes to encode
"""
putInt(len);
putBytes(b, boff, len);
} | java | public void putByteArray(byte[] b, int boff, int len) {
putInt(len);
putBytes(b, boff, len);
} | [
"public",
"void",
"putByteArray",
"(",
"byte",
"[",
"]",
"b",
",",
"int",
"boff",
",",
"int",
"len",
")",
"{",
"putInt",
"(",
"len",
")",
";",
"putBytes",
"(",
"b",
",",
"boff",
",",
"len",
")",
";",
"}"
] | Put a counted array of bytes into the buffer
@param b
byte array
@param boff
offset into byte array
@param len
number of bytes to encode | [
"Put",
"a",
"counted",
"array",
"of",
"bytes",
"into",
"the",
"buffer"
] | train | https://github.com/EMCECS/nfs-client-java/blob/7ba25bad5052b95cd286052745327729288b2843/src/main/java/com/emc/ecs/nfsclient/rpc/Xdr.java#L349-L352 |
datumbox/datumbox-framework | datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/parametrics/onesample/LjungBox.java | LjungBox.checkCriticalValue | private static boolean checkCriticalValue(double score, int h, double aLevel, int p, int q) {
"""
Checks the Critical Value to determine if the Hypothesis should be rejected
@param score
@param h
@param aLevel
@param p
@param q
@return
""" //p and q are used only in ARIMA Models (p,0,q).
double... | java | private static boolean checkCriticalValue(double score, int h, double aLevel, int p, int q) { //p and q are used only in ARIMA Models (p,0,q).
double probability=ContinuousDistributions.chisquareCdf(score,h - p - q);
boolean rejectH0=false;
double a=aLevel;
if(probability>=(1-a)) {
... | [
"private",
"static",
"boolean",
"checkCriticalValue",
"(",
"double",
"score",
",",
"int",
"h",
",",
"double",
"aLevel",
",",
"int",
"p",
",",
"int",
"q",
")",
"{",
"//p and q are used only in ARIMA Models (p,0,q).",
"double",
"probability",
"=",
"ContinuousDistribut... | Checks the Critical Value to determine if the Hypothesis should be rejected
@param score
@param h
@param aLevel
@param p
@param q
@return | [
"Checks",
"the",
"Critical",
"Value",
"to",
"determine",
"if",
"the",
"Hypothesis",
"should",
"be",
"rejected"
] | train | https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/parametrics/onesample/LjungBox.java#L83-L94 |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java | ClassicLayoutManager.findTotalOffset | protected int findTotalOffset(ArrayList aligments, byte position) {
"""
Finds the highest sum of height for each possible alignment (left, center, right)
@param aligments
@return
"""
int total = 0;
for (Object aligment : aligments) {
HorizontalBandAlignment currentAlignment = (HorizontalBandAlignment)... | java | protected int findTotalOffset(ArrayList aligments, byte position) {
int total = 0;
for (Object aligment : aligments) {
HorizontalBandAlignment currentAlignment = (HorizontalBandAlignment) aligment;
int aux = 0;
for (AutoText autotext : getReport().getAutoTexts()) {
if (autotext.getPosition() == positio... | [
"protected",
"int",
"findTotalOffset",
"(",
"ArrayList",
"aligments",
",",
"byte",
"position",
")",
"{",
"int",
"total",
"=",
"0",
";",
"for",
"(",
"Object",
"aligment",
":",
"aligments",
")",
"{",
"HorizontalBandAlignment",
"currentAlignment",
"=",
"(",
"Hori... | Finds the highest sum of height for each possible alignment (left, center, right)
@param aligments
@return | [
"Finds",
"the",
"highest",
"sum",
"of",
"height",
"for",
"each",
"possible",
"alignment",
"(",
"left",
"center",
"right",
")"
] | train | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java#L172-L186 |
ironjacamar/ironjacamar | core/src/main/java/org/ironjacamar/core/connectionmanager/pool/AbstractManagedConnectionPool.java | AbstractManagedConnectionPool.removeConnectionListener | protected ConnectionListener removeConnectionListener(boolean free, Collection<ConnectionListener> listeners) {
"""
Remove a free ConnectionListener instance
@param free True if FREE, false if IN_USE
@param listeners The listeners
@return The ConnectionListener, or <code>null</code>
"""
if (free)
... | java | protected ConnectionListener removeConnectionListener(boolean free, Collection<ConnectionListener> listeners)
{
if (free)
{
for (ConnectionListener cl : listeners)
{
if (cl.changeState(FREE, IN_USE))
return cl;
}
}
else
{
fo... | [
"protected",
"ConnectionListener",
"removeConnectionListener",
"(",
"boolean",
"free",
",",
"Collection",
"<",
"ConnectionListener",
">",
"listeners",
")",
"{",
"if",
"(",
"free",
")",
"{",
"for",
"(",
"ConnectionListener",
"cl",
":",
"listeners",
")",
"{",
"if"... | Remove a free ConnectionListener instance
@param free True if FREE, false if IN_USE
@param listeners The listeners
@return The ConnectionListener, or <code>null</code> | [
"Remove",
"a",
"free",
"ConnectionListener",
"instance"
] | train | https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/connectionmanager/pool/AbstractManagedConnectionPool.java#L207-L227 |
liferay/com-liferay-commerce | commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountRelPersistenceImpl.java | CommerceDiscountRelPersistenceImpl.removeByCD_CN | @Override
public void removeByCD_CN(long commerceDiscountId, long classNameId) {
"""
Removes all the commerce discount rels where commerceDiscountId = ? and classNameId = ? from the database.
@param commerceDiscountId the commerce discount ID
@param classNameId the class name ID
"""
for (Commerc... | java | @Override
public void removeByCD_CN(long commerceDiscountId, long classNameId) {
for (CommerceDiscountRel commerceDiscountRel : findByCD_CN(
commerceDiscountId, classNameId, QueryUtil.ALL_POS,
QueryUtil.ALL_POS, null)) {
remove(commerceDiscountRel);
}
} | [
"@",
"Override",
"public",
"void",
"removeByCD_CN",
"(",
"long",
"commerceDiscountId",
",",
"long",
"classNameId",
")",
"{",
"for",
"(",
"CommerceDiscountRel",
"commerceDiscountRel",
":",
"findByCD_CN",
"(",
"commerceDiscountId",
",",
"classNameId",
",",
"QueryUtil",
... | Removes all the commerce discount rels where commerceDiscountId = ? and classNameId = ? from the database.
@param commerceDiscountId the commerce discount ID
@param classNameId the class name ID | [
"Removes",
"all",
"the",
"commerce",
"discount",
"rels",
"where",
"commerceDiscountId",
"=",
"?",
";",
"and",
"classNameId",
"=",
"?",
";",
"from",
"the",
"database",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountRelPersistenceImpl.java#L1108-L1115 |
OpenLiberty/open-liberty | dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/ChecksumsManager.java | ChecksumsManager.registerExistingChecksums | public void registerExistingChecksums(File featureDir, String symbolicName, String fileName) {
"""
Registers an existing feature directory's checksum
@param featureDir the feature directory
@param symbolicName the symbolic name for the file
@param fileName the actual file name
"""
ChecksumData che... | java | public void registerExistingChecksums(File featureDir, String symbolicName, String fileName) {
ChecksumData checksums = checksumsMap.get(featureDir);
if (checksums == null) {
checksums = new ChecksumData();
checksumsMap.put(featureDir, checksums);
}
checksums.regi... | [
"public",
"void",
"registerExistingChecksums",
"(",
"File",
"featureDir",
",",
"String",
"symbolicName",
",",
"String",
"fileName",
")",
"{",
"ChecksumData",
"checksums",
"=",
"checksumsMap",
".",
"get",
"(",
"featureDir",
")",
";",
"if",
"(",
"checksums",
"==",... | Registers an existing feature directory's checksum
@param featureDir the feature directory
@param symbolicName the symbolic name for the file
@param fileName the actual file name | [
"Registers",
"an",
"existing",
"feature",
"directory",
"s",
"checksum"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/ChecksumsManager.java#L254-L261 |
Wadpam/guja | guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDUserDaoImpl.java | GeneratedDUserDaoImpl.queryByPhoneNumber2 | public Iterable<DUser> queryByPhoneNumber2(java.lang.String phoneNumber2) {
"""
query-by method for field phoneNumber2
@param phoneNumber2 the specified attribute
@return an Iterable of DUsers for the specified phoneNumber2
"""
return queryByField(null, DUserMapper.Field.PHONENUMBER2.getFieldName(), phon... | java | public Iterable<DUser> queryByPhoneNumber2(java.lang.String phoneNumber2) {
return queryByField(null, DUserMapper.Field.PHONENUMBER2.getFieldName(), phoneNumber2);
} | [
"public",
"Iterable",
"<",
"DUser",
">",
"queryByPhoneNumber2",
"(",
"java",
".",
"lang",
".",
"String",
"phoneNumber2",
")",
"{",
"return",
"queryByField",
"(",
"null",
",",
"DUserMapper",
".",
"Field",
".",
"PHONENUMBER2",
".",
"getFieldName",
"(",
")",
",... | query-by method for field phoneNumber2
@param phoneNumber2 the specified attribute
@return an Iterable of DUsers for the specified phoneNumber2 | [
"query",
"-",
"by",
"method",
"for",
"field",
"phoneNumber2"
] | train | https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDUserDaoImpl.java#L196-L198 |
apache/incubator-gobblin | gobblin-utility/src/main/java/org/apache/gobblin/util/executors/IteratorExecutor.java | IteratorExecutor.verifyAllSuccessful | public static <T> boolean verifyAllSuccessful(List<Either<T, ExecutionException>> results) {
"""
Utility method that checks whether all tasks succeeded from the output of {@link #executeAndGetResults()}.
@return true if all tasks succeeded.
"""
return Iterables.all(results, new Predicate<Either<T, Executi... | java | public static <T> boolean verifyAllSuccessful(List<Either<T, ExecutionException>> results) {
return Iterables.all(results, new Predicate<Either<T, ExecutionException>>() {
@Override
public boolean apply(@Nullable Either<T, ExecutionException> input) {
return input instanceof Either.Left;
}... | [
"public",
"static",
"<",
"T",
">",
"boolean",
"verifyAllSuccessful",
"(",
"List",
"<",
"Either",
"<",
"T",
",",
"ExecutionException",
">",
">",
"results",
")",
"{",
"return",
"Iterables",
".",
"all",
"(",
"results",
",",
"new",
"Predicate",
"<",
"Either",
... | Utility method that checks whether all tasks succeeded from the output of {@link #executeAndGetResults()}.
@return true if all tasks succeeded. | [
"Utility",
"method",
"that",
"checks",
"whether",
"all",
"tasks",
"succeeded",
"from",
"the",
"output",
"of",
"{"
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/executors/IteratorExecutor.java#L140-L147 |
line/armeria | core/src/main/java/com/linecorp/armeria/server/streaming/JsonTextSequences.java | JsonTextSequences.fromPublisher | public static HttpResponse fromPublisher(HttpHeaders headers, Publisher<?> contentPublisher,
HttpHeaders trailingHeaders, ObjectMapper mapper) {
"""
Creates a new JSON Text Sequences from the specified {@link Publisher}.
@param headers the HTTP headers supposed to se... | java | public static HttpResponse fromPublisher(HttpHeaders headers, Publisher<?> contentPublisher,
HttpHeaders trailingHeaders, ObjectMapper mapper) {
requireNonNull(mapper, "mapper");
return streamingFrom(contentPublisher, sanitizeHeaders(headers), trailingHeaders... | [
"public",
"static",
"HttpResponse",
"fromPublisher",
"(",
"HttpHeaders",
"headers",
",",
"Publisher",
"<",
"?",
">",
"contentPublisher",
",",
"HttpHeaders",
"trailingHeaders",
",",
"ObjectMapper",
"mapper",
")",
"{",
"requireNonNull",
"(",
"mapper",
",",
"\"mapper\"... | Creates a new JSON Text Sequences from the specified {@link Publisher}.
@param headers the HTTP headers supposed to send
@param contentPublisher the {@link Publisher} which publishes the objects supposed to send as contents
@param trailingHeaders the trailing HTTP headers supposed to send
@param mapper the mapper whic... | [
"Creates",
"a",
"new",
"JSON",
"Text",
"Sequences",
"from",
"the",
"specified",
"{",
"@link",
"Publisher",
"}",
"."
] | train | https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/streaming/JsonTextSequences.java#L142-L147 |
Pi4J/pi4j | pi4j-gpio-extension/src/main/java/com/pi4j/gpio/extension/mcp/MCP4725GpioProvider.java | MCP4725GpioProvider.setValue | @Override
public void setValue(Pin pin, double value) {
"""
Set the analog output value to an output pin on the DAC immediately.
@param pin analog output pin
@param value raw value to send to the DAC. (Between: 0..4095)
"""
// validate range
if(value <= getMinSupportedValue()){
... | java | @Override
public void setValue(Pin pin, double value) {
// validate range
if(value <= getMinSupportedValue()){
value = getMinSupportedValue();
}
else if(value >= getMaxSupportedValue()){
value = getMaxSupportedValue();
}
// the DAC only supp... | [
"@",
"Override",
"public",
"void",
"setValue",
"(",
"Pin",
"pin",
",",
"double",
"value",
")",
"{",
"// validate range",
"if",
"(",
"value",
"<=",
"getMinSupportedValue",
"(",
")",
")",
"{",
"value",
"=",
"getMinSupportedValue",
"(",
")",
";",
"}",
"else",... | Set the analog output value to an output pin on the DAC immediately.
@param pin analog output pin
@param value raw value to send to the DAC. (Between: 0..4095) | [
"Set",
"the",
"analog",
"output",
"value",
"to",
"an",
"output",
"pin",
"on",
"the",
"DAC",
"immediately",
"."
] | train | https://github.com/Pi4J/pi4j/blob/03cacc62223cc59b3118bfcefadabab979fd84c7/pi4j-gpio-extension/src/main/java/com/pi4j/gpio/extension/mcp/MCP4725GpioProvider.java#L135-L164 |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/AbstractPrintQuery.java | AbstractPrintQuery.getMsgPhrase | public String getMsgPhrase(final SelectBuilder _selectBldr,
final UUID _msgPhrase)
throws EFapsException {
"""
Get the String representation of a phrase.
@param _selectBldr the select bldr
@param _msgPhrase the msg phrase
@return String representation of the phrase
@thr... | java | public String getMsgPhrase(final SelectBuilder _selectBldr,
final UUID _msgPhrase)
throws EFapsException
{
return getMsgPhrase(_selectBldr, MsgPhrase.get(_msgPhrase));
} | [
"public",
"String",
"getMsgPhrase",
"(",
"final",
"SelectBuilder",
"_selectBldr",
",",
"final",
"UUID",
"_msgPhrase",
")",
"throws",
"EFapsException",
"{",
"return",
"getMsgPhrase",
"(",
"_selectBldr",
",",
"MsgPhrase",
".",
"get",
"(",
"_msgPhrase",
")",
")",
"... | Get the String representation of a phrase.
@param _selectBldr the select bldr
@param _msgPhrase the msg phrase
@return String representation of the phrase
@throws EFapsException on error | [
"Get",
"the",
"String",
"representation",
"of",
"a",
"phrase",
"."
] | train | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/AbstractPrintQuery.java#L619-L624 |
orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/shp/SHPRead.java | SHPRead.readShape | public static void readShape(Connection connection, String fileName, String tableReference,String forceEncoding) throws IOException, SQLException {
"""
Copy data from Shape File into a new table in specified connection.
@param connection Active connection
@param tableReference [[catalog.]schema.]table reference
... | java | public static void readShape(Connection connection, String fileName, String tableReference,String forceEncoding) throws IOException, SQLException {
File file = URIUtilities.fileFromString(fileName);
if (FileUtil.isFileImportable(file, "shp")) {
SHPDriverFunction shpDriverFunction = new SHPDr... | [
"public",
"static",
"void",
"readShape",
"(",
"Connection",
"connection",
",",
"String",
"fileName",
",",
"String",
"tableReference",
",",
"String",
"forceEncoding",
")",
"throws",
"IOException",
",",
"SQLException",
"{",
"File",
"file",
"=",
"URIUtilities",
".",
... | Copy data from Shape File into a new table in specified connection.
@param connection Active connection
@param tableReference [[catalog.]schema.]table reference
@param fileName File path of the SHP file or URI
@param forceEncoding Use this encoding instead of DBF file header encoding property.
@throws java.io.IOExcepti... | [
"Copy",
"data",
"from",
"Shape",
"File",
"into",
"a",
"new",
"table",
"in",
"specified",
"connection",
"."
] | train | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/shp/SHPRead.java#L58-L65 |
hypercube1024/firefly | firefly-wechat/src/main/java/com/firefly/wechat/utils/WXBizMsgCrypt.java | WXBizMsgCrypt.decryptMsg | public String decryptMsg(String msgSignature, String timeStamp, String nonce, String postData)
throws AesException {
"""
检验消息的真实性,并且获取解密后的明文.
<ol>
<li>利用收到的密文生成安全签名,进行签名验证</li>
<li>若验证通过,则提取xml中的加密消息</li>
<li>对消息进行解密</li>
</ol>
@param msgSignature 签名串,对应URL参数的msg_signature
@param timeStamp ... | java | public String decryptMsg(String msgSignature, String timeStamp, String nonce, String postData)
throws AesException {
// 密钥,公众账号的app secret
// 提取密文
Object[] encrypt = XMLParser.extract(postData);
// 验证安全签名
String signature = SHA1.getSHA1(token, timeStamp, nonce, encr... | [
"public",
"String",
"decryptMsg",
"(",
"String",
"msgSignature",
",",
"String",
"timeStamp",
",",
"String",
"nonce",
",",
"String",
"postData",
")",
"throws",
"AesException",
"{",
"// 密钥,公众账号的app secret",
"// 提取密文",
"Object",
"[",
"]",
"encrypt",
"=",
"XMLParser",... | 检验消息的真实性,并且获取解密后的明文.
<ol>
<li>利用收到的密文生成安全签名,进行签名验证</li>
<li>若验证通过,则提取xml中的加密消息</li>
<li>对消息进行解密</li>
</ol>
@param msgSignature 签名串,对应URL参数的msg_signature
@param timeStamp 时间戳,对应URL参数的timestamp
@param nonce 随机串,对应URL参数的nonce
@param postData 密文,对应POST请求的数据
@return 解密后的原文
@throws AesException 执行失败,请查看该异常的错误码... | [
"检验消息的真实性,并且获取解密后的明文",
".",
"<ol",
">",
"<li",
">",
"利用收到的密文生成安全签名,进行签名验证<",
"/",
"li",
">",
"<li",
">",
"若验证通过,则提取xml中的加密消息<",
"/",
"li",
">",
"<li",
">",
"对消息进行解密<",
"/",
"li",
">",
"<",
"/",
"ol",
">"
] | train | https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-wechat/src/main/java/com/firefly/wechat/utils/WXBizMsgCrypt.java#L224-L241 |
Hygieia/Hygieia | collectors/build/jenkins/src/main/java/com/capitalone/dashboard/collector/DefaultHudsonClient.java | DefaultHudsonClient.addChangeSet | private void addChangeSet(Build build, JSONObject changeSet, Set<String> commitIds, Set<String> revisions) {
"""
Grabs changeset information for the given build.
@param build a Build
@param changeSet the build JSON object
@param commitIds the commitIds
@param revisions the revisions
"""
... | java | private void addChangeSet(Build build, JSONObject changeSet, Set<String> commitIds, Set<String> revisions) {
String scmType = getString(changeSet, "kind");
Map<String, RepoBranch> revisionToUrl = new HashMap<>();
// Build a map of revision to module (scm url). This is not always
... | [
"private",
"void",
"addChangeSet",
"(",
"Build",
"build",
",",
"JSONObject",
"changeSet",
",",
"Set",
"<",
"String",
">",
"commitIds",
",",
"Set",
"<",
"String",
">",
"revisions",
")",
"{",
"String",
"scmType",
"=",
"getString",
"(",
"changeSet",
",",
"\"k... | Grabs changeset information for the given build.
@param build a Build
@param changeSet the build JSON object
@param commitIds the commitIds
@param revisions the revisions | [
"Grabs",
"changeset",
"information",
"for",
"the",
"given",
"build",
"."
] | train | https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/build/jenkins/src/main/java/com/capitalone/dashboard/collector/DefaultHudsonClient.java#L405-L444 |
EMCECS/nfs-client-java | src/main/java/com/emc/ecs/nfsclient/rpc/RpcWrapper.java | RpcWrapper.callRpcNaked | public void callRpcNaked(S request, T response, String ipAddress) throws RpcException {
"""
Make the call to a specified IP address.
@param request
The request to send.
@param response
A response to hold the returned data.
@param ipAddress
The IP address to use for communication.
@throws RpcException
... | java | public void callRpcNaked(S request, T response, String ipAddress) throws RpcException {
Xdr xdr = new Xdr(_maximumRequestSize);
request.marshalling(xdr);
response.unmarshalling(callRpc(ipAddress, xdr, request.isUsePrivilegedPort()));
} | [
"public",
"void",
"callRpcNaked",
"(",
"S",
"request",
",",
"T",
"response",
",",
"String",
"ipAddress",
")",
"throws",
"RpcException",
"{",
"Xdr",
"xdr",
"=",
"new",
"Xdr",
"(",
"_maximumRequestSize",
")",
";",
"request",
".",
"marshalling",
"(",
"xdr",
"... | Make the call to a specified IP address.
@param request
The request to send.
@param response
A response to hold the returned data.
@param ipAddress
The IP address to use for communication.
@throws RpcException | [
"Make",
"the",
"call",
"to",
"a",
"specified",
"IP",
"address",
"."
] | train | https://github.com/EMCECS/nfs-client-java/blob/7ba25bad5052b95cd286052745327729288b2843/src/main/java/com/emc/ecs/nfsclient/rpc/RpcWrapper.java#L204-L208 |
kiswanij/jk-util | src/main/java/com/jk/util/reflection/client/ReflectionClient.java | ReflectionClient.callMethod | public void callMethod(final MethodCallInfo info) {
"""
Call the remote method based on the passed MethodCallInfo parameter.
@param info specification of remote method
"""
this.logger.info("calling remote method ".concat(info.toString()));
try (Socket socket = new Socket(this.host, this.port)) {
f... | java | public void callMethod(final MethodCallInfo info) {
this.logger.info("calling remote method ".concat(info.toString()));
try (Socket socket = new Socket(this.host, this.port)) {
final ObjectOutputStream out = new ObjectOutputStream(socket.getOutputStream());
out.writeObject(info);
final ObjectInputStre... | [
"public",
"void",
"callMethod",
"(",
"final",
"MethodCallInfo",
"info",
")",
"{",
"this",
".",
"logger",
".",
"info",
"(",
"\"calling remote method \"",
".",
"concat",
"(",
"info",
".",
"toString",
"(",
")",
")",
")",
";",
"try",
"(",
"Socket",
"socket",
... | Call the remote method based on the passed MethodCallInfo parameter.
@param info specification of remote method | [
"Call",
"the",
"remote",
"method",
"based",
"on",
"the",
"passed",
"MethodCallInfo",
"parameter",
"."
] | train | https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/reflection/client/ReflectionClient.java#L61-L72 |
jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java | ClassesManager.functionsAreAllowed | private static boolean functionsAreAllowed(boolean isAddAllFunction, boolean isPutAllFunction,Class<?> classD,Class<?> classS) {
"""
Returns true if the function to check is allowed.
@param isAddAllFunction true if addAll method is to check
@param isPutAllFunction true if putAll method is to check
@param classD... | java | private static boolean functionsAreAllowed(boolean isAddAllFunction, boolean isPutAllFunction,Class<?> classD,Class<?> classS) {
if(isAddAllFunction)
return collectionIsAssignableFrom(classD) && collectionIsAssignableFrom(classS);
if(isPutAllFunction)
return mapIsAssignableFrom(classD) && mapIsAss... | [
"private",
"static",
"boolean",
"functionsAreAllowed",
"(",
"boolean",
"isAddAllFunction",
",",
"boolean",
"isPutAllFunction",
",",
"Class",
"<",
"?",
">",
"classD",
",",
"Class",
"<",
"?",
">",
"classS",
")",
"{",
"if",
"(",
"isAddAllFunction",
")",
"return",... | Returns true if the function to check is allowed.
@param isAddAllFunction true if addAll method is to check
@param isPutAllFunction true if putAll method is to check
@param classD destination class
@param classS source class
@return true if the function to check is allowed | [
"Returns",
"true",
"if",
"the",
"function",
"to",
"check",
"is",
"allowed",
"."
] | train | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java#L232-L242 |
infinispan/infinispan | server/hotrod/src/main/java/org/infinispan/server/hotrod/transport/ExtendedByteBuf.java | ExtendedByteBuf.readOptString | public static Optional<String> readOptString(ByteBuf bf) {
"""
Reads an optional String. 0 length is an empty string, negative length is translated to None.
"""
Optional<byte[]> bytes = readOptRangedBytes(bf);
return bytes.map(b -> new String(b, CharsetUtil.UTF_8));
} | java | public static Optional<String> readOptString(ByteBuf bf) {
Optional<byte[]> bytes = readOptRangedBytes(bf);
return bytes.map(b -> new String(b, CharsetUtil.UTF_8));
} | [
"public",
"static",
"Optional",
"<",
"String",
">",
"readOptString",
"(",
"ByteBuf",
"bf",
")",
"{",
"Optional",
"<",
"byte",
"[",
"]",
">",
"bytes",
"=",
"readOptRangedBytes",
"(",
"bf",
")",
";",
"return",
"bytes",
".",
"map",
"(",
"b",
"->",
"new",
... | Reads an optional String. 0 length is an empty string, negative length is translated to None. | [
"Reads",
"an",
"optional",
"String",
".",
"0",
"length",
"is",
"an",
"empty",
"string",
"negative",
"length",
"is",
"translated",
"to",
"None",
"."
] | train | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/hotrod/src/main/java/org/infinispan/server/hotrod/transport/ExtendedByteBuf.java#L67-L70 |
ysc/word | src/main/java/org/apdplat/word/recognition/RecognitionTool.java | RecognitionTool.isQuantifier | public static boolean isQuantifier(final String text, final int start, final int len) {
"""
数量词识别,如日期、时间、长度、容量、重量、面积等等
@param text 识别文本
@param start 待识别文本开始索引
@param len 识别长度
@return 是否识别
"""
if(len < 2){
return false;
}
//避免量词和不完整小数结合
//.的值是46,/的值是47
//判... | java | public static boolean isQuantifier(final String text, final int start, final int len){
if(len < 2){
return false;
}
//避免量词和不完整小数结合
//.的值是46,/的值是47
//判断前一个字符是否是.或/
int index = start-1;
if(index > -1 && (text.charAt(index) == 46 || text.charAt(index) == ... | [
"public",
"static",
"boolean",
"isQuantifier",
"(",
"final",
"String",
"text",
",",
"final",
"int",
"start",
",",
"final",
"int",
"len",
")",
"{",
"if",
"(",
"len",
"<",
"2",
")",
"{",
"return",
"false",
";",
"}",
"//避免量词和不完整小数结合",
"//.的值是46,/的值是47",
"//... | 数量词识别,如日期、时间、长度、容量、重量、面积等等
@param text 识别文本
@param start 待识别文本开始索引
@param len 识别长度
@return 是否识别 | [
"数量词识别,如日期、时间、长度、容量、重量、面积等等"
] | train | https://github.com/ysc/word/blob/5e45607f4e97207f55d1e3bc561abda6b34f7c54/src/main/java/org/apdplat/word/recognition/RecognitionTool.java#L210-L233 |
jenkinsci/github-plugin | src/main/java/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor.java | GitHubHookRegisterProblemMonitor.registerProblem | private void registerProblem(GitHubRepositoryName repo, String message) {
"""
Used by {@link #registerProblem(GitHubRepositoryName, Throwable)}
@param repo full named GitHub repo, if null nothing will be done
@param message message to show in the interface. Will be used default if blank
"""
if (... | java | private void registerProblem(GitHubRepositoryName repo, String message) {
if (repo == null) {
return;
}
if (!ignored.contains(repo)) {
problems.put(repo, defaultIfBlank(message, Messages.unknown_error()));
} else {
LOGGER.debug("Repo {} is ignored by m... | [
"private",
"void",
"registerProblem",
"(",
"GitHubRepositoryName",
"repo",
",",
"String",
"message",
")",
"{",
"if",
"(",
"repo",
"==",
"null",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"ignored",
".",
"contains",
"(",
"repo",
")",
")",
"{",
"probl... | Used by {@link #registerProblem(GitHubRepositoryName, Throwable)}
@param repo full named GitHub repo, if null nothing will be done
@param message message to show in the interface. Will be used default if blank | [
"Used",
"by",
"{",
"@link",
"#registerProblem",
"(",
"GitHubRepositoryName",
"Throwable",
")",
"}"
] | train | https://github.com/jenkinsci/github-plugin/blob/4e05b9aeb488af5342c78f78aa3c55114e8d462a/src/main/java/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor.java#L94-L103 |
couchbase/CouchbaseMock | src/main/java/com/couchbase/mock/httpio/HandlerUtil.java | HandlerUtil.makeResponse | public static void makeResponse(HttpResponse response, String msg, int status) {
"""
Sets the response body and status
@param response The response object
@param msg The response body
@param status The response status
"""
response.setStatusCode(status);
makeStringResponse(response, msg);
... | java | public static void makeResponse(HttpResponse response, String msg, int status) {
response.setStatusCode(status);
makeStringResponse(response, msg);
} | [
"public",
"static",
"void",
"makeResponse",
"(",
"HttpResponse",
"response",
",",
"String",
"msg",
",",
"int",
"status",
")",
"{",
"response",
".",
"setStatusCode",
"(",
"status",
")",
";",
"makeStringResponse",
"(",
"response",
",",
"msg",
")",
";",
"}"
] | Sets the response body and status
@param response The response object
@param msg The response body
@param status The response status | [
"Sets",
"the",
"response",
"body",
"and",
"status"
] | train | https://github.com/couchbase/CouchbaseMock/blob/2085bbebade1d5b6356480e7bf335139d08383da/src/main/java/com/couchbase/mock/httpio/HandlerUtil.java#L160-L163 |
nightcode/yaranga | core/src/org/nightcode/common/net/http/AuthUtils.java | AuthUtils.percentDecode | public static String percentDecode(String source) throws AuthException {
"""
Returns a decoded string.
@param source source string for decoding
@return decoded string
@throws AuthException if character encoding needs to be consulted, but
named character encoding is not supported
"""
try {
retur... | java | public static String percentDecode(String source) throws AuthException {
try {
return URLDecoder.decode(source, "UTF-8");
} catch (java.io.UnsupportedEncodingException ex) {
throw new AuthException("cannot decode value '" + source + "'", ex);
}
} | [
"public",
"static",
"String",
"percentDecode",
"(",
"String",
"source",
")",
"throws",
"AuthException",
"{",
"try",
"{",
"return",
"URLDecoder",
".",
"decode",
"(",
"source",
",",
"\"UTF-8\"",
")",
";",
"}",
"catch",
"(",
"java",
".",
"io",
".",
"Unsupport... | Returns a decoded string.
@param source source string for decoding
@return decoded string
@throws AuthException if character encoding needs to be consulted, but
named character encoding is not supported | [
"Returns",
"a",
"decoded",
"string",
"."
] | train | https://github.com/nightcode/yaranga/blob/f02cf8d8bcd365b6b1d55638938631a00e9ee808/core/src/org/nightcode/common/net/http/AuthUtils.java#L54-L60 |
liferay/com-liferay-commerce | commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionPersistenceImpl.java | CPOptionPersistenceImpl.findByGroupId | @Override
public List<CPOption> findByGroupId(long groupId, int start, int end) {
"""
Returns a range of all the cp options where groupId = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are... | java | @Override
public List<CPOption> findByGroupId(long groupId, int start, int end) {
return findByGroupId(groupId, start, end, null);
} | [
"@",
"Override",
"public",
"List",
"<",
"CPOption",
">",
"findByGroupId",
"(",
"long",
"groupId",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"return",
"findByGroupId",
"(",
"groupId",
",",
"start",
",",
"end",
",",
"null",
")",
";",
"}"
] | Returns a range of all the cp options where groupId = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting... | [
"Returns",
"a",
"range",
"of",
"all",
"the",
"cp",
"options",
"where",
"groupId",
"=",
"?",
";",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionPersistenceImpl.java#L1517-L1520 |
UrielCh/ovh-java-sdk | ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java | ApiOvhTelephony.billingAccount_line_serviceName_abbreviatedNumber_abbreviatedNumber_GET | public OvhAbbreviatedNumber billingAccount_line_serviceName_abbreviatedNumber_abbreviatedNumber_GET(String billingAccount, String serviceName, Long abbreviatedNumber) throws IOException {
"""
Get this object properties
REST: GET /telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber... | java | public OvhAbbreviatedNumber billingAccount_line_serviceName_abbreviatedNumber_abbreviatedNumber_GET(String billingAccount, String serviceName, Long abbreviatedNumber) throws IOException {
String qPath = "/telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}";
StringBuilder sb = path(q... | [
"public",
"OvhAbbreviatedNumber",
"billingAccount_line_serviceName_abbreviatedNumber_abbreviatedNumber_GET",
"(",
"String",
"billingAccount",
",",
"String",
"serviceName",
",",
"Long",
"abbreviatedNumber",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/telephony... | Get this object properties
REST: GET /telephony/{billingAccount}/line/{serviceName}/abbreviatedNumber/{abbreviatedNumber}
@param billingAccount [required] The name of your billingAccount
@param serviceName [required]
@param abbreviatedNumber [required] The abbreviated number which must start with "2" and must have a l... | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L1592-L1597 |
jtablesaw/tablesaw | core/src/main/java/tech/tablesaw/aggregate/CrossTab.java | CrossTab.tablePercents | public static Table tablePercents(Table table, CategoricalColumn<?> column1, CategoricalColumn<?> column2) {
"""
Returns a table containing the table percents made from a source table, after first calculating the counts
cross-tabulated from the given columns
"""
Table xTabs = counts(table, column1, co... | java | public static Table tablePercents(Table table, CategoricalColumn<?> column1, CategoricalColumn<?> column2) {
Table xTabs = counts(table, column1, column2);
return tablePercents(xTabs);
} | [
"public",
"static",
"Table",
"tablePercents",
"(",
"Table",
"table",
",",
"CategoricalColumn",
"<",
"?",
">",
"column1",
",",
"CategoricalColumn",
"<",
"?",
">",
"column2",
")",
"{",
"Table",
"xTabs",
"=",
"counts",
"(",
"table",
",",
"column1",
",",
"colu... | Returns a table containing the table percents made from a source table, after first calculating the counts
cross-tabulated from the given columns | [
"Returns",
"a",
"table",
"containing",
"the",
"table",
"percents",
"made",
"from",
"a",
"source",
"table",
"after",
"first",
"calculating",
"the",
"counts",
"cross",
"-",
"tabulated",
"from",
"the",
"given",
"columns"
] | train | https://github.com/jtablesaw/tablesaw/blob/68a75b4098ac677e9486df5572cf13ec39f9f701/core/src/main/java/tech/tablesaw/aggregate/CrossTab.java#L278-L281 |
Netflix/conductor | client/src/main/java/com/netflix/conductor/client/http/PayloadStorage.java | PayloadStorage.getLocation | @Override
public ExternalStorageLocation getLocation(Operation operation, PayloadType payloadType, String path) {
"""
This method is not intended to be used in the client.
The client makes a request to the server to get the {@link ExternalStorageLocation}
"""
String uri;
switch (payloadTyp... | java | @Override
public ExternalStorageLocation getLocation(Operation operation, PayloadType payloadType, String path) {
String uri;
switch (payloadType) {
case WORKFLOW_INPUT:
case WORKFLOW_OUTPUT:
uri = "workflow";
break;
case TASK_INPUT... | [
"@",
"Override",
"public",
"ExternalStorageLocation",
"getLocation",
"(",
"Operation",
"operation",
",",
"PayloadType",
"payloadType",
",",
"String",
"path",
")",
"{",
"String",
"uri",
";",
"switch",
"(",
"payloadType",
")",
"{",
"case",
"WORKFLOW_INPUT",
":",
"... | This method is not intended to be used in the client.
The client makes a request to the server to get the {@link ExternalStorageLocation} | [
"This",
"method",
"is",
"not",
"intended",
"to",
"be",
"used",
"in",
"the",
"client",
".",
"The",
"client",
"makes",
"a",
"request",
"to",
"the",
"server",
"to",
"get",
"the",
"{"
] | train | https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/PayloadStorage.java#L51-L67 |
atomix/atomix | protocols/raft/src/main/java/io/atomix/protocols/raft/session/impl/RaftSessionConnection.java | RaftSessionConnection.retryRequest | @SuppressWarnings("unchecked")
protected <T extends RaftRequest> void retryRequest(Throwable cause, T request, BiFunction sender, int count, int selectionId, CompletableFuture future) {
"""
Resends a request due to a request failure, resetting the connection if necessary.
"""
// If the connection has not... | java | @SuppressWarnings("unchecked")
protected <T extends RaftRequest> void retryRequest(Throwable cause, T request, BiFunction sender, int count, int selectionId, CompletableFuture future) {
// If the connection has not changed, reset it and connect to the next server.
if (this.selectionId == selectionId) {
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"<",
"T",
"extends",
"RaftRequest",
">",
"void",
"retryRequest",
"(",
"Throwable",
"cause",
",",
"T",
"request",
",",
"BiFunction",
"sender",
",",
"int",
"count",
",",
"int",
"selectionId",
",",
... | Resends a request due to a request failure, resetting the connection if necessary. | [
"Resends",
"a",
"request",
"due",
"to",
"a",
"request",
"failure",
"resetting",
"the",
"connection",
"if",
"necessary",
"."
] | train | https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/raft/src/main/java/io/atomix/protocols/raft/session/impl/RaftSessionConnection.java#L241-L251 |
fozziethebeat/S-Space | src/main/java/edu/ucla/sspace/tools/WikipediaCleaner.java | WikipediaCleaner.removeWikiLinkMarkup | public void removeWikiLinkMarkup(StringBuilder article, String title) {
"""
Replace [[link]] tags with link name and track what articles this article
links to.
@param text The article text to clean and process link structure of.
@return A Duple containing the cleaned text and the outgoing link count.
""... | java | public void removeWikiLinkMarkup(StringBuilder article, String title) {
int bracketStart = article.indexOf("[[");
boolean includeLinkText =
options.contains(CleanerOption.INCLUDE_LINK_TEXT);
while (bracketStart >= 0) {
// grab the linked article name which i... | [
"public",
"void",
"removeWikiLinkMarkup",
"(",
"StringBuilder",
"article",
",",
"String",
"title",
")",
"{",
"int",
"bracketStart",
"=",
"article",
".",
"indexOf",
"(",
"\"[[\"",
")",
";",
"boolean",
"includeLinkText",
"=",
"options",
".",
"contains",
"(",
"Cl... | Replace [[link]] tags with link name and track what articles this article
links to.
@param text The article text to clean and process link structure of.
@return A Duple containing the cleaned text and the outgoing link count. | [
"Replace",
"[[",
"link",
"]]",
"tags",
"with",
"link",
"name",
"and",
"track",
"what",
"articles",
"this",
"article",
"links",
"to",
"."
] | train | https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/tools/WikipediaCleaner.java#L362-L407 |
opendatatrentino/s-match | src/main/java/it/unitn/disi/smatch/oracles/wordnet/WordNet.java | WordNet.getRelationFromOracle | private boolean getRelationFromOracle(ISense source, ISense target, char rel) throws SenseMatcherException {
"""
Method which returns whether particular type of relation between
two senses holds(according to oracle).
It uses cache to store already obtained relations in order to improve performance.
@param sou... | java | private boolean getRelationFromOracle(ISense source, ISense target, char rel) throws SenseMatcherException {
final String sensePairKey = source.toString() + target.toString();
Character cachedRelation = sensesCache.get(sensePairKey);
// if we don't have cached relation check which one exist a... | [
"private",
"boolean",
"getRelationFromOracle",
"(",
"ISense",
"source",
",",
"ISense",
"target",
",",
"char",
"rel",
")",
"throws",
"SenseMatcherException",
"{",
"final",
"String",
"sensePairKey",
"=",
"source",
".",
"toString",
"(",
")",
"+",
"target",
".",
"... | Method which returns whether particular type of relation between
two senses holds(according to oracle).
It uses cache to store already obtained relations in order to improve performance.
@param source the string of source
@param target the string of target
@param rel the relation between source and target
@return w... | [
"Method",
"which",
"returns",
"whether",
"particular",
"type",
"of",
"relation",
"between",
"two",
"senses",
"holds",
"(",
"according",
"to",
"oracle",
")",
".",
"It",
"uses",
"cache",
"to",
"store",
"already",
"obtained",
"relations",
"in",
"order",
"to",
"... | train | https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/oracles/wordnet/WordNet.java#L272-L306 |
bmwcarit/joynr | java/javaapi/src/main/java/io/joynr/provider/AbstractSubscriptionPublisher.java | AbstractSubscriptionPublisher.fireBroadcast | protected void fireBroadcast(String broadcastName, List<BroadcastFilter> broadcastFilters, Object... values) {
"""
Called by generated {@code <Interface>AbstractProvider} classes to notify
all registered listeners about the fired broadcast.
<p>
NOTE: Provider implementations should _not_ call this method but us... | java | protected void fireBroadcast(String broadcastName, List<BroadcastFilter> broadcastFilters, Object... values) {
if (!broadcastListeners.containsKey(broadcastName)) {
return;
}
List<BroadcastListener> listeners = broadcastListeners.get(broadcastName);
synchronized (listeners) {... | [
"protected",
"void",
"fireBroadcast",
"(",
"String",
"broadcastName",
",",
"List",
"<",
"BroadcastFilter",
">",
"broadcastFilters",
",",
"Object",
"...",
"values",
")",
"{",
"if",
"(",
"!",
"broadcastListeners",
".",
"containsKey",
"(",
"broadcastName",
")",
")"... | Called by generated {@code <Interface>AbstractProvider} classes to notify
all registered listeners about the fired broadcast.
<p>
NOTE: Provider implementations should _not_ call this method but use
broadcast specific {@code <Interface>AbstractProvider.fire<Broadcast>}
methods.
@param broadcastName the broadcast na... | [
"Called",
"by",
"generated",
"{",
"@code",
"<Interface",
">",
"AbstractProvider",
"}",
"classes",
"to",
"notify",
"all",
"registered",
"listeners",
"about",
"the",
"fired",
"broadcast",
".",
"<p",
">",
"NOTE",
":",
"Provider",
"implementations",
"should",
"_not_... | train | https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/javaapi/src/main/java/io/joynr/provider/AbstractSubscriptionPublisher.java#L85-L95 |
ocelotds/ocelot | ocelot-web/src/main/java/org/ocelotds/topic/messageControl/MessageControllerManager.java | MessageControllerManager.getJsTopicMessageControllerFromJsTopicControls | JsTopicMessageController getJsTopicMessageControllerFromJsTopicControls(String topic) {
"""
without jdk8, @Repeatable doesn't work, so we use @JsTopicControls annotation and parse it
@param topic
@return
"""
logger.debug("Looking for messageController for topic '{}' from JsTopicControls annotation", topic)... | java | JsTopicMessageController getJsTopicMessageControllerFromJsTopicControls(String topic) {
logger.debug("Looking for messageController for topic '{}' from JsTopicControls annotation", topic);
Instance<JsTopicMessageController<?>> select = topicMessageController.select(new JsTopicCtrlsAnnotationLiteral());
if(select.... | [
"JsTopicMessageController",
"getJsTopicMessageControllerFromJsTopicControls",
"(",
"String",
"topic",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Looking for messageController for topic '{}' from JsTopicControls annotation\"",
",",
"topic",
")",
";",
"Instance",
"<",
"JsTopicMessag... | without jdk8, @Repeatable doesn't work, so we use @JsTopicControls annotation and parse it
@param topic
@return | [
"without",
"jdk8"
] | train | https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-web/src/main/java/org/ocelotds/topic/messageControl/MessageControllerManager.java#L78-L85 |
ModeShape/modeshape | modeshape-common/src/main/java/org/modeshape/common/util/Reflection.java | Reflection.invokeAccessibly | public static Object invokeAccessibly(Object instance, Method method, Object[] parameters) {
"""
Invokes a method using reflection, in an accessible manner (by using {@link Method#setAccessible(boolean)}
@param instance instance on which to execute the method
@param method method to execute
@param param... | java | public static Object invokeAccessibly(Object instance, Method method, Object[] parameters) {
try {
method.setAccessible(true);
return method.invoke(instance, parameters);
} catch (Exception e) {
throw new RuntimeException("Unable to invoke method " + method + " on obj... | [
"public",
"static",
"Object",
"invokeAccessibly",
"(",
"Object",
"instance",
",",
"Method",
"method",
",",
"Object",
"[",
"]",
"parameters",
")",
"{",
"try",
"{",
"method",
".",
"setAccessible",
"(",
"true",
")",
";",
"return",
"method",
".",
"invoke",
"("... | Invokes a method using reflection, in an accessible manner (by using {@link Method#setAccessible(boolean)}
@param instance instance on which to execute the method
@param method method to execute
@param parameters parameters | [
"Invokes",
"a",
"method",
"using",
"reflection",
"in",
"an",
"accessible",
"manner",
"(",
"by",
"using",
"{",
"@link",
"Method#setAccessible",
"(",
"boolean",
")",
"}"
] | train | https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/util/Reflection.java#L326-L336 |
MariaDB/mariadb-connector-j | src/main/java/org/mariadb/jdbc/MariaDbConnection.java | MariaDbConnection.setSavepoint | public Savepoint setSavepoint(final String name) throws SQLException {
"""
<p>Creates a savepoint with the given name in the current transaction and returns the new
<code>Savepoint</code>
object that represents it.</p> if setSavepoint is invoked outside of an active transaction, a
transaction will be started at... | java | public Savepoint setSavepoint(final String name) throws SQLException {
Savepoint savepoint = new MariaDbSavepoint(name, savepointCount++);
try (Statement st = createStatement()) {
st.execute("SAVEPOINT " + savepoint.toString());
}
return savepoint;
} | [
"public",
"Savepoint",
"setSavepoint",
"(",
"final",
"String",
"name",
")",
"throws",
"SQLException",
"{",
"Savepoint",
"savepoint",
"=",
"new",
"MariaDbSavepoint",
"(",
"name",
",",
"savepointCount",
"++",
")",
";",
"try",
"(",
"Statement",
"st",
"=",
"create... | <p>Creates a savepoint with the given name in the current transaction and returns the new
<code>Savepoint</code>
object that represents it.</p> if setSavepoint is invoked outside of an active transaction, a
transaction will be started at this newly created savepoint.
@param name a <code>String</code> containing the na... | [
"<p",
">",
"Creates",
"a",
"savepoint",
"with",
"the",
"given",
"name",
"in",
"the",
"current",
"transaction",
"and",
"returns",
"the",
"new",
"<code",
">",
"Savepoint<",
"/",
"code",
">",
"object",
"that",
"represents",
"it",
".",
"<",
"/",
"p",
">",
... | train | https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/MariaDbConnection.java#L1148-L1155 |
Backendless/Android-SDK | src/com/backendless/utils/MapEntityUtil.java | MapEntityUtil.removeNullsAndRelations | public static void removeNullsAndRelations( Map<String, Object> entityMap ) {
"""
Removes relations and {@code null} fields (except system ones) from {@code entityMap}.
System fields like "created", "updated", "__meta" etc. are not removed if {@code null}.
@param entityMap entity object to clean up
"""
... | java | public static void removeNullsAndRelations( Map<String, Object> entityMap )
{
Iterator<Map.Entry<String, Object>> entryIterator = entityMap.entrySet().iterator();
while( entryIterator.hasNext() )
{
Map.Entry<String, Object> entry = entryIterator.next();
if( !isSystemField( entry ) )
{
... | [
"public",
"static",
"void",
"removeNullsAndRelations",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"entityMap",
")",
"{",
"Iterator",
"<",
"Map",
".",
"Entry",
"<",
"String",
",",
"Object",
">",
">",
"entryIterator",
"=",
"entityMap",
".",
"entrySet",
"... | Removes relations and {@code null} fields (except system ones) from {@code entityMap}.
System fields like "created", "updated", "__meta" etc. are not removed if {@code null}.
@param entityMap entity object to clean up | [
"Removes",
"relations",
"and",
"{",
"@code",
"null",
"}",
"fields",
"(",
"except",
"system",
"ones",
")",
"from",
"{",
"@code",
"entityMap",
"}",
".",
"System",
"fields",
"like",
"created",
"updated",
"__meta",
"etc",
".",
"are",
"not",
"removed",
"if",
... | train | https://github.com/Backendless/Android-SDK/blob/3af1e9a378f19d890db28a833f7fc8595b924cc3/src/com/backendless/utils/MapEntityUtil.java#L22-L36 |
jmeetsma/Iglu-Util | src/main/java/org/ijsberg/iglu/util/io/FileSupport.java | FileSupport.getFilesInDirectoryTree | public static ArrayList<File> getFilesInDirectoryTree(File file, String includeMask) {
"""
Retrieves all files from a directory and its subdirectories
matching the given mask.
@param file directory
@param includeMask mask to match
@return a list containing the found files
"""
return getContentsInDirect... | java | public static ArrayList<File> getFilesInDirectoryTree(File file, String includeMask) {
return getContentsInDirectoryTree(file, includeMask, true, false);
} | [
"public",
"static",
"ArrayList",
"<",
"File",
">",
"getFilesInDirectoryTree",
"(",
"File",
"file",
",",
"String",
"includeMask",
")",
"{",
"return",
"getContentsInDirectoryTree",
"(",
"file",
",",
"includeMask",
",",
"true",
",",
"false",
")",
";",
"}"
] | Retrieves all files from a directory and its subdirectories
matching the given mask.
@param file directory
@param includeMask mask to match
@return a list containing the found files | [
"Retrieves",
"all",
"files",
"from",
"a",
"directory",
"and",
"its",
"subdirectories",
"matching",
"the",
"given",
"mask",
"."
] | train | https://github.com/jmeetsma/Iglu-Util/blob/971eb022115247b1e34dc26dd02e7e621e29e910/src/main/java/org/ijsberg/iglu/util/io/FileSupport.java#L113-L115 |
moparisthebest/beehive | beehive-netui-core/src/main/java/org/apache/beehive/netui/core/urls/MutableURI.java | MutableURI.addParameter | public void addParameter( String name, String value, boolean encoded ) {
"""
Add a parameter for the query string.
<p> If the encoded flag is true then this method assumes that
the name and value do not need encoding or are already encoded
correctly. Otherwise, it translates the name and value with the
charact... | java | public void addParameter( String name, String value, boolean encoded )
{
if ( name == null )
{
throw new IllegalArgumentException( "A parameter name may not be null." );
}
if ( !encoded )
{
name = encode( name );
value = encode( value );
... | [
"public",
"void",
"addParameter",
"(",
"String",
"name",
",",
"String",
"value",
",",
"boolean",
"encoded",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"A parameter name may not be null.\"",
")",
";",
... | Add a parameter for the query string.
<p> If the encoded flag is true then this method assumes that
the name and value do not need encoding or are already encoded
correctly. Otherwise, it translates the name and value with the
character encoding of this URI and adds them to the set of
parameters for the query. If the e... | [
"Add",
"a",
"parameter",
"for",
"the",
"query",
"string",
".",
"<p",
">",
"If",
"the",
"encoded",
"flag",
"is",
"true",
"then",
"this",
"method",
"assumes",
"that",
"the",
"name",
"and",
"value",
"do",
"not",
"need",
"encoding",
"or",
"are",
"already",
... | train | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/core/urls/MutableURI.java#L578-L599 |
CloudSlang/cs-actions | cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java | WSManRemoteShellService.createShell | private String createShell(HttpClientService csHttpClient, HttpClientInputs httpClientInputs, WSManRequestInputs wsManRequestInputs)
throws RuntimeException, IOException, URISyntaxException,
XPathExpressionException, SAXException, ParserConfigurationException {
"""
Creates a shell on the re... | java | private String createShell(HttpClientService csHttpClient, HttpClientInputs httpClientInputs, WSManRequestInputs wsManRequestInputs)
throws RuntimeException, IOException, URISyntaxException,
XPathExpressionException, SAXException, ParserConfigurationException {
String document = Resource... | [
"private",
"String",
"createShell",
"(",
"HttpClientService",
"csHttpClient",
",",
"HttpClientInputs",
"httpClientInputs",
",",
"WSManRequestInputs",
"wsManRequestInputs",
")",
"throws",
"RuntimeException",
",",
"IOException",
",",
"URISyntaxException",
",",
"XPathExpressionE... | Creates a shell on the remote server and returns the shell id.
@param csHttpClient
@param httpClientInputs
@param wsManRequestInputs
@return the id of the created shell.
@throws RuntimeException
@throws IOException
@throws URISyntaxException
@throws TransformerException
@throws XPathExpressionException
@throws SAXExce... | [
"Creates",
"a",
"shell",
"on",
"the",
"remote",
"server",
"and",
"returns",
"the",
"shell",
"id",
"."
] | train | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java#L191-L200 |
phax/ph-commons | ph-commons/src/main/java/com/helger/commons/lang/EnumHelper.java | EnumHelper.getFromNameCaseInsensitiveOrNull | @Nullable
public static <ENUMTYPE extends Enum <ENUMTYPE> & IHasName> ENUMTYPE getFromNameCaseInsensitiveOrNull (@Nonnull final Class <ENUMTYPE> aClass,
@Nullable final String sName) {
"""
Get the enum value ... | java | @Nullable
public static <ENUMTYPE extends Enum <ENUMTYPE> & IHasName> ENUMTYPE getFromNameCaseInsensitiveOrNull (@Nonnull final Class <ENUMTYPE> aClass,
@Nullable final String sName)
{
return getFromNameCase... | [
"@",
"Nullable",
"public",
"static",
"<",
"ENUMTYPE",
"extends",
"Enum",
"<",
"ENUMTYPE",
">",
"&",
"IHasName",
">",
"ENUMTYPE",
"getFromNameCaseInsensitiveOrNull",
"(",
"@",
"Nonnull",
"final",
"Class",
"<",
"ENUMTYPE",
">",
"aClass",
",",
"@",
"Nullable",
"f... | Get the enum value with the passed name case insensitive
@param <ENUMTYPE>
The enum type
@param aClass
The enum class
@param sName
The name to search
@return <code>null</code> if no enum item with the given ID is present. | [
"Get",
"the",
"enum",
"value",
"with",
"the",
"passed",
"name",
"case",
"insensitive"
] | train | https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/lang/EnumHelper.java#L418-L423 |
Coveros/selenified | src/main/java/com/coveros/selenified/element/Element.java | Element.scrollTo | public void scrollTo(long position) {
"""
Scrolls the page to the element, leaving X pixels at the top of the
viewport above it, making it displayed on the current viewport, but only
if the element is present. If that condition is not met, the scroll action
will be logged, but skipped and the test will continue... | java | public void scrollTo(long position) {
String action = "Scrolling screen to " + position + " pixels above " + prettyOutput();
String expected = prettyOutputStart() + " is now within the current viewport";
try {
// wait for element to be present
if (isNotPresent(action, exp... | [
"public",
"void",
"scrollTo",
"(",
"long",
"position",
")",
"{",
"String",
"action",
"=",
"\"Scrolling screen to \"",
"+",
"position",
"+",
"\" pixels above \"",
"+",
"prettyOutput",
"(",
")",
";",
"String",
"expected",
"=",
"prettyOutputStart",
"(",
")",
"+",
... | Scrolls the page to the element, leaving X pixels at the top of the
viewport above it, making it displayed on the current viewport, but only
if the element is present. If that condition is not met, the scroll action
will be logged, but skipped and the test will continue.
@param position - how many pixels above the ele... | [
"Scrolls",
"the",
"page",
"to",
"the",
"element",
"leaving",
"X",
"pixels",
"at",
"the",
"top",
"of",
"the",
"viewport",
"above",
"it",
"making",
"it",
"displayed",
"on",
"the",
"current",
"viewport",
"but",
"only",
"if",
"the",
"element",
"is",
"present",... | train | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/element/Element.java#L1159-L1178 |
UrielCh/ovh-java-sdk | ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java | ApiOvhMe.accessRestriction_totp_id_PUT | public void accessRestriction_totp_id_PUT(Long id, OvhTOTPAccount body) throws IOException {
"""
Alter this object properties
REST: PUT /me/accessRestriction/totp/{id}
@param body [required] New object properties
@param id [required] The Id of the restriction
"""
String qPath = "/me/accessRestriction/to... | java | public void accessRestriction_totp_id_PUT(Long id, OvhTOTPAccount body) throws IOException {
String qPath = "/me/accessRestriction/totp/{id}";
StringBuilder sb = path(qPath, id);
exec(qPath, "PUT", sb.toString(), body);
} | [
"public",
"void",
"accessRestriction_totp_id_PUT",
"(",
"Long",
"id",
",",
"OvhTOTPAccount",
"body",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/me/accessRestriction/totp/{id}\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qPath",
",",
"id",
... | Alter this object properties
REST: PUT /me/accessRestriction/totp/{id}
@param body [required] New object properties
@param id [required] The Id of the restriction | [
"Alter",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L3961-L3965 |
rythmengine/rythmengine | src/main/java/org/rythmengine/Rythm.java | Rythm.renderStr | public static String renderStr(String template, Object... args) {
"""
Alias of {@link #renderString(String, Object...)}
@param template
@param args
@return render result
@see RythmEngine#renderString(String, Object...)
"""
return engine().renderString(template, args);
} | java | public static String renderStr(String template, Object... args) {
return engine().renderString(template, args);
} | [
"public",
"static",
"String",
"renderStr",
"(",
"String",
"template",
",",
"Object",
"...",
"args",
")",
"{",
"return",
"engine",
"(",
")",
".",
"renderString",
"(",
"template",
",",
"args",
")",
";",
"}"
] | Alias of {@link #renderString(String, Object...)}
@param template
@param args
@return render result
@see RythmEngine#renderString(String, Object...) | [
"Alias",
"of",
"{",
"@link",
"#renderString",
"(",
"String",
"Object",
"...",
")",
"}"
] | train | https://github.com/rythmengine/rythmengine/blob/064b565f08d9da07378bf77a9dd856ea5831cc92/src/main/java/org/rythmengine/Rythm.java#L376-L378 |
Abnaxos/markdown-doclet | doclet/jdk8/src/main/java/ch/raffael/mddoclet/mdtaglet/argval/PredefinedArgumentValidators.java | PredefinedArgumentValidators.atMost | public static ArgumentValidator atMost(final int expectedMax) {
"""
Creates a {@link ArgumentValidator} which checks for _#arguments <= expectedMax_
@param expectedMax the maximum number of expected arguments
@return the TooManyArgumentsValidator
"""
switch (expectedMax) {
case 0:
... | java | public static ArgumentValidator atMost(final int expectedMax) {
switch (expectedMax) {
case 0:
return NO_ARGUMENTS;
case 1:
return _AT_MOST_ONE;
case 2:
return _AT_MOST_TWO;
}
return atMost(expectedMax, MessageFo... | [
"public",
"static",
"ArgumentValidator",
"atMost",
"(",
"final",
"int",
"expectedMax",
")",
"{",
"switch",
"(",
"expectedMax",
")",
"{",
"case",
"0",
":",
"return",
"NO_ARGUMENTS",
";",
"case",
"1",
":",
"return",
"_AT_MOST_ONE",
";",
"case",
"2",
":",
"re... | Creates a {@link ArgumentValidator} which checks for _#arguments <= expectedMax_
@param expectedMax the maximum number of expected arguments
@return the TooManyArgumentsValidator | [
"Creates",
"a",
"{",
"@link",
"ArgumentValidator",
"}",
"which",
"checks",
"for",
"_#arguments",
"<",
"=",
"expectedMax_"
] | train | https://github.com/Abnaxos/markdown-doclet/blob/e98a9630206fc9c8d813cf2349ff594be8630054/doclet/jdk8/src/main/java/ch/raffael/mddoclet/mdtaglet/argval/PredefinedArgumentValidators.java#L164-L174 |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java | ZaurusTableForm.getColIndex | private int getColIndex(String colName, String tabName) {
"""
answer the index of the column named colName in the table tabName
"""
int ordPos = 0;
try {
if (cConn == null) {
return -1;
}
if (dbmeta == null) {
dbmeta = cConn... | java | private int getColIndex(String colName, String tabName) {
int ordPos = 0;
try {
if (cConn == null) {
return -1;
}
if (dbmeta == null) {
dbmeta = cConn.getMetaData();
}
ResultSet colList = dbmeta.getColumns(nu... | [
"private",
"int",
"getColIndex",
"(",
"String",
"colName",
",",
"String",
"tabName",
")",
"{",
"int",
"ordPos",
"=",
"0",
";",
"try",
"{",
"if",
"(",
"cConn",
"==",
"null",
")",
"{",
"return",
"-",
"1",
";",
"}",
"if",
"(",
"dbmeta",
"==",
"null",
... | answer the index of the column named colName in the table tabName | [
"answer",
"the",
"index",
"of",
"the",
"column",
"named",
"colName",
"in",
"the",
"table",
"tabName"
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/util/ZaurusTableForm.java#L876-L902 |
alkacon/opencms-core | src-setup/org/opencms/setup/xml/CmsSetupXmlHelper.java | CmsSetupXmlHelper.setAttribute | public boolean setAttribute(String xmlFilename, String xPath, String attribute, String value)
throws CmsXmlException {
"""
Replaces a attibute's value in the given node addressed by the xPath.<p>
@param xmlFilename the xml file name to get the document from
@param xPath the xPath to the node
@param attrib... | java | public boolean setAttribute(String xmlFilename, String xPath, String attribute, String value)
throws CmsXmlException {
return setAttribute(getDocument(xmlFilename), xPath, attribute, value);
} | [
"public",
"boolean",
"setAttribute",
"(",
"String",
"xmlFilename",
",",
"String",
"xPath",
",",
"String",
"attribute",
",",
"String",
"value",
")",
"throws",
"CmsXmlException",
"{",
"return",
"setAttribute",
"(",
"getDocument",
"(",
"xmlFilename",
")",
",",
"xPa... | Replaces a attibute's value in the given node addressed by the xPath.<p>
@param xmlFilename the xml file name to get the document from
@param xPath the xPath to the node
@param attribute the attribute to replace the value of
@param value the new value to set
@return <code>true</code> if successful <code>false</code> ... | [
"Replaces",
"a",
"attibute",
"s",
"value",
"in",
"the",
"given",
"node",
"addressed",
"by",
"the",
"xPath",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/xml/CmsSetupXmlHelper.java#L442-L446 |
elki-project/elki | elki-database/src/main/java/de/lmu/ifi/dbs/elki/database/query/knn/LinearScanEuclideanDistanceKNNQuery.java | LinearScanEuclideanDistanceKNNQuery.linearScan | private KNNHeap linearScan(Relation<? extends O> relation, DBIDIter iter, final O obj, KNNHeap heap) {
"""
Main loop of the linear scan.
@param relation Data relation
@param iter ID iterator
@param obj Query object
@param heap Output heap
@return Heap
"""
final SquaredEuclideanDistanceFunction squar... | java | private KNNHeap linearScan(Relation<? extends O> relation, DBIDIter iter, final O obj, KNNHeap heap) {
final SquaredEuclideanDistanceFunction squared = SquaredEuclideanDistanceFunction.STATIC;
double max = Double.POSITIVE_INFINITY;
while(iter.valid()) {
final double dist = squared.distance(obj, relati... | [
"private",
"KNNHeap",
"linearScan",
"(",
"Relation",
"<",
"?",
"extends",
"O",
">",
"relation",
",",
"DBIDIter",
"iter",
",",
"final",
"O",
"obj",
",",
"KNNHeap",
"heap",
")",
"{",
"final",
"SquaredEuclideanDistanceFunction",
"squared",
"=",
"SquaredEuclideanDis... | Main loop of the linear scan.
@param relation Data relation
@param iter ID iterator
@param obj Query object
@param heap Output heap
@return Heap | [
"Main",
"loop",
"of",
"the",
"linear",
"scan",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-database/src/main/java/de/lmu/ifi/dbs/elki/database/query/knn/LinearScanEuclideanDistanceKNNQuery.java#L84-L95 |
mongodb/stitch-android-sdk | core/sdk/src/main/java/com/mongodb/stitch/core/auth/internal/CoreStitchAuth.java | CoreStitchAuth.doAuthenticatedRequest | private synchronized Response doAuthenticatedRequest(
final StitchAuthRequest stitchReq,
final AuthInfo authInfo
) {
"""
Internal method which performs the authenticated request by preparing the auth request with
the provided auth info and request.
"""
try {
return requestClient.doRequ... | java | private synchronized Response doAuthenticatedRequest(
final StitchAuthRequest stitchReq,
final AuthInfo authInfo
) {
try {
return requestClient.doRequest(prepareAuthRequest(stitchReq, authInfo));
} catch (final StitchServiceException ex) {
return handleAuthFailure(ex, stitchReq);
}... | [
"private",
"synchronized",
"Response",
"doAuthenticatedRequest",
"(",
"final",
"StitchAuthRequest",
"stitchReq",
",",
"final",
"AuthInfo",
"authInfo",
")",
"{",
"try",
"{",
"return",
"requestClient",
".",
"doRequest",
"(",
"prepareAuthRequest",
"(",
"stitchReq",
",",
... | Internal method which performs the authenticated request by preparing the auth request with
the provided auth info and request. | [
"Internal",
"method",
"which",
"performs",
"the",
"authenticated",
"request",
"by",
"preparing",
"the",
"auth",
"request",
"with",
"the",
"provided",
"auth",
"info",
"and",
"request",
"."
] | train | https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/core/sdk/src/main/java/com/mongodb/stitch/core/auth/internal/CoreStitchAuth.java#L234-L243 |
strator-dev/greenpepper | greenpepper-open/confluence/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/velocity/ConfluenceGreenPepper.java | ConfluenceGreenPepper.verifyCredentials | public void verifyCredentials(String username, String password) throws GreenPepperServerException {
"""
<p>verifyCredentials.</p>
@param username a {@link java.lang.String} object.
@param password a {@link java.lang.String} object.
@throws com.greenpepper.server.GreenPepperServerException if any.
"""
... | java | public void verifyCredentials(String username, String password) throws GreenPepperServerException {
if (username != null && !isCredentialsValid(username, password)) {
throw new GreenPepperServerException("greenpepper.confluence.badcredentials", "The username and password are incorrect.");
}
... | [
"public",
"void",
"verifyCredentials",
"(",
"String",
"username",
",",
"String",
"password",
")",
"throws",
"GreenPepperServerException",
"{",
"if",
"(",
"username",
"!=",
"null",
"&&",
"!",
"isCredentialsValid",
"(",
"username",
",",
"password",
")",
")",
"{",
... | <p>verifyCredentials.</p>
@param username a {@link java.lang.String} object.
@param password a {@link java.lang.String} object.
@throws com.greenpepper.server.GreenPepperServerException if any. | [
"<p",
">",
"verifyCredentials",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper-open/confluence/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/velocity/ConfluenceGreenPepper.java#L902-L906 |
EdwardRaff/JSAT | JSAT/src/jsat/io/JSATData.java | JSATData.loadRegression | public static RegressionDataSet loadRegression(InputStream inRaw, DataStore backingStore) throws IOException {
"""
Loads in a JSAT dataset as a {@link RegressionDataSet}. An exception
will be thrown if the original dataset in the file was not a
{@link RegressionDataSet}.
@param inRaw the input stream, caller ... | java | public static RegressionDataSet loadRegression(InputStream inRaw, DataStore backingStore) throws IOException
{
return (RegressionDataSet) load(inRaw, backingStore);
} | [
"public",
"static",
"RegressionDataSet",
"loadRegression",
"(",
"InputStream",
"inRaw",
",",
"DataStore",
"backingStore",
")",
"throws",
"IOException",
"{",
"return",
"(",
"RegressionDataSet",
")",
"load",
"(",
"inRaw",
",",
"backingStore",
")",
";",
"}"
] | Loads in a JSAT dataset as a {@link RegressionDataSet}. An exception
will be thrown if the original dataset in the file was not a
{@link RegressionDataSet}.
@param inRaw the input stream, caller should buffer it
@param backingStore the data store to put all data points in
@return a RegressionDataSet object
@throws IOE... | [
"Loads",
"in",
"a",
"JSAT",
"dataset",
"as",
"a",
"{",
"@link",
"RegressionDataSet",
"}",
".",
"An",
"exception",
"will",
"be",
"thrown",
"if",
"the",
"original",
"dataset",
"in",
"the",
"file",
"was",
"not",
"a",
"{",
"@link",
"RegressionDataSet",
"}",
... | train | https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/io/JSATData.java#L599-L602 |
Azure/azure-sdk-for-java | servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java | ClientFactory.createMessageSenderFromEntityPath | public static IMessageSender createMessageSenderFromEntityPath(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings) throws InterruptedException, ServiceBusException {
"""
Creates a message sender to the entity using the client settings.
@param namespaceEndpointURI endpoint uri of entity nam... | java | public static IMessageSender createMessageSenderFromEntityPath(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings) throws InterruptedException, ServiceBusException {
return Utils.completeFuture(createMessageSenderFromEntityPathAsync(namespaceEndpointURI, entityPath, clientSettings));
... | [
"public",
"static",
"IMessageSender",
"createMessageSenderFromEntityPath",
"(",
"URI",
"namespaceEndpointURI",
",",
"String",
"entityPath",
",",
"ClientSettings",
"clientSettings",
")",
"throws",
"InterruptedException",
",",
"ServiceBusException",
"{",
"return",
"Utils",
".... | Creates a message sender to the entity using the client settings.
@param namespaceEndpointURI endpoint uri of entity namespace
@param entityPath path of entity
@param clientSettings client settings
@return IMessageSender instance
@throws InterruptedException if the current thread was interrupted while waiting
@throws S... | [
"Creates",
"a",
"message",
"sender",
"to",
"the",
"entity",
"using",
"the",
"client",
"settings",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java#L78-L80 |
google/error-prone-javac | src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/DocEnv.java | DocEnv.printWarning | public void printWarning(SourcePosition pos, String msg) {
"""
Print warning message, increment warning count.
@param msg message to print.
"""
if (silent)
return;
messager.printWarning(pos, msg);
} | java | public void printWarning(SourcePosition pos, String msg) {
if (silent)
return;
messager.printWarning(pos, msg);
} | [
"public",
"void",
"printWarning",
"(",
"SourcePosition",
"pos",
",",
"String",
"msg",
")",
"{",
"if",
"(",
"silent",
")",
"return",
";",
"messager",
".",
"printWarning",
"(",
"pos",
",",
"msg",
")",
";",
"}"
] | Print warning message, increment warning count.
@param msg message to print. | [
"Print",
"warning",
"message",
"increment",
"warning",
"count",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/DocEnv.java#L419-L423 |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.boot.nested/src/com/ibm/ws/kernel/launch/internal/FrameworkManager.java | FrameworkManager.startServerCommandListener | protected void startServerCommandListener() {
"""
Create a server command listener with the given config and uuid.
Made a method to allow test to avoid/swap out the listen() behavior
"""
String uuid = systemBundleCtx.getProperty("org.osgi.framework.uuid");
sc = new ServerCommandListener(config... | java | protected void startServerCommandListener() {
String uuid = systemBundleCtx.getProperty("org.osgi.framework.uuid");
sc = new ServerCommandListener(config, uuid, this);
sc.startListening();
} | [
"protected",
"void",
"startServerCommandListener",
"(",
")",
"{",
"String",
"uuid",
"=",
"systemBundleCtx",
".",
"getProperty",
"(",
"\"org.osgi.framework.uuid\"",
")",
";",
"sc",
"=",
"new",
"ServerCommandListener",
"(",
"config",
",",
"uuid",
",",
"this",
")",
... | Create a server command listener with the given config and uuid.
Made a method to allow test to avoid/swap out the listen() behavior | [
"Create",
"a",
"server",
"command",
"listener",
"with",
"the",
"given",
"config",
"and",
"uuid",
".",
"Made",
"a",
"method",
"to",
"allow",
"test",
"to",
"avoid",
"/",
"swap",
"out",
"the",
"listen",
"()",
"behavior"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.nested/src/com/ibm/ws/kernel/launch/internal/FrameworkManager.java#L756-L760 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java | SqlQueryStatement.appendInCriteria | private void appendInCriteria(TableAlias alias, PathInfo pathInfo, InCriteria c, StringBuffer buf) {
"""
Answer the SQL-Clause for an InCriteria
@param alias
@param pathInfo
@param c InCriteria
@param buf
"""
appendColName(alias, pathInfo, c.isTranslateAttribute(), buf);
buf.append(c.ge... | java | private void appendInCriteria(TableAlias alias, PathInfo pathInfo, InCriteria c, StringBuffer buf)
{
appendColName(alias, pathInfo, c.isTranslateAttribute(), buf);
buf.append(c.getClause());
if (c.getValue() instanceof Collection)
{
Object[] values = ((Collection)... | [
"private",
"void",
"appendInCriteria",
"(",
"TableAlias",
"alias",
",",
"PathInfo",
"pathInfo",
",",
"InCriteria",
"c",
",",
"StringBuffer",
"buf",
")",
"{",
"appendColName",
"(",
"alias",
",",
"pathInfo",
",",
"c",
".",
"isTranslateAttribute",
"(",
")",
",",
... | Answer the SQL-Clause for an InCriteria
@param alias
@param pathInfo
@param c InCriteria
@param buf | [
"Answer",
"the",
"SQL",
"-",
"Clause",
"for",
"an",
"InCriteria"
] | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java#L763-L789 |
BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java | QueryExecuter.runNeighborhood | public static Set<BioPAXElement> runNeighborhood(
Set<BioPAXElement> sourceSet,
Model model,
int limit,
Direction direction,
Filter... filters) {
"""
Gets neighborhood of the source set.
@param sourceSet seed to the query
@param model BioPAX model
@param limit neigborhood distance to get
@param dir... | java | public static Set<BioPAXElement> runNeighborhood(
Set<BioPAXElement> sourceSet,
Model model,
int limit,
Direction direction,
Filter... filters)
{
Graph graph;
if (model.getLevel() == BioPAXLevel.L3)
{
if (direction == Direction.UNDIRECTED)
{
graph = new GraphL3Undirected(model, filters);
... | [
"public",
"static",
"Set",
"<",
"BioPAXElement",
">",
"runNeighborhood",
"(",
"Set",
"<",
"BioPAXElement",
">",
"sourceSet",
",",
"Model",
"model",
",",
"int",
"limit",
",",
"Direction",
"direction",
",",
"Filter",
"...",
"filters",
")",
"{",
"Graph",
"graph... | Gets neighborhood of the source set.
@param sourceSet seed to the query
@param model BioPAX model
@param limit neigborhood distance to get
@param direction UPSTREAM, DOWNSTREAM or BOTHSTREAM
@param filters for filtering graph elements
@return BioPAX elements in the result set | [
"Gets",
"neighborhood",
"of",
"the",
"source",
"set",
"."
] | train | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java#L35-L65 |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/appdev/AppPackageUrl.java | AppPackageUrl.updatePackageUrl | public static MozuUrl updatePackageUrl(String applicationKey, String responseFields) {
"""
Get Resource Url for UpdatePackage
@param applicationKey The application key uniquely identifies the developer namespace, application ID, version, and package in Dev Center. The format is {Dev Account namespace}.{Applicatio... | java | public static MozuUrl updatePackageUrl(String applicationKey, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/appdev/apppackages/{applicationKey}/?responseFields={responseFields}");
formatter.formatUrl("applicationKey", applicationKey);
formatter.formatUrl("responseFields", ... | [
"public",
"static",
"MozuUrl",
"updatePackageUrl",
"(",
"String",
"applicationKey",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/appdev/apppackages/{applicationKey}/?responseFields={responseFields}\"",
... | Get Resource Url for UpdatePackage
@param applicationKey The application key uniquely identifies the developer namespace, application ID, version, and package in Dev Center. The format is {Dev Account namespace}.{Application ID}.{Application Version}.{Package name}.
@param responseFields Filtering syntax appended to an... | [
"Get",
"Resource",
"Url",
"for",
"UpdatePackage"
] | train | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/appdev/AppPackageUrl.java#L156-L162 |
aws/aws-sdk-java | aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/InventoryResultEntity.java | InventoryResultEntity.withData | public InventoryResultEntity withData(java.util.Map<String, InventoryResultItem> data) {
"""
<p>
The data section in the inventory result entity JSON.
</p>
@param data
The data section in the inventory result entity JSON.
@return Returns a reference to this object so that method calls can be chained togethe... | java | public InventoryResultEntity withData(java.util.Map<String, InventoryResultItem> data) {
setData(data);
return this;
} | [
"public",
"InventoryResultEntity",
"withData",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"InventoryResultItem",
">",
"data",
")",
"{",
"setData",
"(",
"data",
")",
";",
"return",
"this",
";",
"}"
] | <p>
The data section in the inventory result entity JSON.
</p>
@param data
The data section in the inventory result entity JSON.
@return Returns a reference to this object so that method calls can be chained together. | [
"<p",
">",
"The",
"data",
"section",
"in",
"the",
"inventory",
"result",
"entity",
"JSON",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/InventoryResultEntity.java#L126-L129 |
xcesco/kripton | kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/BindSharedPreferencesBuilder.java | BindSharedPreferencesBuilder.generateConstructor | private static void generateConstructor(PrefsEntity entity, String sharedPreferenceName, String beanClassName) {
"""
Generate constructor.
@param entity
@param sharedPreferenceName
the shared preference name
@param beanClassName
the bean class name
"""
MethodSpec.Builder method = MethodSpec.construc... | java | private static void generateConstructor(PrefsEntity entity, String sharedPreferenceName, String beanClassName) {
MethodSpec.Builder method = MethodSpec.constructorBuilder().addModifiers(Modifier.PRIVATE).addJavadoc("constructor\n");
method.addStatement("createPrefs()");
if (entity.isImmutablePojo()) {
Immuta... | [
"private",
"static",
"void",
"generateConstructor",
"(",
"PrefsEntity",
"entity",
",",
"String",
"sharedPreferenceName",
",",
"String",
"beanClassName",
")",
"{",
"MethodSpec",
".",
"Builder",
"method",
"=",
"MethodSpec",
".",
"constructorBuilder",
"(",
")",
".",
... | Generate constructor.
@param entity
@param sharedPreferenceName
the shared preference name
@param beanClassName
the bean class name | [
"Generate",
"constructor",
"."
] | train | https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/BindSharedPreferencesBuilder.java#L498-L511 |
notnoop/java-apns | src/main/java/com/notnoop/apns/ApnsServiceBuilder.java | ApnsServiceBuilder.asBatched | public ApnsServiceBuilder asBatched(int waitTimeInSec, int maxWaitTimeInSec, ScheduledExecutorService batchThreadPoolExecutor) {
"""
Construct service which will process notification requests in batch.
After each request batch will wait <code>waitTimeInSec</code> for more request to come
before executing but not... | java | public ApnsServiceBuilder asBatched(int waitTimeInSec, int maxWaitTimeInSec, ScheduledExecutorService batchThreadPoolExecutor) {
this.isBatched = true;
this.batchWaitTimeInSec = waitTimeInSec;
this.batchMaxWaitTimeInSec = maxWaitTimeInSec;
this.batchThreadPoolExecutor = batchThreadPoolEx... | [
"public",
"ApnsServiceBuilder",
"asBatched",
"(",
"int",
"waitTimeInSec",
",",
"int",
"maxWaitTimeInSec",
",",
"ScheduledExecutorService",
"batchThreadPoolExecutor",
")",
"{",
"this",
".",
"isBatched",
"=",
"true",
";",
"this",
".",
"batchWaitTimeInSec",
"=",
"waitTim... | Construct service which will process notification requests in batch.
After each request batch will wait <code>waitTimeInSec</code> for more request to come
before executing but not more than <code>maxWaitTimeInSec</code>
Each batch creates new connection and close it after finished.
In case reconnect policy is specifi... | [
"Construct",
"service",
"which",
"will",
"process",
"notification",
"requests",
"in",
"batch",
".",
"After",
"each",
"request",
"batch",
"will",
"wait",
"<code",
">",
"waitTimeInSec<",
"/",
"code",
">",
"for",
"more",
"request",
"to",
"come",
"before",
"execut... | train | https://github.com/notnoop/java-apns/blob/180a190d4cb49458441596ca7c69d50ec7f1dba5/src/main/java/com/notnoop/apns/ApnsServiceBuilder.java#L664-L670 |
cdapio/netty-http | src/main/java/io/cdap/http/internal/ParamConvertUtils.java | ParamConvertUtils.createPrimitiveTypeConverter | @Nullable
private static Converter<List<String>, Object> createPrimitiveTypeConverter(final Class<?> resultClass) {
"""
Creates a converter function that converts value into primitive type.
@return A converter function or {@code null} if the given type is not primitive type or boxed type
"""
Object de... | java | @Nullable
private static Converter<List<String>, Object> createPrimitiveTypeConverter(final Class<?> resultClass) {
Object defaultValue = defaultValue(resultClass);
if (defaultValue == null) {
// For primitive type, the default value shouldn't be null
return null;
}
return new BasicConve... | [
"@",
"Nullable",
"private",
"static",
"Converter",
"<",
"List",
"<",
"String",
">",
",",
"Object",
">",
"createPrimitiveTypeConverter",
"(",
"final",
"Class",
"<",
"?",
">",
"resultClass",
")",
"{",
"Object",
"defaultValue",
"=",
"defaultValue",
"(",
"resultCl... | Creates a converter function that converts value into primitive type.
@return A converter function or {@code null} if the given type is not primitive type or boxed type | [
"Creates",
"a",
"converter",
"function",
"that",
"converts",
"value",
"into",
"primitive",
"type",
"."
] | train | https://github.com/cdapio/netty-http/blob/02fdbb45bdd51d3dd58c0efbb2f27195d265cd0f/src/main/java/io/cdap/http/internal/ParamConvertUtils.java#L158-L173 |
apache/reef | lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/REEFLauncher.java | REEFLauncher.readConfigurationFromDisk | private static Configuration readConfigurationFromDisk(
final String configPath, final ConfigurationSerializer serializer) {
"""
Read configuration from a given file and deserialize it
into Tang configuration object that can be used for injection.
Configuration is currently serialized using Avro.
This... | java | private static Configuration readConfigurationFromDisk(
final String configPath, final ConfigurationSerializer serializer) {
LOG.log(Level.FINER, "Loading configuration file: {0}", configPath);
final File evaluatorConfigFile = new File(configPath);
if (!evaluatorConfigFile.exists()) {
thr... | [
"private",
"static",
"Configuration",
"readConfigurationFromDisk",
"(",
"final",
"String",
"configPath",
",",
"final",
"ConfigurationSerializer",
"serializer",
")",
"{",
"LOG",
".",
"log",
"(",
"Level",
".",
"FINER",
",",
"\"Loading configuration file: {0}\"",
",",
"c... | Read configuration from a given file and deserialize it
into Tang configuration object that can be used for injection.
Configuration is currently serialized using Avro.
This method also prints full deserialized configuration into log.
@param configPath Path to the local file that contains serialized configuration
of a ... | [
"Read",
"configuration",
"from",
"a",
"given",
"file",
"and",
"deserialize",
"it",
"into",
"Tang",
"configuration",
"object",
"that",
"can",
"be",
"used",
"for",
"injection",
".",
"Configuration",
"is",
"currently",
"serialized",
"using",
"Avro",
".",
"This",
... | train | https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/REEFLauncher.java#L124-L153 |
zxing/zxing | core/src/main/java/com/google/zxing/qrcode/detector/AlignmentPattern.java | AlignmentPattern.combineEstimate | AlignmentPattern combineEstimate(float i, float j, float newModuleSize) {
"""
Combines this object's current estimate of a finder pattern position and module size
with a new estimate. It returns a new {@code FinderPattern} containing an average of the two.
"""
float combinedX = (getX() + j) / 2.0f;
fl... | java | AlignmentPattern combineEstimate(float i, float j, float newModuleSize) {
float combinedX = (getX() + j) / 2.0f;
float combinedY = (getY() + i) / 2.0f;
float combinedModuleSize = (estimatedModuleSize + newModuleSize) / 2.0f;
return new AlignmentPattern(combinedX, combinedY, combinedModuleSize);
} | [
"AlignmentPattern",
"combineEstimate",
"(",
"float",
"i",
",",
"float",
"j",
",",
"float",
"newModuleSize",
")",
"{",
"float",
"combinedX",
"=",
"(",
"getX",
"(",
")",
"+",
"j",
")",
"/",
"2.0f",
";",
"float",
"combinedY",
"=",
"(",
"getY",
"(",
")",
... | Combines this object's current estimate of a finder pattern position and module size
with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. | [
"Combines",
"this",
"object",
"s",
"current",
"estimate",
"of",
"a",
"finder",
"pattern",
"position",
"and",
"module",
"size",
"with",
"a",
"new",
"estimate",
".",
"It",
"returns",
"a",
"new",
"{"
] | train | https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/qrcode/detector/AlignmentPattern.java#L52-L57 |
cloudendpoints/endpoints-management-java | endpoints-control/src/main/java/com/google/api/control/model/MethodRegistry.java | MethodRegistry.lookup | public @Nullable Info lookup(String httpMethod, String url) {
"""
Finds the {@code Info} instance that matches {@code httpMethod} and {@code url}.
@param httpMethod the method of a HTTP request
@param url the url of a HTTP request
@return an {@code Info} corresponding to the url and method, or null if none is... | java | public @Nullable Info lookup(String httpMethod, String url) {
httpMethod = httpMethod.toLowerCase();
if (url.startsWith("/")) {
url = url.substring(1);
}
url = StringUtils.stripTrailingSlash(url);
List<Info> infos = infosByHttpMethod.get(httpMethod);
if (infos == null) {
log.atFine()... | [
"public",
"@",
"Nullable",
"Info",
"lookup",
"(",
"String",
"httpMethod",
",",
"String",
"url",
")",
"{",
"httpMethod",
"=",
"httpMethod",
".",
"toLowerCase",
"(",
")",
";",
"if",
"(",
"url",
".",
"startsWith",
"(",
"\"/\"",
")",
")",
"{",
"url",
"=",
... | Finds the {@code Info} instance that matches {@code httpMethod} and {@code url}.
@param httpMethod the method of a HTTP request
@param url the url of a HTTP request
@return an {@code Info} corresponding to the url and method, or null if none is found | [
"Finds",
"the",
"{",
"@code",
"Info",
"}",
"instance",
"that",
"matches",
"{",
"@code",
"httpMethod",
"}",
"and",
"{",
"@code",
"url",
"}",
"."
] | train | https://github.com/cloudendpoints/endpoints-management-java/blob/5bbf20ddadbbd51b890049e3c338c28abe2c9f94/endpoints-control/src/main/java/com/google/api/control/model/MethodRegistry.java#L81-L104 |
javamelody/javamelody | javamelody-swing/src/main/java/net/bull/javamelody/swing/print/MPrinter.java | MPrinter.chooseFile | protected File chooseFile(final JTable table, final String extension) throws IOException {
"""
Choix du fichier pour un export.
@return File
@param table
JTable
@param extension
String
@throws IOException
Erreur disque
"""
final JFileChooser myFileChooser = getFileChooser();
final MExtensionFi... | java | protected File chooseFile(final JTable table, final String extension) throws IOException {
final JFileChooser myFileChooser = getFileChooser();
final MExtensionFileFilter filter = new MExtensionFileFilter(extension);
myFileChooser.addChoosableFileFilter(filter);
String title = buildTitle(table);
if (... | [
"protected",
"File",
"chooseFile",
"(",
"final",
"JTable",
"table",
",",
"final",
"String",
"extension",
")",
"throws",
"IOException",
"{",
"final",
"JFileChooser",
"myFileChooser",
"=",
"getFileChooser",
"(",
")",
";",
"final",
"MExtensionFileFilter",
"filter",
"... | Choix du fichier pour un export.
@return File
@param table
JTable
@param extension
String
@throws IOException
Erreur disque | [
"Choix",
"du",
"fichier",
"pour",
"un",
"export",
"."
] | train | https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-swing/src/main/java/net/bull/javamelody/swing/print/MPrinter.java#L152-L184 |
DiUS/pact-jvm | pact-jvm-consumer-java8/src/main/java/io/pactfoundation/consumer/dsl/LambdaDslJsonArray.java | LambdaDslJsonArray.eachLike | public LambdaDslJsonArray eachLike(int numberExamples, Consumer<LambdaDslJsonBody> nestedObject) {
"""
Element that is an array where each item must match the following example
@param numberExamples Number of examples to generate
"""
final PactDslJsonBody arrayLike = pactArray.eachLike(numberExample... | java | public LambdaDslJsonArray eachLike(int numberExamples, Consumer<LambdaDslJsonBody> nestedObject) {
final PactDslJsonBody arrayLike = pactArray.eachLike(numberExamples);
final LambdaDslJsonBody dslBody = new LambdaDslJsonBody(arrayLike);
nestedObject.accept(dslBody);
arrayLike.closeArray(... | [
"public",
"LambdaDslJsonArray",
"eachLike",
"(",
"int",
"numberExamples",
",",
"Consumer",
"<",
"LambdaDslJsonBody",
">",
"nestedObject",
")",
"{",
"final",
"PactDslJsonBody",
"arrayLike",
"=",
"pactArray",
".",
"eachLike",
"(",
"numberExamples",
")",
";",
"final",
... | Element that is an array where each item must match the following example
@param numberExamples Number of examples to generate | [
"Element",
"that",
"is",
"an",
"array",
"where",
"each",
"item",
"must",
"match",
"the",
"following",
"example"
] | train | https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer-java8/src/main/java/io/pactfoundation/consumer/dsl/LambdaDslJsonArray.java#L300-L306 |
aspectran/aspectran | core/src/main/java/com/aspectran/core/context/rule/EchoActionRule.java | EchoActionRule.newInstance | public static EchoActionRule newInstance(String id, Boolean hidden) {
"""
Returns a new derived instance of EchoActionRule.
@param id the action id
@param hidden whether to hide result of the action
@return the echo action rule
"""
EchoActionRule echoActionRule = new EchoActionRule();
echo... | java | public static EchoActionRule newInstance(String id, Boolean hidden) {
EchoActionRule echoActionRule = new EchoActionRule();
echoActionRule.setActionId(id);
echoActionRule.setHidden(hidden);
return echoActionRule;
} | [
"public",
"static",
"EchoActionRule",
"newInstance",
"(",
"String",
"id",
",",
"Boolean",
"hidden",
")",
"{",
"EchoActionRule",
"echoActionRule",
"=",
"new",
"EchoActionRule",
"(",
")",
";",
"echoActionRule",
".",
"setActionId",
"(",
"id",
")",
";",
"echoActionR... | Returns a new derived instance of EchoActionRule.
@param id the action id
@param hidden whether to hide result of the action
@return the echo action rule | [
"Returns",
"a",
"new",
"derived",
"instance",
"of",
"EchoActionRule",
"."
] | train | https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/context/rule/EchoActionRule.java#L140-L145 |
JM-Lab/utils-elasticsearch | src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchIndex.java | JMElasticsearchIndex.sendDataAsync | public ActionFuture<IndexResponse> sendDataAsync(
String jsonSource, String index, String type, String id) {
"""
Send data async action future.
@param jsonSource the json source
@param index the index
@param type the type
@param id the id
@return the action future
"""
... | java | public ActionFuture<IndexResponse> sendDataAsync(
String jsonSource, String index, String type, String id) {
return indexQueryAsync(buildIndexRequest(jsonSource, index, type, id));
} | [
"public",
"ActionFuture",
"<",
"IndexResponse",
">",
"sendDataAsync",
"(",
"String",
"jsonSource",
",",
"String",
"index",
",",
"String",
"type",
",",
"String",
"id",
")",
"{",
"return",
"indexQueryAsync",
"(",
"buildIndexRequest",
"(",
"jsonSource",
",",
"index... | Send data async action future.
@param jsonSource the json source
@param index the index
@param type the type
@param id the id
@return the action future | [
"Send",
"data",
"async",
"action",
"future",
"."
] | train | https://github.com/JM-Lab/utils-elasticsearch/blob/6ccec90e1e51d65d2af5efbb6d7b9f9bad90e638/src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchIndex.java#L318-L321 |
jroyalty/jglm | src/main/java/com/hackoeur/jglm/support/FastMathCalc.java | FastMathCalc.quadMult | private static void quadMult(final double a[], final double b[], final double result[]) {
"""
Compute (a[0] + a[1]) * (b[0] + b[1]) in extended precision.
@param a first term of the multiplication
@param b second term of the multiplication
@param result placeholder where to put the result
"""
final ... | java | private static void quadMult(final double a[], final double b[], final double result[]) {
final double xs[] = new double[2];
final double ys[] = new double[2];
final double zs[] = new double[2];
/* a[0] * b[0] */
split(a[0], xs);
split(b[0], ys);
splitMult(xs, ys... | [
"private",
"static",
"void",
"quadMult",
"(",
"final",
"double",
"a",
"[",
"]",
",",
"final",
"double",
"b",
"[",
"]",
",",
"final",
"double",
"result",
"[",
"]",
")",
"{",
"final",
"double",
"xs",
"[",
"]",
"=",
"new",
"double",
"[",
"2",
"]",
"... | Compute (a[0] + a[1]) * (b[0] + b[1]) in extended precision.
@param a first term of the multiplication
@param b second term of the multiplication
@param result placeholder where to put the result | [
"Compute",
"(",
"a",
"[",
"0",
"]",
"+",
"a",
"[",
"1",
"]",
")",
"*",
"(",
"b",
"[",
"0",
"]",
"+",
"b",
"[",
"1",
"]",
")",
"in",
"extended",
"precision",
"."
] | train | https://github.com/jroyalty/jglm/blob/9397c2fcf0d4d62844c64d0b14065ee7bf8cafc6/src/main/java/com/hackoeur/jglm/support/FastMathCalc.java#L436-L483 |
janus-project/guava.janusproject.io | guava/src/com/google/common/eventbus/EventSubscriber.java | EventSubscriber.handleEvent | public void handleEvent(Object event) throws InvocationTargetException {
"""
Invokes the wrapped subscriber method to handle {@code event}.
@param event event to handle
@throws InvocationTargetException if the wrapped method throws any
{@link Throwable} that is not an {@link Error} ({@code Error} instances ... | java | public void handleEvent(Object event) throws InvocationTargetException {
checkNotNull(event);
try {
method.invoke(target, new Object[] { event });
} catch (IllegalArgumentException e) {
throw new Error("Method rejected target/argument: " + event, e);
} catch (IllegalAccessException e) {
... | [
"public",
"void",
"handleEvent",
"(",
"Object",
"event",
")",
"throws",
"InvocationTargetException",
"{",
"checkNotNull",
"(",
"event",
")",
";",
"try",
"{",
"method",
".",
"invoke",
"(",
"target",
",",
"new",
"Object",
"[",
"]",
"{",
"event",
"}",
")",
... | Invokes the wrapped subscriber method to handle {@code event}.
@param event event to handle
@throws InvocationTargetException if the wrapped method throws any
{@link Throwable} that is not an {@link Error} ({@code Error} instances are
propagated as-is). | [
"Invokes",
"the",
"wrapped",
"subscriber",
"method",
"to",
"handle",
"{",
"@code",
"event",
"}",
"."
] | train | https://github.com/janus-project/guava.janusproject.io/blob/1c48fb672c9fdfddf276970570f703fa1115f588/guava/src/com/google/common/eventbus/EventSubscriber.java#L71-L85 |
flow/commons | src/main/java/com/flowpowered/commons/ViewFrustum.java | ViewFrustum.intersectsCuboid | public boolean intersectsCuboid(Vector3f[] vertices, float x, float y, float z) {
"""
Checks if the frustum of this camera intersects the given cuboid vertices.
@param vertices The cuboid local vertices to check the frustum against
@param x The x coordinate of the cuboid position
@param y The y coordinate of ... | java | public boolean intersectsCuboid(Vector3f[] vertices, float x, float y, float z) {
if (vertices.length != 8) {
throw new IllegalArgumentException("A cuboid has 8 vertices, not " + vertices.length);
}
planes:
for (int i = 0; i < 6; i++) {
for (Vector3f vertex : vert... | [
"public",
"boolean",
"intersectsCuboid",
"(",
"Vector3f",
"[",
"]",
"vertices",
",",
"float",
"x",
",",
"float",
"y",
",",
"float",
"z",
")",
"{",
"if",
"(",
"vertices",
".",
"length",
"!=",
"8",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",... | Checks if the frustum of this camera intersects the given cuboid vertices.
@param vertices The cuboid local vertices to check the frustum against
@param x The x coordinate of the cuboid position
@param y The y coordinate of the cuboid position
@param z The z coordinate of the cuboid position
@return Whether or not the... | [
"Checks",
"if",
"the",
"frustum",
"of",
"this",
"camera",
"intersects",
"the",
"given",
"cuboid",
"vertices",
"."
] | train | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/ViewFrustum.java#L240-L254 |
jayantk/jklol | src/com/jayantkrish/jklol/models/TableFactor.java | TableFactor.fromDelimitedFile | public static TableFactor fromDelimitedFile(List<VariableNumMap> variables,
List<? extends Function<String, ?>> inputConverters, Iterable<String> lines, String delimiter,
boolean ignoreInvalidAssignments, TensorFactory tensorFactory) {
"""
Gets a {@code TableFactor} from a series of lines, each descri... | java | public static TableFactor fromDelimitedFile(List<VariableNumMap> variables,
List<? extends Function<String, ?>> inputConverters, Iterable<String> lines, String delimiter,
boolean ignoreInvalidAssignments, TensorFactory tensorFactory) {
int numVars = variables.size();
VariableNumMap allVars = Variab... | [
"public",
"static",
"TableFactor",
"fromDelimitedFile",
"(",
"List",
"<",
"VariableNumMap",
">",
"variables",
",",
"List",
"<",
"?",
"extends",
"Function",
"<",
"String",
",",
"?",
">",
">",
"inputConverters",
",",
"Iterable",
"<",
"String",
">",
"lines",
",... | Gets a {@code TableFactor} from a series of lines, each describing a single
assignment. Each line is {@code delimiter}-separated, and its ith entry is
the value of the ith variable in {@code variables}. The last value on each
line is the weight.
@param variables
@param inputConverters
@param lines
@param delimiter
@pa... | [
"Gets",
"a",
"{",
"@code",
"TableFactor",
"}",
"from",
"a",
"series",
"of",
"lines",
"each",
"describing",
"a",
"single",
"assignment",
".",
"Each",
"line",
"is",
"{",
"@code",
"delimiter",
"}",
"-",
"separated",
"and",
"its",
"ith",
"entry",
"is",
"the"... | train | https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/models/TableFactor.java#L161-L194 |
l0s/fernet-java8 | fernet-java8/src/main/java/com/macasaet/fernet/Token.java | Token.validateAndDecrypt | @SuppressWarnings("PMD.LawOfDemeter")
public <T> T validateAndDecrypt(final Key key, final Validator<T> validator) {
"""
Check the validity of this token.
@param key the secret key against which to validate the token
@param validator an object that encapsulates the validation parameters (e.g. TTL)
@return... | java | @SuppressWarnings("PMD.LawOfDemeter")
public <T> T validateAndDecrypt(final Key key, final Validator<T> validator) {
return validator.validateAndDecrypt(key, this);
} | [
"@",
"SuppressWarnings",
"(",
"\"PMD.LawOfDemeter\"",
")",
"public",
"<",
"T",
">",
"T",
"validateAndDecrypt",
"(",
"final",
"Key",
"key",
",",
"final",
"Validator",
"<",
"T",
">",
"validator",
")",
"{",
"return",
"validator",
".",
"validateAndDecrypt",
"(",
... | Check the validity of this token.
@param key the secret key against which to validate the token
@param validator an object that encapsulates the validation parameters (e.g. TTL)
@return the decrypted, deserialised payload of this token
@throws TokenValidationException if <em>key</em> was NOT used to generate this toke... | [
"Check",
"the",
"validity",
"of",
"this",
"token",
"."
] | train | https://github.com/l0s/fernet-java8/blob/427244bc1af605ffca0ac2469d66b297ea9f77b3/fernet-java8/src/main/java/com/macasaet/fernet/Token.java#L192-L195 |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AwardEmojiApi.java | AwardEmojiApi.getMergeRequestAwardEmoji | public AwardEmoji getMergeRequestAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, Integer awardId) throws GitLabApiException {
"""
Get the specified award emoji for the specified merge request.
<pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/award_emoji/:award_id</code... | java | public AwardEmoji getMergeRequestAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, Integer awardId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mer... | [
"public",
"AwardEmoji",
"getMergeRequestAwardEmoji",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
",",
"Integer",
"awardId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"O... | Get the specified award emoji for the specified merge request.
<pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/award_emoji/:award_id</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param mergeRequestIid the merge reques... | [
"Get",
"the",
"specified",
"award",
"emoji",
"for",
"the",
"specified",
"merge",
"request",
"."
] | train | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AwardEmojiApi.java#L115-L119 |
rzwitserloot/lombok | src/core/lombok/javac/handlers/JavacHandlerUtil.java | JavacHandlerUtil.injectType | public static JavacNode injectType(JavacNode typeNode, final JCClassDecl type) {
"""
Adds an inner type (class, interface, enum) to the given type. Cannot inject top-level types.
@param typeNode parent type to inject new type into
@param type New type (class, interface, etc) to inject.
@return
"""
JCCla... | java | public static JavacNode injectType(JavacNode typeNode, final JCClassDecl type) {
JCClassDecl typeDecl = (JCClassDecl) typeNode.get();
addSuppressWarningsAll(type.mods, typeNode, type.pos, getGeneratedBy(type), typeNode.getContext());
addGenerated(type.mods, typeNode, type.pos, getGeneratedBy(type), typeNode.getCo... | [
"public",
"static",
"JavacNode",
"injectType",
"(",
"JavacNode",
"typeNode",
",",
"final",
"JCClassDecl",
"type",
")",
"{",
"JCClassDecl",
"typeDecl",
"=",
"(",
"JCClassDecl",
")",
"typeNode",
".",
"get",
"(",
")",
";",
"addSuppressWarningsAll",
"(",
"type",
"... | Adds an inner type (class, interface, enum) to the given type. Cannot inject top-level types.
@param typeNode parent type to inject new type into
@param type New type (class, interface, etc) to inject.
@return | [
"Adds",
"an",
"inner",
"type",
"(",
"class",
"interface",
"enum",
")",
"to",
"the",
"given",
"type",
".",
"Cannot",
"inject",
"top",
"-",
"level",
"types",
"."
] | train | https://github.com/rzwitserloot/lombok/blob/75601240760bd81ff95fcde7a1b8185769ce64e8/src/core/lombok/javac/handlers/JavacHandlerUtil.java#L1205-L1211 |
elki-project/elki | elki/src/main/java/de/lmu/ifi/dbs/elki/result/KMLOutputHandler.java | KMLOutputHandler.getColorForValue | public static final Color getColorForValue(double val) {
"""
Get color from a simple heatmap.
@param val Score value
@return Color in heatmap
"""
// Color positions
double[] pos = new double[] { 0.0, 0.6, 0.8, 1.0 };
// Colors at these positions
Color[] cols = new Color[] { new Color(0.0f, ... | java | public static final Color getColorForValue(double val) {
// Color positions
double[] pos = new double[] { 0.0, 0.6, 0.8, 1.0 };
// Colors at these positions
Color[] cols = new Color[] { new Color(0.0f, 0.0f, 0.0f, 0.6f), new Color(0.0f, 0.0f, 1.0f, 0.8f), new Color(1.0f, 0.0f, 0.0f, 0.9f), new Color(1.0... | [
"public",
"static",
"final",
"Color",
"getColorForValue",
"(",
"double",
"val",
")",
"{",
"// Color positions",
"double",
"[",
"]",
"pos",
"=",
"new",
"double",
"[",
"]",
"{",
"0.0",
",",
"0.6",
",",
"0.8",
",",
"1.0",
"}",
";",
"// Colors at these positio... | Get color from a simple heatmap.
@param val Score value
@return Color in heatmap | [
"Get",
"color",
"from",
"a",
"simple",
"heatmap",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/result/KMLOutputHandler.java#L602-L626 |
pippo-java/pippo | pippo-core/src/main/java/ro/pippo/core/PippoSettings.java | PippoSettings.getString | public String getString(String name, String defaultValue) {
"""
Returns the string value for the specified name. If the name does not exist
or the value for the name can not be interpreted as a string, the
defaultValue is returned.
@param name
@param defaultValue
@return name value or defaultValue
"""
... | java | public String getString(String name, String defaultValue) {
String value = getProperties().getProperty(name, defaultValue);
value = overrides.getProperty(name, value);
return value;
} | [
"public",
"String",
"getString",
"(",
"String",
"name",
",",
"String",
"defaultValue",
")",
"{",
"String",
"value",
"=",
"getProperties",
"(",
")",
".",
"getProperty",
"(",
"name",
",",
"defaultValue",
")",
";",
"value",
"=",
"overrides",
".",
"getProperty",... | Returns the string value for the specified name. If the name does not exist
or the value for the name can not be interpreted as a string, the
defaultValue is returned.
@param name
@param defaultValue
@return name value or defaultValue | [
"Returns",
"the",
"string",
"value",
"for",
"the",
"specified",
"name",
".",
"If",
"the",
"name",
"does",
"not",
"exist",
"or",
"the",
"value",
"for",
"the",
"name",
"can",
"not",
"be",
"interpreted",
"as",
"a",
"string",
"the",
"defaultValue",
"is",
"re... | train | https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/PippoSettings.java#L448-L453 |
m-m-m/util | value/src/main/java/net/sf/mmm/util/value/impl/DefaultComposedValueConverter.java | DefaultComposedValueConverter.addConverterComponent | public void addConverterComponent(ValueConverter<?, ?> converter) {
"""
@see #addConverter(ValueConverter)
@param converter is the converter to add.
"""
if (converter instanceof AbstractRecursiveValueConverter) {
((AbstractRecursiveValueConverter<?, ?>) converter).setComposedValueConverter(this);... | java | public void addConverterComponent(ValueConverter<?, ?> converter) {
if (converter instanceof AbstractRecursiveValueConverter) {
((AbstractRecursiveValueConverter<?, ?>) converter).setComposedValueConverter(this);
}
if (converter instanceof AbstractComponent) {
((AbstractComponent) converter).in... | [
"public",
"void",
"addConverterComponent",
"(",
"ValueConverter",
"<",
"?",
",",
"?",
">",
"converter",
")",
"{",
"if",
"(",
"converter",
"instanceof",
"AbstractRecursiveValueConverter",
")",
"{",
"(",
"(",
"AbstractRecursiveValueConverter",
"<",
"?",
",",
"?",
... | @see #addConverter(ValueConverter)
@param converter is the converter to add. | [
"@see",
"#addConverter",
"(",
"ValueConverter",
")"
] | train | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/value/src/main/java/net/sf/mmm/util/value/impl/DefaultComposedValueConverter.java#L58-L67 |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java | FileUtils.asCompressedCharSink | public static CharSink asCompressedCharSink(File f, Charset charSet) throws IOException {
"""
Just like {@link Files#asCharSink(java.io.File, java.nio.charset.Charset,
com.google.common.io.FileWriteMode...)}, but decompresses the incoming data using GZIP.
"""
return asCompressedByteSink(f).asCharSink(char... | java | public static CharSink asCompressedCharSink(File f, Charset charSet) throws IOException {
return asCompressedByteSink(f).asCharSink(charSet);
} | [
"public",
"static",
"CharSink",
"asCompressedCharSink",
"(",
"File",
"f",
",",
"Charset",
"charSet",
")",
"throws",
"IOException",
"{",
"return",
"asCompressedByteSink",
"(",
"f",
")",
".",
"asCharSink",
"(",
"charSet",
")",
";",
"}"
] | Just like {@link Files#asCharSink(java.io.File, java.nio.charset.Charset,
com.google.common.io.FileWriteMode...)}, but decompresses the incoming data using GZIP. | [
"Just",
"like",
"{"
] | train | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java#L824-L826 |
cloudfoundry/uaa | server/src/main/java/org/cloudfoundry/identity/uaa/scim/bootstrap/ScimUserBootstrap.java | ScimUserBootstrap.addUser | protected void addUser(UaaUser user) {
"""
Add a user account from the properties provided.
@param user a UaaUser
"""
ScimUser scimUser = getScimUser(user);
if (scimUser==null) {
if (isEmpty(user.getPassword()) && user.getOrigin().equals(OriginKeys.UAA)) {
logger.... | java | protected void addUser(UaaUser user) {
ScimUser scimUser = getScimUser(user);
if (scimUser==null) {
if (isEmpty(user.getPassword()) && user.getOrigin().equals(OriginKeys.UAA)) {
logger.debug("User's password cannot be empty");
throw new InvalidPasswordExceptio... | [
"protected",
"void",
"addUser",
"(",
"UaaUser",
"user",
")",
"{",
"ScimUser",
"scimUser",
"=",
"getScimUser",
"(",
"user",
")",
";",
"if",
"(",
"scimUser",
"==",
"null",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"user",
".",
"getPassword",
"(",
")",
")",
... | Add a user account from the properties provided.
@param user a UaaUser | [
"Add",
"a",
"user",
"account",
"from",
"the",
"properties",
"provided",
"."
] | train | https://github.com/cloudfoundry/uaa/blob/e8df3d7060580c92d33461106399f9e4f36e3cd2/server/src/main/java/org/cloudfoundry/identity/uaa/scim/bootstrap/ScimUserBootstrap.java#L172-L188 |
headius/invokebinder | src/main/java/com/headius/invokebinder/Signature.java | Signature.appendArgs | public Signature appendArgs(String[] names, Class<?>... types) {
"""
Append an argument (name + type) to the signature.
@param names the names of the arguments
@param types the types of the argument
@return a new signature with the added arguments
"""
assert names.length == types.length : "names a... | java | public Signature appendArgs(String[] names, Class<?>... types) {
assert names.length == types.length : "names and types must be of the same length";
String[] newArgNames = new String[argNames.length + names.length];
System.arraycopy(argNames, 0, newArgNames, 0, argNames.length);
System.... | [
"public",
"Signature",
"appendArgs",
"(",
"String",
"[",
"]",
"names",
",",
"Class",
"<",
"?",
">",
"...",
"types",
")",
"{",
"assert",
"names",
".",
"length",
"==",
"types",
".",
"length",
":",
"\"names and types must be of the same length\"",
";",
"String",
... | Append an argument (name + type) to the signature.
@param names the names of the arguments
@param types the types of the argument
@return a new signature with the added arguments | [
"Append",
"an",
"argument",
"(",
"name",
"+",
"type",
")",
"to",
"the",
"signature",
"."
] | train | https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Signature.java#L202-L210 |
foundation-runtime/service-directory | 2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryRegistrationService.java | DirectoryRegistrationService.registerService | public void registerService(ProvidedServiceInstance serviceInstance, ServiceInstanceHealth registryHealth) {
"""
Register a ProvidedServiceInstance with the OperationalStatus and the ServiceInstanceHealth callback.
@param serviceInstance
the ProvidedServiceInstance.
@param registryHealth
the ServiceInstanceH... | java | public void registerService(ProvidedServiceInstance serviceInstance, ServiceInstanceHealth registryHealth) {
registerService(serviceInstance);
getCacheServiceInstances().put(new ServiceInstanceToken(serviceInstance.getServiceName(), serviceInstance.getProviderId()),
new InstanceHealthPai... | [
"public",
"void",
"registerService",
"(",
"ProvidedServiceInstance",
"serviceInstance",
",",
"ServiceInstanceHealth",
"registryHealth",
")",
"{",
"registerService",
"(",
"serviceInstance",
")",
";",
"getCacheServiceInstances",
"(",
")",
".",
"put",
"(",
"new",
"ServiceI... | Register a ProvidedServiceInstance with the OperationalStatus and the ServiceInstanceHealth callback.
@param serviceInstance
the ProvidedServiceInstance.
@param registryHealth
the ServiceInstanceHealth callback. | [
"Register",
"a",
"ProvidedServiceInstance",
"with",
"the",
"OperationalStatus",
"and",
"the",
"ServiceInstanceHealth",
"callback",
"."
] | train | https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryRegistrationService.java#L128-L132 |
derari/cthul | xml/src/main/java/org/cthul/resolve/RResult.java | RResult.expandSystemId | protected String expandSystemId(String baseId, String systemId) {
"""
Calculates the resource location.
@param baseId
@param systemId
@return schema file path
"""
return getRequest().expandSystemId(baseId, systemId);
} | java | protected String expandSystemId(String baseId, String systemId) {
return getRequest().expandSystemId(baseId, systemId);
} | [
"protected",
"String",
"expandSystemId",
"(",
"String",
"baseId",
",",
"String",
"systemId",
")",
"{",
"return",
"getRequest",
"(",
")",
".",
"expandSystemId",
"(",
"baseId",
",",
"systemId",
")",
";",
"}"
] | Calculates the resource location.
@param baseId
@param systemId
@return schema file path | [
"Calculates",
"the",
"resource",
"location",
"."
] | train | https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/xml/src/main/java/org/cthul/resolve/RResult.java#L169-L171 |
jayantk/jklol | src/com/jayantkrish/jklol/tensor/DenseTensor.java | DenseTensor.constant | public static DenseTensor constant(int[] dimensions, int[] sizes, double weight) {
"""
Gets a tensor where each key has {@code weight}.
@param dimensions
@param sizes
@return
"""
DenseTensorBuilder builder = new DenseTensorBuilder(dimensions, sizes, weight);
return builder.buildNoCopy();
} | java | public static DenseTensor constant(int[] dimensions, int[] sizes, double weight) {
DenseTensorBuilder builder = new DenseTensorBuilder(dimensions, sizes, weight);
return builder.buildNoCopy();
} | [
"public",
"static",
"DenseTensor",
"constant",
"(",
"int",
"[",
"]",
"dimensions",
",",
"int",
"[",
"]",
"sizes",
",",
"double",
"weight",
")",
"{",
"DenseTensorBuilder",
"builder",
"=",
"new",
"DenseTensorBuilder",
"(",
"dimensions",
",",
"sizes",
",",
"wei... | Gets a tensor where each key has {@code weight}.
@param dimensions
@param sizes
@return | [
"Gets",
"a",
"tensor",
"where",
"each",
"key",
"has",
"{",
"@code",
"weight",
"}",
"."
] | train | https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/tensor/DenseTensor.java#L714-L717 |
amaembo/streamex | src/main/java/one/util/streamex/LongStreamEx.java | LongStreamEx.maxByDouble | public OptionalLong maxByDouble(LongToDoubleFunction keyExtractor) {
"""
Returns the maximum element of this stream according to the provided key
extractor function.
<p>
This is a terminal operation.
@param keyExtractor a non-interfering, stateless function
@return an {@code OptionalLong} describing the f... | java | public OptionalLong maxByDouble(LongToDoubleFunction keyExtractor) {
return collect(PrimitiveBox::new, (box, l) -> {
double key = keyExtractor.applyAsDouble(l);
if (!box.b || Double.compare(box.d, key) < 0) {
box.b = true;
box.d = key;
... | [
"public",
"OptionalLong",
"maxByDouble",
"(",
"LongToDoubleFunction",
"keyExtractor",
")",
"{",
"return",
"collect",
"(",
"PrimitiveBox",
"::",
"new",
",",
"(",
"box",
",",
"l",
")",
"->",
"{",
"double",
"key",
"=",
"keyExtractor",
".",
"applyAsDouble",
"(",
... | Returns the maximum element of this stream according to the provided key
extractor function.
<p>
This is a terminal operation.
@param keyExtractor a non-interfering, stateless function
@return an {@code OptionalLong} describing the first element of this
stream for which the highest value was returned by key extractor... | [
"Returns",
"the",
"maximum",
"element",
"of",
"this",
"stream",
"according",
"to",
"the",
"provided",
"key",
"extractor",
"function",
"."
] | train | https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/LongStreamEx.java#L1118-L1127 |
Azure/azure-sdk-for-java | locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLocksInner.java | ManagementLocksInner.createOrUpdateAtResourceLevelAsync | public Observable<ManagementLockObjectInner> createOrUpdateAtResourceLevelAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String lockName, ManagementLockObjectInner parameters) {
"""
Creates or updates a management lock at the r... | java | public Observable<ManagementLockObjectInner> createOrUpdateAtResourceLevelAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String lockName, ManagementLockObjectInner parameters) {
return createOrUpdateAtResourceLevelWithServic... | [
"public",
"Observable",
"<",
"ManagementLockObjectInner",
">",
"createOrUpdateAtResourceLevelAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"resourceProviderNamespace",
",",
"String",
"parentResourcePath",
",",
"String",
"resourceType",
",",
"String",
"resourceNam... | Creates or updates a management lock at the resource level or any level below the resource.
When you apply a lock at a parent scope, all child resources inherit the same lock. To create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles,... | [
"Creates",
"or",
"updates",
"a",
"management",
"lock",
"at",
"the",
"resource",
"level",
"or",
"any",
"level",
"below",
"the",
"resource",
".",
"When",
"you",
"apply",
"a",
"lock",
"at",
"a",
"parent",
"scope",
"all",
"child",
"resources",
"inherit",
"the"... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLocksInner.java#L726-L733 |
strator-dev/greenpepper | greenpepper-open/confluence/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/GreenPepperServerConfigurationActivator.java | GreenPepperServerConfigurationActivator.initCustomInstallConfiguration | public void initCustomInstallConfiguration(String hibernateDialect, String jndiUrl) throws GreenPepperServerException {
"""
<p>initCustomInstallConfiguration.</p>
@param hibernateDialect a {@link java.lang.String} object.
@param jndiUrl a {@link java.lang.String} object.
@throws com.greenpepper.server.GreenPe... | java | public void initCustomInstallConfiguration(String hibernateDialect, String jndiUrl) throws GreenPepperServerException {
GreenPepperServerConfiguration configuration = getConfiguration();
Properties properties = new DefaultServerProperties();
properties.put("hibernate.connection.datasource", jn... | [
"public",
"void",
"initCustomInstallConfiguration",
"(",
"String",
"hibernateDialect",
",",
"String",
"jndiUrl",
")",
"throws",
"GreenPepperServerException",
"{",
"GreenPepperServerConfiguration",
"configuration",
"=",
"getConfiguration",
"(",
")",
";",
"Properties",
"prope... | <p>initCustomInstallConfiguration.</p>
@param hibernateDialect a {@link java.lang.String} object.
@param jndiUrl a {@link java.lang.String} object.
@throws com.greenpepper.server.GreenPepperServerException if any. | [
"<p",
">",
"initCustomInstallConfiguration",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper-open/confluence/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/GreenPepperServerConfigurationActivator.java#L322-L345 |
http-builder-ng/http-builder-ng | http-builder-ng-core/src/main/java/groovyx/net/http/optional/Csv.java | Csv.toCsv | public static void toCsv(final HttpConfig delegate, final String contentType, final Character separator, final Character quote) {
"""
Used to configure the OpenCsv encoder/parser in the configuration context for the specified content type.
@param delegate the configuration object
@param contentType the content... | java | public static void toCsv(final HttpConfig delegate, final String contentType, final Character separator, final Character quote) {
delegate.context(contentType, Context.ID, new Context(separator, quote));
delegate.getRequest().encoder(contentType, Csv::encode);
delegate.getResponse().parser(conte... | [
"public",
"static",
"void",
"toCsv",
"(",
"final",
"HttpConfig",
"delegate",
",",
"final",
"String",
"contentType",
",",
"final",
"Character",
"separator",
",",
"final",
"Character",
"quote",
")",
"{",
"delegate",
".",
"context",
"(",
"contentType",
",",
"Cont... | Used to configure the OpenCsv encoder/parser in the configuration context for the specified content type.
@param delegate the configuration object
@param contentType the content type to be registered
@param separator the CSV column separator character
@param quote the CSV quote character | [
"Used",
"to",
"configure",
"the",
"OpenCsv",
"encoder",
"/",
"parser",
"in",
"the",
"configuration",
"context",
"for",
"the",
"specified",
"content",
"type",
"."
] | train | https://github.com/http-builder-ng/http-builder-ng/blob/865f37732c102c748d3db8b905199dac9222a525/http-builder-ng-core/src/main/java/groovyx/net/http/optional/Csv.java#L142-L146 |
hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.queryBlockByTransactionID | public BlockInfo queryBlockByTransactionID(Collection<Peer> peers, String txID) throws InvalidArgumentException, ProposalException {
"""
query a peer in this channel for a Block by a TransactionID contained in the block
<STRONG>This method may not be thread safe if client context is changed!</STRONG>
@param ... | java | public BlockInfo queryBlockByTransactionID(Collection<Peer> peers, String txID) throws InvalidArgumentException, ProposalException {
return queryBlockByTransactionID(peers, txID, client.getUserContext());
} | [
"public",
"BlockInfo",
"queryBlockByTransactionID",
"(",
"Collection",
"<",
"Peer",
">",
"peers",
",",
"String",
"txID",
")",
"throws",
"InvalidArgumentException",
",",
"ProposalException",
"{",
"return",
"queryBlockByTransactionID",
"(",
"peers",
",",
"txID",
",",
... | query a peer in this channel for a Block by a TransactionID contained in the block
<STRONG>This method may not be thread safe if client context is changed!</STRONG>
@param peers the peers to try to send the request to.
@param txID the transactionID to query on
@return the {@link BlockInfo} for the Block containing t... | [
"query",
"a",
"peer",
"in",
"this",
"channel",
"for",
"a",
"Block",
"by",
"a",
"TransactionID",
"contained",
"in",
"the",
"block"
] | train | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L3019-L3021 |
zaproxy/zaproxy | src/org/zaproxy/zap/view/StandardFieldsDialog.java | StandardFieldsDialog.addPasswordField | public void addPasswordField(int tabIndex, String fieldLabel, String value) {
"""
Adds a {@link JPasswordField} field to the tab with the given index, with the given label and, optionally, the given
value.
@param tabIndex the index of the tab
@param fieldLabel the label of the field
@param value the value of... | java | public void addPasswordField(int tabIndex, String fieldLabel, String value) {
addTextComponent(tabIndex, new JPasswordField(), fieldLabel, value);
} | [
"public",
"void",
"addPasswordField",
"(",
"int",
"tabIndex",
",",
"String",
"fieldLabel",
",",
"String",
"value",
")",
"{",
"addTextComponent",
"(",
"tabIndex",
",",
"new",
"JPasswordField",
"(",
")",
",",
"fieldLabel",
",",
"value",
")",
";",
"}"
] | Adds a {@link JPasswordField} field to the tab with the given index, with the given label and, optionally, the given
value.
@param tabIndex the index of the tab
@param fieldLabel the label of the field
@param value the value of the field, might be {@code null}
@throws IllegalArgumentException if the dialogue is not a ... | [
"Adds",
"a",
"{",
"@link",
"JPasswordField",
"}",
"field",
"to",
"the",
"tab",
"with",
"the",
"given",
"index",
"with",
"the",
"given",
"label",
"and",
"optionally",
"the",
"given",
"value",
"."
] | train | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/StandardFieldsDialog.java#L676-L678 |
Azure/azure-sdk-for-java | servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java | ClientFactory.createTransferMessageSenderFromEntityPathAsync | public static CompletableFuture<IMessageSender> createTransferMessageSenderFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String viaEntityPath) {
"""
Creates a transfer message sender asynchronously. This sender sends message to destination entity via another entity.
This is mainly to... | java | public static CompletableFuture<IMessageSender> createTransferMessageSenderFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String viaEntityPath)
{
Utils.assertNonNull("messagingFactory", messagingFactory);
MessageSender sender = new MessageSender(messagingFactory, viaEntity... | [
"public",
"static",
"CompletableFuture",
"<",
"IMessageSender",
">",
"createTransferMessageSenderFromEntityPathAsync",
"(",
"MessagingFactory",
"messagingFactory",
",",
"String",
"entityPath",
",",
"String",
"viaEntityPath",
")",
"{",
"Utils",
".",
"assertNonNull",
"(",
"... | Creates a transfer message sender asynchronously. This sender sends message to destination entity via another entity.
This is mainly to be used when sending messages in a transaction.
When messages need to be sent across entities in a single transaction, this can be used to ensure
all the messages land initially in th... | [
"Creates",
"a",
"transfer",
"message",
"sender",
"asynchronously",
".",
"This",
"sender",
"sends",
"message",
"to",
"destination",
"entity",
"via",
"another",
"entity",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java#L209-L214 |
rackerlabs/clouddocs-maven-plugin | src/main/java/com/rackspace/cloud/api/docs/GitHelper.java | GitHelper.addCommitProperties | public static boolean addCommitProperties(Transformer transformer, File baseDir, int abbrevLen, Log log) {
"""
Adds properties to the specified {@code transformer} for the current Git
commit hash. The following properties are added to {@code transformer}:
<ul>
<li>{@code repository.commit}: The full commit hash... | java | public static boolean addCommitProperties(Transformer transformer, File baseDir, int abbrevLen, Log log) {
try {
RepositoryBuilder builder = new RepositoryBuilder();
Repository repository = builder.findGitDir(baseDir).readEnvironment().build();
ObjectId objectId = repository.... | [
"public",
"static",
"boolean",
"addCommitProperties",
"(",
"Transformer",
"transformer",
",",
"File",
"baseDir",
",",
"int",
"abbrevLen",
",",
"Log",
"log",
")",
"{",
"try",
"{",
"RepositoryBuilder",
"builder",
"=",
"new",
"RepositoryBuilder",
"(",
")",
";",
"... | Adds properties to the specified {@code transformer} for the current Git
commit hash. The following properties are added to {@code transformer}:
<ul>
<li>{@code repository.commit}: The full commit hash, in lowercase
hexadecimal form.</li>
<li>{@code repository.commit.short}: The abbreviated commit hash, which
is the fi... | [
"Adds",
"properties",
"to",
"the",
"specified",
"{",
"@code",
"transformer",
"}",
"for",
"the",
"current",
"Git",
"commit",
"hash",
".",
"The",
"following",
"properties",
"are",
"added",
"to",
"{",
"@code",
"transformer",
"}",
":",
"<ul",
">",
"<li",
">",
... | train | https://github.com/rackerlabs/clouddocs-maven-plugin/blob/ba8554dc340db674307efdaac647c6fd2b58a34b/src/main/java/com/rackspace/cloud/api/docs/GitHelper.java#L43-L60 |
alibaba/jstorm | jstorm-core/src/main/java/backtype/storm/security/auth/ShellBasedGroupsMapping.java | ShellBasedGroupsMapping.getUnixGroups | private static Set<String> getUnixGroups(final String user) throws IOException {
"""
Get the current user's group list from Unix by running the command 'groups' NOTE. For non-existing user it will return EMPTY list
@param user user name
@return the groups set that the <code>user</code> belongs to
@throws IOEx... | java | private static Set<String> getUnixGroups(final String user) throws IOException {
String result = "";
try {
result = ShellUtils.execCommand(ShellUtils.getGroupsForUserCommand(user));
} catch (ExitCodeException e) {
// if we didn't get the group - just return empty list;
... | [
"private",
"static",
"Set",
"<",
"String",
">",
"getUnixGroups",
"(",
"final",
"String",
"user",
")",
"throws",
"IOException",
"{",
"String",
"result",
"=",
"\"\"",
";",
"try",
"{",
"result",
"=",
"ShellUtils",
".",
"execCommand",
"(",
"ShellUtils",
".",
"... | Get the current user's group list from Unix by running the command 'groups' NOTE. For non-existing user it will return EMPTY list
@param user user name
@return the groups set that the <code>user</code> belongs to
@throws IOException if encounter any error when running the command | [
"Get",
"the",
"current",
"user",
"s",
"group",
"list",
"from",
"Unix",
"by",
"running",
"the",
"command",
"groups",
"NOTE",
".",
"For",
"non",
"-",
"existing",
"user",
"it",
"will",
"return",
"EMPTY",
"list"
] | train | https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/backtype/storm/security/auth/ShellBasedGroupsMapping.java#L74-L90 |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/vpc/VpcClient.java | VpcClient.modifyInstanceAttributes | public void modifyInstanceAttributes(String name, String vpcId) {
"""
Modifying the special attribute to new value of the vpc owned by the user.
@param name The name of the vpc after modifying
@param vpcId the id of the vpc
"""
ModifyVpcAttributesRequest request = new ModifyVpcAttributesRequest();
... | java | public void modifyInstanceAttributes(String name, String vpcId) {
ModifyVpcAttributesRequest request = new ModifyVpcAttributesRequest();
modifyInstanceAttributes(request.withName(name).withVpcId(vpcId));
} | [
"public",
"void",
"modifyInstanceAttributes",
"(",
"String",
"name",
",",
"String",
"vpcId",
")",
"{",
"ModifyVpcAttributesRequest",
"request",
"=",
"new",
"ModifyVpcAttributesRequest",
"(",
")",
";",
"modifyInstanceAttributes",
"(",
"request",
".",
"withName",
"(",
... | Modifying the special attribute to new value of the vpc owned by the user.
@param name The name of the vpc after modifying
@param vpcId the id of the vpc | [
"Modifying",
"the",
"special",
"attribute",
"to",
"new",
"value",
"of",
"the",
"vpc",
"owned",
"by",
"the",
"user",
"."
] | train | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/vpc/VpcClient.java#L274-L277 |
OpenLiberty/open-liberty | dev/com.ibm.ws.com.meterware.httpunit.1.7/src/com/meterware/httpunit/HttpsProtocolSupport.java | HttpsProtocolSupport.useProvider | public static void useProvider(String className,String handlerName) {
"""
use the given SSL providers - reset the one used so far
@param className
@param handlerName
"""
_httpsProviderClass = null;
JSSE_PROVIDER_CLASS =className;
SSL_PROTOCOL_HANDLER =handlerName;
} | java | public static void useProvider(String className,String handlerName) {
_httpsProviderClass = null;
JSSE_PROVIDER_CLASS =className;
SSL_PROTOCOL_HANDLER =handlerName;
} | [
"public",
"static",
"void",
"useProvider",
"(",
"String",
"className",
",",
"String",
"handlerName",
")",
"{",
"_httpsProviderClass",
"=",
"null",
";",
"JSSE_PROVIDER_CLASS",
"=",
"className",
";",
"SSL_PROTOCOL_HANDLER",
"=",
"handlerName",
";",
"}"
] | use the given SSL providers - reset the one used so far
@param className
@param handlerName | [
"use",
"the",
"given",
"SSL",
"providers",
"-",
"reset",
"the",
"one",
"used",
"so",
"far"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.com.meterware.httpunit.1.7/src/com/meterware/httpunit/HttpsProtocolSupport.java#L73-L77 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.