repository_name stringlengths 7 58 | func_path_in_repository stringlengths 18 188 | func_name stringlengths 7 127 | whole_func_string stringlengths 77 3.91k | language stringclasses 1
value | func_code_string stringlengths 77 3.91k | func_code_tokens listlengths 20 745 | func_documentation_string stringlengths 61 1.98k | func_documentation_tokens listlengths 1 477 | split_name stringclasses 1
value | func_code_url stringlengths 111 288 |
|---|---|---|---|---|---|---|---|---|---|---|
jbundle/jbundle | base/screen/model/src/main/java/org/jbundle/base/screen/model/SButtonBox.java | SButtonBox.setSFieldValue | public int setSFieldValue(String strParamValue, boolean bDisplayOption, int iMoveMode)
{
String strButtonDesc = this.getButtonDesc();
String strButtonCommand = this.getButtonCommand();
if (strButtonCommand != null)
if (strButtonDesc != null)
if (strButtonDesc.equa... | java | public int setSFieldValue(String strParamValue, boolean bDisplayOption, int iMoveMode)
{
String strButtonDesc = this.getButtonDesc();
String strButtonCommand = this.getButtonCommand();
if (strButtonCommand != null)
if (strButtonDesc != null)
if (strButtonDesc.equa... | [
"public",
"int",
"setSFieldValue",
"(",
"String",
"strParamValue",
",",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"{",
"String",
"strButtonDesc",
"=",
"this",
".",
"getButtonDesc",
"(",
")",
";",
"String",
"strButtonCommand",
"=",
"this",
".",
... | Set this control's converter to this HTML param.
ie., Check to see if this button was pressed. | [
"Set",
"this",
"control",
"s",
"converter",
"to",
"this",
"HTML",
"param",
".",
"ie",
".",
"Check",
"to",
"see",
"if",
"this",
"button",
"was",
"pressed",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/SButtonBox.java#L177-L190 |
Azure/azure-sdk-for-java | compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java | VirtualMachineScaleSetsInner.beginDeallocateAsync | public Observable<OperationStatusResponseInner> beginDeallocateAsync(String resourceGroupName, String vmScaleSetName) {
return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() {
@Ov... | java | public Observable<OperationStatusResponseInner> beginDeallocateAsync(String resourceGroupName, String vmScaleSetName) {
return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() {
@Ov... | [
"public",
"Observable",
"<",
"OperationStatusResponseInner",
">",
"beginDeallocateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"vmScaleSetName",
")",
"{",
"return",
"beginDeallocateWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"vmScaleSetName",
")",
... | Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates.
@param resourceGroupName The name of the resource group.
@param vmScaleSetName The name of the VM sc... | [
"Deallocates",
"specific",
"virtual",
"machines",
"in",
"a",
"VM",
"scale",
"set",
".",
"Shuts",
"down",
"the",
"virtual",
"machines",
"and",
"releases",
"the",
"compute",
"resources",
".",
"You",
"are",
"not",
"billed",
"for",
"the",
"compute",
"resources",
... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L965-L972 |
VoltDB/voltdb | third_party/java/src/org/HdrHistogram_voltpatches/DoubleHistogram.java | DoubleHistogram.getCountBetweenValues | public double getCountBetweenValues(final double lowValue, final double highValue)
throws ArrayIndexOutOfBoundsException {
return integerValuesHistogram.getCountBetweenValues(
(long)(lowValue * doubleToIntegerValueConversionRatio),
(long)(highValue * doubleToIntegerVa... | java | public double getCountBetweenValues(final double lowValue, final double highValue)
throws ArrayIndexOutOfBoundsException {
return integerValuesHistogram.getCountBetweenValues(
(long)(lowValue * doubleToIntegerValueConversionRatio),
(long)(highValue * doubleToIntegerVa... | [
"public",
"double",
"getCountBetweenValues",
"(",
"final",
"double",
"lowValue",
",",
"final",
"double",
"highValue",
")",
"throws",
"ArrayIndexOutOfBoundsException",
"{",
"return",
"integerValuesHistogram",
".",
"getCountBetweenValues",
"(",
"(",
"long",
")",
"(",
"l... | Get the count of recorded values within a range of value levels (inclusive to within the histogram's resolution).
@param lowValue The lower value bound on the range for which
to provide the recorded count. Will be rounded down with
{@link DoubleHistogram#lowestEquivalentValue lowestEquivalentValue}.
@param highValue ... | [
"Get",
"the",
"count",
"of",
"recorded",
"values",
"within",
"a",
"range",
"of",
"value",
"levels",
"(",
"inclusive",
"to",
"within",
"the",
"histogram",
"s",
"resolution",
")",
"."
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/HdrHistogram_voltpatches/DoubleHistogram.java#L1078-L1084 |
google/j2objc | jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java | BigDecimal.multiplyAndRound | private static BigDecimal multiplyAndRound(long x, long y, int scale, MathContext mc) {
long product = multiply(x, y);
if(product!=INFLATED) {
return doRound(product, scale, mc);
}
// attempt to do it in 128 bits
int rsign = 1;
if(x < 0) {
x = -x;
... | java | private static BigDecimal multiplyAndRound(long x, long y, int scale, MathContext mc) {
long product = multiply(x, y);
if(product!=INFLATED) {
return doRound(product, scale, mc);
}
// attempt to do it in 128 bits
int rsign = 1;
if(x < 0) {
x = -x;
... | [
"private",
"static",
"BigDecimal",
"multiplyAndRound",
"(",
"long",
"x",
",",
"long",
"y",
",",
"int",
"scale",
",",
"MathContext",
"mc",
")",
"{",
"long",
"product",
"=",
"multiply",
"(",
"x",
",",
"y",
")",
";",
"if",
"(",
"product",
"!=",
"INFLATED"... | Multiplies two long values and rounds according {@code MathContext} | [
"Multiplies",
"two",
"long",
"values",
"and",
"rounds",
"according",
"{"
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java#L5024-L5066 |
moparisthebest/beehive | beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/internal/PageFlowTagUtils.java | PageFlowTagUtils.rewriteActionURL | public static String rewriteActionURL(PageContext pageContext, String action, Map params, String location)
throws URISyntaxException
{
ServletContext servletContext = pageContext.getServletContext();
HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
Http... | java | public static String rewriteActionURL(PageContext pageContext, String action, Map params, String location)
throws URISyntaxException
{
ServletContext servletContext = pageContext.getServletContext();
HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
Http... | [
"public",
"static",
"String",
"rewriteActionURL",
"(",
"PageContext",
"pageContext",
",",
"String",
"action",
",",
"Map",
"params",
",",
"String",
"location",
")",
"throws",
"URISyntaxException",
"{",
"ServletContext",
"servletContext",
"=",
"pageContext",
".",
"get... | Create a fully-rewritten url from an initial action url with query parameters
and an anchor (location on page), checking if it needs to be secure then call
the rewriter service using a type of {@link org.apache.beehive.netui.core.urls.URLType#ACTION}.
@param pageContext the current PageContext.
@param action the a... | [
"Create",
"a",
"fully",
"-",
"rewritten",
"url",
"from",
"an",
"initial",
"action",
"url",
"with",
"query",
"parameters",
"and",
"an",
"anchor",
"(",
"location",
"on",
"page",
")",
"checking",
"if",
"it",
"needs",
"to",
"be",
"secure",
"then",
"call",
"t... | train | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/internal/PageFlowTagUtils.java#L60-L69 |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/recurrent/KerasSimpleRnn.java | KerasSimpleRnn.setWeights | @Override
public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException {
this.weights = new HashMap<>();
INDArray W;
if (weights.containsKey(conf.getKERAS_PARAM_NAME_W()))
W = weights.get(conf.getKERAS_PARAM_NAME_W());
else
... | java | @Override
public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException {
this.weights = new HashMap<>();
INDArray W;
if (weights.containsKey(conf.getKERAS_PARAM_NAME_W()))
W = weights.get(conf.getKERAS_PARAM_NAME_W());
else
... | [
"@",
"Override",
"public",
"void",
"setWeights",
"(",
"Map",
"<",
"String",
",",
"INDArray",
">",
"weights",
")",
"throws",
"InvalidKerasConfigurationException",
"{",
"this",
".",
"weights",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"INDArray",
"W",
";",
... | Set weights for layer.
@param weights Simple RNN weights
@throws InvalidKerasConfigurationException Invalid Keras configuration exception | [
"Set",
"weights",
"for",
"layer",
"."
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/recurrent/KerasSimpleRnn.java#L249-L290 |
Swagger2Markup/swagger2markup | src/main/java/io/github/swagger2markup/spi/SecurityDocumentExtension.java | SecurityDocumentExtension.levelOffset | protected int levelOffset(Context context) {
//TODO: Unused method, make sure this is never used and then remove it.
int levelOffset;
switch (context.position) {
case DOCUMENT_BEFORE:
case DOCUMENT_AFTER:
levelOffset = 0;
break;
... | java | protected int levelOffset(Context context) {
//TODO: Unused method, make sure this is never used and then remove it.
int levelOffset;
switch (context.position) {
case DOCUMENT_BEFORE:
case DOCUMENT_AFTER:
levelOffset = 0;
break;
... | [
"protected",
"int",
"levelOffset",
"(",
"Context",
"context",
")",
"{",
"//TODO: Unused method, make sure this is never used and then remove it.",
"int",
"levelOffset",
";",
"switch",
"(",
"context",
".",
"position",
")",
"{",
"case",
"DOCUMENT_BEFORE",
":",
"case",
"DO... | Returns title level offset from 1 to apply to content
@param context context
@return title level offset | [
"Returns",
"title",
"level",
"offset",
"from",
"1",
"to",
"apply",
"to",
"content"
] | train | https://github.com/Swagger2Markup/swagger2markup/blob/da83465f19a2f8a0f1fba873b5762bca8587896b/src/main/java/io/github/swagger2markup/spi/SecurityDocumentExtension.java#L38-L61 |
basho/riak-java-client | src/main/java/com/basho/riak/client/api/convert/reflection/AnnotationUtil.java | AnnotationUtil.populateUsermeta | public static <T> T populateUsermeta(RiakUserMetadata usermetaData, T domainObject)
{
return AnnotationHelper.getInstance().setUsermetaData(usermetaData, domainObject);
} | java | public static <T> T populateUsermeta(RiakUserMetadata usermetaData, T domainObject)
{
return AnnotationHelper.getInstance().setUsermetaData(usermetaData, domainObject);
} | [
"public",
"static",
"<",
"T",
">",
"T",
"populateUsermeta",
"(",
"RiakUserMetadata",
"usermetaData",
",",
"T",
"domainObject",
")",
"{",
"return",
"AnnotationHelper",
".",
"getInstance",
"(",
")",
".",
"setUsermetaData",
"(",
"usermetaData",
",",
"domainObject",
... | Attempts to populate a domain object with user metadata by looking for a
{@literal @RiakUsermeta} annotated member.
@param <T> the type of the domain object
@param usermetaData a Map of user metadata.
@param domainObject the domain object.
@return the domain object. | [
"Attempts",
"to",
"populate",
"a",
"domain",
"object",
"with",
"user",
"metadata",
"by",
"looking",
"for",
"a",
"{",
"@literal",
"@RiakUsermeta",
"}",
"annotated",
"member",
"."
] | train | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/api/convert/reflection/AnnotationUtil.java#L279-L282 |
lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/splitmerge/PolylineSplitMerge.java | PolylineSplitMerge.computePotentialSplitScore | void computePotentialSplitScore( List<Point2D_I32> contour , Element<Corner> e0 , boolean mustSplit )
{
Element<Corner> e1 = next(e0);
e0.object.splitable = canBeSplit(contour,e0,mustSplit);
if( e0.object.splitable ) {
setSplitVariables(contour, e0, e1);
}
} | java | void computePotentialSplitScore( List<Point2D_I32> contour , Element<Corner> e0 , boolean mustSplit )
{
Element<Corner> e1 = next(e0);
e0.object.splitable = canBeSplit(contour,e0,mustSplit);
if( e0.object.splitable ) {
setSplitVariables(contour, e0, e1);
}
} | [
"void",
"computePotentialSplitScore",
"(",
"List",
"<",
"Point2D_I32",
">",
"contour",
",",
"Element",
"<",
"Corner",
">",
"e0",
",",
"boolean",
"mustSplit",
")",
"{",
"Element",
"<",
"Corner",
">",
"e1",
"=",
"next",
"(",
"e0",
")",
";",
"e0",
".",
"o... | Computes the split location and the score of the two new sides if it's split there | [
"Computes",
"the",
"split",
"location",
"and",
"the",
"score",
"of",
"the",
"two",
"new",
"sides",
"if",
"it",
"s",
"split",
"there"
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/splitmerge/PolylineSplitMerge.java#L663-L672 |
js-lib-com/commons | src/main/java/js/io/FilesOutputStream.java | FilesOutputStream.putMeta | public void putMeta(String key, Object value) {
manifest.getMainAttributes().putValue(key, ConverterRegistry.getConverter().asString(value));
} | java | public void putMeta(String key, Object value) {
manifest.getMainAttributes().putValue(key, ConverterRegistry.getConverter().asString(value));
} | [
"public",
"void",
"putMeta",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"{",
"manifest",
".",
"getMainAttributes",
"(",
")",
".",
"putValue",
"(",
"key",
",",
"ConverterRegistry",
".",
"getConverter",
"(",
")",
".",
"asString",
"(",
"value",
")",
... | Put meta data to this archive manifest. If <code>key</code> already exists is overridden. Meta <code>value</code> is
converted to string and can be any type for which there is a {@link Converter} registered.
@param key meta data key,
@param value meta data value. | [
"Put",
"meta",
"data",
"to",
"this",
"archive",
"manifest",
".",
"If",
"<code",
">",
"key<",
"/",
"code",
">",
"already",
"exists",
"is",
"overridden",
".",
"Meta",
"<code",
">",
"value<",
"/",
"code",
">",
"is",
"converted",
"to",
"string",
"and",
"ca... | train | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/io/FilesOutputStream.java#L100-L102 |
Azure/azure-sdk-for-java | sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseTableAuditingPoliciesInner.java | DatabaseTableAuditingPoliciesInner.listByDatabaseAsync | public Observable<DatabaseTableAuditingPolicyListResultInner> listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName) {
return listByDatabaseWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<DatabaseTableAuditingPolicyListResultInne... | java | public Observable<DatabaseTableAuditingPolicyListResultInner> listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName) {
return listByDatabaseWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<DatabaseTableAuditingPolicyListResultInne... | [
"public",
"Observable",
"<",
"DatabaseTableAuditingPolicyListResultInner",
">",
"listByDatabaseAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"serverName",
",",
"String",
"databaseName",
")",
"{",
"return",
"listByDatabaseWithServiceResponseAsync",
"(",
"resourceG... | Lists a database's table auditing policies. Table auditing is deprecated, use blob auditing instead.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param serverName The name of the server.
@param database... | [
"Lists",
"a",
"database",
"s",
"table",
"auditing",
"policies",
".",
"Table",
"auditing",
"is",
"deprecated",
"use",
"blob",
"auditing",
"instead",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseTableAuditingPoliciesInner.java#L306-L313 |
rometools/rome | rome-propono/src/main/java/com/rometools/propono/atom/client/ClientCollection.java | ClientCollection.createMediaEntry | public ClientMediaEntry createMediaEntry(final String title, final String slug, final String contentType, final byte[] bytes) throws ProponoException {
if (!isWritable()) {
throw new ProponoException("Collection is not writable");
}
return new ClientMediaEntry(service, this, title, s... | java | public ClientMediaEntry createMediaEntry(final String title, final String slug, final String contentType, final byte[] bytes) throws ProponoException {
if (!isWritable()) {
throw new ProponoException("Collection is not writable");
}
return new ClientMediaEntry(service, this, title, s... | [
"public",
"ClientMediaEntry",
"createMediaEntry",
"(",
"final",
"String",
"title",
",",
"final",
"String",
"slug",
",",
"final",
"String",
"contentType",
",",
"final",
"byte",
"[",
"]",
"bytes",
")",
"throws",
"ProponoException",
"{",
"if",
"(",
"!",
"isWritab... | Create new media entry assocaited with collection, but do not save. server. Depending on the
Atom server, you may or may not be able to persist the properties of the entry that is
returned.
@param title Title to used for uploaded file.
@param slug String to be used in file-name of stored file
@param contentType MIME c... | [
"Create",
"new",
"media",
"entry",
"assocaited",
"with",
"collection",
"but",
"do",
"not",
"save",
".",
"server",
".",
"Depending",
"on",
"the",
"Atom",
"server",
"you",
"may",
"or",
"may",
"not",
"be",
"able",
"to",
"persist",
"the",
"properties",
"of",
... | train | https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/client/ClientCollection.java#L158-L163 |
aalmiray/Json-lib | src/main/java/net/sf/json/JSONArray.java | JSONArray.element | public JSONArray element( Map value, JsonConfig jsonConfig ) {
if( value instanceof JSONObject ){
elements.add( value );
return this;
}else{
return element( JSONObject.fromObject( value, jsonConfig ) );
}
} | java | public JSONArray element( Map value, JsonConfig jsonConfig ) {
if( value instanceof JSONObject ){
elements.add( value );
return this;
}else{
return element( JSONObject.fromObject( value, jsonConfig ) );
}
} | [
"public",
"JSONArray",
"element",
"(",
"Map",
"value",
",",
"JsonConfig",
"jsonConfig",
")",
"{",
"if",
"(",
"value",
"instanceof",
"JSONObject",
")",
"{",
"elements",
".",
"add",
"(",
"value",
")",
";",
"return",
"this",
";",
"}",
"else",
"{",
"return",... | Put a value in the JSONArray, where the value will be a JSONObject which
is produced from a Map.
@param value A Map value.
@return this. | [
"Put",
"a",
"value",
"in",
"the",
"JSONArray",
"where",
"the",
"value",
"will",
"be",
"a",
"JSONObject",
"which",
"is",
"produced",
"from",
"a",
"Map",
"."
] | train | https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JSONArray.java#L1534-L1541 |
hawkular/hawkular-agent | hawkular-agent-core/src/main/java/org/hawkular/agent/monitor/protocol/platform/OshiPlatformCache.java | OshiPlatformCache.getFileStoreMetric | public Double getFileStoreMetric(String fileStoreNameName, ID metricToCollect) {
Map<String, OSFileStore> cache = getFileStores();
OSFileStore fileStore = cache.get(fileStoreNameName);
if (fileStore == null) {
return null;
}
if (PlatformMetricType.FILE_STORE_TOTAL_S... | java | public Double getFileStoreMetric(String fileStoreNameName, ID metricToCollect) {
Map<String, OSFileStore> cache = getFileStores();
OSFileStore fileStore = cache.get(fileStoreNameName);
if (fileStore == null) {
return null;
}
if (PlatformMetricType.FILE_STORE_TOTAL_S... | [
"public",
"Double",
"getFileStoreMetric",
"(",
"String",
"fileStoreNameName",
",",
"ID",
"metricToCollect",
")",
"{",
"Map",
"<",
"String",
",",
"OSFileStore",
">",
"cache",
"=",
"getFileStores",
"(",
")",
";",
"OSFileStore",
"fileStore",
"=",
"cache",
".",
"g... | Returns the given metric's value, or null if there is no file store with the given name.
@param fileStoreNameName name of file store
@param metricToCollect the metric to collect
@return the value of the metric, or null if there is no file store with the given name | [
"Returns",
"the",
"given",
"metric",
"s",
"value",
"or",
"null",
"if",
"there",
"is",
"no",
"file",
"store",
"with",
"the",
"given",
"name",
"."
] | train | https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-agent-core/src/main/java/org/hawkular/agent/monitor/protocol/platform/OshiPlatformCache.java#L309-L324 |
google/error-prone-javac | src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PackageSummaryBuilder.java | PackageSummaryBuilder.buildPackageTags | public void buildPackageTags(XMLNode node, Content packageContentTree) {
if (configuration.nocomment) {
return;
}
packageWriter.addPackageTags(packageContentTree);
} | java | public void buildPackageTags(XMLNode node, Content packageContentTree) {
if (configuration.nocomment) {
return;
}
packageWriter.addPackageTags(packageContentTree);
} | [
"public",
"void",
"buildPackageTags",
"(",
"XMLNode",
"node",
",",
"Content",
"packageContentTree",
")",
"{",
"if",
"(",
"configuration",
".",
"nocomment",
")",
"{",
"return",
";",
"}",
"packageWriter",
".",
"addPackageTags",
"(",
"packageContentTree",
")",
";",... | Build the tags of the summary.
@param node the XML element that specifies which components to document
@param packageContentTree the tree to which the package tags will be added | [
"Build",
"the",
"tags",
"of",
"the",
"summary",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PackageSummaryBuilder.java#L347-L352 |
mqlight/java-mqlight | mqlight/src/main/java/com/ibm/mqlight/api/security/KeyStoreUtils.java | KeyStoreUtils.addPrivateKey | public static void addPrivateKey(KeyStore keyStore, File pemKeyFile, char[] passwordChars, List<Certificate> certChain) throws IOException, GeneralSecurityException {
final String methodName = "addPrivateKey";
logger.entry(methodName, pemKeyFile, certChain);
PrivateKey privateKey = createPrivat... | java | public static void addPrivateKey(KeyStore keyStore, File pemKeyFile, char[] passwordChars, List<Certificate> certChain) throws IOException, GeneralSecurityException {
final String methodName = "addPrivateKey";
logger.entry(methodName, pemKeyFile, certChain);
PrivateKey privateKey = createPrivat... | [
"public",
"static",
"void",
"addPrivateKey",
"(",
"KeyStore",
"keyStore",
",",
"File",
"pemKeyFile",
",",
"char",
"[",
"]",
"passwordChars",
",",
"List",
"<",
"Certificate",
">",
"certChain",
")",
"throws",
"IOException",
",",
"GeneralSecurityException",
"{",
"f... | Adds a private key to the specified key store from the passed private key file and certificate chain.
@param keyStore
The key store to receive the private key.
@param pemKeyFile
A PEM format file containing the private key.
@param passwordChars
The password that protects the private key.
@param certChain The certifica... | [
"Adds",
"a",
"private",
"key",
"to",
"the",
"specified",
"key",
"store",
"from",
"the",
"passed",
"private",
"key",
"file",
"and",
"certificate",
"chain",
"."
] | train | https://github.com/mqlight/java-mqlight/blob/a565dfa6044050826d1221697da9e3268b557aeb/mqlight/src/main/java/com/ibm/mqlight/api/security/KeyStoreUtils.java#L125-L134 |
duracloud/duracloud | security/src/main/java/org/duracloud/security/vote/SpaceAccessVoter.java | SpaceAccessVoter.getSpaceACLs | protected Map<String, AclType> getSpaceACLs(HttpServletRequest request) {
String storeId = getStoreId(request);
String spaceId = getSpaceId(request);
return getSpaceACLs(storeId, spaceId);
} | java | protected Map<String, AclType> getSpaceACLs(HttpServletRequest request) {
String storeId = getStoreId(request);
String spaceId = getSpaceId(request);
return getSpaceACLs(storeId, spaceId);
} | [
"protected",
"Map",
"<",
"String",
",",
"AclType",
">",
"getSpaceACLs",
"(",
"HttpServletRequest",
"request",
")",
"{",
"String",
"storeId",
"=",
"getStoreId",
"(",
"request",
")",
";",
"String",
"spaceId",
"=",
"getSpaceId",
"(",
"request",
")",
";",
"retur... | This method returns the ACLs of the requested space, or an empty-map if
there is an error or for certain 'keyword' spaces, or null if the space
does not exist.
@param request containing spaceId and storeId
@return ACLs, empty-map, or null | [
"This",
"method",
"returns",
"the",
"ACLs",
"of",
"the",
"requested",
"space",
"or",
"an",
"empty",
"-",
"map",
"if",
"there",
"is",
"an",
"error",
"or",
"for",
"certain",
"keyword",
"spaces",
"or",
"null",
"if",
"the",
"space",
"does",
"not",
"exist",
... | train | https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/security/src/main/java/org/duracloud/security/vote/SpaceAccessVoter.java#L140-L144 |
alkacon/opencms-core | src/org/opencms/xml/containerpage/CmsADECache.java | CmsADECache.getCacheGroupContainer | public CmsXmlGroupContainer getCacheGroupContainer(String key, boolean online) {
try {
m_lock.readLock().lock();
CmsXmlGroupContainer retValue;
if (online) {
retValue = m_groupContainersOnline.get(key);
if (LOG.isDebugEnabled()) {
... | java | public CmsXmlGroupContainer getCacheGroupContainer(String key, boolean online) {
try {
m_lock.readLock().lock();
CmsXmlGroupContainer retValue;
if (online) {
retValue = m_groupContainersOnline.get(key);
if (LOG.isDebugEnabled()) {
... | [
"public",
"CmsXmlGroupContainer",
"getCacheGroupContainer",
"(",
"String",
"key",
",",
"boolean",
"online",
")",
"{",
"try",
"{",
"m_lock",
".",
"readLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"CmsXmlGroupContainer",
"retValue",
";",
"if",
"(",
"online",
"... | Returns the cached group container under the given key and for the given project.<p>
@param key the cache key
@param online if cached in online or offline project
@return the cached group container or <code>null</code> if not found | [
"Returns",
"the",
"cached",
"group",
"container",
"under",
"the",
"given",
"key",
"and",
"for",
"the",
"given",
"project",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/containerpage/CmsADECache.java#L185-L227 |
codelibs/fess | src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java | FessMessages.addSuccessUpdateDesignJspFile | public FessMessages addSuccessUpdateDesignJspFile(String property, String arg0) {
assertPropertyNotNull(property);
add(property, new UserMessage(SUCCESS_update_design_jsp_file, arg0));
return this;
} | java | public FessMessages addSuccessUpdateDesignJspFile(String property, String arg0) {
assertPropertyNotNull(property);
add(property, new UserMessage(SUCCESS_update_design_jsp_file, arg0));
return this;
} | [
"public",
"FessMessages",
"addSuccessUpdateDesignJspFile",
"(",
"String",
"property",
",",
"String",
"arg0",
")",
"{",
"assertPropertyNotNull",
"(",
"property",
")",
";",
"add",
"(",
"property",
",",
"new",
"UserMessage",
"(",
"SUCCESS_update_design_jsp_file",
",",
... | Add the created action message for the key 'success.update_design_jsp_file' with parameters.
<pre>
message: Updated {0}.
</pre>
@param property The property name for the message. (NotNull)
@param arg0 The parameter arg0 for message. (NotNull)
@return this. (NotNull) | [
"Add",
"the",
"created",
"action",
"message",
"for",
"the",
"key",
"success",
".",
"update_design_jsp_file",
"with",
"parameters",
".",
"<pre",
">",
"message",
":",
"Updated",
"{",
"0",
"}",
".",
"<",
"/",
"pre",
">"
] | train | https://github.com/codelibs/fess/blob/e5e4b722549d32a4958dfd94965b21937bfe64cf/src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java#L2346-L2350 |
JCTools/JCTools | jctools-experimental/src/main/java/org/jctools/sets/SingleWriterHashSet.java | SingleWriterHashSet.compactAndRemove | private void compactAndRemove(final E[] buffer, final long mask, int removeHashIndex) {
// remove(9a): [9a,9b,10a,9c,10b,11a,null] -> [9b,10a,9c,10b,11a,null,null]
removeHashIndex = (int) (removeHashIndex & mask);
int j = removeHashIndex;
// every compaction is guarded by two mod count i... | java | private void compactAndRemove(final E[] buffer, final long mask, int removeHashIndex) {
// remove(9a): [9a,9b,10a,9c,10b,11a,null] -> [9b,10a,9c,10b,11a,null,null]
removeHashIndex = (int) (removeHashIndex & mask);
int j = removeHashIndex;
// every compaction is guarded by two mod count i... | [
"private",
"void",
"compactAndRemove",
"(",
"final",
"E",
"[",
"]",
"buffer",
",",
"final",
"long",
"mask",
",",
"int",
"removeHashIndex",
")",
"{",
"// remove(9a): [9a,9b,10a,9c,10b,11a,null] -> [9b,10a,9c,10b,11a,null,null]",
"removeHashIndex",
"=",
"(",
"int",
")",
... | /*
implemented as per wiki suggested algo with minor adjustments. | [
"/",
"*",
"implemented",
"as",
"per",
"wiki",
"suggested",
"algo",
"with",
"minor",
"adjustments",
"."
] | train | https://github.com/JCTools/JCTools/blob/9250fe316ec84209cbba0a41682f341256df781e/jctools-experimental/src/main/java/org/jctools/sets/SingleWriterHashSet.java#L158-L194 |
burberius/eve-esi | src/main/java/net/troja/eve/esi/api/UniverseApi.java | UniverseApi.getUniverseMoonsMoonId | public MoonResponse getUniverseMoonsMoonId(Integer moonId, String datasource, String ifNoneMatch)
throws ApiException {
ApiResponse<MoonResponse> resp = getUniverseMoonsMoonIdWithHttpInfo(moonId, datasource, ifNoneMatch);
return resp.getData();
} | java | public MoonResponse getUniverseMoonsMoonId(Integer moonId, String datasource, String ifNoneMatch)
throws ApiException {
ApiResponse<MoonResponse> resp = getUniverseMoonsMoonIdWithHttpInfo(moonId, datasource, ifNoneMatch);
return resp.getData();
} | [
"public",
"MoonResponse",
"getUniverseMoonsMoonId",
"(",
"Integer",
"moonId",
",",
"String",
"datasource",
",",
"String",
"ifNoneMatch",
")",
"throws",
"ApiException",
"{",
"ApiResponse",
"<",
"MoonResponse",
">",
"resp",
"=",
"getUniverseMoonsMoonIdWithHttpInfo",
"(",
... | Get moon information Get information on a moon --- This route expires
daily at 11:05
@param moonId
moon_id integer (required)
@param datasource
The server name you would like data from (optional, default to
tranquility)
@param ifNoneMatch
ETag from a previous request. A 304 will be returned if this
matches the current... | [
"Get",
"moon",
"information",
"Get",
"information",
"on",
"a",
"moon",
"---",
"This",
"route",
"expires",
"daily",
"at",
"11",
":",
"05"
] | train | https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/UniverseApi.java#L2020-L2024 |
moparisthebest/beehive | beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowUtils.java | PageFlowUtils.getNestingPageFlow | public static PageFlowController getNestingPageFlow( HttpServletRequest request, ServletContext servletContext )
{
PageFlowStack jpfStack = PageFlowStack.get( request, servletContext, false );
if ( jpfStack != null && ! jpfStack.isEmpty() )
{
PageFlowController top = jpf... | java | public static PageFlowController getNestingPageFlow( HttpServletRequest request, ServletContext servletContext )
{
PageFlowStack jpfStack = PageFlowStack.get( request, servletContext, false );
if ( jpfStack != null && ! jpfStack.isEmpty() )
{
PageFlowController top = jpf... | [
"public",
"static",
"PageFlowController",
"getNestingPageFlow",
"(",
"HttpServletRequest",
"request",
",",
"ServletContext",
"servletContext",
")",
"{",
"PageFlowStack",
"jpfStack",
"=",
"PageFlowStack",
".",
"get",
"(",
"request",
",",
"servletContext",
",",
"false",
... | Get the {@link PageFlowController} that is nesting the current one.
@param request the current HttpServletRequest.
@param servletContext the current ServletContext.
@return the nesting {@link PageFlowController}, or <code>null</code> if the current one
is not being nested. | [
"Get",
"the",
"{",
"@link",
"PageFlowController",
"}",
"that",
"is",
"nesting",
"the",
"current",
"one",
"."
] | train | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowUtils.java#L231-L242 |
roboconf/roboconf-platform | core/roboconf-target-iaas-ec2/src/main/java/net/roboconf/target/ec2/internal/Ec2IaasHandler.java | Ec2IaasHandler.prepareEC2RequestNode | private RunInstancesRequest prepareEC2RequestNode( Map<String,String> targetProperties, String userData )
throws UnsupportedEncodingException {
RunInstancesRequest runInstancesRequest = new RunInstancesRequest();
String flavor = targetProperties.get(Ec2Constants.VM_INSTANCE_TYPE);
if( Utils.isEmptyOrWhitespaces... | java | private RunInstancesRequest prepareEC2RequestNode( Map<String,String> targetProperties, String userData )
throws UnsupportedEncodingException {
RunInstancesRequest runInstancesRequest = new RunInstancesRequest();
String flavor = targetProperties.get(Ec2Constants.VM_INSTANCE_TYPE);
if( Utils.isEmptyOrWhitespaces... | [
"private",
"RunInstancesRequest",
"prepareEC2RequestNode",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"targetProperties",
",",
"String",
"userData",
")",
"throws",
"UnsupportedEncodingException",
"{",
"RunInstancesRequest",
"runInstancesRequest",
"=",
"new",
"RunInsta... | Prepares the request.
@param targetProperties the target properties
@param userData the user data to pass
@return a request
@throws UnsupportedEncodingException | [
"Prepares",
"the",
"request",
"."
] | train | https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-iaas-ec2/src/main/java/net/roboconf/target/ec2/internal/Ec2IaasHandler.java#L291-L322 |
JOML-CI/JOML | src/org/joml/Matrix4d.java | Matrix4d.setOrthoSymmetricLH | public Matrix4d setOrthoSymmetricLH(double width, double height, double zNear, double zFar) {
return setOrthoSymmetricLH(width, height, zNear, zFar, false);
} | java | public Matrix4d setOrthoSymmetricLH(double width, double height, double zNear, double zFar) {
return setOrthoSymmetricLH(width, height, zNear, zFar, false);
} | [
"public",
"Matrix4d",
"setOrthoSymmetricLH",
"(",
"double",
"width",
",",
"double",
"height",
",",
"double",
"zNear",
",",
"double",
"zFar",
")",
"{",
"return",
"setOrthoSymmetricLH",
"(",
"width",
",",
"height",
",",
"zNear",
",",
"zFar",
",",
"false",
")",... | Set this matrix to be a symmetric orthographic projection transformation for a left-handed coordinate system
using OpenGL's NDC z range of <code>[-1..+1]</code>.
<p>
This method is equivalent to calling {@link #setOrthoLH(double, double, double, double, double, double) setOrthoLH()} with
<code>left=-width/2</code>, <co... | [
"Set",
"this",
"matrix",
"to",
"be",
"a",
"symmetric",
"orthographic",
"projection",
"transformation",
"for",
"a",
"left",
"-",
"handed",
"coordinate",
"system",
"using",
"OpenGL",
"s",
"NDC",
"z",
"range",
"of",
"<code",
">",
"[",
"-",
"1",
"..",
"+",
"... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4d.java#L10525-L10527 |
alkacon/opencms-core | src/org/opencms/file/CmsObject.java | CmsObject.deleteStaticExportPublishedResource | public void deleteStaticExportPublishedResource(String resourceName, int linkType, String linkParameter)
throws CmsException {
m_securityManager.deleteStaticExportPublishedResource(m_context, resourceName, linkType, linkParameter);
} | java | public void deleteStaticExportPublishedResource(String resourceName, int linkType, String linkParameter)
throws CmsException {
m_securityManager.deleteStaticExportPublishedResource(m_context, resourceName, linkType, linkParameter);
} | [
"public",
"void",
"deleteStaticExportPublishedResource",
"(",
"String",
"resourceName",
",",
"int",
"linkType",
",",
"String",
"linkParameter",
")",
"throws",
"CmsException",
"{",
"m_securityManager",
".",
"deleteStaticExportPublishedResource",
"(",
"m_context",
",",
"res... | Deletes a published resource entry.<p>
@param resourceName The name of the resource to be deleted in the static export
@param linkType the type of resource deleted (0= non-parameter, 1=parameter)
@param linkParameter the parameters of the resource
@throws CmsException if something goes wrong | [
"Deletes",
"a",
"published",
"resource",
"entry",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L1084-L1088 |
Impetus/Kundera | src/kundera-elastic-search/src/main/java/com/impetus/client/es/ESFilterBuilder.java | ESFilterBuilder.getOrFilterBuilder | private OrQueryBuilder getOrFilterBuilder(Expression logicalExp, EntityMetadata m)
{
OrExpression orExp = (OrExpression) logicalExp;
Expression leftExpression = orExp.getLeftExpression();
Expression rightExpression = orExp.getRightExpression();
return new OrQueryBuilder(populateFilt... | java | private OrQueryBuilder getOrFilterBuilder(Expression logicalExp, EntityMetadata m)
{
OrExpression orExp = (OrExpression) logicalExp;
Expression leftExpression = orExp.getLeftExpression();
Expression rightExpression = orExp.getRightExpression();
return new OrQueryBuilder(populateFilt... | [
"private",
"OrQueryBuilder",
"getOrFilterBuilder",
"(",
"Expression",
"logicalExp",
",",
"EntityMetadata",
"m",
")",
"{",
"OrExpression",
"orExp",
"=",
"(",
"OrExpression",
")",
"logicalExp",
";",
"Expression",
"leftExpression",
"=",
"orExp",
".",
"getLeftExpression",... | Gets the or filter builder.
@param logicalExp
the logical exp
@param m
the m
@param entity
the entity
@return the or filter builder | [
"Gets",
"the",
"or",
"filter",
"builder",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-elastic-search/src/main/java/com/impetus/client/es/ESFilterBuilder.java#L378-L385 |
mapsforge/mapsforge | mapsforge-core/src/main/java/org/mapsforge/core/util/MercatorProjection.java | MercatorProjection.pixelYToTileYWithScaleFactor | public static int pixelYToTileYWithScaleFactor(double pixelY, double scaleFactor, int tileSize) {
return (int) Math.min(Math.max(pixelY / tileSize, 0), scaleFactor - 1);
} | java | public static int pixelYToTileYWithScaleFactor(double pixelY, double scaleFactor, int tileSize) {
return (int) Math.min(Math.max(pixelY / tileSize, 0), scaleFactor - 1);
} | [
"public",
"static",
"int",
"pixelYToTileYWithScaleFactor",
"(",
"double",
"pixelY",
",",
"double",
"scaleFactor",
",",
"int",
"tileSize",
")",
"{",
"return",
"(",
"int",
")",
"Math",
".",
"min",
"(",
"Math",
".",
"max",
"(",
"pixelY",
"/",
"tileSize",
",",... | Converts a pixel Y coordinate to the tile Y number.
@param pixelY the pixel Y coordinate that should be converted.
@param scaleFactor the scale factor at which the coordinate should be converted.
@return the tile Y number. | [
"Converts",
"a",
"pixel",
"Y",
"coordinate",
"to",
"the",
"tile",
"Y",
"number",
"."
] | train | https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-core/src/main/java/org/mapsforge/core/util/MercatorProjection.java#L422-L424 |
Impetus/Kundera | src/kundera-mongo/src/main/java/com/impetus/client/mongodb/query/MongoDBQuery.java | MongoDBQuery.createMongoQuery | public BasicDBObject createMongoQuery(EntityMetadata m, Queue filterClauseQueue)
{
QueryComponent sq = getQueryComponent(filterClauseQueue);
populateQueryComponents(m, sq);
return sq.actualQuery == null ? new BasicDBObject() : sq.actualQuery;
} | java | public BasicDBObject createMongoQuery(EntityMetadata m, Queue filterClauseQueue)
{
QueryComponent sq = getQueryComponent(filterClauseQueue);
populateQueryComponents(m, sq);
return sq.actualQuery == null ? new BasicDBObject() : sq.actualQuery;
} | [
"public",
"BasicDBObject",
"createMongoQuery",
"(",
"EntityMetadata",
"m",
",",
"Queue",
"filterClauseQueue",
")",
"{",
"QueryComponent",
"sq",
"=",
"getQueryComponent",
"(",
"filterClauseQueue",
")",
";",
"populateQueryComponents",
"(",
"m",
",",
"sq",
")",
";",
... | Creates the mongo query.
@param m
the m
@param filterClauseQueue
the filter clause queue
@return the basic db object | [
"Creates",
"the",
"mongo",
"query",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-mongo/src/main/java/com/impetus/client/mongodb/query/MongoDBQuery.java#L442-L447 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Character.java | Character.toChars | public static int toChars(int codePoint, char[] dst, int dstIndex) {
if (isBmpCodePoint(codePoint)) {
dst[dstIndex] = (char) codePoint;
return 1;
} else if (isValidCodePoint(codePoint)) {
toSurrogates(codePoint, dst, dstIndex);
return 2;
} else {
... | java | public static int toChars(int codePoint, char[] dst, int dstIndex) {
if (isBmpCodePoint(codePoint)) {
dst[dstIndex] = (char) codePoint;
return 1;
} else if (isValidCodePoint(codePoint)) {
toSurrogates(codePoint, dst, dstIndex);
return 2;
} else {
... | [
"public",
"static",
"int",
"toChars",
"(",
"int",
"codePoint",
",",
"char",
"[",
"]",
"dst",
",",
"int",
"dstIndex",
")",
"{",
"if",
"(",
"isBmpCodePoint",
"(",
"codePoint",
")",
")",
"{",
"dst",
"[",
"dstIndex",
"]",
"=",
"(",
"char",
")",
"codePoin... | Converts the specified character (Unicode code point) to its
UTF-16 representation. If the specified code point is a BMP
(Basic Multilingual Plane or Plane 0) value, the same value is
stored in {@code dst[dstIndex]}, and 1 is returned. If the
specified code point is a supplementary character, its
surrogate values are s... | [
"Converts",
"the",
"specified",
"character",
"(",
"Unicode",
"code",
"point",
")",
"to",
"its",
"UTF",
"-",
"16",
"representation",
".",
"If",
"the",
"specified",
"code",
"point",
"is",
"a",
"BMP",
"(",
"Basic",
"Multilingual",
"Plane",
"or",
"Plane",
"0",... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Character.java#L5197-L5207 |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java | LSSerializerImpl.canSetParameter | public boolean canSetParameter(String name, Object value) {
if (value instanceof Boolean){
if ( name.equalsIgnoreCase(DOMConstants.DOM_CDATA_SECTIONS)
|| name.equalsIgnoreCase(DOMConstants.DOM_COMMENTS)
|| name.equalsIgnoreCase(DOMConstants.DOM_ENTITIES)
... | java | public boolean canSetParameter(String name, Object value) {
if (value instanceof Boolean){
if ( name.equalsIgnoreCase(DOMConstants.DOM_CDATA_SECTIONS)
|| name.equalsIgnoreCase(DOMConstants.DOM_COMMENTS)
|| name.equalsIgnoreCase(DOMConstants.DOM_ENTITIES)
... | [
"public",
"boolean",
"canSetParameter",
"(",
"String",
"name",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"value",
"instanceof",
"Boolean",
")",
"{",
"if",
"(",
"name",
".",
"equalsIgnoreCase",
"(",
"DOMConstants",
".",
"DOM_CDATA_SECTIONS",
")",
"||",
"na... | Checks if setting a parameter to a specific value is supported.
@see org.w3c.dom.DOMConfiguration#canSetParameter(java.lang.String, java.lang.Object)
@since DOM Level 3
@param name A String containing the DOMConfiguration parameter name.
@param value An Object specifying the value of the corresponding parameter. | [
"Checks",
"if",
"setting",
"a",
"parameter",
"to",
"a",
"specific",
"value",
"is",
"supported",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java#L390-L427 |
googleads/googleads-java-lib | examples/admanager_axis/src/main/java/admanager/axis/v201811/inventoryservice/CreateAdUnits.java | CreateAdUnits.runExample | public static void runExample(AdManagerServices adManagerServices, AdManagerSession session)
throws RemoteException {
// Get the InventoryService.
InventoryServiceInterface inventoryService =
adManagerServices.get(session, InventoryServiceInterface.class);
// Get the NetworkService.
Netwo... | java | public static void runExample(AdManagerServices adManagerServices, AdManagerSession session)
throws RemoteException {
// Get the InventoryService.
InventoryServiceInterface inventoryService =
adManagerServices.get(session, InventoryServiceInterface.class);
// Get the NetworkService.
Netwo... | [
"public",
"static",
"void",
"runExample",
"(",
"AdManagerServices",
"adManagerServices",
",",
"AdManagerSession",
"session",
")",
"throws",
"RemoteException",
"{",
"// Get the InventoryService.",
"InventoryServiceInterface",
"inventoryService",
"=",
"adManagerServices",
".",
... | Runs the example.
@param adManagerServices the services factory.
@param session the session.
@throws ApiException if the API request failed with one or more service errors.
@throws RemoteException if the API request failed due to other errors. | [
"Runs",
"the",
"example",
"."
] | train | https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/admanager_axis/src/main/java/admanager/axis/v201811/inventoryservice/CreateAdUnits.java#L55-L112 |
OpenLiberty/open-liberty | dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/spi/DistributedMapFactory.java | DistributedMapFactory.getMap | @Deprecated
public static DistributedMap getMap(String name, Properties properties) {
return DistributedObjectCacheFactory.getMap(name, properties);
} | java | @Deprecated
public static DistributedMap getMap(String name, Properties properties) {
return DistributedObjectCacheFactory.getMap(name, properties);
} | [
"@",
"Deprecated",
"public",
"static",
"DistributedMap",
"getMap",
"(",
"String",
"name",
",",
"Properties",
"properties",
")",
"{",
"return",
"DistributedObjectCacheFactory",
".",
"getMap",
"(",
"name",
",",
"properties",
")",
";",
"}"
] | Returns the DistributedMap instance specified by the given id, using the
the parameters specified in properties. If the given instance has
not yet been created, then a new instance is created using the parameters
specified in the properties object.
<br>Properties:
<table role="presentation">
<tr><td>com.ibm.ws.cache.Ca... | [
"Returns",
"the",
"DistributedMap",
"instance",
"specified",
"by",
"the",
"given",
"id",
"using",
"the",
"the",
"parameters",
"specified",
"in",
"properties",
".",
"If",
"the",
"given",
"instance",
"has",
"not",
"yet",
"been",
"created",
"then",
"a",
"new",
... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/spi/DistributedMapFactory.java#L64-L67 |
DataSketches/sketches-core | src/main/java/com/yahoo/sketches/quantiles/DoublesSketch.java | DoublesSketch.getCompactStorageBytes | public static int getCompactStorageBytes(final int k, final long n) {
if (n == 0) { return 8; }
final int metaPreLongs = DoublesSketch.MAX_PRELONGS + 2; //plus min, max
return ((metaPreLongs + Util.computeRetainedItems(k, n)) << 3);
} | java | public static int getCompactStorageBytes(final int k, final long n) {
if (n == 0) { return 8; }
final int metaPreLongs = DoublesSketch.MAX_PRELONGS + 2; //plus min, max
return ((metaPreLongs + Util.computeRetainedItems(k, n)) << 3);
} | [
"public",
"static",
"int",
"getCompactStorageBytes",
"(",
"final",
"int",
"k",
",",
"final",
"long",
"n",
")",
"{",
"if",
"(",
"n",
"==",
"0",
")",
"{",
"return",
"8",
";",
"}",
"final",
"int",
"metaPreLongs",
"=",
"DoublesSketch",
".",
"MAX_PRELONGS",
... | Returns the number of bytes a DoublesSketch would require to store in compact form
given the values of <i>k</i> and <i>n</i>. The compact form is not updatable.
@param k the size configuration parameter for the sketch
@param n the number of items input into the sketch
@return the number of bytes required to store this ... | [
"Returns",
"the",
"number",
"of",
"bytes",
"a",
"DoublesSketch",
"would",
"require",
"to",
"store",
"in",
"compact",
"form",
"given",
"the",
"values",
"of",
"<i",
">",
"k<",
"/",
"i",
">",
"and",
"<i",
">",
"n<",
"/",
"i",
">",
".",
"The",
"compact",... | train | https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/quantiles/DoublesSketch.java#L630-L634 |
elki-project/elki | elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/dependence/HSMDependenceMeasure.java | HSMDependenceMeasure.countAboveThreshold | private int countAboveThreshold(int[][] mat, double threshold) {
int ret = 0;
for(int i = 0; i < mat.length; i++) {
int[] row = mat[i];
for(int j = 0; j < row.length; j++) {
if(row[j] >= threshold) {
ret++;
}
}
}
return ret;
} | java | private int countAboveThreshold(int[][] mat, double threshold) {
int ret = 0;
for(int i = 0; i < mat.length; i++) {
int[] row = mat[i];
for(int j = 0; j < row.length; j++) {
if(row[j] >= threshold) {
ret++;
}
}
}
return ret;
} | [
"private",
"int",
"countAboveThreshold",
"(",
"int",
"[",
"]",
"[",
"]",
"mat",
",",
"double",
"threshold",
")",
"{",
"int",
"ret",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"mat",
".",
"length",
";",
"i",
"++",
")",
"{",
... | Count the number of cells above the threshold.
@param mat Matrix
@param threshold Threshold
@return Number of elements above the threshold. | [
"Count",
"the",
"number",
"of",
"cells",
"above",
"the",
"threshold",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/dependence/HSMDependenceMeasure.java#L147-L158 |
marvinlabs/android-intents | library/src/main/java/com/marvinlabs/intents/PhoneIntents.java | PhoneIntents.newEmptySmsIntent | public static Intent newEmptySmsIntent(Context context, String phoneNumber) {
return newSmsIntent(context, null, new String[]{phoneNumber});
} | java | public static Intent newEmptySmsIntent(Context context, String phoneNumber) {
return newSmsIntent(context, null, new String[]{phoneNumber});
} | [
"public",
"static",
"Intent",
"newEmptySmsIntent",
"(",
"Context",
"context",
",",
"String",
"phoneNumber",
")",
"{",
"return",
"newSmsIntent",
"(",
"context",
",",
"null",
",",
"new",
"String",
"[",
"]",
"{",
"phoneNumber",
"}",
")",
";",
"}"
] | Creates an intent that will allow to send an SMS without specifying the phone number
@param phoneNumber The phone number to send the SMS to
@return the intent | [
"Creates",
"an",
"intent",
"that",
"will",
"allow",
"to",
"send",
"an",
"SMS",
"without",
"specifying",
"the",
"phone",
"number"
] | train | https://github.com/marvinlabs/android-intents/blob/33e79c825188b6a97601869522533cc825801f6e/library/src/main/java/com/marvinlabs/intents/PhoneIntents.java#L51-L53 |
kotcrab/vis-ui | ui/src/main/java/com/kotcrab/vis/ui/util/ColorUtils.java | ColorUtils.RGBtoHSV | public static int[] RGBtoHSV (Color c) {
return RGBtoHSV(c.r, c.g, c.b);
} | java | public static int[] RGBtoHSV (Color c) {
return RGBtoHSV(c.r, c.g, c.b);
} | [
"public",
"static",
"int",
"[",
"]",
"RGBtoHSV",
"(",
"Color",
"c",
")",
"{",
"return",
"RGBtoHSV",
"(",
"c",
".",
"r",
",",
"c",
".",
"g",
",",
"c",
".",
"b",
")",
";",
"}"
] | Converts {@link Color} to HSV color system
@return 3 element int array with hue (0-360), saturation (0-100) and value (0-100) | [
"Converts",
"{"
] | train | https://github.com/kotcrab/vis-ui/blob/3b68f82d94ae32bffa2a3399c63f432e0f4908e0/ui/src/main/java/com/kotcrab/vis/ui/util/ColorUtils.java#L119-L121 |
GenesysPureEngage/workspace-client-java | src/main/java/com/genesys/internal/workspace/api/MediaApi.java | MediaApi.addAttachment | public ApiSuccessResponse addAttachment(String mediatype, String id, File attachment, String operationId) throws ApiException {
ApiResponse<ApiSuccessResponse> resp = addAttachmentWithHttpInfo(mediatype, id, attachment, operationId);
return resp.getData();
} | java | public ApiSuccessResponse addAttachment(String mediatype, String id, File attachment, String operationId) throws ApiException {
ApiResponse<ApiSuccessResponse> resp = addAttachmentWithHttpInfo(mediatype, id, attachment, operationId);
return resp.getData();
} | [
"public",
"ApiSuccessResponse",
"addAttachment",
"(",
"String",
"mediatype",
",",
"String",
"id",
",",
"File",
"attachment",
",",
"String",
"operationId",
")",
"throws",
"ApiException",
"{",
"ApiResponse",
"<",
"ApiSuccessResponse",
">",
"resp",
"=",
"addAttachmentW... | Add an attachment to the open-media interaction
Add an attachment to the interaction specified in the id path parameter
@param mediatype media-type of interaction to add attachment (required)
@param id id of interaction (required)
@param attachment The file to upload. (optional)
@param operationId operationId associate... | [
"Add",
"an",
"attachment",
"to",
"the",
"open",
"-",
"media",
"interaction",
"Add",
"an",
"attachment",
"to",
"the",
"interaction",
"specified",
"in",
"the",
"id",
"path",
"parameter"
] | train | https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/MediaApi.java#L313-L316 |
deeplearning4j/deeplearning4j | nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/util/FeatureUtil.java | FeatureUtil.scaleMinMax | public static void scaleMinMax(double min, double max, INDArray toScale) {
//X_std = (X - X.min(axis=0)) / (X.max(axis=0) - X.min(axis=0)) X_scaled = X_std * (max - min) + min
INDArray min2 = toScale.min(0);
INDArray max2 = toScale.max(0);
INDArray std = toScale.subRowVector(min2).divi... | java | public static void scaleMinMax(double min, double max, INDArray toScale) {
//X_std = (X - X.min(axis=0)) / (X.max(axis=0) - X.min(axis=0)) X_scaled = X_std * (max - min) + min
INDArray min2 = toScale.min(0);
INDArray max2 = toScale.max(0);
INDArray std = toScale.subRowVector(min2).divi... | [
"public",
"static",
"void",
"scaleMinMax",
"(",
"double",
"min",
",",
"double",
"max",
",",
"INDArray",
"toScale",
")",
"{",
"//X_std = (X - X.min(axis=0)) / (X.max(axis=0) - X.min(axis=0)) X_scaled = X_std * (max - min) + min",
"INDArray",
"min2",
"=",
"toScale",
".",
"min... | Scales the ndarray columns
to the given min/max values
@param min the minimum number
@param max the max number | [
"Scales",
"the",
"ndarray",
"columns",
"to",
"the",
"given",
"min",
"/",
"max",
"values"
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/util/FeatureUtil.java#L91-L101 |
OrienteerBAP/wicket-orientdb | wicket-orientdb/src/main/java/ru/ydn/wicket/wicketorientdb/converter/AbstractJointConverter.java | AbstractJointConverter.of | public static <F> AbstractJointConverter<F> of(final SerializableFunction<? super F, String> to,
final SerializableFunction<String, ? extends F> from) {
return new AbstractJointConverter<F>() {
@Override
public String convertToString(F value, Locale locale) {
return to... | java | public static <F> AbstractJointConverter<F> of(final SerializableFunction<? super F, String> to,
final SerializableFunction<String, ? extends F> from) {
return new AbstractJointConverter<F>() {
@Override
public String convertToString(F value, Locale locale) {
return to... | [
"public",
"static",
"<",
"F",
">",
"AbstractJointConverter",
"<",
"F",
">",
"of",
"(",
"final",
"SerializableFunction",
"<",
"?",
"super",
"F",
",",
"String",
">",
"to",
",",
"final",
"SerializableFunction",
"<",
"String",
",",
"?",
"extends",
"F",
">",
... | Utility method to construct converter from 2 functions
@param <F> type to convert from
@param to function to convert to String
@param from function to convert from String
@return converter | [
"Utility",
"method",
"to",
"construct",
"converter",
"from",
"2",
"functions"
] | train | https://github.com/OrienteerBAP/wicket-orientdb/blob/eb1d94f00a6bff9e266c5c032baa6043afc1db92/wicket-orientdb/src/main/java/ru/ydn/wicket/wicketorientdb/converter/AbstractJointConverter.java#L47-L60 |
aoindustries/aocode-public | src/main/java/com/aoindustries/net/UrlUtils.java | UrlUtils.decodeUrlPath | public static String decodeUrlPath(String href, String encoding) throws UnsupportedEncodingException {
if(href.startsWith("tel:")) return href;
int len = href.length();
int pos = 0;
StringBuilder SB = new StringBuilder(href.length()*2); // Leave a little room for encoding
while(pos<len) {
int nextPos = Str... | java | public static String decodeUrlPath(String href, String encoding) throws UnsupportedEncodingException {
if(href.startsWith("tel:")) return href;
int len = href.length();
int pos = 0;
StringBuilder SB = new StringBuilder(href.length()*2); // Leave a little room for encoding
while(pos<len) {
int nextPos = Str... | [
"public",
"static",
"String",
"decodeUrlPath",
"(",
"String",
"href",
",",
"String",
"encoding",
")",
"throws",
"UnsupportedEncodingException",
"{",
"if",
"(",
"href",
".",
"startsWith",
"(",
"\"tel:\"",
")",
")",
"return",
"href",
";",
"int",
"len",
"=",
"h... | Decodes the URL up to the first ?, if present. Does not decode
any characters in the set { '?', ':', '/', ';', '#', '+' }.
Does not decode tel: urls (case-sensitive).
@see #encodeUrlPath(java.lang.String) | [
"Decodes",
"the",
"URL",
"up",
"to",
"the",
"first",
"?",
"if",
"present",
".",
"Does",
"not",
"decode",
"any",
"characters",
"in",
"the",
"set",
"{",
"?",
":",
"/",
";",
"#",
"+",
"}",
"."
] | train | https://github.com/aoindustries/aocode-public/blob/c7bc1d08aee1d02dfaeeb1421fad21aca1aad4c3/src/main/java/com/aoindustries/net/UrlUtils.java#L105-L129 |
ops4j/org.ops4j.pax.swissbox | pax-swissbox-bnd/src/main/java/org/ops4j/pax/swissbox/bnd/BndUtils.java | BndUtils.parseInstructions | public static Properties parseInstructions( final String query )
throws MalformedURLException
{
final Properties instructions = new Properties();
if( query != null )
{
try
{
// just ignore for the moment and try out if we have valid properties ... | java | public static Properties parseInstructions( final String query )
throws MalformedURLException
{
final Properties instructions = new Properties();
if( query != null )
{
try
{
// just ignore for the moment and try out if we have valid properties ... | [
"public",
"static",
"Properties",
"parseInstructions",
"(",
"final",
"String",
"query",
")",
"throws",
"MalformedURLException",
"{",
"final",
"Properties",
"instructions",
"=",
"new",
"Properties",
"(",
")",
";",
"if",
"(",
"query",
"!=",
"null",
")",
"{",
"tr... | Parses bnd instructions out of an url query string.
@param query query part of an url.
@return parsed instructions as properties
@throws java.net.MalformedURLException if provided path does not comply to syntax. | [
"Parses",
"bnd",
"instructions",
"out",
"of",
"an",
"url",
"query",
"string",
"."
] | train | https://github.com/ops4j/org.ops4j.pax.swissbox/blob/00b0ee16cdbe8017984a4d7ba808b10d985c5b5c/pax-swissbox-bnd/src/main/java/org/ops4j/pax/swissbox/bnd/BndUtils.java#L275-L316 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java | CloudStorageFileSystemProvider.newFileChannel | @Override
public FileChannel newFileChannel(
Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException {
checkNotNull(path);
initStorage();
CloudStorageUtil.checkNotNullArray(attrs);
if (options.contains(StandardOpenOption.CREATE_NEW)) {
Files.createFile(p... | java | @Override
public FileChannel newFileChannel(
Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException {
checkNotNull(path);
initStorage();
CloudStorageUtil.checkNotNullArray(attrs);
if (options.contains(StandardOpenOption.CREATE_NEW)) {
Files.createFile(p... | [
"@",
"Override",
"public",
"FileChannel",
"newFileChannel",
"(",
"Path",
"path",
",",
"Set",
"<",
"?",
"extends",
"OpenOption",
">",
"options",
",",
"FileAttribute",
"<",
"?",
">",
"...",
"attrs",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"path... | Open a file for reading OR writing. The {@link FileChannel} that is returned will only allow
reads or writes depending on the {@link OpenOption}s that are specified. If any of the
following have been specified, the {@link FileChannel} will be write-only: {@link
StandardOpenOption#CREATE}
<ul>
<li>{@link StandardOpenOp... | [
"Open",
"a",
"file",
"for",
"reading",
"OR",
"writing",
".",
"The",
"{",
"@link",
"FileChannel",
"}",
"that",
"is",
"returned",
"will",
"only",
"allow",
"reads",
"or",
"writes",
"depending",
"on",
"the",
"{",
"@link",
"OpenOption",
"}",
"s",
"that",
"are... | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java#L330-L349 |
dropwizard/dropwizard | dropwizard-jersey/src/main/java/io/dropwizard/jersey/filter/RequestIdFilter.java | RequestIdFilter.generateRandomUuid | private static UUID generateRandomUuid() {
final Random rnd = ThreadLocalRandom.current();
long mostSig = rnd.nextLong();
long leastSig = rnd.nextLong();
// Identify this as a version 4 UUID, that is one based on a random value.
mostSig &= 0xffffffffffff0fffL;
mostSig |... | java | private static UUID generateRandomUuid() {
final Random rnd = ThreadLocalRandom.current();
long mostSig = rnd.nextLong();
long leastSig = rnd.nextLong();
// Identify this as a version 4 UUID, that is one based on a random value.
mostSig &= 0xffffffffffff0fffL;
mostSig |... | [
"private",
"static",
"UUID",
"generateRandomUuid",
"(",
")",
"{",
"final",
"Random",
"rnd",
"=",
"ThreadLocalRandom",
".",
"current",
"(",
")",
";",
"long",
"mostSig",
"=",
"rnd",
".",
"nextLong",
"(",
")",
";",
"long",
"leastSig",
"=",
"rnd",
".",
"next... | Generate a random UUID v4 that will perform reasonably when used by
multiple threads under load.
@see <a href="https://github.com/Netflix/netflix-commons/blob/v0.3.0/netflix-commons-util/src/main/java/com/netflix/util/concurrent/ConcurrentUUIDFactory.java">ConcurrentUUIDFactory</a>
@return random UUID | [
"Generate",
"a",
"random",
"UUID",
"v4",
"that",
"will",
"perform",
"reasonably",
"when",
"used",
"by",
"multiple",
"threads",
"under",
"load",
"."
] | train | https://github.com/dropwizard/dropwizard/blob/7ee09a410476b9681e8072ab684788bb440877bd/dropwizard-jersey/src/main/java/io/dropwizard/jersey/filter/RequestIdFilter.java#L59-L74 |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.getBusHub | @Pure
public BusHub getBusHub(String name, Comparator<String> nameComparator) {
if (name == null) {
return null;
}
final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator;
for (final BusHub busHub : this.validBusHubs) {
if (cmp.compare(name, busHub.get... | java | @Pure
public BusHub getBusHub(String name, Comparator<String> nameComparator) {
if (name == null) {
return null;
}
final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator;
for (final BusHub busHub : this.validBusHubs) {
if (cmp.compare(name, busHub.get... | [
"@",
"Pure",
"public",
"BusHub",
"getBusHub",
"(",
"String",
"name",
",",
"Comparator",
"<",
"String",
">",
"nameComparator",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Comparator",
"<",
"String",
">",
"c... | Replies the bus hub with the specified name.
@param name is the desired name
@param nameComparator is used to compare the names.
@return a bus hub or <code>null</code> | [
"Replies",
"the",
"bus",
"hub",
"with",
"the",
"specified",
"name",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L1288-L1305 |
liyiorg/weixin-popular | src/main/java/weixin/popular/api/BizwifiAPI.java | BizwifiAPI.deviceList | public static DeviceListResult deviceList(String accessToken, DeviceList deviceList) {
return deviceList(accessToken, JsonUtil.toJSONString(deviceList));
} | java | public static DeviceListResult deviceList(String accessToken, DeviceList deviceList) {
return deviceList(accessToken, JsonUtil.toJSONString(deviceList));
} | [
"public",
"static",
"DeviceListResult",
"deviceList",
"(",
"String",
"accessToken",
",",
"DeviceList",
"deviceList",
")",
"{",
"return",
"deviceList",
"(",
"accessToken",
",",
"JsonUtil",
".",
"toJSONString",
"(",
"deviceList",
")",
")",
";",
"}"
] | Wi-Fi设备管理-查询设备
可通过指定分页或具体门店ID的方式,查询当前MP账号下指定门店连网成功的设备信息。一次最多能查询20个门店的设备信息。
@param accessToken accessToken
@param deviceList deviceList
@return DeviceListResult | [
"Wi",
"-",
"Fi设备管理",
"-",
"查询设备",
"可通过指定分页或具体门店ID的方式,查询当前MP账号下指定门店连网成功的设备信息。一次最多能查询20个门店的设备信息。"
] | train | https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/BizwifiAPI.java#L379-L381 |
DiUS/pact-jvm | pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslJsonArray.java | PactDslJsonArray.arrayMinMaxLike | public static PactDslJsonArray arrayMinMaxLike(int minSize, int maxSize, PactDslJsonRootValue value) {
return arrayMinMaxLike(minSize, maxSize, minSize, value);
} | java | public static PactDslJsonArray arrayMinMaxLike(int minSize, int maxSize, PactDslJsonRootValue value) {
return arrayMinMaxLike(minSize, maxSize, minSize, value);
} | [
"public",
"static",
"PactDslJsonArray",
"arrayMinMaxLike",
"(",
"int",
"minSize",
",",
"int",
"maxSize",
",",
"PactDslJsonRootValue",
"value",
")",
"{",
"return",
"arrayMinMaxLike",
"(",
"minSize",
",",
"maxSize",
",",
"minSize",
",",
"value",
")",
";",
"}"
] | Root level array with minimum and maximum size where each item must match the provided matcher
@param minSize minimum size
@param maxSize maximum size | [
"Root",
"level",
"array",
"with",
"minimum",
"and",
"maximum",
"size",
"where",
"each",
"item",
"must",
"match",
"the",
"provided",
"matcher"
] | train | https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslJsonArray.java#L897-L899 |
apache/incubator-druid | server/src/main/java/org/apache/druid/initialization/Initialization.java | Initialization.getExtensionFilesToLoad | public static File[] getExtensionFilesToLoad(ExtensionsConfig config)
{
final File rootExtensionsDir = new File(config.getDirectory());
if (rootExtensionsDir.exists() && !rootExtensionsDir.isDirectory()) {
throw new ISE("Root extensions directory [%s] is not a directory!?", rootExtensionsDir);
}
... | java | public static File[] getExtensionFilesToLoad(ExtensionsConfig config)
{
final File rootExtensionsDir = new File(config.getDirectory());
if (rootExtensionsDir.exists() && !rootExtensionsDir.isDirectory()) {
throw new ISE("Root extensions directory [%s] is not a directory!?", rootExtensionsDir);
}
... | [
"public",
"static",
"File",
"[",
"]",
"getExtensionFilesToLoad",
"(",
"ExtensionsConfig",
"config",
")",
"{",
"final",
"File",
"rootExtensionsDir",
"=",
"new",
"File",
"(",
"config",
".",
"getDirectory",
"(",
")",
")",
";",
"if",
"(",
"rootExtensionsDir",
".",... | Find all the extension files that should be loaded by druid.
<p/>
If user explicitly specifies druid.extensions.loadList, then it will look for those extensions under root
extensions directory. If one of them is not found, druid will fail loudly.
<p/>
If user doesn't specify druid.extension.toLoad (or its value is empt... | [
"Find",
"all",
"the",
"extension",
"files",
"that",
"should",
"be",
"loaded",
"by",
"druid",
".",
"<p",
"/",
">",
"If",
"user",
"explicitly",
"specifies",
"druid",
".",
"extensions",
".",
"loadList",
"then",
"it",
"will",
"look",
"for",
"those",
"extension... | train | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/initialization/Initialization.java#L225-L254 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/query/QueryRunner.java | QueryRunner.runPartitionScanQueryOnPartitionChunk | public ResultSegment runPartitionScanQueryOnPartitionChunk(Query query, int partitionId, int tableIndex, int fetchSize) {
MapContainer mapContainer = mapServiceContext.getMapContainer(query.getMapName());
Predicate predicate = queryOptimizer.optimize(query.getPredicate(), mapContainer.getIndexes(partiti... | java | public ResultSegment runPartitionScanQueryOnPartitionChunk(Query query, int partitionId, int tableIndex, int fetchSize) {
MapContainer mapContainer = mapServiceContext.getMapContainer(query.getMapName());
Predicate predicate = queryOptimizer.optimize(query.getPredicate(), mapContainer.getIndexes(partiti... | [
"public",
"ResultSegment",
"runPartitionScanQueryOnPartitionChunk",
"(",
"Query",
"query",
",",
"int",
"partitionId",
",",
"int",
"tableIndex",
",",
"int",
"fetchSize",
")",
"{",
"MapContainer",
"mapContainer",
"=",
"mapServiceContext",
".",
"getMapContainer",
"(",
"q... | Runs a query on a chunk of a single partition. The chunk is defined by the offset {@code tableIndex}
and the soft limit {@code fetchSize}.
@param query the query
@param partitionId the partition which is queried
@param tableIndex the index at which to start querying
@param fetchSize the soft limit for the num... | [
"Runs",
"a",
"query",
"on",
"a",
"chunk",
"of",
"a",
"single",
"partition",
".",
"The",
"chunk",
"is",
"defined",
"by",
"the",
"offset",
"{",
"@code",
"tableIndex",
"}",
"and",
"the",
"soft",
"limit",
"{",
"@code",
"fetchSize",
"}",
"."
] | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/query/QueryRunner.java#L88-L99 |
Azure/azure-sdk-for-java | containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RegistriesInner.java | RegistriesInner.scheduleRunAsync | public Observable<RunInner> scheduleRunAsync(String resourceGroupName, String registryName, RunRequest runRequest) {
return scheduleRunWithServiceResponseAsync(resourceGroupName, registryName, runRequest).map(new Func1<ServiceResponse<RunInner>, RunInner>() {
@Override
public RunInner ca... | java | public Observable<RunInner> scheduleRunAsync(String resourceGroupName, String registryName, RunRequest runRequest) {
return scheduleRunWithServiceResponseAsync(resourceGroupName, registryName, runRequest).map(new Func1<ServiceResponse<RunInner>, RunInner>() {
@Override
public RunInner ca... | [
"public",
"Observable",
"<",
"RunInner",
">",
"scheduleRunAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"registryName",
",",
"RunRequest",
"runRequest",
")",
"{",
"return",
"scheduleRunWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"registryName",
... | Schedules a new run based on the request parameters and add it to the run queue.
@param resourceGroupName The name of the resource group to which the container registry belongs.
@param registryName The name of the container registry.
@param runRequest The parameters of a run that needs to scheduled.
@throws IllegalArg... | [
"Schedules",
"a",
"new",
"run",
"based",
"on",
"the",
"request",
"parameters",
"and",
"add",
"it",
"to",
"the",
"run",
"queue",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RegistriesInner.java#L1754-L1761 |
shekhargulati/strman-java | src/main/java/strman/Strman.java | Strman.ensureRight | public static String ensureRight(final String value, final String suffix, boolean caseSensitive) {
validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
return endsWith(value, suffix, caseSensitive) ? value : append(value, suffix);
} | java | public static String ensureRight(final String value, final String suffix, boolean caseSensitive) {
validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
return endsWith(value, suffix, caseSensitive) ? value : append(value, suffix);
} | [
"public",
"static",
"String",
"ensureRight",
"(",
"final",
"String",
"value",
",",
"final",
"String",
"suffix",
",",
"boolean",
"caseSensitive",
")",
"{",
"validate",
"(",
"value",
",",
"NULL_STRING_PREDICATE",
",",
"NULL_STRING_MSG_SUPPLIER",
")",
";",
"return",
... | Ensures that the value ends with suffix. If it doesn't, it's appended.
@param value The input String
@param suffix The substr to be ensured to be right
@param caseSensitive Use case (in-)sensitive matching for determining if value already ends with suffix
@return The string which is guarenteed to start ... | [
"Ensures",
"that",
"the",
"value",
"ends",
"with",
"suffix",
".",
"If",
"it",
"doesn",
"t",
"it",
"s",
"appended",
"."
] | train | https://github.com/shekhargulati/strman-java/blob/d0c2a10a6273fd6082f084e95156653ca55ce1be/src/main/java/strman/Strman.java#L403-L406 |
http-builder-ng/http-builder-ng | http-builder-ng-core/src/main/java/groovyx/net/http/optional/Download.java | Download.toStream | public static void toStream(final HttpConfig config, final String contentType, final OutputStream ostream) {
config.context(contentType, ID, ostream);
config.getResponse().parser(contentType, Download::streamParser);
} | java | public static void toStream(final HttpConfig config, final String contentType, final OutputStream ostream) {
config.context(contentType, ID, ostream);
config.getResponse().parser(contentType, Download::streamParser);
} | [
"public",
"static",
"void",
"toStream",
"(",
"final",
"HttpConfig",
"config",
",",
"final",
"String",
"contentType",
",",
"final",
"OutputStream",
"ostream",
")",
"{",
"config",
".",
"context",
"(",
"contentType",
",",
"ID",
",",
"ostream",
")",
";",
"config... | Downloads the content into an `OutputStream` with the specified content type.
@param config the `HttpConfig` instance
@param ostream the `OutputStream` to contain the content.
@param contentType the content type | [
"Downloads",
"the",
"content",
"into",
"an",
"OutputStream",
"with",
"the",
"specified",
"content",
"type",
"."
] | train | https://github.com/http-builder-ng/http-builder-ng/blob/865f37732c102c748d3db8b905199dac9222a525/http-builder-ng-core/src/main/java/groovyx/net/http/optional/Download.java#L114-L117 |
mygreen/super-csv-annotation | src/main/java/com/github/mygreen/supercsv/cellprocessor/ConversionProcessorHandler.java | ConversionProcessorHandler.register | public <A extends Annotation> void register(final Class<A> anno, final ConversionProcessorFactory<A> factory) {
factoryMap.put(anno, factory);
} | java | public <A extends Annotation> void register(final Class<A> anno, final ConversionProcessorFactory<A> factory) {
factoryMap.put(anno, factory);
} | [
"public",
"<",
"A",
"extends",
"Annotation",
">",
"void",
"register",
"(",
"final",
"Class",
"<",
"A",
">",
"anno",
",",
"final",
"ConversionProcessorFactory",
"<",
"A",
">",
"factory",
")",
"{",
"factoryMap",
".",
"put",
"(",
"anno",
",",
"factory",
")"... | アノテーションに対する{@link ConversionProcessorFactory}を登録する。
@param <A> アノテーションのタイプ
@param anno 関連づけるアノテーション
@param factory 制約の{@link CellProcessor}を作成する{@link ConversionProcessorFactory}の実装。 | [
"アノテーションに対する",
"{",
"@link",
"ConversionProcessorFactory",
"}",
"を登録する。"
] | train | https://github.com/mygreen/super-csv-annotation/blob/9910320cb6dc143be972c7d10d9ab5ffb09c3b84/src/main/java/com/github/mygreen/supercsv/cellprocessor/ConversionProcessorHandler.java#L88-L90 |
greese/dasein-cloud-cloudstack | src/main/java/org/dasein/cloud/cloudstack/network/LoadBalancers.java | LoadBalancers.uploadSslCertificate | private Document uploadSslCertificate(SSLCertificateCreateOptions opts, boolean cs44hack) throws InternalException, CloudException {
// TODO: add trace
final List<Param> params = new ArrayList<Param>();
try {
params.add(new Param("certificate",
cs44hack ? URLEncod... | java | private Document uploadSslCertificate(SSLCertificateCreateOptions opts, boolean cs44hack) throws InternalException, CloudException {
// TODO: add trace
final List<Param> params = new ArrayList<Param>();
try {
params.add(new Param("certificate",
cs44hack ? URLEncod... | [
"private",
"Document",
"uploadSslCertificate",
"(",
"SSLCertificateCreateOptions",
"opts",
",",
"boolean",
"cs44hack",
")",
"throws",
"InternalException",
",",
"CloudException",
"{",
"// TODO: add trace",
"final",
"List",
"<",
"Param",
">",
"params",
"=",
"new",
"Arra... | Upload SSL certificate, optionally using parameter double encoding to address CLOUDSTACK-6864 found in 4.4
@param opts
@param cs44hack
@return Document | [
"Upload",
"SSL",
"certificate",
"optionally",
"using",
"parameter",
"double",
"encoding",
"to",
"address",
"CLOUDSTACK",
"-",
"6864",
"found",
"in",
"4",
".",
"4"
] | train | https://github.com/greese/dasein-cloud-cloudstack/blob/d86d42abbe4f277290b2c6b5d38ced506c57fee6/src/main/java/org/dasein/cloud/cloudstack/network/LoadBalancers.java#L788-L804 |
alkacon/opencms-core | src/org/opencms/i18n/CmsVfsBundleManager.java | CmsVfsBundleManager.addPropertyBundle | private void addPropertyBundle(CmsResource bundleResource) {
NameAndLocale nameAndLocale = getNameAndLocale(bundleResource);
Locale locale = nameAndLocale.getLocale();
String baseName = nameAndLocale.getName();
m_bundleBaseNames.add(baseName);
LOG.info(
Stri... | java | private void addPropertyBundle(CmsResource bundleResource) {
NameAndLocale nameAndLocale = getNameAndLocale(bundleResource);
Locale locale = nameAndLocale.getLocale();
String baseName = nameAndLocale.getName();
m_bundleBaseNames.add(baseName);
LOG.info(
Stri... | [
"private",
"void",
"addPropertyBundle",
"(",
"CmsResource",
"bundleResource",
")",
"{",
"NameAndLocale",
"nameAndLocale",
"=",
"getNameAndLocale",
"(",
"bundleResource",
")",
";",
"Locale",
"locale",
"=",
"nameAndLocale",
".",
"getLocale",
"(",
")",
";",
"String",
... | Adds a resource bundle based on a properties file in the VFS.<p>
@param bundleResource the properties file | [
"Adds",
"a",
"resource",
"bundle",
"based",
"on",
"a",
"properties",
"file",
"in",
"the",
"VFS",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/i18n/CmsVfsBundleManager.java#L285-L307 |
b3dgs/lionengine | lionengine-core-awt/src/main/java/com/b3dgs/lionengine/awt/MouseMoveAwt.java | MouseMoveAwt.robotTeleport | void robotTeleport(int nx, int ny)
{
oldX = nx;
oldY = ny;
x = nx;
y = ny;
wx = nx;
wy = ny;
mx = 0;
my = 0;
moved = false;
} | java | void robotTeleport(int nx, int ny)
{
oldX = nx;
oldY = ny;
x = nx;
y = ny;
wx = nx;
wy = ny;
mx = 0;
my = 0;
moved = false;
} | [
"void",
"robotTeleport",
"(",
"int",
"nx",
",",
"int",
"ny",
")",
"{",
"oldX",
"=",
"nx",
";",
"oldY",
"=",
"ny",
";",
"x",
"=",
"nx",
";",
"y",
"=",
"ny",
";",
"wx",
"=",
"nx",
";",
"wy",
"=",
"ny",
";",
"mx",
"=",
"0",
";",
"my",
"=",
... | Teleport mouse with robot.
@param nx The new X.
@param ny The new Y. | [
"Teleport",
"mouse",
"with",
"robot",
"."
] | train | https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core-awt/src/main/java/com/b3dgs/lionengine/awt/MouseMoveAwt.java#L118-L129 |
Stratio/cassandra-lucene-index | builder/src/main/java/com/stratio/cassandra/lucene/builder/Builder.java | Builder.partitionerOnColumn | public static Partitioner.OnColumn partitionerOnColumn(int partitions, String column) {
return new Partitioner.OnColumn(partitions, column);
} | java | public static Partitioner.OnColumn partitionerOnColumn(int partitions, String column) {
return new Partitioner.OnColumn(partitions, column);
} | [
"public",
"static",
"Partitioner",
".",
"OnColumn",
"partitionerOnColumn",
"(",
"int",
"partitions",
",",
"String",
"column",
")",
"{",
"return",
"new",
"Partitioner",
".",
"OnColumn",
"(",
"partitions",
",",
"column",
")",
";",
"}"
] | Returns a new {@link Partitioner.OnColumn} based on the specified partition key column. Rows will be stored in an
index partition determined by the hash of the specified partition key column. Both partition-directed as well as
token range searches containing an CQL equality filter over the selected partition key column... | [
"Returns",
"a",
"new",
"{",
"@link",
"Partitioner",
".",
"OnColumn",
"}",
"based",
"on",
"the",
"specified",
"partition",
"key",
"column",
".",
"Rows",
"will",
"be",
"stored",
"in",
"an",
"index",
"partition",
"determined",
"by",
"the",
"hash",
"of",
"the"... | train | https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/builder/src/main/java/com/stratio/cassandra/lucene/builder/Builder.java#L801-L803 |
DDTH/ddth-commons | ddth-commons-core/src/main/java/com/github/ddth/commons/utils/DPathUtils.java | DPathUtils.getValue | public static Object getValue(Object target, String dPath) {
if (target instanceof JsonNode) {
return getValue((JsonNode) target, dPath);
}
String[] paths = splitDpath(dPath);
Object result = target;
for (String path : paths) {
result = extractValue(result... | java | public static Object getValue(Object target, String dPath) {
if (target instanceof JsonNode) {
return getValue((JsonNode) target, dPath);
}
String[] paths = splitDpath(dPath);
Object result = target;
for (String path : paths) {
result = extractValue(result... | [
"public",
"static",
"Object",
"getValue",
"(",
"Object",
"target",
",",
"String",
"dPath",
")",
"{",
"if",
"(",
"target",
"instanceof",
"JsonNode",
")",
"{",
"return",
"getValue",
"(",
"(",
"JsonNode",
")",
"target",
",",
"dPath",
")",
";",
"}",
"String"... | Extract a value from the target object using DPath expression.
@param target
@param dPath | [
"Extract",
"a",
"value",
"from",
"the",
"target",
"object",
"using",
"DPath",
"expression",
"."
] | train | https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/DPathUtils.java#L411-L421 |
liferay/com-liferay-commerce | commerce-product-type-virtual-service/src/main/java/com/liferay/commerce/product/type/virtual/service/persistence/impl/CPDefinitionVirtualSettingPersistenceImpl.java | CPDefinitionVirtualSettingPersistenceImpl.findByC_C | @Override
public CPDefinitionVirtualSetting findByC_C(long classNameId, long classPK)
throws NoSuchCPDefinitionVirtualSettingException {
CPDefinitionVirtualSetting cpDefinitionVirtualSetting = fetchByC_C(classNameId,
classPK);
if (cpDefinitionVirtualSetting == null) {
StringBundler msg = new StringBundle... | java | @Override
public CPDefinitionVirtualSetting findByC_C(long classNameId, long classPK)
throws NoSuchCPDefinitionVirtualSettingException {
CPDefinitionVirtualSetting cpDefinitionVirtualSetting = fetchByC_C(classNameId,
classPK);
if (cpDefinitionVirtualSetting == null) {
StringBundler msg = new StringBundle... | [
"@",
"Override",
"public",
"CPDefinitionVirtualSetting",
"findByC_C",
"(",
"long",
"classNameId",
",",
"long",
"classPK",
")",
"throws",
"NoSuchCPDefinitionVirtualSettingException",
"{",
"CPDefinitionVirtualSetting",
"cpDefinitionVirtualSetting",
"=",
"fetchByC_C",
"(",
"clas... | Returns the cp definition virtual setting where classNameId = ? and classPK = ? or throws a {@link NoSuchCPDefinitionVirtualSettingException} if it could not be found.
@param classNameId the class name ID
@param classPK the class pk
@return the matching cp definition virtual setting
@throws NoSuchCPDefinitionV... | [
"Returns",
"the",
"cp",
"definition",
"virtual",
"setting",
"where",
"classNameId",
"=",
"?",
";",
"and",
"classPK",
"=",
"?",
";",
"or",
"throws",
"a",
"{",
"@link",
"NoSuchCPDefinitionVirtualSettingException",
"}",
"if",
"it",
"could",
"not",
"be",
"fo... | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-type-virtual-service/src/main/java/com/liferay/commerce/product/type/virtual/service/persistence/impl/CPDefinitionVirtualSettingPersistenceImpl.java#L1527-L1554 |
SeleniumHQ/selenium | java/client/src/org/openqa/selenium/remote/RemoteWebDriverBuilder.java | RemoteWebDriverBuilder.setCapability | public RemoteWebDriverBuilder setCapability(String capabilityName, String value) {
if (!OK_KEYS.test(capabilityName)) {
throw new IllegalArgumentException("Capability is not valid");
}
if (value == null) {
throw new IllegalArgumentException("Null values are not allowed");
}
additionalCa... | java | public RemoteWebDriverBuilder setCapability(String capabilityName, String value) {
if (!OK_KEYS.test(capabilityName)) {
throw new IllegalArgumentException("Capability is not valid");
}
if (value == null) {
throw new IllegalArgumentException("Null values are not allowed");
}
additionalCa... | [
"public",
"RemoteWebDriverBuilder",
"setCapability",
"(",
"String",
"capabilityName",
",",
"String",
"value",
")",
"{",
"if",
"(",
"!",
"OK_KEYS",
".",
"test",
"(",
"capabilityName",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Capability is ... | Sets a capability for every single alternative when the session is created. These capabilities
are only set once the session is created, so this will be set on capabilities added via
{@link #addAlternative(Capabilities)} or {@link #oneOf(Capabilities, Capabilities...)} even
after this method call. | [
"Sets",
"a",
"capability",
"for",
"every",
"single",
"alternative",
"when",
"the",
"session",
"is",
"created",
".",
"These",
"capabilities",
"are",
"only",
"set",
"once",
"the",
"session",
"is",
"created",
"so",
"this",
"will",
"be",
"set",
"on",
"capabiliti... | train | https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/remote/RemoteWebDriverBuilder.java#L146-L156 |
jmxtrans/embedded-jmxtrans | src/main/java/org/jmxtrans/embedded/output/StackdriverWriter.java | StackdriverWriter.start | @Override
public void start() {
try {
url = new URL(getStringSetting(SETTING_URL, DEFAULT_STACKDRIVER_API_URL));
} catch (MalformedURLException e) {
throw new EmbeddedJmxTransException(e);
}
apiKey = getStringSetting(SETTING_TOKEN);
if (getStringSetting(SETTING_PROXY_HOST, null) != null && !getString... | java | @Override
public void start() {
try {
url = new URL(getStringSetting(SETTING_URL, DEFAULT_STACKDRIVER_API_URL));
} catch (MalformedURLException e) {
throw new EmbeddedJmxTransException(e);
}
apiKey = getStringSetting(SETTING_TOKEN);
if (getStringSetting(SETTING_PROXY_HOST, null) != null && !getString... | [
"@",
"Override",
"public",
"void",
"start",
"(",
")",
"{",
"try",
"{",
"url",
"=",
"new",
"URL",
"(",
"getStringSetting",
"(",
"SETTING_URL",
",",
"DEFAULT_STACKDRIVER_API_URL",
")",
")",
";",
"}",
"catch",
"(",
"MalformedURLException",
"e",
")",
"{",
"thr... | Initial setup for the writer class. Loads in settings and initializes one-time setup variables like instanceId. | [
"Initial",
"setup",
"for",
"the",
"writer",
"class",
".",
"Loads",
"in",
"settings",
"and",
"initializes",
"one",
"-",
"time",
"setup",
"variables",
"like",
"instanceId",
"."
] | train | https://github.com/jmxtrans/embedded-jmxtrans/blob/17224389e7d8323284cabc2a5167fc03bed6d223/src/main/java/org/jmxtrans/embedded/output/StackdriverWriter.java#L110-L149 |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nslimitselector.java | nslimitselector.get | public static nslimitselector get(nitro_service service, String selectorname) throws Exception{
nslimitselector obj = new nslimitselector();
obj.set_selectorname(selectorname);
nslimitselector response = (nslimitselector) obj.get_resource(service);
return response;
} | java | public static nslimitselector get(nitro_service service, String selectorname) throws Exception{
nslimitselector obj = new nslimitselector();
obj.set_selectorname(selectorname);
nslimitselector response = (nslimitselector) obj.get_resource(service);
return response;
} | [
"public",
"static",
"nslimitselector",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"selectorname",
")",
"throws",
"Exception",
"{",
"nslimitselector",
"obj",
"=",
"new",
"nslimitselector",
"(",
")",
";",
"obj",
".",
"set_selectorname",
"(",
"selectornam... | Use this API to fetch nslimitselector resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"nslimitselector",
"resource",
"of",
"given",
"name",
"."
] | train | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nslimitselector.java#L276-L281 |
RestComm/media-core | ice/src/main/java/org/restcomm/media/core/ice/harvest/HostCandidateHarvester.java | HostCandidateHarvester.openUdpChannel | private DatagramChannel openUdpChannel(InetAddress localAddress, int port, Selector selector) throws IOException {
DatagramChannel channel = DatagramChannel.open();
channel.configureBlocking(false);
// Register selector for reading operations
channel.register(selector, SelectionKey.OP_READ | SelectionKey.OP_WRI... | java | private DatagramChannel openUdpChannel(InetAddress localAddress, int port, Selector selector) throws IOException {
DatagramChannel channel = DatagramChannel.open();
channel.configureBlocking(false);
// Register selector for reading operations
channel.register(selector, SelectionKey.OP_READ | SelectionKey.OP_WRI... | [
"private",
"DatagramChannel",
"openUdpChannel",
"(",
"InetAddress",
"localAddress",
",",
"int",
"port",
",",
"Selector",
"selector",
")",
"throws",
"IOException",
"{",
"DatagramChannel",
"channel",
"=",
"DatagramChannel",
".",
"open",
"(",
")",
";",
"channel",
"."... | Opens a datagram channel and binds it to an address.
@param localAddress
The address to bind the channel to.
@param port
The port to use
@return The bound datagram channel
@throws IOException
When an error occurs while binding the datagram channel. | [
"Opens",
"a",
"datagram",
"channel",
"and",
"binds",
"it",
"to",
"an",
"address",
"."
] | train | https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/ice/src/main/java/org/restcomm/media/core/ice/harvest/HostCandidateHarvester.java#L150-L157 |
UrielCh/ovh-java-sdk | ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java | ApiOvhDedicatedserver.serviceName_virtualNetworkInterface_GET | public ArrayList<String> serviceName_virtualNetworkInterface_GET(String serviceName, OvhVirtualNetworkInterfaceModeEnum mode, String name, String vrack) throws IOException {
String qPath = "/dedicated/server/{serviceName}/virtualNetworkInterface";
StringBuilder sb = path(qPath, serviceName);
query(sb, "mode", mod... | java | public ArrayList<String> serviceName_virtualNetworkInterface_GET(String serviceName, OvhVirtualNetworkInterfaceModeEnum mode, String name, String vrack) throws IOException {
String qPath = "/dedicated/server/{serviceName}/virtualNetworkInterface";
StringBuilder sb = path(qPath, serviceName);
query(sb, "mode", mod... | [
"public",
"ArrayList",
"<",
"String",
">",
"serviceName_virtualNetworkInterface_GET",
"(",
"String",
"serviceName",
",",
"OvhVirtualNetworkInterfaceModeEnum",
"mode",
",",
"String",
"name",
",",
"String",
"vrack",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
... | List server VirtualNetworkInterfaces
REST: GET /dedicated/server/{serviceName}/virtualNetworkInterface
@param name [required] Filter the value of name property (=)
@param vrack [required] Filter the value of vrack property (=)
@param mode [required] Filter the value of mode property (=)
@param serviceName [required] T... | [
"List",
"server",
"VirtualNetworkInterfaces"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L185-L193 |
apereo/cas | support/cas-server-support-shell/src/main/java/org/apereo/cas/shell/commands/util/ValidateLdapConnectionCommand.java | ValidateLdapConnectionCommand.validateLdap | @ShellMethod(key = "validate-ldap", value = "Test connections to an LDAP server to verify connectivity, SSL, etc")
public static void validateLdap(
@ShellOption(value = {"url"},
help = "LDAP URL to test, comma-separated.") final String url,
@ShellOption(value = {"bindDn"},
he... | java | @ShellMethod(key = "validate-ldap", value = "Test connections to an LDAP server to verify connectivity, SSL, etc")
public static void validateLdap(
@ShellOption(value = {"url"},
help = "LDAP URL to test, comma-separated.") final String url,
@ShellOption(value = {"bindDn"},
he... | [
"@",
"ShellMethod",
"(",
"key",
"=",
"\"validate-ldap\"",
",",
"value",
"=",
"\"Test connections to an LDAP server to verify connectivity, SSL, etc\"",
")",
"public",
"static",
"void",
"validateLdap",
"(",
"@",
"ShellOption",
"(",
"value",
"=",
"{",
"\"url\"",
"}",
",... | Validate endpoint.
@param url the url
@param bindDn the bind dn
@param bindCredential the bind credential
@param baseDn the base dn
@param searchFilter the search filter
@param userPassword the user password
@param userAttributes the user attributes | [
"Validate",
"endpoint",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-shell/src/main/java/org/apereo/cas/shell/commands/util/ValidateLdapConnectionCommand.java#L42-L63 |
fcrepo4/fcrepo4 | fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/services/ContainerServiceImpl.java | ContainerServiceImpl.find | @Override
public Container find(final FedoraSession session, final String path) {
final Node node = findNode(session, path);
return cast(node);
} | java | @Override
public Container find(final FedoraSession session, final String path) {
final Node node = findNode(session, path);
return cast(node);
} | [
"@",
"Override",
"public",
"Container",
"find",
"(",
"final",
"FedoraSession",
"session",
",",
"final",
"String",
"path",
")",
"{",
"final",
"Node",
"node",
"=",
"findNode",
"(",
"session",
",",
"path",
")",
";",
"return",
"cast",
"(",
"node",
")",
";",
... | Retrieve a {@link org.fcrepo.kernel.api.models.Container} instance by pid and dsid
@param path the path
@param session the session
@return A {@link org.fcrepo.kernel.api.models.Container} with the proffered PID | [
"Retrieve",
"a",
"{",
"@link",
"org",
".",
"fcrepo",
".",
"kernel",
".",
"api",
".",
"models",
".",
"Container",
"}",
"instance",
"by",
"pid",
"and",
"dsid"
] | train | https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/services/ContainerServiceImpl.java#L119-L124 |
lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java | PerspectiveOps.projectionSplit | public static void projectionSplit( DMatrixRMaj P , DMatrixRMaj M , Vector3D_F64 T ) {
CommonOps_DDRM.extract(P,0,3,0,3,M,0,0);
T.x = P.get(0,3);
T.y = P.get(1,3);
T.z = P.get(2,3);
} | java | public static void projectionSplit( DMatrixRMaj P , DMatrixRMaj M , Vector3D_F64 T ) {
CommonOps_DDRM.extract(P,0,3,0,3,M,0,0);
T.x = P.get(0,3);
T.y = P.get(1,3);
T.z = P.get(2,3);
} | [
"public",
"static",
"void",
"projectionSplit",
"(",
"DMatrixRMaj",
"P",
",",
"DMatrixRMaj",
"M",
",",
"Vector3D_F64",
"T",
")",
"{",
"CommonOps_DDRM",
".",
"extract",
"(",
"P",
",",
"0",
",",
"3",
",",
"0",
",",
"3",
",",
"M",
",",
"0",
",",
"0",
"... | Splits the projection matrix into a 3x3 matrix and 3x1 vector.
@param P (Input) 3x4 projection matirx
@param M (Output) M = P(:,0:2)
@param T (Output) T = P(:,3) | [
"Splits",
"the",
"projection",
"matrix",
"into",
"a",
"3x3",
"matrix",
"and",
"3x1",
"vector",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java#L650-L655 |
revapi/revapi | revapi-java-spi/src/main/java/org/revapi/java/spi/CheckBase.java | CheckBase.isBothAccessible | public boolean isBothAccessible(@Nullable JavaModelElement a, @Nullable JavaModelElement b) {
if (a == null || b == null) {
return false;
}
return isAccessible(a) && isAccessible(b);
} | java | public boolean isBothAccessible(@Nullable JavaModelElement a, @Nullable JavaModelElement b) {
if (a == null || b == null) {
return false;
}
return isAccessible(a) && isAccessible(b);
} | [
"public",
"boolean",
"isBothAccessible",
"(",
"@",
"Nullable",
"JavaModelElement",
"a",
",",
"@",
"Nullable",
"JavaModelElement",
"b",
")",
"{",
"if",
"(",
"a",
"==",
"null",
"||",
"b",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"return",
"isAc... | Checks whether both provided elements are public or protected. If one at least one of them is null, the method
returns false, because the accessibility cannot be truthfully detected in that case.
@param a first element
@param b second element
@return true if both elements are not null and accessible (i.e. public or pr... | [
"Checks",
"whether",
"both",
"provided",
"elements",
"are",
"public",
"or",
"protected",
".",
"If",
"one",
"at",
"least",
"one",
"of",
"them",
"is",
"null",
"the",
"method",
"returns",
"false",
"because",
"the",
"accessibility",
"cannot",
"be",
"truthfully",
... | train | https://github.com/revapi/revapi/blob/e070b136d977441ab96fdce067a13e7e0423295b/revapi-java-spi/src/main/java/org/revapi/java/spi/CheckBase.java#L83-L89 |
OpenLiberty/open-liberty | dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/internal/FormLoginAuthenticator.java | FormLoginAuthenticator.handleRedirect | private AuthenticationResult handleRedirect(HttpServletRequest req,
HttpServletResponse res,
WebRequest webRequest) {
AuthenticationResult authResult;
String loginURL = getFormLoginURL(req, webRequest, webAp... | java | private AuthenticationResult handleRedirect(HttpServletRequest req,
HttpServletResponse res,
WebRequest webRequest) {
AuthenticationResult authResult;
String loginURL = getFormLoginURL(req, webRequest, webAp... | [
"private",
"AuthenticationResult",
"handleRedirect",
"(",
"HttpServletRequest",
"req",
",",
"HttpServletResponse",
"res",
",",
"WebRequest",
"webRequest",
")",
"{",
"AuthenticationResult",
"authResult",
";",
"String",
"loginURL",
"=",
"getFormLoginURL",
"(",
"req",
",",... | This method save post parameters in the cookie or session and
redirect to a login page.
@param req
@param res
@param loginURL
@return authenticationResult | [
"This",
"method",
"save",
"post",
"parameters",
"in",
"the",
"cookie",
"or",
"session",
"and",
"redirect",
"to",
"a",
"login",
"page",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/internal/FormLoginAuthenticator.java#L126-L147 |
google/error-prone-javac | src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java | ClassReader.sigToType | Type sigToType(byte[] sig, int offset, int len) {
signature = sig;
sigp = offset;
siglimit = offset + len;
return sigToType();
} | java | Type sigToType(byte[] sig, int offset, int len) {
signature = sig;
sigp = offset;
siglimit = offset + len;
return sigToType();
} | [
"Type",
"sigToType",
"(",
"byte",
"[",
"]",
"sig",
",",
"int",
"offset",
",",
"int",
"len",
")",
"{",
"signature",
"=",
"sig",
";",
"sigp",
"=",
"offset",
";",
"siglimit",
"=",
"offset",
"+",
"len",
";",
"return",
"sigToType",
"(",
")",
";",
"}"
] | Convert signature to type, where signature is a byte array segment. | [
"Convert",
"signature",
"to",
"type",
"where",
"signature",
"is",
"a",
"byte",
"array",
"segment",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java#L652-L657 |
phax/ph-masterdata | ph-masterdata/src/main/java/com/helger/masterdata/ean/AbstractUPCEAN.java | AbstractUPCEAN.calcChecksumChar | protected static char calcChecksumChar (@Nonnull final String sMsg, @Nonnegative final int nLength)
{
ValueEnforcer.notNull (sMsg, "Msg");
ValueEnforcer.isBetweenInclusive (nLength, "Length", 0, sMsg.length ());
return asChar (calcChecksum (sMsg.toCharArray (), nLength));
} | java | protected static char calcChecksumChar (@Nonnull final String sMsg, @Nonnegative final int nLength)
{
ValueEnforcer.notNull (sMsg, "Msg");
ValueEnforcer.isBetweenInclusive (nLength, "Length", 0, sMsg.length ());
return asChar (calcChecksum (sMsg.toCharArray (), nLength));
} | [
"protected",
"static",
"char",
"calcChecksumChar",
"(",
"@",
"Nonnull",
"final",
"String",
"sMsg",
",",
"@",
"Nonnegative",
"final",
"int",
"nLength",
")",
"{",
"ValueEnforcer",
".",
"notNull",
"(",
"sMsg",
",",
"\"Msg\"",
")",
";",
"ValueEnforcer",
".",
"is... | Calculates the check character for a given message
@param sMsg
the message
@param nLength
The number of characters to be checked. Must be ≥ 0 and <
message.length
@return char the check character | [
"Calculates",
"the",
"check",
"character",
"for",
"a",
"given",
"message"
] | train | https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/ean/AbstractUPCEAN.java#L144-L150 |
couchbase/couchbase-lite-java | src/main/java/com/couchbase/lite/Expression.java | Expression.notEqualTo | @NonNull
public Expression notEqualTo(@NonNull Expression expression) {
if (expression == null) {
throw new IllegalArgumentException("expression cannot be null.");
}
return new BinaryExpression(this, expression, BinaryExpression.OpType.NotEqualTo);
} | java | @NonNull
public Expression notEqualTo(@NonNull Expression expression) {
if (expression == null) {
throw new IllegalArgumentException("expression cannot be null.");
}
return new BinaryExpression(this, expression, BinaryExpression.OpType.NotEqualTo);
} | [
"@",
"NonNull",
"public",
"Expression",
"notEqualTo",
"(",
"@",
"NonNull",
"Expression",
"expression",
")",
"{",
"if",
"(",
"expression",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"expression cannot be null.\"",
")",
";",
"}",
"r... | Create a NOT equal to expression that evaluates whether or not the current expression
is not equal to the given expression.
@param expression the expression to compare with the current expression.
@return a NOT equal to exprssion. | [
"Create",
"a",
"NOT",
"equal",
"to",
"expression",
"that",
"evaluates",
"whether",
"or",
"not",
"the",
"current",
"expression",
"is",
"not",
"equal",
"to",
"the",
"given",
"expression",
"."
] | train | https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/Expression.java#L692-L698 |
netty/netty | codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostRequestEncoder.java | HttpPostRequestEncoder.encodeAttribute | @SuppressWarnings("unchecked")
private String encodeAttribute(String s, Charset charset) throws ErrorDataEncoderException {
if (s == null) {
return "";
}
try {
String encoded = URLEncoder.encode(s, charset.name());
if (encoderMode == EncoderMode.RFC3986) {... | java | @SuppressWarnings("unchecked")
private String encodeAttribute(String s, Charset charset) throws ErrorDataEncoderException {
if (s == null) {
return "";
}
try {
String encoded = URLEncoder.encode(s, charset.name());
if (encoderMode == EncoderMode.RFC3986) {... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"String",
"encodeAttribute",
"(",
"String",
"s",
",",
"Charset",
"charset",
")",
"throws",
"ErrorDataEncoderException",
"{",
"if",
"(",
"s",
"==",
"null",
")",
"{",
"return",
"\"\"",
";",
"}",
"t... | Encode one attribute
@return the encoded attribute
@throws ErrorDataEncoderException
if the encoding is in error | [
"Encode",
"one",
"attribute"
] | train | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostRequestEncoder.java#L836-L853 |
TNG/JGiven | jgiven-core/src/main/java/com/tngtech/jgiven/attachment/MediaType.java | MediaType.nonBinary | public static MediaType nonBinary( MediaType.Type type, String subType, Charset charSet ) {
ApiUtil.notNull( charSet, "charset must not be null" );
return new MediaType( type, subType, charSet );
} | java | public static MediaType nonBinary( MediaType.Type type, String subType, Charset charSet ) {
ApiUtil.notNull( charSet, "charset must not be null" );
return new MediaType( type, subType, charSet );
} | [
"public",
"static",
"MediaType",
"nonBinary",
"(",
"MediaType",
".",
"Type",
"type",
",",
"String",
"subType",
",",
"Charset",
"charSet",
")",
"{",
"ApiUtil",
".",
"notNull",
"(",
"charSet",
",",
"\"charset must not be null\"",
")",
";",
"return",
"new",
"Medi... | Creates a non-binary media type with the given type, subtype, and charSet
@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null} | [
"Creates",
"a",
"non",
"-",
"binary",
"media",
"type",
"with",
"the",
"given",
"type",
"subtype",
"and",
"charSet"
] | train | https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/attachment/MediaType.java#L185-L188 |
landawn/AbacusUtil | src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java | PoolablePreparedStatement.setNClob | @Override
public void setNClob(int parameterIndex, Reader reader) throws SQLException {
internalStmt.setNClob(parameterIndex, reader);
} | java | @Override
public void setNClob(int parameterIndex, Reader reader) throws SQLException {
internalStmt.setNClob(parameterIndex, reader);
} | [
"@",
"Override",
"public",
"void",
"setNClob",
"(",
"int",
"parameterIndex",
",",
"Reader",
"reader",
")",
"throws",
"SQLException",
"{",
"internalStmt",
".",
"setNClob",
"(",
"parameterIndex",
",",
"reader",
")",
";",
"}"
] | Method setNClob.
@param parameterIndex
@param reader
@throws SQLException
@see java.sql.PreparedStatement#setNClob(int, Reader) | [
"Method",
"setNClob",
"."
] | train | https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java#L830-L833 |
contentful/contentful-management.java | src/main/java/com/contentful/java/cma/ModuleEditorInterfaces.java | ModuleEditorInterfaces.fetchOne | public CMAEditorInterface fetchOne(String spaceId, String environmentId, String contentTypeId) {
assertNotNull(spaceId, "spaceId");
assertNotNull(environmentId, "environmentId");
assertNotNull(contentTypeId, "contentTypeId");
return service.fetchOne(spaceId, environmentId, contentTypeId).blockingFirst(... | java | public CMAEditorInterface fetchOne(String spaceId, String environmentId, String contentTypeId) {
assertNotNull(spaceId, "spaceId");
assertNotNull(environmentId, "environmentId");
assertNotNull(contentTypeId, "contentTypeId");
return service.fetchOne(spaceId, environmentId, contentTypeId).blockingFirst(... | [
"public",
"CMAEditorInterface",
"fetchOne",
"(",
"String",
"spaceId",
",",
"String",
"environmentId",
",",
"String",
"contentTypeId",
")",
"{",
"assertNotNull",
"(",
"spaceId",
",",
"\"spaceId\"",
")",
";",
"assertNotNull",
"(",
"environmentId",
",",
"\"environmentI... | Get the editor interface by id, using the given space and environment.
<p>
This method will override the configuration specified through
{@link CMAClient.Builder#setSpaceId(String)} and
{@link CMAClient.Builder#setEnvironmentId(String)}.
@param spaceId the id of the space this environment is part of.
@param envi... | [
"Get",
"the",
"editor",
"interface",
"by",
"id",
"using",
"the",
"given",
"space",
"and",
"environment",
".",
"<p",
">",
"This",
"method",
"will",
"override",
"the",
"configuration",
"specified",
"through",
"{",
"@link",
"CMAClient",
".",
"Builder#setSpaceId",
... | train | https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleEditorInterfaces.java#L86-L92 |
jenkinsci/jenkins | core/src/main/java/jenkins/model/Nodes.java | Nodes.replaceNode | public boolean replaceNode(final Node oldOne, final @Nonnull Node newOne) throws IOException {
if (oldOne == nodes.get(oldOne.getNodeName())) {
// use the queue lock until Nodes has a way of directly modifying a single node.
Queue.withLock(new Runnable() {
public void run... | java | public boolean replaceNode(final Node oldOne, final @Nonnull Node newOne) throws IOException {
if (oldOne == nodes.get(oldOne.getNodeName())) {
// use the queue lock until Nodes has a way of directly modifying a single node.
Queue.withLock(new Runnable() {
public void run... | [
"public",
"boolean",
"replaceNode",
"(",
"final",
"Node",
"oldOne",
",",
"final",
"@",
"Nonnull",
"Node",
"newOne",
")",
"throws",
"IOException",
"{",
"if",
"(",
"oldOne",
"==",
"nodes",
".",
"get",
"(",
"oldOne",
".",
"getNodeName",
"(",
")",
")",
")",
... | Replace node of given name.
@return {@code true} if node was replaced.
@since 2.8 | [
"Replace",
"node",
"of",
"given",
"name",
"."
] | train | https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/Nodes.java#L224-L245 |
pedrovgs/DraggablePanel | draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java | DraggableViewCallback.clampViewPositionHorizontal | @Override public int clampViewPositionHorizontal(View child, int left, int dx) {
int newLeft = draggedView.getLeft();
if ((draggableView.isMinimized() && Math.abs(dx) > MINIMUM_DX_FOR_HORIZONTAL_DRAG) || (
draggableView.isDragViewAtBottom()
&& !draggableView.isDragViewAtRight())) {
new... | java | @Override public int clampViewPositionHorizontal(View child, int left, int dx) {
int newLeft = draggedView.getLeft();
if ((draggableView.isMinimized() && Math.abs(dx) > MINIMUM_DX_FOR_HORIZONTAL_DRAG) || (
draggableView.isDragViewAtBottom()
&& !draggableView.isDragViewAtRight())) {
new... | [
"@",
"Override",
"public",
"int",
"clampViewPositionHorizontal",
"(",
"View",
"child",
",",
"int",
"left",
",",
"int",
"dx",
")",
"{",
"int",
"newLeft",
"=",
"draggedView",
".",
"getLeft",
"(",
")",
";",
"if",
"(",
"(",
"draggableView",
".",
"isMinimized",... | Override method used to configure the horizontal drag. Restrict the motion of the dragged
child view along the horizontal axis.
@param child child view being dragged.
@param left attempted motion along the X axis.
@param dx proposed change in position for left.
@return the new clamped position for left. | [
"Override",
"method",
"used",
"to",
"configure",
"the",
"horizontal",
"drag",
".",
"Restrict",
"the",
"motion",
"of",
"the",
"dragged",
"child",
"view",
"along",
"the",
"horizontal",
"axis",
"."
] | train | https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java#L108-L116 |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/Stylesheet.java | Stylesheet.containsExcludeResultPrefix | public boolean containsExcludeResultPrefix(String prefix, String uri)
{
if (null == m_ExcludeResultPrefixs || uri == null )
return false;
// This loop is ok here because this code only runs during
// stylesheet compile time.
for (int i =0; i< m_ExcludeResultPrefixs.size(); i++)
{
... | java | public boolean containsExcludeResultPrefix(String prefix, String uri)
{
if (null == m_ExcludeResultPrefixs || uri == null )
return false;
// This loop is ok here because this code only runs during
// stylesheet compile time.
for (int i =0; i< m_ExcludeResultPrefixs.size(); i++)
{
... | [
"public",
"boolean",
"containsExcludeResultPrefix",
"(",
"String",
"prefix",
",",
"String",
"uri",
")",
"{",
"if",
"(",
"null",
"==",
"m_ExcludeResultPrefixs",
"||",
"uri",
"==",
"null",
")",
"return",
"false",
";",
"// This loop is ok here because this code only runs... | Get whether or not the passed prefix is contained flagged by
the "exclude-result-prefixes" property.
@see <a href="http://www.w3.org/TR/xslt#literal-result-element">literal-result-element in XSLT Specification</a>
@param prefix non-null reference to prefix that might be excluded.
@param uri reference to namespace that... | [
"Get",
"whether",
"or",
"not",
"the",
"passed",
"prefix",
"is",
"contained",
"flagged",
"by",
"the",
"exclude",
"-",
"result",
"-",
"prefixes",
"property",
".",
"@see",
"<a",
"href",
"=",
"http",
":",
"//",
"www",
".",
"w3",
".",
"org",
"/",
"TR",
"/... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/Stylesheet.java#L348-L368 |
burberius/eve-esi | src/main/java/net/troja/eve/esi/api/UserInterfaceApi.java | UserInterfaceApi.postUiOpenwindowNewmail | public void postUiOpenwindowNewmail(String datasource, String token, UiNewMail uiNewMail) throws ApiException {
postUiOpenwindowNewmailWithHttpInfo(datasource, token, uiNewMail);
} | java | public void postUiOpenwindowNewmail(String datasource, String token, UiNewMail uiNewMail) throws ApiException {
postUiOpenwindowNewmailWithHttpInfo(datasource, token, uiNewMail);
} | [
"public",
"void",
"postUiOpenwindowNewmail",
"(",
"String",
"datasource",
",",
"String",
"token",
",",
"UiNewMail",
"uiNewMail",
")",
"throws",
"ApiException",
"{",
"postUiOpenwindowNewmailWithHttpInfo",
"(",
"datasource",
",",
"token",
",",
"uiNewMail",
")",
";",
"... | Open New Mail Window Open the New Mail window, according to settings from
the request if applicable --- SSO Scope: esi-ui.open_window.v1
@param datasource
The server name you would like data from (optional, default to
tranquility)
@param token
Access token to use if unable to set a header (optional)
@param uiNewMail
(... | [
"Open",
"New",
"Mail",
"Window",
"Open",
"the",
"New",
"Mail",
"window",
"according",
"to",
"settings",
"from",
"the",
"request",
"if",
"applicable",
"---",
"SSO",
"Scope",
":",
"esi",
"-",
"ui",
".",
"open_window",
".",
"v1"
] | train | https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/UserInterfaceApi.java#L749-L751 |
soi-toolkit/soi-toolkit-mule | commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/util/MuleUtil.java | MuleUtil.getImmutableEndpoint | public static ImmutableEndpoint getImmutableEndpoint(MuleContext muleContext, String endpointName) throws IOException {
ImmutableEndpoint endpoint = null;
Object o = muleContext.getRegistry().lookupObject(endpointName);
if (o instanceof ImmutableEndpoint) {
// For Inbound and Outbound Endpoints
endpoint = ... | java | public static ImmutableEndpoint getImmutableEndpoint(MuleContext muleContext, String endpointName) throws IOException {
ImmutableEndpoint endpoint = null;
Object o = muleContext.getRegistry().lookupObject(endpointName);
if (o instanceof ImmutableEndpoint) {
// For Inbound and Outbound Endpoints
endpoint = ... | [
"public",
"static",
"ImmutableEndpoint",
"getImmutableEndpoint",
"(",
"MuleContext",
"muleContext",
",",
"String",
"endpointName",
")",
"throws",
"IOException",
"{",
"ImmutableEndpoint",
"endpoint",
"=",
"null",
";",
"Object",
"o",
"=",
"muleContext",
".",
"getRegistr... | Lookup an ImmutableEndpoint based on its name
@param muleContext
@param endpointName
@return
@throws IOException | [
"Lookup",
"an",
"ImmutableEndpoint",
"based",
"on",
"its",
"name"
] | train | https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/util/MuleUtil.java#L100-L118 |
strator-dev/greenpepper | greenpepper/extensions/src/main/java/com/greenpepper/runner/repository/VFSRepository.java | VFSRepository.addProvider | public void addProvider(String urlScheme, FileProvider provider) throws FileSystemException
{
((DefaultFileSystemManager)fileSystemManager).addProvider(urlScheme, provider);
} | java | public void addProvider(String urlScheme, FileProvider provider) throws FileSystemException
{
((DefaultFileSystemManager)fileSystemManager).addProvider(urlScheme, provider);
} | [
"public",
"void",
"addProvider",
"(",
"String",
"urlScheme",
",",
"FileProvider",
"provider",
")",
"throws",
"FileSystemException",
"{",
"(",
"(",
"DefaultFileSystemManager",
")",
"fileSystemManager",
")",
".",
"addProvider",
"(",
"urlScheme",
",",
"provider",
")",
... | For testing purpose of new VFS providers (eg. Confluence, ...)
@param urlScheme a {@link java.lang.String} object.
@param provider a {@link org.apache.commons.vfs.provider.FileProvider} object.
@throws org.apache.commons.vfs.FileSystemException if any. | [
"For",
"testing",
"purpose",
"of",
"new",
"VFS",
"providers",
"(",
"eg",
".",
"Confluence",
"...",
")"
] | train | https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/extensions/src/main/java/com/greenpepper/runner/repository/VFSRepository.java#L127-L130 |
zaproxy/zaproxy | src/org/parosproxy/paros/view/AbstractParamContainerPanel.java | AbstractParamContainerPanel.getPanelHeadline | private JPanel getPanelHeadline() {
if (panelHeadline == null) {
panelHeadline = new JPanel();
panelHeadline.setLayout(new BorderLayout(0, 0));
txtHeadline = getTxtHeadline();
panelHeadline.add(txtHeadline, BorderLayout.CENTER);
JButton butto... | java | private JPanel getPanelHeadline() {
if (panelHeadline == null) {
panelHeadline = new JPanel();
panelHeadline.setLayout(new BorderLayout(0, 0));
txtHeadline = getTxtHeadline();
panelHeadline.add(txtHeadline, BorderLayout.CENTER);
JButton butto... | [
"private",
"JPanel",
"getPanelHeadline",
"(",
")",
"{",
"if",
"(",
"panelHeadline",
"==",
"null",
")",
"{",
"panelHeadline",
"=",
"new",
"JPanel",
"(",
")",
";",
"panelHeadline",
".",
"setLayout",
"(",
"new",
"BorderLayout",
"(",
"0",
",",
"0",
")",
")",... | Gets the headline panel, that shows the name of the (selected) panel and has the help button.
@return the headline panel, never {@code null}.
@see #getTxtHeadline()
@see #getHelpButton() | [
"Gets",
"the",
"headline",
"panel",
"that",
"shows",
"the",
"name",
"of",
"the",
"(",
"selected",
")",
"panel",
"and",
"has",
"the",
"help",
"button",
"."
] | train | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/AbstractParamContainerPanel.java#L268-L281 |
google/error-prone-javac | src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java | ElementScanner9.visitModule | @Override
public R visitModule(ModuleElement e, P p) {
return scan(e.getEnclosedElements(), p); // TODO: Hmmm, this might not be right
} | java | @Override
public R visitModule(ModuleElement e, P p) {
return scan(e.getEnclosedElements(), p); // TODO: Hmmm, this might not be right
} | [
"@",
"Override",
"public",
"R",
"visitModule",
"(",
"ModuleElement",
"e",
",",
"P",
"p",
")",
"{",
"return",
"scan",
"(",
"e",
".",
"getEnclosedElements",
"(",
")",
",",
"p",
")",
";",
"// TODO: Hmmm, this might not be right",
"}"
] | Visits a {@code ModuleElement} by scanning the enclosed
elements.
@param e the element to visit
@param p a visitor-specified parameter
@return the result of the scan | [
"Visits",
"a",
"{",
"@code",
"ModuleElement",
"}",
"by",
"scanning",
"the",
"enclosed",
"elements",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java#L121-L124 |
apache/incubator-gobblin | gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/FlowGraphPath.java | FlowGraphPath.updateJobDependencies | private void updateJobDependencies(List<JobExecutionPlan> jobExecutionPlans, Map<String, String> templateToJobNameMap) {
for (JobExecutionPlan jobExecutionPlan: jobExecutionPlans) {
JobSpec jobSpec = jobExecutionPlan.getJobSpec();
List<String> updatedDependenciesList = new ArrayList<>();
if (jobSp... | java | private void updateJobDependencies(List<JobExecutionPlan> jobExecutionPlans, Map<String, String> templateToJobNameMap) {
for (JobExecutionPlan jobExecutionPlan: jobExecutionPlans) {
JobSpec jobSpec = jobExecutionPlan.getJobSpec();
List<String> updatedDependenciesList = new ArrayList<>();
if (jobSp... | [
"private",
"void",
"updateJobDependencies",
"(",
"List",
"<",
"JobExecutionPlan",
">",
"jobExecutionPlans",
",",
"Map",
"<",
"String",
",",
"String",
">",
"templateToJobNameMap",
")",
"{",
"for",
"(",
"JobExecutionPlan",
"jobExecutionPlan",
":",
"jobExecutionPlans",
... | A method to modify the {@link ConfigurationKeys#JOB_DEPENDENCIES} specified in a {@link JobTemplate} to those
which are usable in a {@link JobSpec}.
The {@link ConfigurationKeys#JOB_DEPENDENCIES} specified in a JobTemplate use the JobTemplate names
(i.e. the file names of the templates without the extension). However, ... | [
"A",
"method",
"to",
"modify",
"the",
"{"
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/FlowGraphPath.java#L198-L214 |
aws/aws-sdk-java | aws-java-sdk-sts/src/main/java/com/amazonaws/auth/SessionCredentialsProviderFactory.java | SessionCredentialsProviderFactory.getSessionCredentialsProvider | public static synchronized STSSessionCredentialsProvider getSessionCredentialsProvider(AWSCredentials longTermCredentials,
String serviceEndpoint,
... | java | public static synchronized STSSessionCredentialsProvider getSessionCredentialsProvider(AWSCredentials longTermCredentials,
String serviceEndpoint,
... | [
"public",
"static",
"synchronized",
"STSSessionCredentialsProvider",
"getSessionCredentialsProvider",
"(",
"AWSCredentials",
"longTermCredentials",
",",
"String",
"serviceEndpoint",
",",
"ClientConfiguration",
"stsClientConfiguration",
")",
"{",
"Key",
"key",
"=",
"new",
"Key... | Gets a session credentials provider for the long-term credentials and
service endpoint given. These are shared globally to support reuse of
session tokens.
@param longTermCredentials
The long-term AWS account credentials used to initiate a
session.
@param serviceEndpoint
The service endpoint for the service the sessio... | [
"Gets",
"a",
"session",
"credentials",
"provider",
"for",
"the",
"long",
"-",
"term",
"credentials",
"and",
"service",
"endpoint",
"given",
".",
"These",
"are",
"shared",
"globally",
"to",
"support",
"reuse",
"of",
"session",
"tokens",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sts/src/main/java/com/amazonaws/auth/SessionCredentialsProviderFactory.java#L91-L99 |
infinispan/infinispan | core/src/main/java/org/infinispan/jmx/ComponentsJmxRegistration.java | ComponentsJmxRegistration.unregisterMBeans | public void unregisterMBeans(Collection<ResourceDMBean> resourceDMBeans) throws CacheException {
log.trace("Unregistering jmx resources..");
try {
for (ResourceDMBean resource : resourceDMBeans) {
JmxUtil.unregisterMBean(getObjectName(resource), mBeanServer);
}
}
ca... | java | public void unregisterMBeans(Collection<ResourceDMBean> resourceDMBeans) throws CacheException {
log.trace("Unregistering jmx resources..");
try {
for (ResourceDMBean resource : resourceDMBeans) {
JmxUtil.unregisterMBean(getObjectName(resource), mBeanServer);
}
}
ca... | [
"public",
"void",
"unregisterMBeans",
"(",
"Collection",
"<",
"ResourceDMBean",
">",
"resourceDMBeans",
")",
"throws",
"CacheException",
"{",
"log",
".",
"trace",
"(",
"\"Unregistering jmx resources..\"",
")",
";",
"try",
"{",
"for",
"(",
"ResourceDMBean",
"resource... | Unregisters all the MBeans registered through {@link #registerMBeans(Collection)}.
@param resourceDMBeans | [
"Unregisters",
"all",
"the",
"MBeans",
"registered",
"through",
"{"
] | train | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/jmx/ComponentsJmxRegistration.java#L68-L78 |
google/closure-templates | java/src/com/google/template/soy/jssrc/internal/GenJsCodeVisitor.java | GenJsCodeVisitor.addCodeToRequireCss | private static void addCodeToRequireCss(JsDoc.Builder header, SoyFileNode soyFile) {
SortedSet<String> requiredCssNamespaces = new TreeSet<>();
requiredCssNamespaces.addAll(soyFile.getRequiredCssNamespaces());
for (TemplateNode template : soyFile.getChildren()) {
requiredCssNamespaces.addAll(template... | java | private static void addCodeToRequireCss(JsDoc.Builder header, SoyFileNode soyFile) {
SortedSet<String> requiredCssNamespaces = new TreeSet<>();
requiredCssNamespaces.addAll(soyFile.getRequiredCssNamespaces());
for (TemplateNode template : soyFile.getChildren()) {
requiredCssNamespaces.addAll(template... | [
"private",
"static",
"void",
"addCodeToRequireCss",
"(",
"JsDoc",
".",
"Builder",
"header",
",",
"SoyFileNode",
"soyFile",
")",
"{",
"SortedSet",
"<",
"String",
">",
"requiredCssNamespaces",
"=",
"new",
"TreeSet",
"<>",
"(",
")",
";",
"requiredCssNamespaces",
".... | Appends requirecss jsdoc tags in the file header section.
@param soyFile The file with the templates.. | [
"Appends",
"requirecss",
"jsdoc",
"tags",
"in",
"the",
"file",
"header",
"section",
"."
] | train | https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jssrc/internal/GenJsCodeVisitor.java#L487-L500 |
comapi/comapi-chat-sdk-android | COMAPI/chat/src/main/java/com/comapi/chat/PersistenceController.java | PersistenceController.updateConversations | public Observable<Boolean> updateConversations(List<ChatConversation> conversationsToUpdate) {
return asObservable(new Executor<Boolean>() {
@Override
void execute(ChatStore store, Emitter<Boolean> emitter) {
store.beginTransaction();
boolean isSuccess ... | java | public Observable<Boolean> updateConversations(List<ChatConversation> conversationsToUpdate) {
return asObservable(new Executor<Boolean>() {
@Override
void execute(ChatStore store, Emitter<Boolean> emitter) {
store.beginTransaction();
boolean isSuccess ... | [
"public",
"Observable",
"<",
"Boolean",
">",
"updateConversations",
"(",
"List",
"<",
"ChatConversation",
">",
"conversationsToUpdate",
")",
"{",
"return",
"asObservable",
"(",
"new",
"Executor",
"<",
"Boolean",
">",
"(",
")",
"{",
"@",
"Override",
"void",
"ex... | Update conversations.
@param conversationsToUpdate List of conversations to apply an update.
@return Observable emitting result. | [
"Update",
"conversations",
"."
] | train | https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/PersistenceController.java#L497-L537 |
google/closure-templates | java/src/com/google/template/soy/pysrc/internal/TranslateToPyExprVisitor.java | TranslateToPyExprVisitor.genTernaryConditional | private PyExpr genTernaryConditional(PyExpr conditionalExpr, PyExpr trueExpr, PyExpr falseExpr) {
// Python's ternary operator switches the order from <conditional> ? <true> : <false> to
// <true> if <conditional> else <false>.
int conditionalPrecedence = PyExprUtils.pyPrecedenceForOperator(Operator.CONDITI... | java | private PyExpr genTernaryConditional(PyExpr conditionalExpr, PyExpr trueExpr, PyExpr falseExpr) {
// Python's ternary operator switches the order from <conditional> ? <true> : <false> to
// <true> if <conditional> else <false>.
int conditionalPrecedence = PyExprUtils.pyPrecedenceForOperator(Operator.CONDITI... | [
"private",
"PyExpr",
"genTernaryConditional",
"(",
"PyExpr",
"conditionalExpr",
",",
"PyExpr",
"trueExpr",
",",
"PyExpr",
"falseExpr",
")",
"{",
"// Python's ternary operator switches the order from <conditional> ? <true> : <false> to",
"// <true> if <conditional> else <false>.",
"in... | Generates a ternary conditional Python expression given the conditional and true/false
expressions.
@param conditionalExpr the conditional expression
@param trueExpr the expression to execute if the conditional executes to true
@param falseExpr the expression to execute if the conditional executes to false
@return a t... | [
"Generates",
"a",
"ternary",
"conditional",
"Python",
"expression",
"given",
"the",
"conditional",
"and",
"true",
"/",
"false",
"expressions",
"."
] | train | https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/pysrc/internal/TranslateToPyExprVisitor.java#L657-L670 |
briandilley/jsonrpc4j | src/main/java/com/googlecode/jsonrpc4j/JsonRpcBasicServer.java | JsonRpcBasicServer.writeAndFlushValue | private void writeAndFlushValue(OutputStream output, ObjectNode value) throws IOException {
logger.debug("Response: {}", value);
for (JsonRpcInterceptor interceptor : interceptorList) {
interceptor.postHandleJson(value);
}
mapper.writeValue(new NoCloseOutputStream(output), value);
output.write('\n');
} | java | private void writeAndFlushValue(OutputStream output, ObjectNode value) throws IOException {
logger.debug("Response: {}", value);
for (JsonRpcInterceptor interceptor : interceptorList) {
interceptor.postHandleJson(value);
}
mapper.writeValue(new NoCloseOutputStream(output), value);
output.write('\n');
} | [
"private",
"void",
"writeAndFlushValue",
"(",
"OutputStream",
"output",
",",
"ObjectNode",
"value",
")",
"throws",
"IOException",
"{",
"logger",
".",
"debug",
"(",
"\"Response: {}\"",
",",
"value",
")",
";",
"for",
"(",
"JsonRpcInterceptor",
"interceptor",
":",
... | Writes and flushes a value to the given {@link OutputStream}
and prevents Jackson from closing it. Also writes newline.
@param output the {@link OutputStream}
@param value the value to write
@throws IOException on error | [
"Writes",
"and",
"flushes",
"a",
"value",
"to",
"the",
"given",
"{",
"@link",
"OutputStream",
"}",
"and",
"prevents",
"Jackson",
"from",
"closing",
"it",
".",
"Also",
"writes",
"newline",
"."
] | train | https://github.com/briandilley/jsonrpc4j/blob/d749762c9295b92d893677a8c7be2a14dd43b3bb/src/main/java/com/googlecode/jsonrpc4j/JsonRpcBasicServer.java#L866-L874 |
lucee/Lucee | core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java | XMLConfigAdmin.updateCustomTag | public void updateCustomTag(String virtual, String physical, String archive, String primary, short inspect) throws ExpressionException, SecurityException {
checkWriteAccess();
_updateCustomTag(virtual, physical, archive, primary, inspect);
} | java | public void updateCustomTag(String virtual, String physical, String archive, String primary, short inspect) throws ExpressionException, SecurityException {
checkWriteAccess();
_updateCustomTag(virtual, physical, archive, primary, inspect);
} | [
"public",
"void",
"updateCustomTag",
"(",
"String",
"virtual",
",",
"String",
"physical",
",",
"String",
"archive",
",",
"String",
"primary",
",",
"short",
"inspect",
")",
"throws",
"ExpressionException",
",",
"SecurityException",
"{",
"checkWriteAccess",
"(",
")"... | insert or update a mapping for Custom Tag
@param virtual
@param physical
@param archive
@param primary
@param trusted
@throws ExpressionException
@throws SecurityException | [
"insert",
"or",
"update",
"a",
"mapping",
"for",
"Custom",
"Tag"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java#L867-L870 |
jalkanen/speed4j | src/main/java/com/ecyrd/speed4j/util/Percentile.java | Percentile.evaluate | public double evaluate(final double[] values, final double p) {
test(values, 0, 0);
return evaluate(values, 0, values.length, p);
} | java | public double evaluate(final double[] values, final double p) {
test(values, 0, 0);
return evaluate(values, 0, values.length, p);
} | [
"public",
"double",
"evaluate",
"(",
"final",
"double",
"[",
"]",
"values",
",",
"final",
"double",
"p",
")",
"{",
"test",
"(",
"values",
",",
"0",
",",
"0",
")",
";",
"return",
"evaluate",
"(",
"values",
",",
"0",
",",
"values",
".",
"length",
","... | Returns an estimate of the <code>p</code>th percentile of the values
in the <code>values</code> array.
<p>
Calls to this method do not modify the internal <code>quantile</code>
state of this statistic.
<p>
<ul>
<li>Returns <code>Double.NaN</code> if <code>values</code> has length
<code>0</code></li>
<li>Returns (for an... | [
"Returns",
"an",
"estimate",
"of",
"the",
"<code",
">",
"p<",
"/",
"code",
">",
"th",
"percentile",
"of",
"the",
"values",
"in",
"the",
"<code",
">",
"values<",
"/",
"code",
">",
"array",
".",
"<p",
">",
"Calls",
"to",
"this",
"method",
"do",
"not",
... | train | https://github.com/jalkanen/speed4j/blob/1d2db9c9b9def869c25fedb9bbd7cf95c39023bd/src/main/java/com/ecyrd/speed4j/util/Percentile.java#L127-L130 |
ironjacamar/ironjacamar | validator/src/main/java/org/ironjacamar/validator/Validation.java | Validation.createResourceAdapter | private static List<Validate> createResourceAdapter(Connector cmd,
List<Failure> failures, ResourceBundle rb, ClassLoader cl)
{
List<Validate> result = new ArrayList<Validate>();
if (cmd.getVersion() != Version.V_10 && cmd.getResourceadapter() != null &&
cmd.getResourceadapter().getRe... | java | private static List<Validate> createResourceAdapter(Connector cmd,
List<Failure> failures, ResourceBundle rb, ClassLoader cl)
{
List<Validate> result = new ArrayList<Validate>();
if (cmd.getVersion() != Version.V_10 && cmd.getResourceadapter() != null &&
cmd.getResourceadapter().getRe... | [
"private",
"static",
"List",
"<",
"Validate",
">",
"createResourceAdapter",
"(",
"Connector",
"cmd",
",",
"List",
"<",
"Failure",
">",
"failures",
",",
"ResourceBundle",
"rb",
",",
"ClassLoader",
"cl",
")",
"{",
"List",
"<",
"Validate",
">",
"result",
"=",
... | createResourceAdapter
@param cmd connector metadata
@param failures list of failures
@param rb ResourceBundle
@param cl classloador
@return list of validate objects | [
"createResourceAdapter"
] | train | https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/validator/src/main/java/org/ironjacamar/validator/Validation.java#L298-L325 |
DDTH/ddth-tsc | ddth-tsc-core/src/main/java/com/github/ddth/tsc/AbstractCounter.java | AbstractCounter.getAllInRange | protected DataPoint[] getAllInRange(long timestampStartMs, long timestampEndMs) {
SortedSet<DataPoint> result = new TreeSet<DataPoint>(new Comparator<DataPoint>() {
@Override
public int compare(DataPoint block1, DataPoint block2) {
return Longs.compare(block1.timestamp(),... | java | protected DataPoint[] getAllInRange(long timestampStartMs, long timestampEndMs) {
SortedSet<DataPoint> result = new TreeSet<DataPoint>(new Comparator<DataPoint>() {
@Override
public int compare(DataPoint block1, DataPoint block2) {
return Longs.compare(block1.timestamp(),... | [
"protected",
"DataPoint",
"[",
"]",
"getAllInRange",
"(",
"long",
"timestampStartMs",
",",
"long",
"timestampEndMs",
")",
"{",
"SortedSet",
"<",
"DataPoint",
">",
"result",
"=",
"new",
"TreeSet",
"<",
"DataPoint",
">",
"(",
"new",
"Comparator",
"<",
"DataPoint... | Gets all data points in range [{@code timestampStartMs},
{@code timestampEndMs}).
@param timestampStartMs
@param timestampEndMs
@return
@since 0.3.2 | [
"Gets",
"all",
"data",
"points",
"in",
"range",
"[",
"{",
"@code",
"timestampStartMs",
"}",
"{",
"@code",
"timestampEndMs",
"}",
")",
"."
] | train | https://github.com/DDTH/ddth-tsc/blob/d233c304c8fed2f3c069de42a36b7bbd5c8be01b/ddth-tsc-core/src/main/java/com/github/ddth/tsc/AbstractCounter.java#L213-L230 |
Netflix/karyon | karyon2-admin-web/src/main/java/netflix/adminresources/tableview/DataTableHelper.java | DataTableHelper.applyQueryParams | private static void applyQueryParams(TableViewResource resource, MultivaluedMap<String, String> queryParams) {
final String allColsSearch = queryParams.getFirst("sSearch");
final String displayStart = queryParams.getFirst("iDisplayStart");
final String displayLen = queryParams.getFirst("iDispla... | java | private static void applyQueryParams(TableViewResource resource, MultivaluedMap<String, String> queryParams) {
final String allColsSearch = queryParams.getFirst("sSearch");
final String displayStart = queryParams.getFirst("iDisplayStart");
final String displayLen = queryParams.getFirst("iDispla... | [
"private",
"static",
"void",
"applyQueryParams",
"(",
"TableViewResource",
"resource",
",",
"MultivaluedMap",
"<",
"String",
",",
"String",
">",
"queryParams",
")",
"{",
"final",
"String",
"allColsSearch",
"=",
"queryParams",
".",
"getFirst",
"(",
"\"sSearch\"",
"... | apply pagination, search, sort params
<p/>
Sample query from DataTables -
sEcho=1&iColumns=2&sColumns=&iDisplayStart=0&iDisplayLength=25&mDataProp_0=0&mDataProp_1=1&sSearch=&
bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&
iSortingCols=1&iSortCol_0=0&sSortDir_0=as... | [
"apply",
"pagination",
"search",
"sort",
"params",
"<p",
"/",
">",
"Sample",
"query",
"from",
"DataTables",
"-",
"sEcho",
"=",
"1&iColumns",
"=",
"2&sColumns",
"=",
"&iDisplayStart",
"=",
"0&iDisplayLength",
"=",
"25&mDataProp_0",
"=",
"0&mDataProp_1",
"=",
"1&s... | train | https://github.com/Netflix/karyon/blob/d50bc0ff37693ef3fbda373e90a109d1f92e0b9a/karyon2-admin-web/src/main/java/netflix/adminresources/tableview/DataTableHelper.java#L31-L56 |
BorderTech/wcomponents | wcomponents-core/src/main/java/com/github/bordertech/wcomponents/servlet/WServlet.java | WServlet.createServletHelper | protected WServletHelper createServletHelper(final HttpServletRequest httpServletRequest,
final HttpServletResponse httpServletResponse) {
LOG.debug("Creating a new WServletHelper instance");
WServletHelper helper = new WServletHelper(this, httpServletRequest, httpServletResponse);
return helper;
} | java | protected WServletHelper createServletHelper(final HttpServletRequest httpServletRequest,
final HttpServletResponse httpServletResponse) {
LOG.debug("Creating a new WServletHelper instance");
WServletHelper helper = new WServletHelper(this, httpServletRequest, httpServletResponse);
return helper;
} | [
"protected",
"WServletHelper",
"createServletHelper",
"(",
"final",
"HttpServletRequest",
"httpServletRequest",
",",
"final",
"HttpServletResponse",
"httpServletResponse",
")",
"{",
"LOG",
".",
"debug",
"(",
"\"Creating a new WServletHelper instance\"",
")",
";",
"WServletHel... | Create a support class to coordinate the web request.
@param httpServletRequest the request being processed
@param httpServletResponse the servlet response
@return the servlet helper | [
"Create",
"a",
"support",
"class",
"to",
"coordinate",
"the",
"web",
"request",
"."
] | train | https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/servlet/WServlet.java#L189-L194 |
sjamesr/jfreesane | src/main/java/au/com/southsky/jfreesane/SaneSession.java | SaneSession.withRemoteSane | public static SaneSession withRemoteSane(InetAddress saneAddress, long timeout, TimeUnit timeUnit)
throws IOException {
return withRemoteSane(saneAddress, DEFAULT_PORT, timeout, timeUnit, 0, TimeUnit.MILLISECONDS);
} | java | public static SaneSession withRemoteSane(InetAddress saneAddress, long timeout, TimeUnit timeUnit)
throws IOException {
return withRemoteSane(saneAddress, DEFAULT_PORT, timeout, timeUnit, 0, TimeUnit.MILLISECONDS);
} | [
"public",
"static",
"SaneSession",
"withRemoteSane",
"(",
"InetAddress",
"saneAddress",
",",
"long",
"timeout",
",",
"TimeUnit",
"timeUnit",
")",
"throws",
"IOException",
"{",
"return",
"withRemoteSane",
"(",
"saneAddress",
",",
"DEFAULT_PORT",
",",
"timeout",
",",
... | Establishes a connection to the SANE daemon running on the given host on the default SANE port
with the given connection timeout. | [
"Establishes",
"a",
"connection",
"to",
"the",
"SANE",
"daemon",
"running",
"on",
"the",
"given",
"host",
"on",
"the",
"default",
"SANE",
"port",
"with",
"the",
"given",
"connection",
"timeout",
"."
] | train | https://github.com/sjamesr/jfreesane/blob/15ad0f73df0a8d0efec5167a2141cbd53afd862d/src/main/java/au/com/southsky/jfreesane/SaneSession.java#L77-L80 |
Netflix/eureka | eureka-client/src/main/java/com/netflix/discovery/shared/Applications.java | Applications.populateInstanceCountMap | public void populateInstanceCountMap(Map<String, AtomicInteger> instanceCountMap) {
for (Application app : this.getRegisteredApplications()) {
for (InstanceInfo info : app.getInstancesAsIsFromEureka()) {
AtomicInteger instanceCount = instanceCountMap.computeIfAbsent(info.getStatus().... | java | public void populateInstanceCountMap(Map<String, AtomicInteger> instanceCountMap) {
for (Application app : this.getRegisteredApplications()) {
for (InstanceInfo info : app.getInstancesAsIsFromEureka()) {
AtomicInteger instanceCount = instanceCountMap.computeIfAbsent(info.getStatus().... | [
"public",
"void",
"populateInstanceCountMap",
"(",
"Map",
"<",
"String",
",",
"AtomicInteger",
">",
"instanceCountMap",
")",
"{",
"for",
"(",
"Application",
"app",
":",
"this",
".",
"getRegisteredApplications",
"(",
")",
")",
"{",
"for",
"(",
"InstanceInfo",
"... | Populates the provided instance count map. The instance count map is used
as part of the general app list synchronization mechanism.
@param instanceCountMap
the map to populate | [
"Populates",
"the",
"provided",
"instance",
"count",
"map",
".",
"The",
"instance",
"count",
"map",
"is",
"used",
"as",
"part",
"of",
"the",
"general",
"app",
"list",
"synchronization",
"mechanism",
"."
] | train | https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-client/src/main/java/com/netflix/discovery/shared/Applications.java#L246-L254 |
ModeShape/modeshape | modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/DatabaseBinaryStore.java | DatabaseBinaryStore.getInputStream | @Override
public InputStream getInputStream( BinaryKey key ) throws BinaryStoreException {
Connection connection = newConnection();
try {
InputStream inputStream = database.readContent(key, connection);
if (inputStream == null) {
// if we didn't find anything,... | java | @Override
public InputStream getInputStream( BinaryKey key ) throws BinaryStoreException {
Connection connection = newConnection();
try {
InputStream inputStream = database.readContent(key, connection);
if (inputStream == null) {
// if we didn't find anything,... | [
"@",
"Override",
"public",
"InputStream",
"getInputStream",
"(",
"BinaryKey",
"key",
")",
"throws",
"BinaryStoreException",
"{",
"Connection",
"connection",
"=",
"newConnection",
"(",
")",
";",
"try",
"{",
"InputStream",
"inputStream",
"=",
"database",
".",
"readC... | @inheritDoc
In addition to the generic contract from {@link BinaryStore}, this implementation will use a database connection to read
the contents of a binary stream from the database. If such a stream cannot be found or an unexpected exception occurs,
the connection is always closed.
<p/>
However, if the content is fo... | [
"@inheritDoc"
] | train | https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/DatabaseBinaryStore.java#L216-L230 |
rjeschke/txtmark | src/main/java/com/github/rjeschke/txtmark/Utils.java | Utils.skipSpaces | public final static int skipSpaces(final String in, final int start)
{
int pos = start;
while (pos < in.length() && (in.charAt(pos) == ' ' || in.charAt(pos) == '\n'))
{
pos++;
}
return pos < in.length() ? pos : -1;
} | java | public final static int skipSpaces(final String in, final int start)
{
int pos = start;
while (pos < in.length() && (in.charAt(pos) == ' ' || in.charAt(pos) == '\n'))
{
pos++;
}
return pos < in.length() ? pos : -1;
} | [
"public",
"final",
"static",
"int",
"skipSpaces",
"(",
"final",
"String",
"in",
",",
"final",
"int",
"start",
")",
"{",
"int",
"pos",
"=",
"start",
";",
"while",
"(",
"pos",
"<",
"in",
".",
"length",
"(",
")",
"&&",
"(",
"in",
".",
"charAt",
"(",
... | Skips spaces in the given String.
@param in
Input String.
@param start
Starting position.
@return The new position or -1 if EOL has been reached. | [
"Skips",
"spaces",
"in",
"the",
"given",
"String",
"."
] | train | https://github.com/rjeschke/txtmark/blob/108cee6b209a362843729c032c2d982625d12d98/src/main/java/com/github/rjeschke/txtmark/Utils.java#L47-L55 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.