repository_name stringlengths 7 58 | func_path_in_repository stringlengths 18 201 | func_name stringlengths 4 126 | whole_func_string stringlengths 75 3.57k | language stringclasses 1
value | func_code_string stringlengths 75 3.57k | func_code_tokens listlengths 21 599 | func_documentation_string stringlengths 61 1.95k | func_documentation_tokens listlengths 1 478 | split_name stringclasses 1
value | func_code_url stringlengths 111 308 |
|---|---|---|---|---|---|---|---|---|---|---|
fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/storage/translation/AtomDODeserializer.java | AtomDODeserializer.getDSVersionable | private boolean getDSVersionable(DigitalObject obj, Entry entry) {
if (getDatastreamId(obj, entry).equals("AUDIT")) {
return false;
}
List<Category> versionable = entry.getCategories(MODEL.VERSIONABLE.uri);
if (versionable.isEmpty() || versionable.size() > 1) {
re... | java | private boolean getDSVersionable(DigitalObject obj, Entry entry) {
if (getDatastreamId(obj, entry).equals("AUDIT")) {
return false;
}
List<Category> versionable = entry.getCategories(MODEL.VERSIONABLE.uri);
if (versionable.isEmpty() || versionable.size() > 1) {
re... | [
"private",
"boolean",
"getDSVersionable",
"(",
"DigitalObject",
"obj",
",",
"Entry",
"entry",
")",
"{",
"if",
"(",
"getDatastreamId",
"(",
"obj",
",",
"entry",
")",
".",
"equals",
"(",
"\"AUDIT\"",
")",
")",
"{",
"return",
"false",
";",
"}",
"List",
"<",... | Note: AUDIT datastreams always return false, otherwise defaults to true.
@param entry
@return | [
"Note",
":",
"AUDIT",
"datastreams",
"always",
"return",
"false",
"otherwise",
"defaults",
"to",
"true",
"."
] | train | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/translation/AtomDODeserializer.java#L465-L475 |
cybazeitalia/emaze-dysfunctional | src/main/java/net/emaze/dysfunctional/Spies.java | Spies.spyRes | public static <R, T> Function<T, R> spyRes(Function<T, R> function, Box<R> result) {
return spy(function, result, Box.<T>empty());
} | java | public static <R, T> Function<T, R> spyRes(Function<T, R> function, Box<R> result) {
return spy(function, result, Box.<T>empty());
} | [
"public",
"static",
"<",
"R",
",",
"T",
">",
"Function",
"<",
"T",
",",
"R",
">",
"spyRes",
"(",
"Function",
"<",
"T",
",",
"R",
">",
"function",
",",
"Box",
"<",
"R",
">",
"result",
")",
"{",
"return",
"spy",
"(",
"function",
",",
"result",
",... | Proxies a function spying for result.
@param <R> the function result type
@param <T> the function parameter type
@param function the function that will be spied
@param result a box that will be containing spied result
@return the proxied function | [
"Proxies",
"a",
"function",
"spying",
"for",
"result",
"."
] | train | https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L294-L296 |
FXMisc/UndoFX | undofx/src/main/java/org/fxmisc/undo/impl/UndoManagerImpl.java | UndoManagerImpl.applyChange | private boolean applyChange(boolean isChangeAvailable, Supplier<C> changeToApply) {
if (isChangeAvailable) {
canMerge = false;
// perform change
C change = changeToApply.get();
this.expectedChange = change;
performingAction.suspendWhile(() -> apply.ac... | java | private boolean applyChange(boolean isChangeAvailable, Supplier<C> changeToApply) {
if (isChangeAvailable) {
canMerge = false;
// perform change
C change = changeToApply.get();
this.expectedChange = change;
performingAction.suspendWhile(() -> apply.ac... | [
"private",
"boolean",
"applyChange",
"(",
"boolean",
"isChangeAvailable",
",",
"Supplier",
"<",
"C",
">",
"changeToApply",
")",
"{",
"if",
"(",
"isChangeAvailable",
")",
"{",
"canMerge",
"=",
"false",
";",
"// perform change",
"C",
"change",
"=",
"changeToApply"... | Helper method for reducing code duplication
@param isChangeAvailable same as `isUndoAvailable()` [Undo] or `isRedoAvailable()` [Redo]
@param changeToApply same as `invert.apply(queue.prev())` [Undo] or `queue.next()` [Redo] | [
"Helper",
"method",
"for",
"reducing",
"code",
"duplication"
] | train | https://github.com/FXMisc/UndoFX/blob/5f9404a657e1dcfcd60bebee0aadef2f072dc2ab/undofx/src/main/java/org/fxmisc/undo/impl/UndoManagerImpl.java#L206-L224 |
LGoodDatePicker/LGoodDatePicker | Project/src/main/java/com/github/lgooddatepicker/zinternaltools/DemoPanel.java | DemoPanel.addLabel | public void addLabel(JPanel panel, int x, int pickerRow, String labelText) {
((GridBagLayout) panel.getLayout()).rowHeights[(pickerRow - 3)] = 6;
JLabel label = new JLabel();
label.setText(labelText);
panel.add(label, new GridBagConstraints(x, (pickerRow - 2), 1, 1, 0.0, 0.0,
... | java | public void addLabel(JPanel panel, int x, int pickerRow, String labelText) {
((GridBagLayout) panel.getLayout()).rowHeights[(pickerRow - 3)] = 6;
JLabel label = new JLabel();
label.setText(labelText);
panel.add(label, new GridBagConstraints(x, (pickerRow - 2), 1, 1, 0.0, 0.0,
... | [
"public",
"void",
"addLabel",
"(",
"JPanel",
"panel",
",",
"int",
"x",
",",
"int",
"pickerRow",
",",
"String",
"labelText",
")",
"{",
"(",
"(",
"GridBagLayout",
")",
"panel",
".",
"getLayout",
"(",
")",
")",
".",
"rowHeights",
"[",
"(",
"pickerRow",
"-... | JFormDesigner - End of variables declaration //GEN-END:variables | [
"JFormDesigner",
"-",
"End",
"of",
"variables",
"declaration",
"//",
"GEN",
"-",
"END",
":",
"variables"
] | train | https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/github/lgooddatepicker/zinternaltools/DemoPanel.java#L203-L212 |
palatable/lambda | src/main/java/com/jnape/palatable/lambda/adt/Maybe.java | Maybe.toEither | public final <L> Either<L, A> toEither(Supplier<L> lSupplier) {
return fmap(Either::<L, A>right).orElseGet(() -> left(lSupplier.get()));
} | java | public final <L> Either<L, A> toEither(Supplier<L> lSupplier) {
return fmap(Either::<L, A>right).orElseGet(() -> left(lSupplier.get()));
} | [
"public",
"final",
"<",
"L",
">",
"Either",
"<",
"L",
",",
"A",
">",
"toEither",
"(",
"Supplier",
"<",
"L",
">",
"lSupplier",
")",
"{",
"return",
"fmap",
"(",
"Either",
"::",
"<",
"L",
",",
"A",
">",
"right",
")",
".",
"orElseGet",
"(",
"(",
")... | If this value is absent, return the value supplied by <code>lSupplier</code> wrapped in <code>Either.left</code>.
Otherwise, wrap the value in <code>Either.right</code> and return it.
@param lSupplier the supplier for the left value
@param <L> the left parameter type
@return this value wrapped in an Either.right... | [
"If",
"this",
"value",
"is",
"absent",
"return",
"the",
"value",
"supplied",
"by",
"<code",
">",
"lSupplier<",
"/",
"code",
">",
"wrapped",
"in",
"<code",
">",
"Either",
".",
"left<",
"/",
"code",
">",
".",
"Otherwise",
"wrap",
"the",
"value",
"in",
"<... | train | https://github.com/palatable/lambda/blob/b643ba836c5916d1d8193822e5efb4e7b40c489a/src/main/java/com/jnape/palatable/lambda/adt/Maybe.java#L97-L99 |
JoeKerouac/utils | src/main/java/com/joe/utils/common/DateUtil.java | DateUtil.beforeNow | public static boolean beforeNow(String date, String format, DateUnit dateUnit) {
logger.debug("指定日期为:{}", date);
return calc(new Date(), parse(date, format), dateUnit) > 0;
} | java | public static boolean beforeNow(String date, String format, DateUnit dateUnit) {
logger.debug("指定日期为:{}", date);
return calc(new Date(), parse(date, format), dateUnit) > 0;
} | [
"public",
"static",
"boolean",
"beforeNow",
"(",
"String",
"date",
",",
"String",
"format",
",",
"DateUnit",
"dateUnit",
")",
"{",
"logger",
".",
"debug",
"(",
"\"指定日期为:{}\", date);",
"",
"",
"",
"",
"return",
"calc",
"(",
"new",
"Date",
"(",
")",
",",
... | 判断指定日期是否在当前时间之前,精确到指定单位
@param date 指定日期
@param format 指定日期的格式
@param dateUnit 精确单位(例如传入年就是精确到年)
@return 如果指定日期在当前时间之前返回<code>true</code> | [
"判断指定日期是否在当前时间之前,精确到指定单位"
] | train | https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/common/DateUtil.java#L218-L221 |
RestComm/sip-servlets | sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/ExtendedListeningPoint.java | ExtendedListeningPoint.createContactHeader | public ContactHeader createContactHeader(String displayName, String userName, boolean usePublicAddress) {
return createContactHeader(displayName, userName, usePublicAddress, null);
} | java | public ContactHeader createContactHeader(String displayName, String userName, boolean usePublicAddress) {
return createContactHeader(displayName, userName, usePublicAddress, null);
} | [
"public",
"ContactHeader",
"createContactHeader",
"(",
"String",
"displayName",
",",
"String",
"userName",
",",
"boolean",
"usePublicAddress",
")",
"{",
"return",
"createContactHeader",
"(",
"displayName",
",",
"userName",
",",
"usePublicAddress",
",",
"null",
")",
... | Create a Contact Header based on the host, port and transport of this listening point
@param usePublicAddress if true, the host will be the global ip address found by STUN otherwise
it will be the local network interface ipaddress
@param displayName the display name to use
@return the Contact header | [
"Create",
"a",
"Contact",
"Header",
"based",
"on",
"the",
"host",
"port",
"and",
"transport",
"of",
"this",
"listening",
"point"
] | train | https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/ExtendedListeningPoint.java#L131-L133 |
google/j2objc | jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java | BigDecimal.divideToIntegralValue | public BigDecimal divideToIntegralValue(BigDecimal divisor, MathContext mc) {
if (mc.precision == 0 || // exact result
(this.compareMagnitude(divisor) < 0)) // zero result
return divideToIntegralValue(divisor);
// Calculate preferred scale
int preferredScale = saturateLo... | java | public BigDecimal divideToIntegralValue(BigDecimal divisor, MathContext mc) {
if (mc.precision == 0 || // exact result
(this.compareMagnitude(divisor) < 0)) // zero result
return divideToIntegralValue(divisor);
// Calculate preferred scale
int preferredScale = saturateLo... | [
"public",
"BigDecimal",
"divideToIntegralValue",
"(",
"BigDecimal",
"divisor",
",",
"MathContext",
"mc",
")",
"{",
"if",
"(",
"mc",
".",
"precision",
"==",
"0",
"||",
"// exact result",
"(",
"this",
".",
"compareMagnitude",
"(",
"divisor",
")",
"<",
"0",
")"... | Returns a {@code BigDecimal} whose value is the integer part
of {@code (this / divisor)}. Since the integer part of the
exact quotient does not depend on the rounding mode, the
rounding mode does not affect the values returned by this
method. The preferred scale of the result is
{@code (this.scale() - divisor.scale()... | [
"Returns",
"a",
"{",
"@code",
"BigDecimal",
"}",
"whose",
"value",
"is",
"the",
"integer",
"part",
"of",
"{",
"@code",
"(",
"this",
"/",
"divisor",
")",
"}",
".",
"Since",
"the",
"integer",
"part",
"of",
"the",
"exact",
"quotient",
"does",
"not",
"depe... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java#L1829-L1876 |
esigate/esigate | esigate-servlet/src/main/java/org/esigate/servlet/impl/RequestUrl.java | RequestUrl.getRelativeUrl | public static String getRelativeUrl(HttpServletRequest request, boolean servlet) {
// Raw request url
String requestURI = request.getRequestURI();
// Application (war) context path
String contextPath = request.getContextPath();
// Servlet mapping
String servletPath = requ... | java | public static String getRelativeUrl(HttpServletRequest request, boolean servlet) {
// Raw request url
String requestURI = request.getRequestURI();
// Application (war) context path
String contextPath = request.getContextPath();
// Servlet mapping
String servletPath = requ... | [
"public",
"static",
"String",
"getRelativeUrl",
"(",
"HttpServletRequest",
"request",
",",
"boolean",
"servlet",
")",
"{",
"// Raw request url",
"String",
"requestURI",
"=",
"request",
".",
"getRequestURI",
"(",
")",
";",
"// Application (war) context path",
"String",
... | Get the relative url to the current servlet.
<p>
Uses the request URI and removes : the context path, the servlet path if used.
@param request
The current HTTP request
@param servlet
true to remove the servlet path
@return the url, relative to the servlet mapping. | [
"Get",
"the",
"relative",
"url",
"to",
"the",
"current",
"servlet",
".",
"<p",
">",
"Uses",
"the",
"request",
"URI",
"and",
"removes",
":",
"the",
"context",
"path",
"the",
"servlet",
"path",
"if",
"used",
"."
] | train | https://github.com/esigate/esigate/blob/50421fb224f16e1ec42715425109a72b3b55527b/esigate-servlet/src/main/java/org/esigate/servlet/impl/RequestUrl.java#L46-L72 |
google/error-prone-javac | src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java | Gen.hasFinally | boolean hasFinally(JCTree target, Env<GenContext> env) {
while (env.tree != target) {
if (env.tree.hasTag(TRY) && env.info.finalize.hasFinalizer())
return true;
env = env.next;
}
return false;
} | java | boolean hasFinally(JCTree target, Env<GenContext> env) {
while (env.tree != target) {
if (env.tree.hasTag(TRY) && env.info.finalize.hasFinalizer())
return true;
env = env.next;
}
return false;
} | [
"boolean",
"hasFinally",
"(",
"JCTree",
"target",
",",
"Env",
"<",
"GenContext",
">",
"env",
")",
"{",
"while",
"(",
"env",
".",
"tree",
"!=",
"target",
")",
"{",
"if",
"(",
"env",
".",
"tree",
".",
"hasTag",
"(",
"TRY",
")",
"&&",
"env",
".",
"i... | Do any of the structures aborted by a non-local exit have
finalizers that require an empty stack?
@param target The tree representing the structure that's aborted
@param env The environment current at the non-local exit. | [
"Do",
"any",
"of",
"the",
"structures",
"aborted",
"by",
"a",
"non",
"-",
"local",
"exit",
"have",
"finalizers",
"that",
"require",
"an",
"empty",
"stack?"
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java#L386-L393 |
iipc/openwayback | wayback-core/src/main/java/org/archive/wayback/util/ByteOp.java | ByteOp.copyStream | public static void copyStream(InputStream is, OutputStream os)
throws IOException {
copyStream(is,os,BUFFER_SIZE);
} | java | public static void copyStream(InputStream is, OutputStream os)
throws IOException {
copyStream(is,os,BUFFER_SIZE);
} | [
"public",
"static",
"void",
"copyStream",
"(",
"InputStream",
"is",
",",
"OutputStream",
"os",
")",
"throws",
"IOException",
"{",
"copyStream",
"(",
"is",
",",
"os",
",",
"BUFFER_SIZE",
")",
";",
"}"
] | Write all bytes from is to os. Does not close either stream.
@param is to copy bytes from
@param os to copy bytes to
@throws IOException for usual reasons | [
"Write",
"all",
"bytes",
"from",
"is",
"to",
"os",
".",
"Does",
"not",
"close",
"either",
"stream",
"."
] | train | https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/util/ByteOp.java#L129-L132 |
fabiomaffioletti/jsondoc | jsondoc-springmvc/src/main/java/org/jsondoc/springmvc/scanner/builder/SpringQueryParamBuilder.java | SpringQueryParamBuilder.mergeApiQueryParamDoc | private static void mergeApiQueryParamDoc(ApiQueryParam apiQueryParam, ApiParamDoc apiParamDoc) {
if (apiQueryParam != null) {
if (apiParamDoc.getName().trim().isEmpty()) {
apiParamDoc.setName(apiQueryParam.name());
}
apiParamDoc.setDescription(apiQueryParam.description());
apiParamDoc.setAllowedvalue... | java | private static void mergeApiQueryParamDoc(ApiQueryParam apiQueryParam, ApiParamDoc apiParamDoc) {
if (apiQueryParam != null) {
if (apiParamDoc.getName().trim().isEmpty()) {
apiParamDoc.setName(apiQueryParam.name());
}
apiParamDoc.setDescription(apiQueryParam.description());
apiParamDoc.setAllowedvalue... | [
"private",
"static",
"void",
"mergeApiQueryParamDoc",
"(",
"ApiQueryParam",
"apiQueryParam",
",",
"ApiParamDoc",
"apiParamDoc",
")",
"{",
"if",
"(",
"apiQueryParam",
"!=",
"null",
")",
"{",
"if",
"(",
"apiParamDoc",
".",
"getName",
"(",
")",
".",
"trim",
"(",
... | Available properties that can be overridden: name, description, required,
allowedvalues, format, defaultvalue. Name is overridden only if it's empty
in the apiParamDoc argument. Description, format and allowedvalues are
copied in any case Default value and required are not overridden: in any
case they are coming from t... | [
"Available",
"properties",
"that",
"can",
"be",
"overridden",
":",
"name",
"description",
"required",
"allowedvalues",
"format",
"defaultvalue",
".",
"Name",
"is",
"overridden",
"only",
"if",
"it",
"s",
"empty",
"in",
"the",
"apiParamDoc",
"argument",
".",
"Desc... | train | https://github.com/fabiomaffioletti/jsondoc/blob/26bf413c236e7c3b66f534c2451b157783c1f45e/jsondoc-springmvc/src/main/java/org/jsondoc/springmvc/scanner/builder/SpringQueryParamBuilder.java#L109-L118 |
jenkinsci/jenkins | core/src/main/java/hudson/util/ReflectionUtils.java | ReflectionUtils.getPublicMethodNamed | public static Method getPublicMethodNamed(Class c, String methodName) {
for( Method m : c.getMethods() )
if(m.getName().equals(methodName))
return m;
return null;
} | java | public static Method getPublicMethodNamed(Class c, String methodName) {
for( Method m : c.getMethods() )
if(m.getName().equals(methodName))
return m;
return null;
} | [
"public",
"static",
"Method",
"getPublicMethodNamed",
"(",
"Class",
"c",
",",
"String",
"methodName",
")",
"{",
"for",
"(",
"Method",
"m",
":",
"c",
".",
"getMethods",
"(",
")",
")",
"if",
"(",
"m",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"meth... | Finds a public method of the given name, regardless of its parameter definitions, | [
"Finds",
"a",
"public",
"method",
"of",
"the",
"given",
"name",
"regardless",
"of",
"its",
"parameter",
"definitions"
] | train | https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/ReflectionUtils.java#L52-L57 |
Azure/azure-sdk-for-java | logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/MapsInner.java | MapsInner.listContentCallbackUrl | public WorkflowTriggerCallbackUrlInner listContentCallbackUrl(String resourceGroupName, String integrationAccountName, String mapName, GetCallbackUrlParameters listContentCallbackUrl) {
return listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, mapName, listContentCallbackU... | java | public WorkflowTriggerCallbackUrlInner listContentCallbackUrl(String resourceGroupName, String integrationAccountName, String mapName, GetCallbackUrlParameters listContentCallbackUrl) {
return listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, mapName, listContentCallbackU... | [
"public",
"WorkflowTriggerCallbackUrlInner",
"listContentCallbackUrl",
"(",
"String",
"resourceGroupName",
",",
"String",
"integrationAccountName",
",",
"String",
"mapName",
",",
"GetCallbackUrlParameters",
"listContentCallbackUrl",
")",
"{",
"return",
"listContentCallbackUrlWith... | Get the content callback url.
@param resourceGroupName The resource group name.
@param integrationAccountName The integration account name.
@param mapName The integration account map name.
@param listContentCallbackUrl the GetCallbackUrlParameters value
@throws IllegalArgumentException thrown if parameters fail the va... | [
"Get",
"the",
"content",
"callback",
"url",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/MapsInner.java#L643-L645 |
appium/java-client | src/main/java/io/appium/java_client/imagecomparison/FeaturesMatchingResult.java | FeaturesMatchingResult.getPoints1 | public List<Point> getPoints1() {
verifyPropertyPresence(POINTS1);
//noinspection unchecked
return ((List<Map<String, Object>>) getCommandResult().get(POINTS1)).stream()
.map(ComparisonResult::mapToPoint)
.collect(Collectors.toList());
} | java | public List<Point> getPoints1() {
verifyPropertyPresence(POINTS1);
//noinspection unchecked
return ((List<Map<String, Object>>) getCommandResult().get(POINTS1)).stream()
.map(ComparisonResult::mapToPoint)
.collect(Collectors.toList());
} | [
"public",
"List",
"<",
"Point",
">",
"getPoints1",
"(",
")",
"{",
"verifyPropertyPresence",
"(",
"POINTS1",
")",
";",
"//noinspection unchecked",
"return",
"(",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"getCommandResult",
"(",
... | Returns a list of matching points on the first image.
@return The list of matching points on the first image. | [
"Returns",
"a",
"list",
"of",
"matching",
"points",
"on",
"the",
"first",
"image",
"."
] | train | https://github.com/appium/java-client/blob/5a17759b05d6fda8ef425b3ab6e766c73ed2e8df/src/main/java/io/appium/java_client/imagecomparison/FeaturesMatchingResult.java#L67-L73 |
michael-rapp/AndroidUtil | library/src/main/java/de/mrapp/android/util/ElevationUtil.java | ElevationUtil.createElevationShadow | public static Bitmap createElevationShadow(@NonNull final Context context, final int elevation,
@NonNull final Orientation orientation) {
return createElevationShadow(context, elevation, orientation, false);
} | java | public static Bitmap createElevationShadow(@NonNull final Context context, final int elevation,
@NonNull final Orientation orientation) {
return createElevationShadow(context, elevation, orientation, false);
} | [
"public",
"static",
"Bitmap",
"createElevationShadow",
"(",
"@",
"NonNull",
"final",
"Context",
"context",
",",
"final",
"int",
"elevation",
",",
"@",
"NonNull",
"final",
"Orientation",
"orientation",
")",
"{",
"return",
"createElevationShadow",
"(",
"context",
",... | Creates and returns a bitmap, which can be used to emulate a shadow of an elevated view on
pre-Lollipop devices. By default a non-parallel illumination of the view is emulated, which
causes the shadow at its bottom to appear a bit more intense than the shadows to its left and
right and a lot more intense than the shado... | [
"Creates",
"and",
"returns",
"a",
"bitmap",
"which",
"can",
"be",
"used",
"to",
"emulate",
"a",
"shadow",
"of",
"an",
"elevated",
"view",
"on",
"pre",
"-",
"Lollipop",
"devices",
".",
"By",
"default",
"a",
"non",
"-",
"parallel",
"illumination",
"of",
"t... | train | https://github.com/michael-rapp/AndroidUtil/blob/67ec0e5732344eeb4d946dd1f96d782939e449f4/library/src/main/java/de/mrapp/android/util/ElevationUtil.java#L792-L795 |
lucee/Lucee | core/src/main/java/lucee/runtime/op/Elvis.java | Elvis.operate | public static boolean operate(PageContext pc, double scope, String[] varNames) {
return _operate(pc, scope, KeyImpl.toKeyArray(varNames), 0);
} | java | public static boolean operate(PageContext pc, double scope, String[] varNames) {
return _operate(pc, scope, KeyImpl.toKeyArray(varNames), 0);
} | [
"public",
"static",
"boolean",
"operate",
"(",
"PageContext",
"pc",
",",
"double",
"scope",
",",
"String",
"[",
"]",
"varNames",
")",
"{",
"return",
"_operate",
"(",
"pc",
",",
"scope",
",",
"KeyImpl",
".",
"toKeyArray",
"(",
"varNames",
")",
",",
"0",
... | called by the Elvis operator from generated bytecode
@param pc
@param scope
@param varNames
@return | [
"called",
"by",
"the",
"Elvis",
"operator",
"from",
"generated",
"bytecode"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Elvis.java#L51-L53 |
brianwhu/xillium | base/src/main/java/org/xillium/base/beans/Beans.java | Beans.valueOf | @Deprecated
@SuppressWarnings("unchecked")
public static <T> T valueOf(Class<T> type, String value, typeinfo annotation) {
if (type.equals(String.class)) {
return type.cast(value);
} else {
try {
Class<?> boxed = boxPrimitive(type);
try {
... | java | @Deprecated
@SuppressWarnings("unchecked")
public static <T> T valueOf(Class<T> type, String value, typeinfo annotation) {
if (type.equals(String.class)) {
return type.cast(value);
} else {
try {
Class<?> boxed = boxPrimitive(type);
try {
... | [
"@",
"Deprecated",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"T",
"valueOf",
"(",
"Class",
"<",
"T",
">",
"type",
",",
"String",
"value",
",",
"typeinfo",
"annotation",
")",
"{",
"if",
"(",
"type",
".",
"equ... | Converts a String representation into a value of a given type. Conversion attempts are made in the following order:
<ol>
<li>Try to invoke {@code public static SomeClass valueOf(String text)}.</li>
<li>Try to invoke {@code public static SomeClass valueOf(Class<SomeClass> type, String text)},
or {@code public static Som... | [
"Converts",
"a",
"String",
"representation",
"into",
"a",
"value",
"of",
"a",
"given",
"type",
".",
"Conversion",
"attempts",
"are",
"made",
"in",
"the",
"following",
"order",
":",
"<ol",
">",
"<li",
">",
"Try",
"to",
"invoke",
"{",
"@code",
"public",
"s... | train | https://github.com/brianwhu/xillium/blob/e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799/base/src/main/java/org/xillium/base/beans/Beans.java#L481-L502 |
Azure/azure-sdk-for-java | appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceEnvironmentsInner.java | AppServiceEnvironmentsInner.changeVnetWithServiceResponseAsync | public Observable<ServiceResponse<Page<SiteInner>>> changeVnetWithServiceResponseAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo) {
return changeVnetSinglePageAsync(resourceGroupName, name, vnetInfo)
.concatMap(new Func1<ServiceResponse<Page<SiteInner>>,... | java | public Observable<ServiceResponse<Page<SiteInner>>> changeVnetWithServiceResponseAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo) {
return changeVnetSinglePageAsync(resourceGroupName, name, vnetInfo)
.concatMap(new Func1<ServiceResponse<Page<SiteInner>>,... | [
"public",
"Observable",
"<",
"ServiceResponse",
"<",
"Page",
"<",
"SiteInner",
">",
">",
">",
"changeVnetWithServiceResponseAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"name",
",",
"final",
"VirtualNetworkProfile",
"vnetInfo",
")",
"... | Move an App Service Environment to a different VNET.
Move an App Service Environment to a different VNET.
@param resourceGroupName Name of the resource group to which the resource belongs.
@param name Name of the App Service Environment.
@param vnetInfo Details for the new virtual network.
@throws IllegalArgumentExcep... | [
"Move",
"an",
"App",
"Service",
"Environment",
"to",
"a",
"different",
"VNET",
".",
"Move",
"an",
"App",
"Service",
"Environment",
"to",
"a",
"different",
"VNET",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceEnvironmentsInner.java#L1602-L1614 |
alkacon/opencms-core | src/org/opencms/file/CmsObject.java | CmsObject.getGroupsOfUser | public List<CmsGroup> getGroupsOfUser(String username, boolean directGroupsOnly, boolean includeOtherOus)
throws CmsException {
return getGroupsOfUser(username, directGroupsOnly, includeOtherOus, m_context.getRemoteAddress());
} | java | public List<CmsGroup> getGroupsOfUser(String username, boolean directGroupsOnly, boolean includeOtherOus)
throws CmsException {
return getGroupsOfUser(username, directGroupsOnly, includeOtherOus, m_context.getRemoteAddress());
} | [
"public",
"List",
"<",
"CmsGroup",
">",
"getGroupsOfUser",
"(",
"String",
"username",
",",
"boolean",
"directGroupsOnly",
",",
"boolean",
"includeOtherOus",
")",
"throws",
"CmsException",
"{",
"return",
"getGroupsOfUser",
"(",
"username",
",",
"directGroupsOnly",
",... | Returns all the groups the given user belongs to.<p>
@param username the name of the user
@param directGroupsOnly if set only the direct assigned groups will be returned, if not also indirect roles
@param includeOtherOus if to include groups of other organizational units
@return a list of <code>{@link CmsGroup}</code... | [
"Returns",
"all",
"the",
"groups",
"the",
"given",
"user",
"belongs",
"to",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L1471-L1475 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/TimeZone.java | TimeZone.getDisplayName | public final String getDisplayName(Locale locale) {
return _getDisplayName(LONG_GENERIC, false, ULocale.forLocale(locale));
} | java | public final String getDisplayName(Locale locale) {
return _getDisplayName(LONG_GENERIC, false, ULocale.forLocale(locale));
} | [
"public",
"final",
"String",
"getDisplayName",
"(",
"Locale",
"locale",
")",
"{",
"return",
"_getDisplayName",
"(",
"LONG_GENERIC",
",",
"false",
",",
"ULocale",
".",
"forLocale",
"(",
"locale",
")",
")",
";",
"}"
] | Returns a name of this time zone suitable for presentation to the user
in the specified locale.
This method returns the long generic name.
If the display name is not available for the locale,
a fallback based on the country, city, or time zone id will be used.
@param locale the locale in which to supply the display nam... | [
"Returns",
"a",
"name",
"of",
"this",
"time",
"zone",
"suitable",
"for",
"presentation",
"to",
"the",
"user",
"in",
"the",
"specified",
"locale",
".",
"This",
"method",
"returns",
"the",
"long",
"generic",
"name",
".",
"If",
"the",
"display",
"name",
"is",... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/TimeZone.java#L388-L390 |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/db/thrift/CassandraSchemaMgr.java | CassandraSchemaMgr.dropKeyspace | public void dropKeyspace(DBConn dbConn, String keyspace) {
m_logger.info("Deleting Keyspace '{}'", keyspace);
try {
dbConn.getClientSession().system_drop_keyspace(keyspace);
waitForSchemaPropagation(dbConn);
} catch (Exception ex) {
String errMsg = "Fail... | java | public void dropKeyspace(DBConn dbConn, String keyspace) {
m_logger.info("Deleting Keyspace '{}'", keyspace);
try {
dbConn.getClientSession().system_drop_keyspace(keyspace);
waitForSchemaPropagation(dbConn);
} catch (Exception ex) {
String errMsg = "Fail... | [
"public",
"void",
"dropKeyspace",
"(",
"DBConn",
"dbConn",
",",
"String",
"keyspace",
")",
"{",
"m_logger",
".",
"info",
"(",
"\"Deleting Keyspace '{}'\"",
",",
"keyspace",
")",
";",
"try",
"{",
"dbConn",
".",
"getClientSession",
"(",
")",
".",
"system_drop_ke... | Delete the keyspace with the given name. This method can use any DB connection.
@param dbConn Database connection to use.
@param keyspace Name of keyspace to drop. | [
"Delete",
"the",
"keyspace",
"with",
"the",
"given",
"name",
".",
"This",
"method",
"can",
"use",
"any",
"DB",
"connection",
"."
] | train | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/thrift/CassandraSchemaMgr.java#L118-L128 |
jcuda/jcuda | JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java | JCudaDriver.cuGraphicsSubResourceGetMappedArray | public static int cuGraphicsSubResourceGetMappedArray(CUarray pArray, CUgraphicsResource resource, int arrayIndex, int mipLevel)
{
return checkResult(cuGraphicsSubResourceGetMappedArrayNative(pArray, resource, arrayIndex, mipLevel));
} | java | public static int cuGraphicsSubResourceGetMappedArray(CUarray pArray, CUgraphicsResource resource, int arrayIndex, int mipLevel)
{
return checkResult(cuGraphicsSubResourceGetMappedArrayNative(pArray, resource, arrayIndex, mipLevel));
} | [
"public",
"static",
"int",
"cuGraphicsSubResourceGetMappedArray",
"(",
"CUarray",
"pArray",
",",
"CUgraphicsResource",
"resource",
",",
"int",
"arrayIndex",
",",
"int",
"mipLevel",
")",
"{",
"return",
"checkResult",
"(",
"cuGraphicsSubResourceGetMappedArrayNative",
"(",
... | Get an array through which to access a subresource of a mapped graphics resource.
<pre>
CUresult cuGraphicsSubResourceGetMappedArray (
CUarray* pArray,
CUgraphicsResource resource,
unsigned int arrayIndex,
unsigned int mipLevel )
</pre>
<div>
<p>Get an array through which to access a
subresource of a mapped graphics... | [
"Get",
"an",
"array",
"through",
"which",
"to",
"access",
"a",
"subresource",
"of",
"a",
"mapped",
"graphics",
"resource",
"."
] | train | https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L15864-L15867 |
querydsl/querydsl | querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java | Expressions.booleanTemplate | public static BooleanTemplate booleanTemplate(String template, List<?> args) {
return booleanTemplate(createTemplate(template), args);
} | java | public static BooleanTemplate booleanTemplate(String template, List<?> args) {
return booleanTemplate(createTemplate(template), args);
} | [
"public",
"static",
"BooleanTemplate",
"booleanTemplate",
"(",
"String",
"template",
",",
"List",
"<",
"?",
">",
"args",
")",
"{",
"return",
"booleanTemplate",
"(",
"createTemplate",
"(",
"template",
")",
",",
"args",
")",
";",
"}"
] | Create a new Template expression
@param template template
@param args template parameters
@return template expression | [
"Create",
"a",
"new",
"Template",
"expression"
] | train | https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L985-L987 |
nostra13/Android-Universal-Image-Loader | library/src/main/java/com/nostra13/universalimageloader/core/DefaultConfigurationFactory.java | DefaultConfigurationFactory.createReserveDiskCacheDir | private static File createReserveDiskCacheDir(Context context) {
File cacheDir = StorageUtils.getCacheDirectory(context, false);
File individualDir = new File(cacheDir, "uil-images");
if (individualDir.exists() || individualDir.mkdir()) {
cacheDir = individualDir;
}
return cacheDir;
} | java | private static File createReserveDiskCacheDir(Context context) {
File cacheDir = StorageUtils.getCacheDirectory(context, false);
File individualDir = new File(cacheDir, "uil-images");
if (individualDir.exists() || individualDir.mkdir()) {
cacheDir = individualDir;
}
return cacheDir;
} | [
"private",
"static",
"File",
"createReserveDiskCacheDir",
"(",
"Context",
"context",
")",
"{",
"File",
"cacheDir",
"=",
"StorageUtils",
".",
"getCacheDirectory",
"(",
"context",
",",
"false",
")",
";",
"File",
"individualDir",
"=",
"new",
"File",
"(",
"cacheDir"... | Creates reserve disk cache folder which will be used if primary disk cache folder becomes unavailable | [
"Creates",
"reserve",
"disk",
"cache",
"folder",
"which",
"will",
"be",
"used",
"if",
"primary",
"disk",
"cache",
"folder",
"becomes",
"unavailable"
] | train | https://github.com/nostra13/Android-Universal-Image-Loader/blob/fc3c5f6779bb4f702e233653b61bd9d559e345cc/library/src/main/java/com/nostra13/universalimageloader/core/DefaultConfigurationFactory.java#L101-L108 |
threerings/narya | core/src/main/java/com/threerings/presents/client/ClientDObjectMgr.java | ClientDObjectMgr.doUnsubscribe | protected void doUnsubscribe (int oid, Subscriber<?> target)
{
DObject dobj = _ocache.get(oid);
if (dobj != null) {
dobj.removeSubscriber(target);
} else if (_client.isFailureLoggable(Client.FailureType.UNSUBSCRIBE_NOT_PROXIED)) {
log.info("Requested to remove subscr... | java | protected void doUnsubscribe (int oid, Subscriber<?> target)
{
DObject dobj = _ocache.get(oid);
if (dobj != null) {
dobj.removeSubscriber(target);
} else if (_client.isFailureLoggable(Client.FailureType.UNSUBSCRIBE_NOT_PROXIED)) {
log.info("Requested to remove subscr... | [
"protected",
"void",
"doUnsubscribe",
"(",
"int",
"oid",
",",
"Subscriber",
"<",
"?",
">",
"target",
")",
"{",
"DObject",
"dobj",
"=",
"_ocache",
".",
"get",
"(",
"oid",
")",
";",
"if",
"(",
"dobj",
"!=",
"null",
")",
"{",
"dobj",
".",
"removeSubscri... | This is guaranteed to be invoked via the invoker and can safely do main thread type things
like call back to the subscriber. | [
"This",
"is",
"guaranteed",
"to",
"be",
"invoked",
"via",
"the",
"invoker",
"and",
"can",
"safely",
"do",
"main",
"thread",
"type",
"things",
"like",
"call",
"back",
"to",
"the",
"subscriber",
"."
] | train | https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/ClientDObjectMgr.java#L439-L449 |
segmentio/analytics-android | analytics/src/main/java/com/segment/analytics/Cartographer.java | Cartographer.toJson | public void toJson(Map<?, ?> map, Writer writer) throws IOException {
if (map == null) {
throw new IllegalArgumentException("map == null");
}
if (writer == null) {
throw new IllegalArgumentException("writer == null");
}
JsonWriter jsonWriter = new JsonWriter(writer);
jsonWriter.setL... | java | public void toJson(Map<?, ?> map, Writer writer) throws IOException {
if (map == null) {
throw new IllegalArgumentException("map == null");
}
if (writer == null) {
throw new IllegalArgumentException("writer == null");
}
JsonWriter jsonWriter = new JsonWriter(writer);
jsonWriter.setL... | [
"public",
"void",
"toJson",
"(",
"Map",
"<",
"?",
",",
"?",
">",
"map",
",",
"Writer",
"writer",
")",
"throws",
"IOException",
"{",
"if",
"(",
"map",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"map == null\"",
")",
";",
... | Serializes the map into it's json representation into the provided {@link Writer}. If you want
to retrieve the json as a string, use {@link #toJson(Map)} instead. | [
"Serializes",
"the",
"map",
"into",
"it",
"s",
"json",
"representation",
"into",
"the",
"provided",
"{"
] | train | https://github.com/segmentio/analytics-android/blob/93c7d5bb09b593440a2347a6089db3e9f74012da/analytics/src/main/java/com/segment/analytics/Cartographer.java#L105-L123 |
UrielCh/ovh-java-sdk | ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java | ApiOvhMe.subscription_subscriptionType_GET | public OvhSubscription subscription_subscriptionType_GET(String subscriptionType) throws IOException {
String qPath = "/me/subscription/{subscriptionType}";
StringBuilder sb = path(qPath, subscriptionType);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhSubscription.class);
} | java | public OvhSubscription subscription_subscriptionType_GET(String subscriptionType) throws IOException {
String qPath = "/me/subscription/{subscriptionType}";
StringBuilder sb = path(qPath, subscriptionType);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhSubscription.class);
} | [
"public",
"OvhSubscription",
"subscription_subscriptionType_GET",
"(",
"String",
"subscriptionType",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/me/subscription/{subscriptionType}\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qPath",
",",
"subscrip... | Get this object properties
REST: GET /me/subscription/{subscriptionType}
@param subscriptionType [required] The type of subscription | [
"Get",
"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#L2612-L2617 |
tvesalainen/util | util/src/main/java/org/vesalainen/navi/ElasticChain.java | ElasticChain.horizontalForce | public double horizontalForce(Double T, double d)
{
return AE*Math.sqrt(Math.pow(T/AE+1, 2)-2*w*d/AE)-AE;
} | java | public double horizontalForce(Double T, double d)
{
return AE*Math.sqrt(Math.pow(T/AE+1, 2)-2*w*d/AE)-AE;
} | [
"public",
"double",
"horizontalForce",
"(",
"Double",
"T",
",",
"double",
"d",
")",
"{",
"return",
"AE",
"*",
"Math",
".",
"sqrt",
"(",
"Math",
".",
"pow",
"(",
"T",
"/",
"AE",
"+",
"1",
",",
"2",
")",
"-",
"2",
"*",
"w",
"*",
"d",
"/",
"AE",... | Horizontal force for a given fairlead tension T
@param T Fairlead tension
@param d depth
@return | [
"Horizontal",
"force",
"for",
"a",
"given",
"fairlead",
"tension",
"T"
] | train | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/navi/ElasticChain.java#L50-L53 |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java | GISCoordinates.L93_L1 | @Pure
public static Point2d L93_L1(double x, double y) {
final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y,
LAMBERT_93_N,
LAMBERT_93_C,
LAMBERT_93_XS,
LAMBERT_93_YS);
return NTFLambdaPhi_NTFLambert(
ntfLambdaPhi.getX(), ntfLambdaPhi.getY(),
LAMBERT_1_N,
LAMBERT_1_C,
LAMBERT_... | java | @Pure
public static Point2d L93_L1(double x, double y) {
final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y,
LAMBERT_93_N,
LAMBERT_93_C,
LAMBERT_93_XS,
LAMBERT_93_YS);
return NTFLambdaPhi_NTFLambert(
ntfLambdaPhi.getX(), ntfLambdaPhi.getY(),
LAMBERT_1_N,
LAMBERT_1_C,
LAMBERT_... | [
"@",
"Pure",
"public",
"static",
"Point2d",
"L93_L1",
"(",
"double",
"x",
",",
"double",
"y",
")",
"{",
"final",
"Point2d",
"ntfLambdaPhi",
"=",
"NTFLambert_NTFLambdaPhi",
"(",
"x",
",",
"y",
",",
"LAMBERT_93_N",
",",
"LAMBERT_93_C",
",",
"LAMBERT_93_XS",
",... | This function convert France Lambert 93 coordinate to
France Lambert I coordinate.
@param x is the coordinate in France Lambert 93
@param y is the coordinate in France Lambert 93
@return the France Lambert I coordinate. | [
"This",
"function",
"convert",
"France",
"Lambert",
"93",
"coordinate",
"to",
"France",
"Lambert",
"I",
"coordinate",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L846-L859 |
jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/db/TableSession.java | TableSession.createDatabaseSession | public DatabaseSession createDatabaseSession(BaseDatabase database, Map<String, Object> properties) throws RemoteException
{
DatabaseSession remoteDatabase = null;
Map<String,Object> propOld = this.getProperties();
this.setProperties(properties);
DatabaseOwner databaseOwner = databas... | java | public DatabaseSession createDatabaseSession(BaseDatabase database, Map<String, Object> properties) throws RemoteException
{
DatabaseSession remoteDatabase = null;
Map<String,Object> propOld = this.getProperties();
this.setProperties(properties);
DatabaseOwner databaseOwner = databas... | [
"public",
"DatabaseSession",
"createDatabaseSession",
"(",
"BaseDatabase",
"database",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
")",
"throws",
"RemoteException",
"{",
"DatabaseSession",
"remoteDatabase",
"=",
"null",
";",
"Map",
"<",
"String",
... | Create a session for this database (and place it in the right spot in the session hierarchy)
@param database
@param properties
@return
@throws RemoteException | [
"Create",
"a",
"session",
"for",
"this",
"database",
"(",
"and",
"place",
"it",
"in",
"the",
"right",
"spot",
"in",
"the",
"session",
"hierarchy",
")"
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/db/TableSession.java#L990-L1006 |
ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/Settings.java | Settings.getBundle | private static String getBundle(String friendlyName, String className, int truncate)
{
try {
cl.loadClass(className);
int start = className.length();
for (int i = 0; i < truncate; ++i)
start = className.lastIndexOf('.', start - 1);
final String bundle = className.substring(0, start);
retur... | java | private static String getBundle(String friendlyName, String className, int truncate)
{
try {
cl.loadClass(className);
int start = className.length();
for (int i = 0; i < truncate; ++i)
start = className.lastIndexOf('.', start - 1);
final String bundle = className.substring(0, start);
retur... | [
"private",
"static",
"String",
"getBundle",
"(",
"String",
"friendlyName",
",",
"String",
"className",
",",
"int",
"truncate",
")",
"{",
"try",
"{",
"cl",
".",
"loadClass",
"(",
"className",
")",
";",
"int",
"start",
"=",
"className",
".",
"length",
"(",
... | to check availability, then class name is truncated to bundle id | [
"to",
"check",
"availability",
"then",
"class",
"name",
"is",
"truncated",
"to",
"bundle",
"id"
] | train | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/Settings.java#L188-L201 |
snowflakedb/snowflake-jdbc | src/main/java/net/snowflake/client/core/bind/BindUploader.java | BindUploader.putBinds | private void putBinds() throws BindException
{
createStageIfNeeded();
String putStatement = getPutStmt(bindDir.toString(), stagePath);
for (int i = 0; i < PUT_RETRY_COUNT; i++)
{
try
{
SFStatement statement = new SFStatement(session);
SFBaseResultSet putResult = statement... | java | private void putBinds() throws BindException
{
createStageIfNeeded();
String putStatement = getPutStmt(bindDir.toString(), stagePath);
for (int i = 0; i < PUT_RETRY_COUNT; i++)
{
try
{
SFStatement statement = new SFStatement(session);
SFBaseResultSet putResult = statement... | [
"private",
"void",
"putBinds",
"(",
")",
"throws",
"BindException",
"{",
"createStageIfNeeded",
"(",
")",
";",
"String",
"putStatement",
"=",
"getPutStmt",
"(",
"bindDir",
".",
"toString",
"(",
")",
",",
"stagePath",
")",
";",
"for",
"(",
"int",
"i",
"=",
... | Upload binds from local file to stage
@throws BindException if uploading the binds fails | [
"Upload",
"binds",
"from",
"local",
"file",
"to",
"stage"
] | train | https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/bind/BindUploader.java#L424-L457 |
couchbase/couchbase-java-client | src/main/java/com/couchbase/client/java/document/json/JsonObject.java | JsonObject.put | public JsonObject put(String name, List<?> value) {
return put(name, JsonArray.from(value));
} | java | public JsonObject put(String name, List<?> value) {
return put(name, JsonArray.from(value));
} | [
"public",
"JsonObject",
"put",
"(",
"String",
"name",
",",
"List",
"<",
"?",
">",
"value",
")",
"{",
"return",
"put",
"(",
"name",
",",
"JsonArray",
".",
"from",
"(",
"value",
")",
")",
";",
"}"
] | Stores a {@link JsonArray} value identified by the field name.
@param name the name of the JSON field.
@param value the value of the JSON field.
@return the {@link JsonObject}. | [
"Stores",
"a",
"{",
"@link",
"JsonArray",
"}",
"value",
"identified",
"by",
"the",
"field",
"name",
"."
] | train | https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/document/json/JsonObject.java#L842-L844 |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/bos/BosClient.java | BosClient.getObject | public ObjectMetadata getObject(String bucketName, String key, File destinationFile) {
return this.getObject(new GetObjectRequest(bucketName, key), destinationFile);
} | java | public ObjectMetadata getObject(String bucketName, String key, File destinationFile) {
return this.getObject(new GetObjectRequest(bucketName, key), destinationFile);
} | [
"public",
"ObjectMetadata",
"getObject",
"(",
"String",
"bucketName",
",",
"String",
"key",
",",
"File",
"destinationFile",
")",
"{",
"return",
"this",
".",
"getObject",
"(",
"new",
"GetObjectRequest",
"(",
"bucketName",
",",
"key",
")",
",",
"destinationFile",
... | Gets the object metadata for the object stored in Bos under the specified bucket and key,
and saves the object contents to the specified file.
Returns <code>null</code> if the specified constraints weren't met.
@param bucketName The name of the bucket containing the desired object.
@param key The key under which the d... | [
"Gets",
"the",
"object",
"metadata",
"for",
"the",
"object",
"stored",
"in",
"Bos",
"under",
"the",
"specified",
"bucket",
"and",
"key",
"and",
"saves",
"the",
"object",
"contents",
"to",
"the",
"specified",
"file",
".",
"Returns",
"<code",
">",
"null<",
"... | train | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bos/BosClient.java#L659-L661 |
OpenLiberty/open-liberty | dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSRdbManagedConnectionImpl.java | WSRdbManagedConnectionImpl.setShardingKeys | public final void setShardingKeys(Object shardingKey, Object superShardingKey) throws SQLException {
if (mcf.beforeJDBCVersion(JDBCRuntimeVersion.VERSION_4_3))
throw new SQLFeatureNotSupportedException();
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(... | java | public final void setShardingKeys(Object shardingKey, Object superShardingKey) throws SQLException {
if (mcf.beforeJDBCVersion(JDBCRuntimeVersion.VERSION_4_3))
throw new SQLFeatureNotSupportedException();
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(... | [
"public",
"final",
"void",
"setShardingKeys",
"(",
"Object",
"shardingKey",
",",
"Object",
"superShardingKey",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"mcf",
".",
"beforeJDBCVersion",
"(",
"JDBCRuntimeVersion",
".",
"VERSION_4_3",
")",
")",
"throw",
"new",
... | Updates the value of the sharding keys.
@param shardingKey the new sharding key.
@param superShardingKey the new super sharding key. The 'unchanged' constant can be used to avoid changing it. | [
"Updates",
"the",
"value",
"of",
"the",
"sharding",
"keys",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSRdbManagedConnectionImpl.java#L4097-L4109 |
EsotericSoftware/kryo | src/com/esotericsoftware/kryo/io/Input.java | Input.readBytes | public void readBytes (byte[] bytes, int offset, int count) throws KryoException {
if (bytes == null) throw new IllegalArgumentException("bytes cannot be null.");
int copyCount = Math.min(limit - position, count);
while (true) {
System.arraycopy(buffer, position, bytes, offset, copyCount);
position += ... | java | public void readBytes (byte[] bytes, int offset, int count) throws KryoException {
if (bytes == null) throw new IllegalArgumentException("bytes cannot be null.");
int copyCount = Math.min(limit - position, count);
while (true) {
System.arraycopy(buffer, position, bytes, offset, copyCount);
position += ... | [
"public",
"void",
"readBytes",
"(",
"byte",
"[",
"]",
"bytes",
",",
"int",
"offset",
",",
"int",
"count",
")",
"throws",
"KryoException",
"{",
"if",
"(",
"bytes",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"bytes cannot be null.\"",
... | Reads count bytes and writes them to the specified byte[], starting at offset. | [
"Reads",
"count",
"bytes",
"and",
"writes",
"them",
"to",
"the",
"specified",
"byte",
"[]",
"starting",
"at",
"offset",
"."
] | train | https://github.com/EsotericSoftware/kryo/blob/a8be1ab26f347f299a3c3f7171d6447dd5390845/src/com/esotericsoftware/kryo/io/Input.java#L360-L372 |
oaqa/uima-ecd | src/main/java/edu/cmu/lti/oaqa/ecd/driver/SimplePipelineRev803.java | SimplePipelineRev803.runPipeline | public static void runPipeline(final JCas jcas, final AnalysisEngine... engines)
throws UIMAException, IOException {
if (engines.length == 0) {
return;
}
JCasIterator jcasIter = engines[0].processAndOutputNewCASes(jcas);
AnalysisEngine[] enginesRemains = Arrays.copyOfRange(engines, 1, engine... | java | public static void runPipeline(final JCas jcas, final AnalysisEngine... engines)
throws UIMAException, IOException {
if (engines.length == 0) {
return;
}
JCasIterator jcasIter = engines[0].processAndOutputNewCASes(jcas);
AnalysisEngine[] enginesRemains = Arrays.copyOfRange(engines, 1, engine... | [
"public",
"static",
"void",
"runPipeline",
"(",
"final",
"JCas",
"jcas",
",",
"final",
"AnalysisEngine",
"...",
"engines",
")",
"throws",
"UIMAException",
",",
"IOException",
"{",
"if",
"(",
"engines",
".",
"length",
"==",
"0",
")",
"{",
"return",
";",
"}"... | Run a sequence of {@link AnalysisEngine analysis engines} over a {@link JCas}. This method
does not {@link AnalysisEngine#destroy() destroy} the engines or send them other events like
{@link AnalysisEngine#collectionProcessComplete()}. This is left to the caller.
@param jcas
the jCas to process
@param engines
a sequen... | [
"Run",
"a",
"sequence",
"of",
"{",
"@link",
"AnalysisEngine",
"analysis",
"engines",
"}",
"over",
"a",
"{",
"@link",
"JCas",
"}",
".",
"This",
"method",
"does",
"not",
"{",
"@link",
"AnalysisEngine#destroy",
"()",
"destroy",
"}",
"the",
"engines",
"or",
"s... | train | https://github.com/oaqa/uima-ecd/blob/09a0ae26647490b43affc36ab3a01100702b989f/src/main/java/edu/cmu/lti/oaqa/ecd/driver/SimplePipelineRev803.java#L225-L237 |
forge/core | javaee/impl/src/main/java/org/jboss/forge/addon/javaee/cdi/CDIOperations.java | CDIOperations.getProjectInjectableBeans | public List<JavaResource> getProjectInjectableBeans(Project project)
{
final List<JavaResource> beans = new ArrayList<>();
if (project != null)
{
project.getFacet(JavaSourceFacet.class).visitJavaSources(new JavaResourceVisitor()
{
@Override
public void visi... | java | public List<JavaResource> getProjectInjectableBeans(Project project)
{
final List<JavaResource> beans = new ArrayList<>();
if (project != null)
{
project.getFacet(JavaSourceFacet.class).visitJavaSources(new JavaResourceVisitor()
{
@Override
public void visi... | [
"public",
"List",
"<",
"JavaResource",
">",
"getProjectInjectableBeans",
"(",
"Project",
"project",
")",
"{",
"final",
"List",
"<",
"JavaResource",
">",
"beans",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"if",
"(",
"project",
"!=",
"null",
")",
"{",
... | Returns all the injectable objects from the given {@link Project}. Most of the Java EE components can be injected,
except JPA entities, message driven beans.... | [
"Returns",
"all",
"the",
"injectable",
"objects",
"from",
"the",
"given",
"{"
] | train | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/javaee/impl/src/main/java/org/jboss/forge/addon/javaee/cdi/CDIOperations.java#L55-L103 |
stratosphere/stratosphere | stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/api/AbstractRecordReader.java | AbstractRecordReader.subscribeToEvent | @Override
public void subscribeToEvent(EventListener eventListener, Class<? extends AbstractTaskEvent> eventType) {
this.eventHandler.subscribeToEvent(eventListener, eventType);
} | java | @Override
public void subscribeToEvent(EventListener eventListener, Class<? extends AbstractTaskEvent> eventType) {
this.eventHandler.subscribeToEvent(eventListener, eventType);
} | [
"@",
"Override",
"public",
"void",
"subscribeToEvent",
"(",
"EventListener",
"eventListener",
",",
"Class",
"<",
"?",
"extends",
"AbstractTaskEvent",
">",
"eventType",
")",
"{",
"this",
".",
"eventHandler",
".",
"subscribeToEvent",
"(",
"eventListener",
",",
"even... | Subscribes the listener object to receive events of the given type.
@param eventListener
the listener object to register
@param eventType
the type of event to register the listener for | [
"Subscribes",
"the",
"listener",
"object",
"to",
"receive",
"events",
"of",
"the",
"given",
"type",
"."
] | train | https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/api/AbstractRecordReader.java#L43-L46 |
aws/aws-sdk-java | aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java | XpathUtils.asString | public static String asString(String expression, Node node)
throws XPathExpressionException {
return evaluateAsString(expression, node, xpath());
} | java | public static String asString(String expression, Node node)
throws XPathExpressionException {
return evaluateAsString(expression, node, xpath());
} | [
"public",
"static",
"String",
"asString",
"(",
"String",
"expression",
",",
"Node",
"node",
")",
"throws",
"XPathExpressionException",
"{",
"return",
"evaluateAsString",
"(",
"expression",
",",
"node",
",",
"xpath",
"(",
")",
")",
";",
"}"
] | Evaluates the specified XPath expression and returns the result as a
string.
<p>
This method can be expensive as a new xpath is instantiated per
invocation. Consider passing in the xpath explicitly via {
{@link #asDouble(String, Node, XPath)} instead. Note {@link XPath} is
not thread-safe and not reentrant.
@param ex... | [
"Evaluates",
"the",
"specified",
"XPath",
"expression",
"and",
"returns",
"the",
"result",
"as",
"a",
"string",
".",
"<p",
">",
"This",
"method",
"can",
"be",
"expensive",
"as",
"a",
"new",
"xpath",
"is",
"instantiated",
"per",
"invocation",
".",
"Consider",... | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java#L243-L246 |
spotify/helios | helios-services/src/main/java/com/spotify/helios/master/resources/HistoryResource.java | HistoryResource.jobHistory | @GET
@Produces(APPLICATION_JSON)
@Path("jobs/{id}")
@Timed
@ExceptionMetered
public TaskStatusEvents jobHistory(@PathParam("id") @Valid final JobId jobId)
throws HeliosException {
if (!jobId.isFullyQualified()) {
throw badRequest("Invalid id");
}
try {
final List<TaskStatusEvent>... | java | @GET
@Produces(APPLICATION_JSON)
@Path("jobs/{id}")
@Timed
@ExceptionMetered
public TaskStatusEvents jobHistory(@PathParam("id") @Valid final JobId jobId)
throws HeliosException {
if (!jobId.isFullyQualified()) {
throw badRequest("Invalid id");
}
try {
final List<TaskStatusEvent>... | [
"@",
"GET",
"@",
"Produces",
"(",
"APPLICATION_JSON",
")",
"@",
"Path",
"(",
"\"jobs/{id}\"",
")",
"@",
"Timed",
"@",
"ExceptionMetered",
"public",
"TaskStatusEvents",
"jobHistory",
"(",
"@",
"PathParam",
"(",
"\"id\"",
")",
"@",
"Valid",
"final",
"JobId",
"... | Returns the {@link TaskStatusEvents} for the specified job.
@param jobId The ID of the job.
@return The history of the jobs.
@throws HeliosException If an unexpected error occurs. | [
"Returns",
"the",
"{",
"@link",
"TaskStatusEvents",
"}",
"for",
"the",
"specified",
"job",
"."
] | train | https://github.com/spotify/helios/blob/c9000bc1d6908651570be8b057d4981bba4df5b4/helios-services/src/main/java/com/spotify/helios/master/resources/HistoryResource.java#L64-L82 |
sporniket/core | sporniket-core-lang/src/main/java/com/sporniket/libre/lang/functor/FunctorFactory.java | FunctorFactory.instanciateFunctorWithParameterAsAMethodWrapper | public static FunctorWithParameter instanciateFunctorWithParameterAsAMethodWrapper(final Object instance, final Method method)
throws Exception
{
if (null == method)
{
throw new NullPointerException("Method is null");
}
if (method.getParameterTypes().length != 1 || !Map.class.equals(method.getPara... | java | public static FunctorWithParameter instanciateFunctorWithParameterAsAMethodWrapper(final Object instance, final Method method)
throws Exception
{
if (null == method)
{
throw new NullPointerException("Method is null");
}
if (method.getParameterTypes().length != 1 || !Map.class.equals(method.getPara... | [
"public",
"static",
"FunctorWithParameter",
"instanciateFunctorWithParameterAsAMethodWrapper",
"(",
"final",
"Object",
"instance",
",",
"final",
"Method",
"method",
")",
"throws",
"Exception",
"{",
"if",
"(",
"null",
"==",
"method",
")",
"{",
"throw",
"new",
"NullPo... | Create a functor with parameter, wrapping a call to another method.
@param instance
null is allowed, for wrapping static method calls
@param method
the method to call.
@return a Functor with parameter that call the specified method on the specified instance.
@throws Exception if there is a problem to deal with. | [
"Create",
"a",
"functor",
"with",
"parameter",
"wrapping",
"a",
"call",
"to",
"another",
"method",
"."
] | train | https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-lang/src/main/java/com/sporniket/libre/lang/functor/FunctorFactory.java#L140-L163 |
prestodb/presto | presto-thrift-connector/src/main/java/com/facebook/presto/connector/thrift/ThriftMetadata.java | ThriftMetadata.getTableMetadataInternal | private Optional<ThriftTableMetadata> getTableMetadataInternal(SchemaTableName schemaTableName)
{
requireNonNull(schemaTableName, "schemaTableName is null");
PrestoThriftNullableTableMetadata thriftTableMetadata = getTableMetadata(schemaTableName);
if (thriftTableMetadata.getTableMetadata() ... | java | private Optional<ThriftTableMetadata> getTableMetadataInternal(SchemaTableName schemaTableName)
{
requireNonNull(schemaTableName, "schemaTableName is null");
PrestoThriftNullableTableMetadata thriftTableMetadata = getTableMetadata(schemaTableName);
if (thriftTableMetadata.getTableMetadata() ... | [
"private",
"Optional",
"<",
"ThriftTableMetadata",
">",
"getTableMetadataInternal",
"(",
"SchemaTableName",
"schemaTableName",
")",
"{",
"requireNonNull",
"(",
"schemaTableName",
",",
"\"schemaTableName is null\"",
")",
";",
"PrestoThriftNullableTableMetadata",
"thriftTableMeta... | this method makes actual thrift request and should be called only by cache load method | [
"this",
"method",
"makes",
"actual",
"thrift",
"request",
"and",
"should",
"be",
"called",
"only",
"by",
"cache",
"load",
"method"
] | train | https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-thrift-connector/src/main/java/com/facebook/presto/connector/thrift/ThriftMetadata.java#L198-L210 |
GoogleCloudPlatform/appengine-mapreduce | java/src/main/java/com/google/appengine/tools/mapreduce/impl/BigQueryFieldUtil.java | BigQueryFieldUtil.validateNestedRepeatedType | public static void validateNestedRepeatedType(Class<?> parameterType, Field field) {
if (isCollectionOrArray(parameterType)) {
throw new IllegalArgumentException(
" Cannot marshal a nested collection or array field " + field.getName());
}
} | java | public static void validateNestedRepeatedType(Class<?> parameterType, Field field) {
if (isCollectionOrArray(parameterType)) {
throw new IllegalArgumentException(
" Cannot marshal a nested collection or array field " + field.getName());
}
} | [
"public",
"static",
"void",
"validateNestedRepeatedType",
"(",
"Class",
"<",
"?",
">",
"parameterType",
",",
"Field",
"field",
")",
"{",
"if",
"(",
"isCollectionOrArray",
"(",
"parameterType",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\" C... | A field of type Collection<Collection> cannot be marshalled into bigquery data format as
parameterized types nested more than one level cannot be determined at runtime. So cannot be
marshalled. | [
"A",
"field",
"of",
"type",
"Collection<Collection",
">",
"cannot",
"be",
"marshalled",
"into",
"bigquery",
"data",
"format",
"as",
"parameterized",
"types",
"nested",
"more",
"than",
"one",
"level",
"cannot",
"be",
"determined",
"at",
"runtime",
".",
"So",
"c... | train | https://github.com/GoogleCloudPlatform/appengine-mapreduce/blob/2045eb3605b6ecb40c83d11dd5442a89fe5c5dd6/java/src/main/java/com/google/appengine/tools/mapreduce/impl/BigQueryFieldUtil.java#L195-L200 |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/content/DocumentListUrl.java | DocumentListUrl.updateDocumentListUrl | public static MozuUrl updateDocumentListUrl(String documentListName, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/content/documentlists/{documentListName}?responseFields={responseFields}");
formatter.formatUrl("documentListName", documentListName);
formatter.formatUrl("responseFie... | java | public static MozuUrl updateDocumentListUrl(String documentListName, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/content/documentlists/{documentListName}?responseFields={responseFields}");
formatter.formatUrl("documentListName", documentListName);
formatter.formatUrl("responseFie... | [
"public",
"static",
"MozuUrl",
"updateDocumentListUrl",
"(",
"String",
"documentListName",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/content/documentlists/{documentListName}?responseFields={responseFields}\"",... | Get Resource Url for UpdateDocumentList
@param documentListName Name of content documentListName to delete
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update da... | [
"Get",
"Resource",
"Url",
"for",
"UpdateDocumentList"
] | train | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/content/DocumentListUrl.java#L64-L70 |
alkacon/opencms-core | src/org/opencms/ade/detailpage/CmsDetailPageUtil.java | CmsDetailPageUtil.getBestUrlName | public static String getBestUrlName(CmsObject cms, CmsUUID id) throws CmsException {
// this is currently only used for static export
Locale locale = cms.getRequestContext().getLocale();
List<Locale> defaultLocales = OpenCms.getLocaleManager().getDefaultLocales();
String urlName = cms.r... | java | public static String getBestUrlName(CmsObject cms, CmsUUID id) throws CmsException {
// this is currently only used for static export
Locale locale = cms.getRequestContext().getLocale();
List<Locale> defaultLocales = OpenCms.getLocaleManager().getDefaultLocales();
String urlName = cms.r... | [
"public",
"static",
"String",
"getBestUrlName",
"(",
"CmsObject",
"cms",
",",
"CmsUUID",
"id",
")",
"throws",
"CmsException",
"{",
"// this is currently only used for static export",
"Locale",
"locale",
"=",
"cms",
".",
"getRequestContext",
"(",
")",
".",
"getLocale",... | Returns either the newest URL name for a structure id, or the structure id as a string if there is no URL name.<p>
@param cms the current CMS context
@param id the structure id of a resource
@return the best URL name for the structure id
@throws CmsException if something goes wrong | [
"Returns",
"either",
"the",
"newest",
"URL",
"name",
"for",
"a",
"structure",
"id",
"or",
"the",
"structure",
"id",
"as",
"a",
"string",
"if",
"there",
"is",
"no",
"URL",
"name",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/detailpage/CmsDetailPageUtil.java#L101-L111 |
JadiraOrg/jadira | cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java | UnsafeOperations.deepCopyArrayAtOffset | public final void deepCopyArrayAtOffset(Object source, Object copy, Class<?> fieldClass, long offset) {
deepCopyArrayAtOffset(source, copy, fieldClass, offset, new IdentityHashMap<Object, Object>(100));
} | java | public final void deepCopyArrayAtOffset(Object source, Object copy, Class<?> fieldClass, long offset) {
deepCopyArrayAtOffset(source, copy, fieldClass, offset, new IdentityHashMap<Object, Object>(100));
} | [
"public",
"final",
"void",
"deepCopyArrayAtOffset",
"(",
"Object",
"source",
",",
"Object",
"copy",
",",
"Class",
"<",
"?",
">",
"fieldClass",
",",
"long",
"offset",
")",
"{",
"deepCopyArrayAtOffset",
"(",
"source",
",",
"copy",
",",
"fieldClass",
",",
"offs... | Copies the array of the specified type from the given field offset in the source object
to the same location in the copy, visiting the array during the copy so that its contents are also copied
@param source The object to copy from
@param copy The target object
@param fieldClass The declared type of array at the given ... | [
"Copies",
"the",
"array",
"of",
"the",
"specified",
"type",
"from",
"the",
"given",
"field",
"offset",
"in",
"the",
"source",
"object",
"to",
"the",
"same",
"location",
"in",
"the",
"copy",
"visiting",
"the",
"array",
"during",
"the",
"copy",
"so",
"that",... | train | https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java#L454-L456 |
biojava/biojava | biojava-structure/src/main/java/org/biojava/nbio/structure/io/LocalPDBDirectory.java | LocalPDBDirectory.getLastModifiedTime | private Date getLastModifiedTime(URL url) {
// see http://stackoverflow.com/questions/2416872/how-do-you-obtain-modified-date-from-a-remote-file-java
Date date = null;
try {
String lastModified = url.openConnection().getHeaderField("Last-Modified");
logger.debug("Last modified date of server file ({}) is {... | java | private Date getLastModifiedTime(URL url) {
// see http://stackoverflow.com/questions/2416872/how-do-you-obtain-modified-date-from-a-remote-file-java
Date date = null;
try {
String lastModified = url.openConnection().getHeaderField("Last-Modified");
logger.debug("Last modified date of server file ({}) is {... | [
"private",
"Date",
"getLastModifiedTime",
"(",
"URL",
"url",
")",
"{",
"// see http://stackoverflow.com/questions/2416872/how-do-you-obtain-modified-date-from-a-remote-file-java",
"Date",
"date",
"=",
"null",
";",
"try",
"{",
"String",
"lastModified",
"=",
"url",
".",
"open... | Get the last modified time of the file in given url by retrieveing the "Last-Modified" header.
Note that this only works for http URLs
@param url
@return the last modified date or null if it couldn't be retrieved (in that case a warning will be logged) | [
"Get",
"the",
"last",
"modified",
"time",
"of",
"the",
"file",
"in",
"given",
"url",
"by",
"retrieveing",
"the",
"Last",
"-",
"Modified",
"header",
".",
"Note",
"that",
"this",
"only",
"works",
"for",
"http",
"URLs"
] | train | https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/LocalPDBDirectory.java#L576-L601 |
google/closure-templates | java/src/com/google/template/soy/SoyFileSet.java | SoyFileSet.compileForServerRendering | private ServerCompilationPrimitives compileForServerRendering() {
ParseResult result = parse();
throwIfErrorsPresent();
SoyFileSetNode soyTree = result.fileSet();
TemplateRegistry registry = result.registry();
// Clear the SoyDoc strings because they use unnecessary memory, unless we have a cache, ... | java | private ServerCompilationPrimitives compileForServerRendering() {
ParseResult result = parse();
throwIfErrorsPresent();
SoyFileSetNode soyTree = result.fileSet();
TemplateRegistry registry = result.registry();
// Clear the SoyDoc strings because they use unnecessary memory, unless we have a cache, ... | [
"private",
"ServerCompilationPrimitives",
"compileForServerRendering",
"(",
")",
"{",
"ParseResult",
"result",
"=",
"parse",
"(",
")",
";",
"throwIfErrorsPresent",
"(",
")",
";",
"SoyFileSetNode",
"soyTree",
"=",
"result",
".",
"fileSet",
"(",
")",
";",
"TemplateR... | Runs common compiler logic shared by tofu and jbcsrc backends. | [
"Runs",
"common",
"compiler",
"logic",
"shared",
"by",
"tofu",
"and",
"jbcsrc",
"backends",
"."
] | train | https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/SoyFileSet.java#L857-L871 |
apache/incubator-atlas | repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java | AtlasEntityStoreV1.validateEntityAssociations | private void validateEntityAssociations(String guid, List<AtlasClassification> classifications) throws AtlasBaseException {
List<String> entityClassifications = getClassificationNames(guid);
for (AtlasClassification classification : classifications) {
String newClassification = classificati... | java | private void validateEntityAssociations(String guid, List<AtlasClassification> classifications) throws AtlasBaseException {
List<String> entityClassifications = getClassificationNames(guid);
for (AtlasClassification classification : classifications) {
String newClassification = classificati... | [
"private",
"void",
"validateEntityAssociations",
"(",
"String",
"guid",
",",
"List",
"<",
"AtlasClassification",
">",
"classifications",
")",
"throws",
"AtlasBaseException",
"{",
"List",
"<",
"String",
">",
"entityClassifications",
"=",
"getClassificationNames",
"(",
... | Validate if classification is not already associated with the entities
@param guid unique entity id
@param classifications list of classifications to be associated | [
"Validate",
"if",
"classification",
"is",
"not",
"already",
"associated",
"with",
"the",
"entities"
] | train | https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java#L726-L737 |
rwl/CSparseJ | src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_schol.java | Scs_schol.cs_schol | public static Scss cs_schol(int order, Scs A) {
int n, c[], post[], P[];
Scs C;
Scss S;
if (!Scs_util.CS_CSC(A))
return (null); /* check inputs */
n = A.n;
S = new Scss(); /* allocate result S */
P = Scs_amd.cs_amd(order, A); /* P = amd(A+A'), ... | java | public static Scss cs_schol(int order, Scs A) {
int n, c[], post[], P[];
Scs C;
Scss S;
if (!Scs_util.CS_CSC(A))
return (null); /* check inputs */
n = A.n;
S = new Scss(); /* allocate result S */
P = Scs_amd.cs_amd(order, A); /* P = amd(A+A'), ... | [
"public",
"static",
"Scss",
"cs_schol",
"(",
"int",
"order",
",",
"Scs",
"A",
")",
"{",
"int",
"n",
",",
"c",
"[",
"]",
",",
"post",
"[",
"]",
",",
"P",
"[",
"]",
";",
"Scs",
"C",
";",
"Scss",
"S",
";",
"if",
"(",
"!",
"Scs_util",
".",
"CS_... | Ordering and symbolic analysis for a Cholesky factorization.
@param order
ordering option (0 or 1)
@param A
column-compressed matrix
@return symbolic analysis for Cholesky, null on error | [
"Ordering",
"and",
"symbolic",
"analysis",
"for",
"a",
"Cholesky",
"factorization",
"."
] | train | https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_schol.java#L46-L65 |
groupon/odo | client/src/main/java/com/groupon/odo/client/Client.java | Client.getServerGroups | public List<ServerGroup> getServerGroups() {
ArrayList<ServerGroup> groups = new ArrayList<ServerGroup>();
try {
JSONObject response = new JSONObject(doGet(BASE_SERVERGROUP, null));
JSONArray serverArray = response.getJSONArray("servergroups");
for (int i = 0; i < se... | java | public List<ServerGroup> getServerGroups() {
ArrayList<ServerGroup> groups = new ArrayList<ServerGroup>();
try {
JSONObject response = new JSONObject(doGet(BASE_SERVERGROUP, null));
JSONArray serverArray = response.getJSONArray("servergroups");
for (int i = 0; i < se... | [
"public",
"List",
"<",
"ServerGroup",
">",
"getServerGroups",
"(",
")",
"{",
"ArrayList",
"<",
"ServerGroup",
">",
"groups",
"=",
"new",
"ArrayList",
"<",
"ServerGroup",
">",
"(",
")",
";",
"try",
"{",
"JSONObject",
"response",
"=",
"new",
"JSONObject",
"(... | Get the collection of the server groups
@return Collection of active server groups | [
"Get",
"the",
"collection",
"of",
"the",
"server",
"groups"
] | train | https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/client/src/main/java/com/groupon/odo/client/Client.java#L1249-L1265 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/config/replacer/AbstractPbeReplacer.java | AbstractPbeReplacer.transform | private byte[] transform(int cryptMode, byte[] value, byte[] salt, int iterations) throws Exception {
checkPositive(iterations, "Count of iterations has to be positive number.");
SecretKeyFactory factory = SecretKeyFactory.getInstance(secretKeyFactoryAlgorithm);
char[] password = getPassword();
... | java | private byte[] transform(int cryptMode, byte[] value, byte[] salt, int iterations) throws Exception {
checkPositive(iterations, "Count of iterations has to be positive number.");
SecretKeyFactory factory = SecretKeyFactory.getInstance(secretKeyFactoryAlgorithm);
char[] password = getPassword();
... | [
"private",
"byte",
"[",
"]",
"transform",
"(",
"int",
"cryptMode",
",",
"byte",
"[",
"]",
"value",
",",
"byte",
"[",
"]",
"salt",
",",
"int",
"iterations",
")",
"throws",
"Exception",
"{",
"checkPositive",
"(",
"iterations",
",",
"\"Count of iterations has t... | Encrypt/decrypt given value by using the configured cipher algorithm with provided salt and iterations count.
@param cryptMode mode (one of {@link Cipher#DECRYPT_MODE}, {@link Cipher#ENCRYPT_MODE})
@param value value to encrypt/decrypt
@param salt salt to be used
@param iterations count of iterations
@return encrypted... | [
"Encrypt",
"/",
"decrypt",
"given",
"value",
"by",
"using",
"the",
"configured",
"cipher",
"algorithm",
"with",
"provided",
"salt",
"and",
"iterations",
"count",
"."
] | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/replacer/AbstractPbeReplacer.java#L158-L170 |
messagebird/java-rest-api | api/src/main/java/com/messagebird/RequestSigner.java | RequestSigner.computeSignature | private byte[] computeSignature(Request request) {
String timestampAndQuery = request.getTimestamp() + '\n' +
request.getSortedQueryParameters() + '\n';
byte[] timestampAndQueryBytes = timestampAndQuery.getBytes(CHARSET_UTF8);
byte[] bodyHashBytes = getSha256Hash(request.getData... | java | private byte[] computeSignature(Request request) {
String timestampAndQuery = request.getTimestamp() + '\n' +
request.getSortedQueryParameters() + '\n';
byte[] timestampAndQueryBytes = timestampAndQuery.getBytes(CHARSET_UTF8);
byte[] bodyHashBytes = getSha256Hash(request.getData... | [
"private",
"byte",
"[",
"]",
"computeSignature",
"(",
"Request",
"request",
")",
"{",
"String",
"timestampAndQuery",
"=",
"request",
".",
"getTimestamp",
"(",
")",
"+",
"'",
"'",
"+",
"request",
".",
"getSortedQueryParameters",
"(",
")",
"+",
"'",
"'",
";"... | Computes the signature for a request instance.
@param request Request to compute signature for.
@return HMAC-SHA2556 signature for the provided request. | [
"Computes",
"the",
"signature",
"for",
"a",
"request",
"instance",
"."
] | train | https://github.com/messagebird/java-rest-api/blob/f92cd93afff413e6dc12aa6e41e69f26cbae8941/api/src/main/java/com/messagebird/RequestSigner.java#L75-L83 |
lettuce-io/lettuce-core | src/main/java/io/lettuce/core/cluster/RedisClusterURIUtil.java | RedisClusterURIUtil.applyUriConnectionSettings | static void applyUriConnectionSettings(RedisURI from, RedisURI to) {
if (from.getPassword() != null && from.getPassword().length != 0) {
to.setPassword(new String(from.getPassword()));
}
to.setTimeout(from.getTimeout());
to.setSsl(from.isSsl());
to.setStartTls(from.... | java | static void applyUriConnectionSettings(RedisURI from, RedisURI to) {
if (from.getPassword() != null && from.getPassword().length != 0) {
to.setPassword(new String(from.getPassword()));
}
to.setTimeout(from.getTimeout());
to.setSsl(from.isSsl());
to.setStartTls(from.... | [
"static",
"void",
"applyUriConnectionSettings",
"(",
"RedisURI",
"from",
",",
"RedisURI",
"to",
")",
"{",
"if",
"(",
"from",
".",
"getPassword",
"(",
")",
"!=",
"null",
"&&",
"from",
".",
"getPassword",
"(",
")",
".",
"length",
"!=",
"0",
")",
"{",
"to... | Apply {@link RedisURI} settings such as SSL/Timeout/password.
@param from from {@link RedisURI}.
@param to from {@link RedisURI}. | [
"Apply",
"{",
"@link",
"RedisURI",
"}",
"settings",
"such",
"as",
"SSL",
"/",
"Timeout",
"/",
"password",
"."
] | train | https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/cluster/RedisClusterURIUtil.java#L72-L82 |
Azure/azure-sdk-for-java | containerinstance/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2018_02_01_preview/implementation/ContainerGroupsInner.java | ContainerGroupsInner.createOrUpdate | public ContainerGroupInner createOrUpdate(String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, containerGroupName, containerGroup).toBlocking().last().body();
} | java | public ContainerGroupInner createOrUpdate(String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, containerGroupName, containerGroup).toBlocking().last().body();
} | [
"public",
"ContainerGroupInner",
"createOrUpdate",
"(",
"String",
"resourceGroupName",
",",
"String",
"containerGroupName",
",",
"ContainerGroupInner",
"containerGroup",
")",
"{",
"return",
"createOrUpdateWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"containerGroup... | Create or update container groups.
Create or update container groups with specified configurations.
@param resourceGroupName The name of the resource group.
@param containerGroupName The name of the container group.
@param containerGroup The properties of the container group to be created or updated.
@throws IllegalAr... | [
"Create",
"or",
"update",
"container",
"groups",
".",
"Create",
"or",
"update",
"container",
"groups",
"with",
"specified",
"configurations",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerinstance/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2018_02_01_preview/implementation/ContainerGroupsInner.java#L441-L443 |
Azure/azure-sdk-for-java | network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteTablesInner.java | RouteTablesInner.updateTagsAsync | public Observable<RouteTableInner> updateTagsAsync(String resourceGroupName, String routeTableName) {
return updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName).map(new Func1<ServiceResponse<RouteTableInner>, RouteTableInner>() {
@Override
public RouteTableInner call(Se... | java | public Observable<RouteTableInner> updateTagsAsync(String resourceGroupName, String routeTableName) {
return updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName).map(new Func1<ServiceResponse<RouteTableInner>, RouteTableInner>() {
@Override
public RouteTableInner call(Se... | [
"public",
"Observable",
"<",
"RouteTableInner",
">",
"updateTagsAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"routeTableName",
")",
"{",
"return",
"updateTagsWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"routeTableName",
")",
".",
"map",
"(",
... | Updates a route table tags.
@param resourceGroupName The name of the resource group.
@param routeTableName The name of the route table.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable for the request | [
"Updates",
"a",
"route",
"table",
"tags",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteTablesInner.java#L636-L643 |
before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/NumberInRange.java | NumberInRange.isInRange | @ArgumentsChecked
@Throws(IllegalNullArgumentException.class)
public static boolean isInRange(@Nonnull final Number number, @Nonnull final BigDecimal min, @Nonnull final BigDecimal max) {
Check.notNull(number, "number");
Check.notNull(min, "min");
Check.notNull(max, "max");
BigDecimal bigDecimal = null;
if... | java | @ArgumentsChecked
@Throws(IllegalNullArgumentException.class)
public static boolean isInRange(@Nonnull final Number number, @Nonnull final BigDecimal min, @Nonnull final BigDecimal max) {
Check.notNull(number, "number");
Check.notNull(min, "min");
Check.notNull(max, "max");
BigDecimal bigDecimal = null;
if... | [
"@",
"ArgumentsChecked",
"@",
"Throws",
"(",
"IllegalNullArgumentException",
".",
"class",
")",
"public",
"static",
"boolean",
"isInRange",
"(",
"@",
"Nonnull",
"final",
"Number",
"number",
",",
"@",
"Nonnull",
"final",
"BigDecimal",
"min",
",",
"@",
"Nonnull",
... | Test if a number is in an arbitrary range.
@param number
a number
@param min
lower boundary of the range
@param max
upper boundary of the range
@return true if the given number is within the range | [
"Test",
"if",
"a",
"number",
"is",
"in",
"an",
"arbitrary",
"range",
"."
] | train | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/NumberInRange.java#L250-L271 |
xwiki/xwiki-rendering | xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/parser/reference/GenericLinkReferenceParser.java | GenericLinkReferenceParser.shouldEscape | private boolean shouldEscape(StringBuilder content, int charPosition)
{
int counter = 0;
int pos = charPosition - 1;
while (pos > -1 && content.charAt(pos) == ESCAPE_CHAR) {
counter++;
pos--;
}
return counter % 2 != 0;
} | java | private boolean shouldEscape(StringBuilder content, int charPosition)
{
int counter = 0;
int pos = charPosition - 1;
while (pos > -1 && content.charAt(pos) == ESCAPE_CHAR) {
counter++;
pos--;
}
return counter % 2 != 0;
} | [
"private",
"boolean",
"shouldEscape",
"(",
"StringBuilder",
"content",
",",
"int",
"charPosition",
")",
"{",
"int",
"counter",
"=",
"0",
";",
"int",
"pos",
"=",
"charPosition",
"-",
"1",
";",
"while",
"(",
"pos",
">",
"-",
"1",
"&&",
"content",
".",
"c... | Count the number of escape chars before a given character and if that number is odd then that character should be
escaped.
@param content the content in which to check for escapes
@param charPosition the position of the char for which to decide if it should be escaped or not
@return true if the character should be esc... | [
"Count",
"the",
"number",
"of",
"escape",
"chars",
"before",
"a",
"given",
"character",
"and",
"if",
"that",
"number",
"is",
"odd",
"then",
"that",
"character",
"should",
"be",
"escaped",
"."
] | train | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/parser/reference/GenericLinkReferenceParser.java#L292-L301 |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.authentication.filter/src/com/ibm/ws/security/authentication/filter/internal/CommonFilter.java | CommonFilter.makeConditionWithMatchType | private ICondition makeConditionWithMatchType(String key, String operand, String valueString,
boolean ipAddress) throws FilterException {
if (operand.equalsIgnoreCase(AuthFilterConfig.MATCH_TYPE_EQUALS)) {
return new EqualCondition(key, makeValue(val... | java | private ICondition makeConditionWithMatchType(String key, String operand, String valueString,
boolean ipAddress) throws FilterException {
if (operand.equalsIgnoreCase(AuthFilterConfig.MATCH_TYPE_EQUALS)) {
return new EqualCondition(key, makeValue(val... | [
"private",
"ICondition",
"makeConditionWithMatchType",
"(",
"String",
"key",
",",
"String",
"operand",
",",
"String",
"valueString",
",",
"boolean",
"ipAddress",
")",
"throws",
"FilterException",
"{",
"if",
"(",
"operand",
".",
"equalsIgnoreCase",
"(",
"AuthFilterCo... | Given the three parts (key, operand, value) make a proper condition object. Notice that I need to know
if the value should be interpreted as an IP address. There some service that use symbol and others use word
for operand/matchType.
Basically just look at the operator string and create the correct condition. Only the... | [
"Given",
"the",
"three",
"parts",
"(",
"key",
"operand",
"value",
")",
"make",
"a",
"proper",
"condition",
"object",
".",
"Notice",
"that",
"I",
"need",
"to",
"know",
"if",
"the",
"value",
"should",
"be",
"interpreted",
"as",
"an",
"IP",
"address",
".",
... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.authentication.filter/src/com/ibm/ws/security/authentication/filter/internal/CommonFilter.java#L245-L269 |
biojava/biojava | biojava-structure/src/main/java/org/biojava/nbio/structure/GroupIterator.java | GroupIterator.getNextGroup | private Group getNextGroup(int tmp_model,int tmp_chain,int tmp_group)
throws NoSuchElementException
{
if ( tmp_model >= structure.nrModels()){
throw new NoSuchElementException("arrived at end of structure!");
}
List<Chain> model = structure.getModel(tmp_model);
if ( tmp_chain >= model.size() ){
if(fi... | java | private Group getNextGroup(int tmp_model,int tmp_chain,int tmp_group)
throws NoSuchElementException
{
if ( tmp_model >= structure.nrModels()){
throw new NoSuchElementException("arrived at end of structure!");
}
List<Chain> model = structure.getModel(tmp_model);
if ( tmp_chain >= model.size() ){
if(fi... | [
"private",
"Group",
"getNextGroup",
"(",
"int",
"tmp_model",
",",
"int",
"tmp_chain",
",",
"int",
"tmp_group",
")",
"throws",
"NoSuchElementException",
"{",
"if",
"(",
"tmp_model",
">=",
"structure",
".",
"nrModels",
"(",
")",
")",
"{",
"throw",
"new",
"NoSu... | recursive method to retrieve the next group. Helper
method for gext().
@see #next | [
"recursive",
"method",
"to",
"retrieve",
"the",
"next",
"group",
".",
"Helper",
"method",
"for",
"gext",
"()",
"."
] | train | https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/GroupIterator.java#L172-L200 |
alkacon/opencms-core | src/org/opencms/db/CmsUserSettings.java | CmsUserSettings.setAdditionalPreference | public void setAdditionalPreference(String name, String value) {
if (value == null) {
m_additionalPreferences.remove(name);
} else {
m_additionalPreferences.put(name, value);
}
} | java | public void setAdditionalPreference(String name, String value) {
if (value == null) {
m_additionalPreferences.remove(name);
} else {
m_additionalPreferences.put(name, value);
}
} | [
"public",
"void",
"setAdditionalPreference",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"m_additionalPreferences",
".",
"remove",
"(",
"name",
")",
";",
"}",
"else",
"{",
"m_additionalPreferences",
".... | Sets an additional preference value.<p>
@param name the additional preference name
@param value the preference value | [
"Sets",
"an",
"additional",
"preference",
"value",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsUserSettings.java#L1740-L1747 |
ngageoint/geopackage-android-map | geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java | StyleUtils.createMarkerOptions | public static MarkerOptions createMarkerOptions(GeoPackage geoPackage, FeatureRow featureRow, float density) {
return createMarkerOptions(geoPackage, featureRow, density, null);
} | java | public static MarkerOptions createMarkerOptions(GeoPackage geoPackage, FeatureRow featureRow, float density) {
return createMarkerOptions(geoPackage, featureRow, density, null);
} | [
"public",
"static",
"MarkerOptions",
"createMarkerOptions",
"(",
"GeoPackage",
"geoPackage",
",",
"FeatureRow",
"featureRow",
",",
"float",
"density",
")",
"{",
"return",
"createMarkerOptions",
"(",
"geoPackage",
",",
"featureRow",
",",
"density",
",",
"null",
")",
... | Create new marker options populated with the feature row style (icon or style)
@param geoPackage GeoPackage
@param featureRow feature row
@param density display density: {@link android.util.DisplayMetrics#density}
@return marker options populated with the feature style | [
"Create",
"new",
"marker",
"options",
"populated",
"with",
"the",
"feature",
"row",
"style",
"(",
"icon",
"or",
"style",
")"
] | train | https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java#L35-L37 |
navnorth/LRJavaLib | src/com/navnorth/learningregistry/LRActivity.java | LRActivity.addVerb | public boolean addVerb(String action, Date dateStart, Date dateEnd, String[] description, String comment)
{
Map<String, Object> container = new HashMap<String, Object>();
if (action != null)
{
container.put("action", action);
}
else
{
... | java | public boolean addVerb(String action, Date dateStart, Date dateEnd, String[] description, String comment)
{
Map<String, Object> container = new HashMap<String, Object>();
if (action != null)
{
container.put("action", action);
}
else
{
... | [
"public",
"boolean",
"addVerb",
"(",
"String",
"action",
",",
"Date",
"dateStart",
",",
"Date",
"dateEnd",
",",
"String",
"[",
"]",
"description",
",",
"String",
"comment",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"container",
"=",
"new",
"Has... | Add a verb object to this activity
@param action The action type of the verb (required)
@param dateStart The start date of the action described
@param dateEnd The end date of the action described
@param description An array of descriptions of this action
@param comment A comment on this verb
@return True if added, fal... | [
"Add",
"a",
"verb",
"object",
"to",
"this",
"activity"
] | train | https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRActivity.java#L298-L328 |
JodaOrg/joda-beans | src/main/java/org/joda/beans/gen/BeanData.java | BeanData.getTypeGenericExtends | public String getTypeGenericExtends(int typeParamIndex, String[] typeParamNames) {
String genericClause = typeGenericExtends[typeParamIndex];
genericClause = genericClause.replace("<" + typeGenericName[typeParamIndex] + ">", "<" + typeParamNames[typeParamIndex] + ">");
for (int i = 0; i < typeGe... | java | public String getTypeGenericExtends(int typeParamIndex, String[] typeParamNames) {
String genericClause = typeGenericExtends[typeParamIndex];
genericClause = genericClause.replace("<" + typeGenericName[typeParamIndex] + ">", "<" + typeParamNames[typeParamIndex] + ">");
for (int i = 0; i < typeGe... | [
"public",
"String",
"getTypeGenericExtends",
"(",
"int",
"typeParamIndex",
",",
"String",
"[",
"]",
"typeParamNames",
")",
"{",
"String",
"genericClause",
"=",
"typeGenericExtends",
"[",
"typeParamIndex",
"]",
";",
"genericClause",
"=",
"genericClause",
".",
"replac... | Gets the extends clause of the parameterisation of the bean, such as '{@code extends Foo}'.
@param typeParamIndex the zero-based index of the type parameter
@param typeParamNames the type parameter names
@return the generic type extends clause, or a blank string if not generic or no extends, not null | [
"Gets",
"the",
"extends",
"clause",
"of",
"the",
"parameterisation",
"of",
"the",
"bean",
"such",
"as",
"{"
] | train | https://github.com/JodaOrg/joda-beans/blob/f07dbe42947150b23a173f35984c6ab33c5529bf/src/main/java/org/joda/beans/gen/BeanData.java#L913-L922 |
strator-dev/greenpepper | greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/domain/Repository.java | Repository.removeRequirement | public void removeRequirement(Requirement requirement) throws GreenPepperServerException
{
if(!requirements.contains(requirement) )
throw new GreenPepperServerException( GreenPepperServerErrorKey.REQUIREMENT_NOT_FOUND, "Requirement not found");
requirements.remove(requirement);
... | java | public void removeRequirement(Requirement requirement) throws GreenPepperServerException
{
if(!requirements.contains(requirement) )
throw new GreenPepperServerException( GreenPepperServerErrorKey.REQUIREMENT_NOT_FOUND, "Requirement not found");
requirements.remove(requirement);
... | [
"public",
"void",
"removeRequirement",
"(",
"Requirement",
"requirement",
")",
"throws",
"GreenPepperServerException",
"{",
"if",
"(",
"!",
"requirements",
".",
"contains",
"(",
"requirement",
")",
")",
"throw",
"new",
"GreenPepperServerException",
"(",
"GreenPepperSe... | <p>removeRequirement.</p>
@param requirement a {@link com.greenpepper.server.domain.Requirement} object.
@throws com.greenpepper.server.GreenPepperServerException if any. | [
"<p",
">",
"removeRequirement",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/domain/Repository.java#L363-L370 |
onelogin/onelogin-java-sdk | src/main/java/com/onelogin/sdk/conn/Client.java | Client.createEvent | public void createEvent(Map<String, Object> eventParams) throws OAuthSystemException, OAuthProblemException, URISyntaxException {
cleanError();
prepareToken();
OneloginURLConnectionClient httpClient = new OneloginURLConnectionClient();
OAuthClient oAuthClient = new OAuthClient(httpClient);
URIBuilder url = ... | java | public void createEvent(Map<String, Object> eventParams) throws OAuthSystemException, OAuthProblemException, URISyntaxException {
cleanError();
prepareToken();
OneloginURLConnectionClient httpClient = new OneloginURLConnectionClient();
OAuthClient oAuthClient = new OAuthClient(httpClient);
URIBuilder url = ... | [
"public",
"void",
"createEvent",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"eventParams",
")",
"throws",
"OAuthSystemException",
",",
"OAuthProblemException",
",",
"URISyntaxException",
"{",
"cleanError",
"(",
")",
";",
"prepareToken",
"(",
")",
";",
"Onelo... | Create an event in the OneLogin event log.
@param eventParams
Event Data (event_type_id, account_id, actor_system, actor_user_id, actor_user_name, app_id,
assuming_acting_user_id, custom_message, directory_sync_run_id, group_id, group_name, ipaddr,
otp_device_id, otp_device_name, policy_id, policy_name, role_id, role_... | [
"Create",
"an",
"event",
"in",
"the",
"OneLogin",
"event",
"log",
"."
] | train | https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L2163-L2186 |
timehop/sticky-headers-recyclerview | library/src/main/java/com/timehop/stickyheadersrecyclerview/calculation/DimensionCalculator.java | DimensionCalculator.initMargins | public void initMargins(Rect margins, View view) {
LayoutParams layoutParams = view.getLayoutParams();
if (layoutParams instanceof MarginLayoutParams) {
MarginLayoutParams marginLayoutParams = (MarginLayoutParams) layoutParams;
initMarginRect(margins, marginLayoutParams);
} else {
margi... | java | public void initMargins(Rect margins, View view) {
LayoutParams layoutParams = view.getLayoutParams();
if (layoutParams instanceof MarginLayoutParams) {
MarginLayoutParams marginLayoutParams = (MarginLayoutParams) layoutParams;
initMarginRect(margins, marginLayoutParams);
} else {
margi... | [
"public",
"void",
"initMargins",
"(",
"Rect",
"margins",
",",
"View",
"view",
")",
"{",
"LayoutParams",
"layoutParams",
"=",
"view",
".",
"getLayoutParams",
"(",
")",
";",
"if",
"(",
"layoutParams",
"instanceof",
"MarginLayoutParams",
")",
"{",
"MarginLayoutPara... | Populates {@link Rect} with margins for any view.
@param margins rect to populate
@param view for which to get margins | [
"Populates",
"{",
"@link",
"Rect",
"}",
"with",
"margins",
"for",
"any",
"view",
"."
] | train | https://github.com/timehop/sticky-headers-recyclerview/blob/f5a9e9b8f5d96734e20439b0a41381865fa52fb7/library/src/main/java/com/timehop/stickyheadersrecyclerview/calculation/DimensionCalculator.java#L21-L30 |
OpenLiberty/open-liberty | dev/com.ibm.ws.clientcontainer/src/com/ibm/ws/clientcontainer/internal/LifecycleCallbackHelper.java | LifecycleCallbackHelper.getMethodNameFromDD | public String getMethodNameFromDD(List<LifecycleCallback> callbacks, String classname) {
String methodName = null;
for (LifecycleCallback callback : callbacks) {
// lifecycle-callback-class default to the enclosing component class Client
String callbackClassName;
call... | java | public String getMethodNameFromDD(List<LifecycleCallback> callbacks, String classname) {
String methodName = null;
for (LifecycleCallback callback : callbacks) {
// lifecycle-callback-class default to the enclosing component class Client
String callbackClassName;
call... | [
"public",
"String",
"getMethodNameFromDD",
"(",
"List",
"<",
"LifecycleCallback",
">",
"callbacks",
",",
"String",
"classname",
")",
"{",
"String",
"methodName",
"=",
"null",
";",
"for",
"(",
"LifecycleCallback",
"callback",
":",
"callbacks",
")",
"{",
"// lifec... | Gets the lifecycle callback method name from the application client module deployment descriptor
@param callbacks a list of lifecycle-callback in the application client module deployment descriptor
@param classname the Class name
@return the Mehtod name | [
"Gets",
"the",
"lifecycle",
"callback",
"method",
"name",
"from",
"the",
"application",
"client",
"module",
"deployment",
"descriptor"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.clientcontainer/src/com/ibm/ws/clientcontainer/internal/LifecycleCallbackHelper.java#L220-L238 |
hageldave/ImagingKit | ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Pixel.java | Pixel.setARGB_fromDouble | public Pixel setARGB_fromDouble(double a, double r, double g, double b){
return setValue(Pixel.argb_fromNormalized(a, r, g, b));
} | java | public Pixel setARGB_fromDouble(double a, double r, double g, double b){
return setValue(Pixel.argb_fromNormalized(a, r, g, b));
} | [
"public",
"Pixel",
"setARGB_fromDouble",
"(",
"double",
"a",
",",
"double",
"r",
",",
"double",
"g",
",",
"double",
"b",
")",
"{",
"return",
"setValue",
"(",
"Pixel",
".",
"argb_fromNormalized",
"(",
"a",
",",
"r",
",",
"g",
",",
"b",
")",
")",
";",
... | Sets an ARGB value at the position currently referenced by this Pixel. <br>
Each channel value is assumed to be within [0.0 .. 1.0]. Channel values
outside these bounds will be clamped to them.
@param a normalized alpha
@param r normalized red
@param g normalized green
@param b normalized blue
@throws ArrayIndexOutOfBo... | [
"Sets",
"an",
"ARGB",
"value",
"at",
"the",
"position",
"currently",
"referenced",
"by",
"this",
"Pixel",
".",
"<br",
">",
"Each",
"channel",
"value",
"is",
"assumed",
"to",
"be",
"within",
"[",
"0",
".",
"0",
"..",
"1",
".",
"0",
"]",
".",
"Channel"... | train | https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Pixel.java#L406-L408 |
Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java | KeyVaultClientBaseImpl.createCertificate | public CertificateOperation createCertificate(String vaultBaseUrl, String certificateName, CertificatePolicy certificatePolicy, CertificateAttributes certificateAttributes, Map<String, String> tags) {
return createCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName, certificatePolicy, certificateA... | java | public CertificateOperation createCertificate(String vaultBaseUrl, String certificateName, CertificatePolicy certificatePolicy, CertificateAttributes certificateAttributes, Map<String, String> tags) {
return createCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName, certificatePolicy, certificateA... | [
"public",
"CertificateOperation",
"createCertificate",
"(",
"String",
"vaultBaseUrl",
",",
"String",
"certificateName",
",",
"CertificatePolicy",
"certificatePolicy",
",",
"CertificateAttributes",
"certificateAttributes",
",",
"Map",
"<",
"String",
",",
"String",
">",
"ta... | Creates a new certificate.
If this is the first version, the certificate resource is created. This operation requires the certificates/create permission.
@param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
@param certificateName The name of the certificate.
@param certificatePolicy The man... | [
"Creates",
"a",
"new",
"certificate",
".",
"If",
"this",
"is",
"the",
"first",
"version",
"the",
"certificate",
"resource",
"is",
"created",
".",
"This",
"operation",
"requires",
"the",
"certificates",
"/",
"create",
"permission",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L6579-L6581 |
alkacon/opencms-core | src-gwt/org/opencms/gwt/client/ui/input/form/CmsBasicFormField.java | CmsBasicFormField.createField | public static CmsBasicFormField createField(CmsXmlContentProperty propertyConfig) {
return createField(propertyConfig, Collections.<String, String> emptyMap());
} | java | public static CmsBasicFormField createField(CmsXmlContentProperty propertyConfig) {
return createField(propertyConfig, Collections.<String, String> emptyMap());
} | [
"public",
"static",
"CmsBasicFormField",
"createField",
"(",
"CmsXmlContentProperty",
"propertyConfig",
")",
"{",
"return",
"createField",
"(",
"propertyConfig",
",",
"Collections",
".",
"<",
"String",
",",
"String",
">",
"emptyMap",
"(",
")",
")",
";",
"}"
] | Utility method for creating a single basic form field from an id and a property configuration.
@param propertyConfig the configuration of the property
@return the newly created form field | [
"Utility",
"method",
"for",
"creating",
"a",
"single",
"basic",
"form",
"field",
"from",
"an",
"id",
"and",
"a",
"property",
"configuration",
"."
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/form/CmsBasicFormField.java#L112-L115 |
albfernandez/itext2 | src/main/java/com/lowagie/text/html/HtmlParser.java | HtmlParser.go | public void go(DocListener document, String file) {
try {
parser.parse(file, new SAXmyHtmlHandler(document));
}
catch(SAXException se) {
throw new ExceptionConverter(se);
}
catch(IOException ioe) {
throw new ExceptionConverter(ioe);
}
... | java | public void go(DocListener document, String file) {
try {
parser.parse(file, new SAXmyHtmlHandler(document));
}
catch(SAXException se) {
throw new ExceptionConverter(se);
}
catch(IOException ioe) {
throw new ExceptionConverter(ioe);
}
... | [
"public",
"void",
"go",
"(",
"DocListener",
"document",
",",
"String",
"file",
")",
"{",
"try",
"{",
"parser",
".",
"parse",
"(",
"file",
",",
"new",
"SAXmyHtmlHandler",
"(",
"document",
")",
")",
";",
"}",
"catch",
"(",
"SAXException",
"se",
")",
"{",... | Parses a given file.
@param document the document the parser will write to
@param file the file with the content | [
"Parses",
"a",
"given",
"file",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/html/HtmlParser.java#L112-L122 |
alkacon/opencms-core | src/org/opencms/flex/CmsFlexRequestDispatcher.java | CmsFlexRequestDispatcher.includeExternal | private void includeExternal(ServletRequest req, ServletResponse res) throws ServletException, IOException {
// This is an external include, probably to a JSP page, dispatch with system dispatcher
if (LOG.isInfoEnabled()) {
LOG.info(
Messages.get().getBundle().key(
... | java | private void includeExternal(ServletRequest req, ServletResponse res) throws ServletException, IOException {
// This is an external include, probably to a JSP page, dispatch with system dispatcher
if (LOG.isInfoEnabled()) {
LOG.info(
Messages.get().getBundle().key(
... | [
"private",
"void",
"includeExternal",
"(",
"ServletRequest",
"req",
",",
"ServletResponse",
"res",
")",
"throws",
"ServletException",
",",
"IOException",
"{",
"// This is an external include, probably to a JSP page, dispatch with system dispatcher",
"if",
"(",
"LOG",
".",
"is... | Include an external (non-OpenCms) file using the standard dispatcher.<p>
@param req the servlet request
@param res the servlet response
@throws ServletException in case something goes wrong
@throws IOException in case something goes wrong | [
"Include",
"an",
"external",
"(",
"non",
"-",
"OpenCms",
")",
"file",
"using",
"the",
"standard",
"dispatcher",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/flex/CmsFlexRequestDispatcher.java#L182-L192 |
facebookarchive/hive-dwrf | hive-dwrf-shims/src/main/java/org/apache/hadoop/hive/ql/io/slice/Slice.java | Slice.setShort | public void setShort(int index, int value)
{
checkIndexLength(index, SizeOf.SIZE_OF_SHORT);
unsafe.putShort(base, address + index, (short) (value & 0xFFFF));
} | java | public void setShort(int index, int value)
{
checkIndexLength(index, SizeOf.SIZE_OF_SHORT);
unsafe.putShort(base, address + index, (short) (value & 0xFFFF));
} | [
"public",
"void",
"setShort",
"(",
"int",
"index",
",",
"int",
"value",
")",
"{",
"checkIndexLength",
"(",
"index",
",",
"SizeOf",
".",
"SIZE_OF_SHORT",
")",
";",
"unsafe",
".",
"putShort",
"(",
"base",
",",
"address",
"+",
"index",
",",
"(",
"short",
... | Sets the specified 16-bit short integer at the specified absolute
{@code index} in this buffer. The 16 high-order bits of the specified
value are ignored.
@throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
{@code index + 2} is greater than {@code this.length()} | [
"Sets",
"the",
"specified",
"16",
"-",
"bit",
"short",
"integer",
"at",
"the",
"specified",
"absolute",
"{",
"@code",
"index",
"}",
"in",
"this",
"buffer",
".",
"The",
"16",
"high",
"-",
"order",
"bits",
"of",
"the",
"specified",
"value",
"are",
"ignored... | train | https://github.com/facebookarchive/hive-dwrf/blob/a7b4fcf28a57e006a2fc041d40cf7e5ad16e6b45/hive-dwrf-shims/src/main/java/org/apache/hadoop/hive/ql/io/slice/Slice.java#L420-L424 |
seancfoley/IPAddress | IPAddress/src/inet.ipaddr/inet/ipaddr/ipv6/IPv6AddressSection.java | IPv6AddressSection.spanWithPrefixBlocks | public IPv6AddressSection[] spanWithPrefixBlocks(IPv6AddressSection other) throws AddressPositionException {
if(other.addressSegmentIndex != addressSegmentIndex) {
throw new AddressPositionException(other, other.addressSegmentIndex, addressSegmentIndex);
}
return getSpanningPrefixBlocks(
this,
other,
... | java | public IPv6AddressSection[] spanWithPrefixBlocks(IPv6AddressSection other) throws AddressPositionException {
if(other.addressSegmentIndex != addressSegmentIndex) {
throw new AddressPositionException(other, other.addressSegmentIndex, addressSegmentIndex);
}
return getSpanningPrefixBlocks(
this,
other,
... | [
"public",
"IPv6AddressSection",
"[",
"]",
"spanWithPrefixBlocks",
"(",
"IPv6AddressSection",
"other",
")",
"throws",
"AddressPositionException",
"{",
"if",
"(",
"other",
".",
"addressSegmentIndex",
"!=",
"addressSegmentIndex",
")",
"{",
"throw",
"new",
"AddressPositionE... | Produces the list of prefix block subnets that span from this series to the given series.
@param other
@return | [
"Produces",
"the",
"list",
"of",
"prefix",
"block",
"subnets",
"that",
"span",
"from",
"this",
"series",
"to",
"the",
"given",
"series",
"."
] | train | https://github.com/seancfoley/IPAddress/blob/90493d0673511d673100c36d020dd93dd870111a/IPAddress/src/inet.ipaddr/inet/ipaddr/ipv6/IPv6AddressSection.java#L1986-L1999 |
centic9/commons-dost | src/main/java/org/dstadler/commons/http/HttpClientWrapper.java | HttpClientWrapper.simpleGet | public void simpleGet(String url, Consumer<InputStream> consumer) throws IOException {
simpleGetInternal(url, consumer, null);
} | java | public void simpleGet(String url, Consumer<InputStream> consumer) throws IOException {
simpleGetInternal(url, consumer, null);
} | [
"public",
"void",
"simpleGet",
"(",
"String",
"url",
",",
"Consumer",
"<",
"InputStream",
">",
"consumer",
")",
"throws",
"IOException",
"{",
"simpleGetInternal",
"(",
"url",
",",
"consumer",
",",
"null",
")",
";",
"}"
] | Perform a simple get-operation and passes the resulting InputStream to the given Consumer
@param url The URL to query
@param consumer A Consumer which receives the InputStream and can process the data
on-the-fly in streaming fashion without retrieving all of the data into memory
at once.
@throws IOException if the HT... | [
"Perform",
"a",
"simple",
"get",
"-",
"operation",
"and",
"passes",
"the",
"resulting",
"InputStream",
"to",
"the",
"given",
"Consumer"
] | train | https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/http/HttpClientWrapper.java#L209-L211 |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/destination/JSPtoPRealization.java | JSPtoPRealization.attachLocalPtoPLocalisation | @Override
public void attachLocalPtoPLocalisation(LocalizationPoint ptoPMessageItemStream)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(
tc,
"attachLocalPtoPLocalisation",
new Object[] {... | java | @Override
public void attachLocalPtoPLocalisation(LocalizationPoint ptoPMessageItemStream)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(
tc,
"attachLocalPtoPLocalisation",
new Object[] {... | [
"@",
"Override",
"public",
"void",
"attachLocalPtoPLocalisation",
"(",
"LocalizationPoint",
"ptoPMessageItemStream",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry... | Method attachLocalPtoPLocalisation
<p> Attach a local Localisation to this Destination's Localisations.
@param ptoPMessageItemStream is the PtoPMessageItemStream to add.
@param localisationIsRemote should be true if the PtoPMessageItemStream is remote.
@param transaction is the Transaction to add it under. | [
"Method",
"attachLocalPtoPLocalisation"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/destination/JSPtoPRealization.java#L1324-L1356 |
Stratio/stratio-cassandra | src/java/org/apache/cassandra/db/SystemKeyspace.java | SystemKeyspace.checkHealth | public static void checkHealth() throws ConfigurationException
{
Keyspace keyspace;
try
{
keyspace = Keyspace.open(Keyspace.SYSTEM_KS);
}
catch (AssertionError err)
{
// this happens when a user switches from OPP to RP.
Configuratio... | java | public static void checkHealth() throws ConfigurationException
{
Keyspace keyspace;
try
{
keyspace = Keyspace.open(Keyspace.SYSTEM_KS);
}
catch (AssertionError err)
{
// this happens when a user switches from OPP to RP.
Configuratio... | [
"public",
"static",
"void",
"checkHealth",
"(",
")",
"throws",
"ConfigurationException",
"{",
"Keyspace",
"keyspace",
";",
"try",
"{",
"keyspace",
"=",
"Keyspace",
".",
"open",
"(",
"Keyspace",
".",
"SYSTEM_KS",
")",
";",
"}",
"catch",
"(",
"AssertionError",
... | One of three things will happen if you try to read the system keyspace:
1. files are present and you can read them: great
2. no files are there: great (new node is assumed)
3. files are present but you can't read them: bad
@throws ConfigurationException | [
"One",
"of",
"three",
"things",
"will",
"happen",
"if",
"you",
"try",
"to",
"read",
"the",
"system",
"keyspace",
":",
"1",
".",
"files",
"are",
"present",
"and",
"you",
"can",
"read",
"them",
":",
"great",
"2",
".",
"no",
"files",
"are",
"there",
":"... | train | https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/SystemKeyspace.java#L555-L589 |
cdk/cdk | tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java | GeometricTetrahedralEncoderFactory.makeElevationMap | private static void makeElevationMap(IAtom atom, List<IBond> bonds, Map<IAtom, Integer> map) {
map.clear();
for (IBond bond : bonds) {
int elevation = 0;
switch (bond.getStereo()) {
case UP:
case DOWN_INVERTED:
elevation = +1;
... | java | private static void makeElevationMap(IAtom atom, List<IBond> bonds, Map<IAtom, Integer> map) {
map.clear();
for (IBond bond : bonds) {
int elevation = 0;
switch (bond.getStereo()) {
case UP:
case DOWN_INVERTED:
elevation = +1;
... | [
"private",
"static",
"void",
"makeElevationMap",
"(",
"IAtom",
"atom",
",",
"List",
"<",
"IBond",
">",
"bonds",
",",
"Map",
"<",
"IAtom",
",",
"Integer",
">",
"map",
")",
"{",
"map",
".",
"clear",
"(",
")",
";",
"for",
"(",
"IBond",
"bond",
":",
"b... | Maps the input bonds to a map of Atom->Elevation where the elevation is
whether the bond is off the plane with respect to the central atom.
@param atom central atom
@param bonds bonds connected to the central atom
@param map map to load with elevation values (can be reused) | [
"Maps",
"the",
"input",
"bonds",
"to",
"a",
"map",
"of",
"Atom",
"-",
">",
"Elevation",
"where",
"the",
"elevation",
"is",
"whether",
"the",
"bond",
"is",
"off",
"the",
"plane",
"with",
"respect",
"to",
"the",
"central",
"atom",
"."
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricTetrahedralEncoderFactory.java#L258-L282 |
classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.addFieldInfo | void addFieldInfo(final FieldInfoList fieldInfoList, final Map<String, ClassInfo> classNameToClassInfo) {
for (final FieldInfo fi : fieldInfoList) {
// Index field annotations
addFieldOrMethodAnnotationInfo(fi.annotationInfo, /* isField = */ true, classNameToClassInfo);
}
... | java | void addFieldInfo(final FieldInfoList fieldInfoList, final Map<String, ClassInfo> classNameToClassInfo) {
for (final FieldInfo fi : fieldInfoList) {
// Index field annotations
addFieldOrMethodAnnotationInfo(fi.annotationInfo, /* isField = */ true, classNameToClassInfo);
}
... | [
"void",
"addFieldInfo",
"(",
"final",
"FieldInfoList",
"fieldInfoList",
",",
"final",
"Map",
"<",
"String",
",",
"ClassInfo",
">",
"classNameToClassInfo",
")",
"{",
"for",
"(",
"final",
"FieldInfo",
"fi",
":",
"fieldInfoList",
")",
"{",
"// Index field annotations... | Add field info.
@param fieldInfoList
the field info list
@param classNameToClassInfo
the map from class name to class info | [
"Add",
"field",
"info",
"."
] | train | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L484-L494 |
line/centraldogma | client/java-armeria/src/main/java/com/linecorp/centraldogma/client/armeria/ArmeriaCentralDogma.java | ArmeriaCentralDogma.toJson | private static JsonNode toJson(AggregatedHttpMessage res, @Nullable JsonNodeType expectedNodeType) {
final String content = toString(res);
final JsonNode node;
try {
node = Jackson.readTree(content);
} catch (JsonParseException e) {
throw new CentralDogmaException... | java | private static JsonNode toJson(AggregatedHttpMessage res, @Nullable JsonNodeType expectedNodeType) {
final String content = toString(res);
final JsonNode node;
try {
node = Jackson.readTree(content);
} catch (JsonParseException e) {
throw new CentralDogmaException... | [
"private",
"static",
"JsonNode",
"toJson",
"(",
"AggregatedHttpMessage",
"res",
",",
"@",
"Nullable",
"JsonNodeType",
"expectedNodeType",
")",
"{",
"final",
"String",
"content",
"=",
"toString",
"(",
"res",
")",
";",
"final",
"JsonNode",
"node",
";",
"try",
"{... | Parses the content of the specified {@link AggregatedHttpMessage} into a {@link JsonNode}. | [
"Parses",
"the",
"content",
"of",
"the",
"specified",
"{"
] | train | https://github.com/line/centraldogma/blob/b9e46c67fbc26628c2186ce2f46e7fb303c831e9/client/java-armeria/src/main/java/com/linecorp/centraldogma/client/armeria/ArmeriaCentralDogma.java#L962-L977 |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/pipeline/LabeledChunkIdentifier.java | LabeledChunkIdentifier.isStartOfChunk | public static boolean isStartOfChunk(LabelTagType prev, LabelTagType cur)
{
if (prev == null) {
return isStartOfChunk("O", "O", cur.tag, cur.type);
} else {
return isStartOfChunk(prev.tag, prev.type, cur.tag, cur.type);
}
} | java | public static boolean isStartOfChunk(LabelTagType prev, LabelTagType cur)
{
if (prev == null) {
return isStartOfChunk("O", "O", cur.tag, cur.type);
} else {
return isStartOfChunk(prev.tag, prev.type, cur.tag, cur.type);
}
} | [
"public",
"static",
"boolean",
"isStartOfChunk",
"(",
"LabelTagType",
"prev",
",",
"LabelTagType",
"cur",
")",
"{",
"if",
"(",
"prev",
"==",
"null",
")",
"{",
"return",
"isStartOfChunk",
"(",
"\"O\"",
",",
"\"O\"",
",",
"cur",
".",
"tag",
",",
"cur",
"."... | Returns whether a chunk started between the previous and current token
@param prev - the label/tag/type of the previous token
@param cur - the label/tag/type of the current token
@return true if the current token was the first token of a chunk | [
"Returns",
"whether",
"a",
"chunk",
"started",
"between",
"the",
"previous",
"and",
"current",
"token"
] | train | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/pipeline/LabeledChunkIdentifier.java#L196-L203 |
Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java | JDBCRepositoryBuilder.getDataSource | public DataSource getDataSource() throws ConfigurationException {
if (mDataSource == null) {
if (mDriverClassName != null && mURL != null) {
try {
mDataSource = new SimpleDataSource
(mDriverClassName, mURL, mUsername, mPassword);
... | java | public DataSource getDataSource() throws ConfigurationException {
if (mDataSource == null) {
if (mDriverClassName != null && mURL != null) {
try {
mDataSource = new SimpleDataSource
(mDriverClassName, mURL, mUsername, mPassword);
... | [
"public",
"DataSource",
"getDataSource",
"(",
")",
"throws",
"ConfigurationException",
"{",
"if",
"(",
"mDataSource",
"==",
"null",
")",
"{",
"if",
"(",
"mDriverClassName",
"!=",
"null",
"&&",
"mURL",
"!=",
"null",
")",
"{",
"try",
"{",
"mDataSource",
"=",
... | Returns the source of JDBC connections, which defaults to a non-pooling
source if driver class, driver URL, username, and password are all
supplied.
@throws ConfigurationException if driver class wasn't found | [
"Returns",
"the",
"source",
"of",
"JDBC",
"connections",
"which",
"defaults",
"to",
"a",
"non",
"-",
"pooling",
"source",
"if",
"driver",
"class",
"driver",
"URL",
"username",
"and",
"password",
"are",
"all",
"supplied",
"."
] | train | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java#L149-L171 |
facebook/fresco | samples/scrollperf/src/main/java/com/facebook/samples/scrollperf/util/UI.java | UI.findViewById | public static <T extends View> T findViewById(Activity act, int viewId) {
View containerView = act.getWindow().getDecorView();
return findViewById(containerView, viewId);
} | java | public static <T extends View> T findViewById(Activity act, int viewId) {
View containerView = act.getWindow().getDecorView();
return findViewById(containerView, viewId);
} | [
"public",
"static",
"<",
"T",
"extends",
"View",
">",
"T",
"findViewById",
"(",
"Activity",
"act",
",",
"int",
"viewId",
")",
"{",
"View",
"containerView",
"=",
"act",
".",
"getWindow",
"(",
")",
".",
"getDecorView",
"(",
")",
";",
"return",
"findViewByI... | This method returns the reference of the View with the given Id in the layout of the
Activity passed as parameter
@param act The Activity that is using the layout with the given View
@param viewId The id of the View we want to get a reference
@return The View with the given id and type | [
"This",
"method",
"returns",
"the",
"reference",
"of",
"the",
"View",
"with",
"the",
"given",
"Id",
"in",
"the",
"layout",
"of",
"the",
"Activity",
"passed",
"as",
"parameter"
] | train | https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/samples/scrollperf/src/main/java/com/facebook/samples/scrollperf/util/UI.java#L30-L33 |
calrissian/mango | mango-core/src/main/java/org/calrissian/mango/collect/FluentCloseableIterable.java | FluentCloseableIterable.filter | public final <E> FluentCloseableIterable<E> filter(Class<E> type) {
return from(CloseableIterables.filter(this, type));
} | java | public final <E> FluentCloseableIterable<E> filter(Class<E> type) {
return from(CloseableIterables.filter(this, type));
} | [
"public",
"final",
"<",
"E",
">",
"FluentCloseableIterable",
"<",
"E",
">",
"filter",
"(",
"Class",
"<",
"E",
">",
"type",
")",
"{",
"return",
"from",
"(",
"CloseableIterables",
".",
"filter",
"(",
"this",
",",
"type",
")",
")",
";",
"}"
] | Returns the elements from this fluent iterable that are instances of class {@code type}. | [
"Returns",
"the",
"elements",
"from",
"this",
"fluent",
"iterable",
"that",
"are",
"instances",
"of",
"class",
"{"
] | train | https://github.com/calrissian/mango/blob/a95aa5e77af9aa0e629787228d80806560023452/mango-core/src/main/java/org/calrissian/mango/collect/FluentCloseableIterable.java#L150-L152 |
apiman/apiman | gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/URLRewritingPolicy.java | URLRewritingPolicy.doHeaderReplaceAll | private String doHeaderReplaceAll(String headerValue, String fromRegex, String toReplacement) {
return headerValue.replaceAll(fromRegex, toReplacement);
} | java | private String doHeaderReplaceAll(String headerValue, String fromRegex, String toReplacement) {
return headerValue.replaceAll(fromRegex, toReplacement);
} | [
"private",
"String",
"doHeaderReplaceAll",
"(",
"String",
"headerValue",
",",
"String",
"fromRegex",
",",
"String",
"toReplacement",
")",
"{",
"return",
"headerValue",
".",
"replaceAll",
"(",
"fromRegex",
",",
"toReplacement",
")",
";",
"}"
] | Finds all matching instances of the regular expression and replaces them with
the replacement value.
@param headerValue
@param fromRegex
@param toReplacement | [
"Finds",
"all",
"matching",
"instances",
"of",
"the",
"regular",
"expression",
"and",
"replaces",
"them",
"with",
"the",
"replacement",
"value",
"."
] | train | https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/URLRewritingPolicy.java#L109-L111 |
EdwardRaff/JSAT | JSAT/src/jsat/linear/Matrix.java | Matrix.sameDimensions | public static boolean sameDimensions(Matrix A, Matrix B)
{
return A.rows() == B.rows() && A.cols() == B.cols();
} | java | public static boolean sameDimensions(Matrix A, Matrix B)
{
return A.rows() == B.rows() && A.cols() == B.cols();
} | [
"public",
"static",
"boolean",
"sameDimensions",
"(",
"Matrix",
"A",
",",
"Matrix",
"B",
")",
"{",
"return",
"A",
".",
"rows",
"(",
")",
"==",
"B",
".",
"rows",
"(",
")",
"&&",
"A",
".",
"cols",
"(",
")",
"==",
"B",
".",
"cols",
"(",
")",
";",
... | Convenience method that will return {@code true} only if the two input
matrices have the exact same dimensions.
@param A the first matrix
@param B the second matrix
@return {@code true} if they have the exact same dimensions,
{@code false} otherwise. | [
"Convenience",
"method",
"that",
"will",
"return",
"{"
] | train | https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/linear/Matrix.java#L777-L780 |
b3log/latke | latke-core/src/main/java/org/b3log/latke/ioc/Bean.java | Bean.resolveDependencies | private void resolveDependencies(final Object reference) {
final Class<?> superclass = reference.getClass().getSuperclass().getSuperclass(); // Proxy -> Orig -> Super
resolveSuperclassFieldDependencies(reference, superclass);
resolveCurrentclassFieldDependencies(reference);
} | java | private void resolveDependencies(final Object reference) {
final Class<?> superclass = reference.getClass().getSuperclass().getSuperclass(); // Proxy -> Orig -> Super
resolveSuperclassFieldDependencies(reference, superclass);
resolveCurrentclassFieldDependencies(reference);
} | [
"private",
"void",
"resolveDependencies",
"(",
"final",
"Object",
"reference",
")",
"{",
"final",
"Class",
"<",
"?",
">",
"superclass",
"=",
"reference",
".",
"getClass",
"(",
")",
".",
"getSuperclass",
"(",
")",
".",
"getSuperclass",
"(",
")",
";",
"// Pr... | Resolves dependencies for the specified reference.
@param reference the specified reference | [
"Resolves",
"dependencies",
"for",
"the",
"specified",
"reference",
"."
] | train | https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/b3log/latke/ioc/Bean.java#L136-L141 |
apereo/cas | core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/configurer/AbstractCasWebflowConfigurer.java | AbstractCasWebflowConfigurer.createMappingToSubflowState | public DefaultMapping createMappingToSubflowState(final String name, final String value, final boolean required, final Class type) {
val parser = this.flowBuilderServices.getExpressionParser();
val source = parser.parseExpression(value, new FluentParserContext());
val target = parser.parseExpres... | java | public DefaultMapping createMappingToSubflowState(final String name, final String value, final boolean required, final Class type) {
val parser = this.flowBuilderServices.getExpressionParser();
val source = parser.parseExpression(value, new FluentParserContext());
val target = parser.parseExpres... | [
"public",
"DefaultMapping",
"createMappingToSubflowState",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"value",
",",
"final",
"boolean",
"required",
",",
"final",
"Class",
"type",
")",
"{",
"val",
"parser",
"=",
"this",
".",
"flowBuilderServices",
".... | Create mapping to subflow state.
@param name the name
@param value the value
@param required the required
@param type the type
@return the default mapping | [
"Create",
"mapping",
"to",
"subflow",
"state",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/configurer/AbstractCasWebflowConfigurer.java#L517-L526 |
aws/aws-sdk-java | aws-java-sdk-cognitosync/src/main/java/com/amazonaws/services/cognitosync/model/GetCognitoEventsResult.java | GetCognitoEventsResult.withEvents | public GetCognitoEventsResult withEvents(java.util.Map<String, String> events) {
setEvents(events);
return this;
} | java | public GetCognitoEventsResult withEvents(java.util.Map<String, String> events) {
setEvents(events);
return this;
} | [
"public",
"GetCognitoEventsResult",
"withEvents",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"events",
")",
"{",
"setEvents",
"(",
"events",
")",
";",
"return",
"this",
";",
"}"
] | <p>
The Cognito Events returned from the GetCognitoEvents request
</p>
@param events
The Cognito Events returned from the GetCognitoEvents request
@return Returns a reference to this object so that method calls can be chained together. | [
"<p",
">",
"The",
"Cognito",
"Events",
"returned",
"from",
"the",
"GetCognitoEvents",
"request",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cognitosync/src/main/java/com/amazonaws/services/cognitosync/model/GetCognitoEventsResult.java#L74-L77 |
OpenLiberty/open-liberty | dev/com.ibm.ws.management.security/src/com/ibm/ws/management/security/internal/AbstractManagementRole.java | AbstractManagementRole.updateBindings | private void updateBindings(Map<String, Object> props) {
// Process the user element
processProps(props, CFG_KEY_USER, users);
// Process the user-access-id element
processProps(props, CFG_KEY_USER_ACCESSID, users);
// Process the group element
processProps(props, CFG_KE... | java | private void updateBindings(Map<String, Object> props) {
// Process the user element
processProps(props, CFG_KEY_USER, users);
// Process the user-access-id element
processProps(props, CFG_KEY_USER_ACCESSID, users);
// Process the group element
processProps(props, CFG_KE... | [
"private",
"void",
"updateBindings",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"props",
")",
"{",
"// Process the user element",
"processProps",
"(",
"props",
",",
"CFG_KEY_USER",
",",
"users",
")",
";",
"// Process the user-access-id element",
"processProps",
... | Update the binding sets based on the properties from the configuration.
@param props | [
"Update",
"the",
"binding",
"sets",
"based",
"on",
"the",
"properties",
"from",
"the",
"configuration",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.management.security/src/com/ibm/ws/management/security/internal/AbstractManagementRole.java#L66-L76 |
k3po/k3po | driver/src/main/java/org/kaazing/k3po/driver/internal/netty/bootstrap/udp/UdpBootstrapFactorySpi.java | UdpBootstrapFactorySpi.newServerBootstrap | @Override
public synchronized ServerBootstrap newServerBootstrap() throws Exception {
if (serverChannelFactory == null) {
Executor workerExecutor = executorServiceFactory.newExecutorService("worker.server");
NioDatagramWorkerPool workerPool = new NioDatagramWorkerPool(workerExecutor,... | java | @Override
public synchronized ServerBootstrap newServerBootstrap() throws Exception {
if (serverChannelFactory == null) {
Executor workerExecutor = executorServiceFactory.newExecutorService("worker.server");
NioDatagramWorkerPool workerPool = new NioDatagramWorkerPool(workerExecutor,... | [
"@",
"Override",
"public",
"synchronized",
"ServerBootstrap",
"newServerBootstrap",
"(",
")",
"throws",
"Exception",
"{",
"if",
"(",
"serverChannelFactory",
"==",
"null",
")",
"{",
"Executor",
"workerExecutor",
"=",
"executorServiceFactory",
".",
"newExecutorService",
... | Returns a {@link ServerBootstrap} instance for the named transport. | [
"Returns",
"a",
"{"
] | train | https://github.com/k3po/k3po/blob/3ca4fd31ab4a397893aa640c62ada0e485c8bbd4/driver/src/main/java/org/kaazing/k3po/driver/internal/netty/bootstrap/udp/UdpBootstrapFactorySpi.java#L107-L119 |
buschmais/jqa-core-framework | rule/src/main/java/com/buschmais/jqassistant/core/rule/impl/reader/AsciidocRuleParserPlugin.java | AsciidocRuleParserPlugin.parseProperties | private Properties parseProperties(AbstractBlock part, String attributeName) {
Properties properties = new Properties();
Object attribute = part.getAttributes().get(attributeName);
if (attribute == null) {
return properties;
}
Scanner propertiesScanner = new Scanner(a... | java | private Properties parseProperties(AbstractBlock part, String attributeName) {
Properties properties = new Properties();
Object attribute = part.getAttributes().get(attributeName);
if (attribute == null) {
return properties;
}
Scanner propertiesScanner = new Scanner(a... | [
"private",
"Properties",
"parseProperties",
"(",
"AbstractBlock",
"part",
",",
"String",
"attributeName",
")",
"{",
"Properties",
"properties",
"=",
"new",
"Properties",
"(",
")",
";",
"Object",
"attribute",
"=",
"part",
".",
"getAttributes",
"(",
")",
".",
"g... | Parse properties from an attribute.
@param part
The content part containing the attribute.
@param attributeName
The attribute name.
@return The properties. | [
"Parse",
"properties",
"from",
"an",
"attribute",
"."
] | train | https://github.com/buschmais/jqa-core-framework/blob/0e63ff509cfe52f9063539a23d5f9f183b2ea4a5/rule/src/main/java/com/buschmais/jqassistant/core/rule/impl/reader/AsciidocRuleParserPlugin.java#L376-L395 |
moparisthebest/beehive | beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/scoping/ScopedServletUtils.java | ScopedServletUtils.getScopedSessionAttr | public static Object getScopedSessionAttr( String attrName, HttpServletRequest request )
{
HttpSession session = request.getSession( false );
if ( session != null )
{
return session.getAttribute( getScopedSessionAttrName( attrName, request ) );
}
else
... | java | public static Object getScopedSessionAttr( String attrName, HttpServletRequest request )
{
HttpSession session = request.getSession( false );
if ( session != null )
{
return session.getAttribute( getScopedSessionAttrName( attrName, request ) );
}
else
... | [
"public",
"static",
"Object",
"getScopedSessionAttr",
"(",
"String",
"attrName",
",",
"HttpServletRequest",
"request",
")",
"{",
"HttpSession",
"session",
"=",
"request",
".",
"getSession",
"(",
"false",
")",
";",
"if",
"(",
"session",
"!=",
"null",
")",
"{",
... | If the request is a ScopedRequest, this returns an attribute whose name is scoped to that request's scope-ID;
otherwise, it is a straight passthrough to {@link HttpSession#getAttribute}.
@exclude | [
"If",
"the",
"request",
"is",
"a",
"ScopedRequest",
"this",
"returns",
"an",
"attribute",
"whose",
"name",
"is",
"scoped",
"to",
"that",
"request",
"s",
"scope",
"-",
"ID",
";",
"otherwise",
"it",
"is",
"a",
"straight",
"passthrough",
"to",
"{",
"@link",
... | train | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/scoping/ScopedServletUtils.java#L310-L322 |
fcrepo4-labs/fcrepo4-client | fcrepo-client-impl/src/main/java/org/fcrepo/client/utils/HttpHelper.java | HttpHelper.createPatchMethod | public HttpPatch createPatchMethod(final String path, final String sparqlUpdate) throws FedoraException {
if ( isBlank(sparqlUpdate) ) {
throw new FedoraException("SPARQL Update command must not be blank");
}
final HttpPatch patch = new HttpPatch(repositoryURL + path);
patch... | java | public HttpPatch createPatchMethod(final String path, final String sparqlUpdate) throws FedoraException {
if ( isBlank(sparqlUpdate) ) {
throw new FedoraException("SPARQL Update command must not be blank");
}
final HttpPatch patch = new HttpPatch(repositoryURL + path);
patch... | [
"public",
"HttpPatch",
"createPatchMethod",
"(",
"final",
"String",
"path",
",",
"final",
"String",
"sparqlUpdate",
")",
"throws",
"FedoraException",
"{",
"if",
"(",
"isBlank",
"(",
"sparqlUpdate",
")",
")",
"{",
"throw",
"new",
"FedoraException",
"(",
"\"SPARQL... | Create a request to update triples with SPARQL Update.
@param path The datastream path.
@param sparqlUpdate SPARQL Update command.
@return created patch based on parameters
@throws FedoraException | [
"Create",
"a",
"request",
"to",
"update",
"triples",
"with",
"SPARQL",
"Update",
"."
] | train | https://github.com/fcrepo4-labs/fcrepo4-client/blob/21eaf27200c5b2542095f6ebb9dd8ec865b95bbd/fcrepo-client-impl/src/main/java/org/fcrepo/client/utils/HttpHelper.java#L244-L253 |
sagiegurari/fax4j | src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java | ApacheHTTPClient.appendBaseURL | protected void appendBaseURL(StringBuilder buffer,String resource,HTTPClientConfiguration configuration)
{
buffer.append("http");
if(configuration.isSSL())
{
buffer.append("s");
}
buffer.append("://");
buffer.append(configuration.getHostName());
in... | java | protected void appendBaseURL(StringBuilder buffer,String resource,HTTPClientConfiguration configuration)
{
buffer.append("http");
if(configuration.isSSL())
{
buffer.append("s");
}
buffer.append("://");
buffer.append(configuration.getHostName());
in... | [
"protected",
"void",
"appendBaseURL",
"(",
"StringBuilder",
"buffer",
",",
"String",
"resource",
",",
"HTTPClientConfiguration",
"configuration",
")",
"{",
"buffer",
".",
"append",
"(",
"\"http\"",
")",
";",
"if",
"(",
"configuration",
".",
"isSSL",
"(",
")",
... | This function appends the base URL (protocol, host, port and resource) to the
provided buffer.
@param buffer
The buffer to update
@param resource
The HTTP resource
@param configuration
The HTTP configuration | [
"This",
"function",
"appends",
"the",
"base",
"URL",
"(",
"protocol",
"host",
"port",
"and",
"resource",
")",
"to",
"the",
"provided",
"buffer",
"."
] | train | https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java#L130-L153 |
stratosphere/stratosphere | stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGroupVertex.java | ManagementGroupVertex.insertBackwardEdge | void insertBackwardEdge(final ManagementGroupEdge edge, final int index) {
while (index >= this.backwardEdges.size()) {
this.backwardEdges.add(null);
}
this.backwardEdges.set(index, edge);
} | java | void insertBackwardEdge(final ManagementGroupEdge edge, final int index) {
while (index >= this.backwardEdges.size()) {
this.backwardEdges.add(null);
}
this.backwardEdges.set(index, edge);
} | [
"void",
"insertBackwardEdge",
"(",
"final",
"ManagementGroupEdge",
"edge",
",",
"final",
"int",
"index",
")",
"{",
"while",
"(",
"index",
">=",
"this",
".",
"backwardEdges",
".",
"size",
"(",
")",
")",
"{",
"this",
".",
"backwardEdges",
".",
"add",
"(",
... | Inserts a new edge arriving at this group vertex at the given index.
@param edge
the edge to be added
@param index
the index at which the edge shall be added | [
"Inserts",
"a",
"new",
"edge",
"arriving",
"at",
"this",
"group",
"vertex",
"at",
"the",
"given",
"index",
"."
] | train | https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGroupVertex.java#L144-L151 |
aws/aws-sdk-java | aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/DefinitionInformation.java | DefinitionInformation.withTags | public DefinitionInformation withTags(java.util.Map<String, String> tags) {
setTags(tags);
return this;
} | java | public DefinitionInformation withTags(java.util.Map<String, String> tags) {
setTags(tags);
return this;
} | [
"public",
"DefinitionInformation",
"withTags",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"tags",
")",
"{",
"setTags",
"(",
"tags",
")",
";",
"return",
"this",
";",
"}"
] | The tags for the definition.
@param tags
The tags for the definition.
@return Returns a reference to this object so that method calls can be chained together. | [
"The",
"tags",
"for",
"the",
"definition",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/DefinitionInformation.java#L313-L316 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.