repository_name stringlengths 7 54 | func_path_in_repository stringlengths 18 196 | func_name stringlengths 7 107 | whole_func_string stringlengths 76 3.82k | language stringclasses 1
value | func_code_string stringlengths 76 3.82k | func_code_tokens listlengths 22 717 | func_documentation_string stringlengths 61 1.98k | func_documentation_tokens listlengths 1 508 | split_name stringclasses 1
value | func_code_url stringlengths 111 310 |
|---|---|---|---|---|---|---|---|---|---|---|
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/bos/model/CompleteMultipartUploadRequest.java | CompleteMultipartUploadRequest.setPartETags | public void setPartETags(List<PartETag> partETags) {
checkNotNull(partETags, "partETags should not be null.");
for (int i = 0; i < partETags.size(); ++i) {
PartETag partETag = partETags.get(i);
checkNotNull(partETag, "partETags[%s] should not be null.", i);
int partNu... | java | public void setPartETags(List<PartETag> partETags) {
checkNotNull(partETags, "partETags should not be null.");
for (int i = 0; i < partETags.size(); ++i) {
PartETag partETag = partETags.get(i);
checkNotNull(partETag, "partETags[%s] should not be null.", i);
int partNu... | [
"public",
"void",
"setPartETags",
"(",
"List",
"<",
"PartETag",
">",
"partETags",
")",
"{",
"checkNotNull",
"(",
"partETags",
",",
"\"partETags should not be null.\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"partETags",
".",
"size",
"("... | Sets the list of part numbers and ETags that identify the individual
parts of the multipart upload to complete.
@param partETags The list of part numbers and ETags that identify the
individual parts of the multipart upload to complete. | [
"Sets",
"the",
"list",
"of",
"part",
"numbers",
"and",
"ETags",
"that",
"identify",
"the",
"individual",
"parts",
"of",
"the",
"multipart",
"upload",
"to",
"complete",
"."
] | train | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bos/model/CompleteMultipartUploadRequest.java#L170-L192 |
GerdHolz/TOVAL | src/de/invation/code/toval/os/OSUtils.java | OSUtils.runCommand | public void runCommand(String[] command, GenericHandler<BufferedReader> inputHandler, GenericHandler<BufferedReader> errorHandler) throws OSException {
Validate.notNull(command);
try {
Process p = Runtime.getRuntime().exec(command);
BufferedReader in = new BufferedReader(new Inp... | java | public void runCommand(String[] command, GenericHandler<BufferedReader> inputHandler, GenericHandler<BufferedReader> errorHandler) throws OSException {
Validate.notNull(command);
try {
Process p = Runtime.getRuntime().exec(command);
BufferedReader in = new BufferedReader(new Inp... | [
"public",
"void",
"runCommand",
"(",
"String",
"[",
"]",
"command",
",",
"GenericHandler",
"<",
"BufferedReader",
">",
"inputHandler",
",",
"GenericHandler",
"<",
"BufferedReader",
">",
"errorHandler",
")",
"throws",
"OSException",
"{",
"Validate",
".",
"notNull",... | Runs a command on the operating system.
@param command String array of command parts. The parts are concatenated
with spaces between the parts. The single command parts should not
contain whitespaces.
@param inputHandler {@link GenericHandler} to handle the process input
stream {@link BufferedReader}.
@param errorHand... | [
"Runs",
"a",
"command",
"on",
"the",
"operating",
"system",
"."
] | train | https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/os/OSUtils.java#L170-L191 |
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.reimageAllAsync | public Observable<OperationStatusResponseInner> reimageAllAsync(String resourceGroupName, String vmScaleSetName) {
return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() {
@Override
... | java | public Observable<OperationStatusResponseInner> reimageAllAsync(String resourceGroupName, String vmScaleSetName) {
return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() {
@Override
... | [
"public",
"Observable",
"<",
"OperationStatusResponseInner",
">",
"reimageAllAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"vmScaleSetName",
")",
"{",
"return",
"reimageAllWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"vmScaleSetName",
")",
".",
"... | Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
@param resourceGroupName The name of the resource group.
@param vmScaleSetName The name of the VM scale set.
@throws IllegalArgumentException thrown if parameters fail the vali... | [
"Reimages",
"all",
"the",
"disks",
"(",
"including",
"data",
"disks",
")",
"in",
"the",
"virtual",
"machines",
"in",
"a",
"VM",
"scale",
"set",
".",
"This",
"operation",
"is",
"only",
"supported",
"for",
"managed",
"disks",
"."
] | 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#L3243-L3250 |
alkacon/opencms-core | src/org/opencms/search/solr/CmsSolrIndex.java | CmsSolrIndex.getLocaleForResource | @Override
public Locale getLocaleForResource(CmsObject cms, CmsResource resource, List<Locale> availableLocales) {
Locale result = null;
List<Locale> defaultLocales = OpenCms.getLocaleManager().getDefaultLocales(cms, resource);
if ((availableLocales != null) && (availableLocales.size()... | java | @Override
public Locale getLocaleForResource(CmsObject cms, CmsResource resource, List<Locale> availableLocales) {
Locale result = null;
List<Locale> defaultLocales = OpenCms.getLocaleManager().getDefaultLocales(cms, resource);
if ((availableLocales != null) && (availableLocales.size()... | [
"@",
"Override",
"public",
"Locale",
"getLocaleForResource",
"(",
"CmsObject",
"cms",
",",
"CmsResource",
"resource",
",",
"List",
"<",
"Locale",
">",
"availableLocales",
")",
"{",
"Locale",
"result",
"=",
"null",
";",
"List",
"<",
"Locale",
">",
"defaultLocal... | Returns the language locale for the given resource in this index.<p>
@param cms the current OpenCms user context
@param resource the resource to check
@param availableLocales a list of locales supported by the resource
@return the language locale for the given resource in this index | [
"Returns",
"the",
"language",
"locale",
"for",
"the",
"given",
"resource",
"in",
"this",
"index",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/CmsSolrIndex.java#L598-L615 |
astrapi69/jaulp-wicket | jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/resource/ResourceModelFactory.java | ResourceModelFactory.newResourceModel | public static IModel<String> newResourceModel(final String resourceKey,
final Component component)
{
return newResourceModel(resourceKey, component, null, "");
} | java | public static IModel<String> newResourceModel(final String resourceKey,
final Component component)
{
return newResourceModel(resourceKey, component, null, "");
} | [
"public",
"static",
"IModel",
"<",
"String",
">",
"newResourceModel",
"(",
"final",
"String",
"resourceKey",
",",
"final",
"Component",
"component",
")",
"{",
"return",
"newResourceModel",
"(",
"resourceKey",
",",
"component",
",",
"null",
",",
"\"\"",
")",
";... | Factory method to create a new {@link StringResourceModel} from the given resource key and
given component.
@param resourceKey
the resource key
@param component
the component
@return a new {@link StringResourceModel} as an {@link IModel} | [
"Factory",
"method",
"to",
"create",
"a",
"new",
"{",
"@link",
"StringResourceModel",
"}",
"from",
"the",
"given",
"resource",
"key",
"and",
"given",
"component",
"."
] | train | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/resource/ResourceModelFactory.java#L127-L131 |
jmchilton/galaxy-bootstrap | src/main/java/com/github/jmchilton/galaxybootstrap/DownloadProperties.java | DownloadProperties.forGalaxyDist | @Deprecated
public static DownloadProperties forGalaxyDist(final File destination, String revision) {
return new DownloadProperties(GALAXY_DIST_REPOSITORY_URL, BRANCH_STABLE, revision, destination);
} | java | @Deprecated
public static DownloadProperties forGalaxyDist(final File destination, String revision) {
return new DownloadProperties(GALAXY_DIST_REPOSITORY_URL, BRANCH_STABLE, revision, destination);
} | [
"@",
"Deprecated",
"public",
"static",
"DownloadProperties",
"forGalaxyDist",
"(",
"final",
"File",
"destination",
",",
"String",
"revision",
")",
"{",
"return",
"new",
"DownloadProperties",
"(",
"GALAXY_DIST_REPOSITORY_URL",
",",
"BRANCH_STABLE",
",",
"revision",
","... | Builds a new DownloadProperties for downloading Galaxy from galaxy-dist.
@param destination The destination directory to store Galaxy, null if a directory
should be chosen by default.
@param revision The revision to use for Galaxy.
@return A new DownloadProperties for downloading Galaxy from galaxy-dist. | [
"Builds",
"a",
"new",
"DownloadProperties",
"for",
"downloading",
"Galaxy",
"from",
"galaxy",
"-",
"dist",
"."
] | train | https://github.com/jmchilton/galaxy-bootstrap/blob/4a899f5e6ec0c9f6f4b9b21d5a0320e5925ec649/src/main/java/com/github/jmchilton/galaxybootstrap/DownloadProperties.java#L326-L329 |
VoltDB/voltdb | src/frontend/org/voltcore/messaging/HostMessenger.java | HostMessenger.cutLink | public void cutLink(int hostIdA, int hostIdB) {
if (m_localHostId == hostIdA) {
Iterator<ForeignHost> it = m_foreignHosts.get(hostIdB).iterator();
while (it.hasNext()) {
ForeignHost fh = it.next();
fh.cutLink();
}
}
if (m_localH... | java | public void cutLink(int hostIdA, int hostIdB) {
if (m_localHostId == hostIdA) {
Iterator<ForeignHost> it = m_foreignHosts.get(hostIdB).iterator();
while (it.hasNext()) {
ForeignHost fh = it.next();
fh.cutLink();
}
}
if (m_localH... | [
"public",
"void",
"cutLink",
"(",
"int",
"hostIdA",
",",
"int",
"hostIdB",
")",
"{",
"if",
"(",
"m_localHostId",
"==",
"hostIdA",
")",
"{",
"Iterator",
"<",
"ForeignHost",
">",
"it",
"=",
"m_foreignHosts",
".",
"get",
"(",
"hostIdB",
")",
".",
"iterator"... | Cut the network connection between two hostids immediately
Useful for simulating network partitions | [
"Cut",
"the",
"network",
"connection",
"between",
"two",
"hostids",
"immediately",
"Useful",
"for",
"simulating",
"network",
"partitions"
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/HostMessenger.java#L1869-L1884 |
pip-services3-java/pip-services3-commons-java | src/org/pipservices3/commons/convert/TypeConverter.java | TypeConverter.toTypeWithDefault | public static <T> T toTypeWithDefault(Class<T> type, Object value, T defaultValue) {
T result = toNullableType(type, value);
return result != null ? result : defaultValue;
} | java | public static <T> T toTypeWithDefault(Class<T> type, Object value, T defaultValue) {
T result = toNullableType(type, value);
return result != null ? result : defaultValue;
} | [
"public",
"static",
"<",
"T",
">",
"T",
"toTypeWithDefault",
"(",
"Class",
"<",
"T",
">",
"type",
",",
"Object",
"value",
",",
"T",
"defaultValue",
")",
"{",
"T",
"result",
"=",
"toNullableType",
"(",
"type",
",",
"value",
")",
";",
"return",
"result",... | Converts value into an object type specified by Type Code or returns default
value when conversion is not possible.
@param type the Class type for the data type into which 'value' is to be converted.
@param value the value to convert.
@param defaultValue the default value to return if conversion is not ... | [
"Converts",
"value",
"into",
"an",
"object",
"type",
"specified",
"by",
"Type",
"Code",
"or",
"returns",
"default",
"value",
"when",
"conversion",
"is",
"not",
"possible",
"."
] | train | https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/convert/TypeConverter.java#L193-L196 |
wcm-io/wcm-io-handler | link/src/main/java/io/wcm/handler/link/type/MediaLinkType.java | MediaLinkType.getSyntheticLinkResource | public static @NotNull Resource getSyntheticLinkResource(@NotNull ResourceResolver resourceResolver, @NotNull String mediaRef) {
Map<String, Object> map = new HashMap<>();
map.put(LinkNameConstants.PN_LINK_TYPE, ID);
map.put(LinkNameConstants.PN_LINK_MEDIA_REF, mediaRef);
return new SyntheticLinkResourc... | java | public static @NotNull Resource getSyntheticLinkResource(@NotNull ResourceResolver resourceResolver, @NotNull String mediaRef) {
Map<String, Object> map = new HashMap<>();
map.put(LinkNameConstants.PN_LINK_TYPE, ID);
map.put(LinkNameConstants.PN_LINK_MEDIA_REF, mediaRef);
return new SyntheticLinkResourc... | [
"public",
"static",
"@",
"NotNull",
"Resource",
"getSyntheticLinkResource",
"(",
"@",
"NotNull",
"ResourceResolver",
"resourceResolver",
",",
"@",
"NotNull",
"String",
"mediaRef",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"map",
"=",
"new",
"HashMap",
... | Get synthetic link resource for this link type.
@param resourceResolver Resource resolver
@param mediaRef Media asset reference
@return Synthetic link resource | [
"Get",
"synthetic",
"link",
"resource",
"for",
"this",
"link",
"type",
"."
] | train | https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/link/src/main/java/io/wcm/handler/link/type/MediaLinkType.java#L140-L145 |
salesforce/Argus | ArgusCore/src/main/java/com/salesforce/dva/argus/service/tsdb/CachedTSDBService.java | CachedTSDBService.constructMetricQueryKey | private String constructMetricQueryKey(Long startTimeStampBoundary, Metric metric, MetricQuery query) {
StringBuilder sb = new StringBuilder();
sb.append(startTimeStampBoundary).append(":");
sb.append(query.getNamespace()).append(":");
sb.append(query.getScope()).append(":");
sb... | java | private String constructMetricQueryKey(Long startTimeStampBoundary, Metric metric, MetricQuery query) {
StringBuilder sb = new StringBuilder();
sb.append(startTimeStampBoundary).append(":");
sb.append(query.getNamespace()).append(":");
sb.append(query.getScope()).append(":");
sb... | [
"private",
"String",
"constructMetricQueryKey",
"(",
"Long",
"startTimeStampBoundary",
",",
"Metric",
"metric",
",",
"MetricQuery",
"query",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"sb",
".",
"append",
"(",
"startTimeStampBound... | Constructs a cache key from start time stamp boundary, returned metric tags and metric query.
@param startTimeStampBoundary The start time stamp boundary.
@param metric The metric to construct the cache key for.
@param query The query to use to construct the cache key.
@retur... | [
"Constructs",
"a",
"cache",
"key",
"from",
"start",
"time",
"stamp",
"boundary",
"returned",
"metric",
"tags",
"and",
"metric",
"query",
"."
] | train | https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/service/tsdb/CachedTSDBService.java#L280-L296 |
pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/ContentSpec.java | ContentSpec.setAdditionalPublicanCfg | public void setAdditionalPublicanCfg(final String name, final String publicanCfg) {
if (publicanCfg == null && !publicanCfgs.containsKey(name)) {
return;
} else if (publicanCfg == null) {
removeChild(publicanCfgs.get(name));
publicanCfgs.remove(name);
} else i... | java | public void setAdditionalPublicanCfg(final String name, final String publicanCfg) {
if (publicanCfg == null && !publicanCfgs.containsKey(name)) {
return;
} else if (publicanCfg == null) {
removeChild(publicanCfgs.get(name));
publicanCfgs.remove(name);
} else i... | [
"public",
"void",
"setAdditionalPublicanCfg",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"publicanCfg",
")",
"{",
"if",
"(",
"publicanCfg",
"==",
"null",
"&&",
"!",
"publicanCfgs",
".",
"containsKey",
"(",
"name",
")",
")",
"{",
"return",
";",
... | Set the data that will be appended to the publican.cfg file when built.
@param name The custom configuration name.
@param publicanCfg The data to be appended. | [
"Set",
"the",
"data",
"that",
"will",
"be",
"appended",
"to",
"the",
"publican",
".",
"cfg",
"file",
"when",
"built",
"."
] | train | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/ContentSpec.java#L595-L609 |
DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/BaseJsonBo.java | BaseJsonBo.getSubAttr | public JsonNode getSubAttr(String attrName, String dPath) {
Lock lock = lockForRead();
try {
return JacksonUtils.getValue(getAttribute(attrName), dPath);
} finally {
lock.unlock();
}
} | java | public JsonNode getSubAttr(String attrName, String dPath) {
Lock lock = lockForRead();
try {
return JacksonUtils.getValue(getAttribute(attrName), dPath);
} finally {
lock.unlock();
}
} | [
"public",
"JsonNode",
"getSubAttr",
"(",
"String",
"attrName",
",",
"String",
"dPath",
")",
"{",
"Lock",
"lock",
"=",
"lockForRead",
"(",
")",
";",
"try",
"{",
"return",
"JacksonUtils",
".",
"getValue",
"(",
"getAttribute",
"(",
"attrName",
")",
",",
"dPat... | Get a sub-attribute using d-path.
@param attrName
@param dPath
@return
@see DPathUtils | [
"Get",
"a",
"sub",
"-",
"attribute",
"using",
"d",
"-",
"path",
"."
] | train | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/BaseJsonBo.java#L136-L143 |
grpc/grpc-java | alts/src/main/java/io/grpc/alts/internal/RpcProtocolVersionsUtil.java | RpcProtocolVersionsUtil.checkRpcProtocolVersions | static RpcVersionsCheckResult checkRpcProtocolVersions(
RpcProtocolVersions localVersions, RpcProtocolVersions peerVersions) {
Version maxCommonVersion;
Version minCommonVersion;
// maxCommonVersion is MIN(local.max, peer.max)
if (isGreaterThanOrEqualTo(localVersions.getMaxRpcVersion(), peerVersio... | java | static RpcVersionsCheckResult checkRpcProtocolVersions(
RpcProtocolVersions localVersions, RpcProtocolVersions peerVersions) {
Version maxCommonVersion;
Version minCommonVersion;
// maxCommonVersion is MIN(local.max, peer.max)
if (isGreaterThanOrEqualTo(localVersions.getMaxRpcVersion(), peerVersio... | [
"static",
"RpcVersionsCheckResult",
"checkRpcProtocolVersions",
"(",
"RpcProtocolVersions",
"localVersions",
",",
"RpcProtocolVersions",
"peerVersions",
")",
"{",
"Version",
"maxCommonVersion",
";",
"Version",
"minCommonVersion",
";",
"// maxCommonVersion is MIN(local.max, peer.max... | Performs check between local and peer Rpc Protocol Versions. This function returns true and the
highest common version if there exists a common Rpc Protocol Version to use, and returns false
and null otherwise. | [
"Performs",
"check",
"between",
"local",
"and",
"peer",
"Rpc",
"Protocol",
"Versions",
".",
"This",
"function",
"returns",
"true",
"and",
"the",
"highest",
"common",
"version",
"if",
"there",
"exists",
"a",
"common",
"Rpc",
"Protocol",
"Version",
"to",
"use",
... | train | https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/alts/src/main/java/io/grpc/alts/internal/RpcProtocolVersionsUtil.java#L67-L90 |
ckpoint/CheckPoint | src/main/java/hsim/checkpoint/util/ValidationFileUtil.java | ValidationFileUtil.initFileSendHeader | public static void initFileSendHeader(HttpServletResponse res, String filename, String contentType) {
filename = getEncodingFileName(filename);
if (contentType != null) {
res.setContentType(contentType);
} else {
res.setContentType("applicaiton/download;charset=utf-8");
... | java | public static void initFileSendHeader(HttpServletResponse res, String filename, String contentType) {
filename = getEncodingFileName(filename);
if (contentType != null) {
res.setContentType(contentType);
} else {
res.setContentType("applicaiton/download;charset=utf-8");
... | [
"public",
"static",
"void",
"initFileSendHeader",
"(",
"HttpServletResponse",
"res",
",",
"String",
"filename",
",",
"String",
"contentType",
")",
"{",
"filename",
"=",
"getEncodingFileName",
"(",
"filename",
")",
";",
"if",
"(",
"contentType",
"!=",
"null",
")"... | Init file send header.
@param res the res
@param filename the filename
@param contentType the content type | [
"Init",
"file",
"send",
"header",
"."
] | train | https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationFileUtil.java#L89-L101 |
geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java | DomHelper.setController | public void setController(Object object, GraphicsController controller, int eventMask) {
doSetController(getGroup(object), controller, eventMask);
} | java | public void setController(Object object, GraphicsController controller, int eventMask) {
doSetController(getGroup(object), controller, eventMask);
} | [
"public",
"void",
"setController",
"(",
"Object",
"object",
",",
"GraphicsController",
"controller",
",",
"int",
"eventMask",
")",
"{",
"doSetController",
"(",
"getGroup",
"(",
"object",
")",
",",
"controller",
",",
"eventMask",
")",
";",
"}"
] | Set the controller on an element of this <code>GraphicsContext</code> so it can react to events.
@param object
the element on which the controller should be set.
@param controller
The new <code>GraphicsController</code>
@param eventMask
a bitmask to specify which events to listen for {@link com.google.gwt.user.client.... | [
"Set",
"the",
"controller",
"on",
"an",
"element",
"of",
"this",
"<code",
">",
"GraphicsContext<",
"/",
"code",
">",
"so",
"it",
"can",
"react",
"to",
"events",
"."
] | train | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L583-L585 |
StripesFramework/stripes-stuff | src/main/java/org/stripesstuff/plugin/session/SessionStoreInterceptor.java | SessionStoreInterceptor.saveFields | protected void saveFields(Collection<Field> fields, ActionBean actionBean, HttpSession session) throws IllegalAccessException {
for (Field field : fields) {
if (!field.isAccessible()) {
field.setAccessible(true);
}
setAttribute(session, getFieldKey(field,... | java | protected void saveFields(Collection<Field> fields, ActionBean actionBean, HttpSession session) throws IllegalAccessException {
for (Field field : fields) {
if (!field.isAccessible()) {
field.setAccessible(true);
}
setAttribute(session, getFieldKey(field,... | [
"protected",
"void",
"saveFields",
"(",
"Collection",
"<",
"Field",
">",
"fields",
",",
"ActionBean",
"actionBean",
",",
"HttpSession",
"session",
")",
"throws",
"IllegalAccessException",
"{",
"for",
"(",
"Field",
"field",
":",
"fields",
")",
"{",
"if",
"(",
... | Saves all fields in session.
@param fields Fields to save in session.
@param actionBean ActionBean.
@param session HttpSession.
@throws IllegalAccessException Cannot get access to some fields. | [
"Saves",
"all",
"fields",
"in",
"session",
"."
] | train | https://github.com/StripesFramework/stripes-stuff/blob/51ad92b4bd5862ba34d7c18c5829fb00ea3a3811/src/main/java/org/stripesstuff/plugin/session/SessionStoreInterceptor.java#L76-L83 |
teatrove/teatrove | teaservlet/src/main/java/org/teatrove/teatools/TeaToolsUtils.java | TeaToolsUtils.createPatternString | public String createPatternString(String pattern, int length) {
if (pattern == null) {
return null;
}
int totalLength = pattern.length() * length;
StringBuffer sb = new StringBuffer(totalLength);
for (int i = 0; i < length; i++) {
sb.append(pattern);
... | java | public String createPatternString(String pattern, int length) {
if (pattern == null) {
return null;
}
int totalLength = pattern.length() * length;
StringBuffer sb = new StringBuffer(totalLength);
for (int i = 0; i < length; i++) {
sb.append(pattern);
... | [
"public",
"String",
"createPatternString",
"(",
"String",
"pattern",
",",
"int",
"length",
")",
"{",
"if",
"(",
"pattern",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"int",
"totalLength",
"=",
"pattern",
".",
"length",
"(",
")",
"*",
"length",
... | Creates a String with the specified pattern repeated length
times. | [
"Creates",
"a",
"String",
"with",
"the",
"specified",
"pattern",
"repeated",
"length",
"times",
"."
] | train | https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teatools/TeaToolsUtils.java#L693-L704 |
javalite/activeweb | javalite-async/src/main/java/org/javalite/async/Async.java | Async.receiveCommand | public Command receiveCommand(String queueName, long timeout) {
try {
Message message = receiveMessage(queueName, timeout);
if(message == null){
return null;
}else{
Command command;
if(binaryMode){
command =... | java | public Command receiveCommand(String queueName, long timeout) {
try {
Message message = receiveMessage(queueName, timeout);
if(message == null){
return null;
}else{
Command command;
if(binaryMode){
command =... | [
"public",
"Command",
"receiveCommand",
"(",
"String",
"queueName",
",",
"long",
"timeout",
")",
"{",
"try",
"{",
"Message",
"message",
"=",
"receiveMessage",
"(",
"queueName",
",",
"timeout",
")",
";",
"if",
"(",
"message",
"==",
"null",
")",
"{",
"return"... | Receives a command from a queue synchronously. If this queue also has listeners, then commands will be distributed across
all consumers.
@param queueName name of queue
@param timeout timeout in milliseconds. If a command is not received during a timeout, this methods returns null.
@return command if found. If command... | [
"Receives",
"a",
"command",
"from",
"a",
"queue",
"synchronously",
".",
"If",
"this",
"queue",
"also",
"has",
"listeners",
"then",
"commands",
"will",
"be",
"distributed",
"across",
"all",
"consumers",
"."
] | train | https://github.com/javalite/activeweb/blob/f25f589da94852b6f5625182360732e0861794a6/javalite-async/src/main/java/org/javalite/async/Async.java#L433-L452 |
ManfredTremmel/gwt-commons-lang3 | src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java | MethodUtils.invokeMethod | public static Object invokeMethod(final Object object, final String methodName,
Object... args) throws NoSuchMethodException,
IllegalAccessException, InvocationTargetException {
args = ArrayUtils.nullToEmpty(args);
final Class<?>[] parameterTypes = ClassUtils.toClass(args);
... | java | public static Object invokeMethod(final Object object, final String methodName,
Object... args) throws NoSuchMethodException,
IllegalAccessException, InvocationTargetException {
args = ArrayUtils.nullToEmpty(args);
final Class<?>[] parameterTypes = ClassUtils.toClass(args);
... | [
"public",
"static",
"Object",
"invokeMethod",
"(",
"final",
"Object",
"object",
",",
"final",
"String",
"methodName",
",",
"Object",
"...",
"args",
")",
"throws",
"NoSuchMethodException",
",",
"IllegalAccessException",
",",
"InvocationTargetException",
"{",
"args",
... | <p>Invokes a named method whose parameter type matches the object type.</p>
<p>This method delegates the method search to {@link #getMatchingAccessibleMethod(Class, String, Class[])}.</p>
<p>This method supports calls to methods taking primitive parameters
via passing in wrapping classes. So, for example, a {@code Bo... | [
"<p",
">",
"Invokes",
"a",
"named",
"method",
"whose",
"parameter",
"type",
"matches",
"the",
"object",
"type",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java#L146-L152 |
ArcBees/gwtquery | gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java | Function.getArgument | public <T> T getArgument(int idx, Class<? extends T> type) {
return getArgument(-1, idx, type);
} | java | public <T> T getArgument(int idx, Class<? extends T> type) {
return getArgument(-1, idx, type);
} | [
"public",
"<",
"T",
">",
"T",
"getArgument",
"(",
"int",
"idx",
",",
"Class",
"<",
"?",
"extends",
"T",
">",
"type",
")",
"{",
"return",
"getArgument",
"(",
"-",
"1",
",",
"idx",
",",
"type",
")",
";",
"}"
] | Safety return the argument in the position idx.
If the element class is not of the requested type it returns null and
you don't get casting exeption. | [
"Safety",
"return",
"the",
"argument",
"in",
"the",
"position",
"idx",
"."
] | train | https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java#L221-L223 |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSField.java | JSField.estimateSizeOfUnassembledValue | public int estimateSizeOfUnassembledValue(byte[] frame, int offset, int indirect) {
if (indirect == 0)
return estimateUnassembledSize(frame, offset);
else
return coder.estimateUnassembledSize(frame, offset);
} | java | public int estimateSizeOfUnassembledValue(byte[] frame, int offset, int indirect) {
if (indirect == 0)
return estimateUnassembledSize(frame, offset);
else
return coder.estimateUnassembledSize(frame, offset);
} | [
"public",
"int",
"estimateSizeOfUnassembledValue",
"(",
"byte",
"[",
"]",
"frame",
",",
"int",
"offset",
",",
"int",
"indirect",
")",
"{",
"if",
"(",
"indirect",
"==",
"0",
")",
"return",
"estimateUnassembledSize",
"(",
"frame",
",",
"offset",
")",
";",
"e... | estimateSizeOfUnassembledValue
Return the estimated size of the value if unassembled.
This size includes a guess at the heap overhead of the object(s) which
would be created.
@param frame the byte array from which the object would be deserialized.
@param offset the byte at which to start in frame
@param indirect the l... | [
"estimateSizeOfUnassembledValue",
"Return",
"the",
"estimated",
"size",
"of",
"the",
"value",
"if",
"unassembled",
".",
"This",
"size",
"includes",
"a",
"guess",
"at",
"the",
"heap",
"overhead",
"of",
"the",
"object",
"(",
"s",
")",
"which",
"would",
"be",
"... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSField.java#L222-L227 |
apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/ConcurrentBoundedWorkUnitList.java | ConcurrentBoundedWorkUnitList.addFileSet | public boolean addFileSet(FileSet<CopyEntity> fileSet, List<WorkUnit> workUnits) {
boolean addedWorkunits = addFileSetImpl(fileSet, workUnits);
if (!addedWorkunits) {
this.rejectedFileSet = true;
}
return addedWorkunits;
} | java | public boolean addFileSet(FileSet<CopyEntity> fileSet, List<WorkUnit> workUnits) {
boolean addedWorkunits = addFileSetImpl(fileSet, workUnits);
if (!addedWorkunits) {
this.rejectedFileSet = true;
}
return addedWorkunits;
} | [
"public",
"boolean",
"addFileSet",
"(",
"FileSet",
"<",
"CopyEntity",
">",
"fileSet",
",",
"List",
"<",
"WorkUnit",
">",
"workUnits",
")",
"{",
"boolean",
"addedWorkunits",
"=",
"addFileSetImpl",
"(",
"fileSet",
",",
"workUnits",
")",
";",
"if",
"(",
"!",
... | Add a file set to the container.
@param fileSet File set, expressed as a {@link org.apache.gobblin.data.management.partition.FileSet} of {@link CopyEntity}s.
@param workUnits List of {@link WorkUnit}s corresponding to this file set.
@return true if the file set was added to the container, false otherwise (i.e. has reac... | [
"Add",
"a",
"file",
"set",
"to",
"the",
"container",
"."
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/ConcurrentBoundedWorkUnitList.java#L108-L114 |
Azure/azure-sdk-for-java | eventgrid/resource-manager/v2018_09_15_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_09_15_preview/implementation/DomainsInner.java | DomainsInner.beginCreateOrUpdateAsync | public Observable<DomainInner> beginCreateOrUpdateAsync(String resourceGroupName, String domainName, DomainInner domainInfo) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domainInfo).map(new Func1<ServiceResponse<DomainInner>, DomainInner>() {
@Override
... | java | public Observable<DomainInner> beginCreateOrUpdateAsync(String resourceGroupName, String domainName, DomainInner domainInfo) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domainInfo).map(new Func1<ServiceResponse<DomainInner>, DomainInner>() {
@Override
... | [
"public",
"Observable",
"<",
"DomainInner",
">",
"beginCreateOrUpdateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"domainName",
",",
"DomainInner",
"domainInfo",
")",
"{",
"return",
"beginCreateOrUpdateWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
... | Create a domain.
Asynchronously creates a new domain with the specified parameters.
@param resourceGroupName The name of the resource group within the user's subscription.
@param domainName Name of the domain
@param domainInfo Domain information
@throws IllegalArgumentException thrown if parameters fail the validation... | [
"Create",
"a",
"domain",
".",
"Asynchronously",
"creates",
"a",
"new",
"domain",
"with",
"the",
"specified",
"parameters",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2018_09_15_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_09_15_preview/implementation/DomainsInner.java#L327-L334 |
alkacon/opencms-core | src/org/opencms/xml/CmsXmlUtils.java | CmsXmlUtils.createXpath | public static String createXpath(String path, int index) {
if (path.indexOf('/') > -1) {
// this is a complex path over more then 1 node
StringBuffer result = new StringBuffer(path.length() + 32);
// split the path into sub elements
List<String> elements = CmsSt... | java | public static String createXpath(String path, int index) {
if (path.indexOf('/') > -1) {
// this is a complex path over more then 1 node
StringBuffer result = new StringBuffer(path.length() + 32);
// split the path into sub elements
List<String> elements = CmsSt... | [
"public",
"static",
"String",
"createXpath",
"(",
"String",
"path",
",",
"int",
"index",
")",
"{",
"if",
"(",
"path",
".",
"indexOf",
"(",
"'",
"'",
")",
">",
"-",
"1",
")",
"{",
"// this is a complex path over more then 1 node",
"StringBuffer",
"result",
"=... | Translates a simple lookup path to the simplified Xpath format used for
the internal bookmarks.<p>
Examples:<br>
<code>title</code> becomes <code>title[1]</code><br>
<code>title[1]</code> is left untouched<br>
<code>title/subtitle</code> becomes <code>title[1]/subtitle[1]</code><br>
<code>title/subtitle[1]</code> beco... | [
"Translates",
"a",
"simple",
"lookup",
"path",
"to",
"the",
"simplified",
"Xpath",
"format",
"used",
"for",
"the",
"internal",
"bookmarks",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/CmsXmlUtils.java#L177-L199 |
JodaOrg/joda-time | src/main/java/org/joda/time/chrono/BuddhistChronology.java | BuddhistChronology.getInstance | public static BuddhistChronology getInstance(DateTimeZone zone) {
if (zone == null) {
zone = DateTimeZone.getDefault();
}
BuddhistChronology chrono = cCache.get(zone);
if (chrono == null) {
// First create without a lower limit.
chrono = new BuddhistCh... | java | public static BuddhistChronology getInstance(DateTimeZone zone) {
if (zone == null) {
zone = DateTimeZone.getDefault();
}
BuddhistChronology chrono = cCache.get(zone);
if (chrono == null) {
// First create without a lower limit.
chrono = new BuddhistCh... | [
"public",
"static",
"BuddhistChronology",
"getInstance",
"(",
"DateTimeZone",
"zone",
")",
"{",
"if",
"(",
"zone",
"==",
"null",
")",
"{",
"zone",
"=",
"DateTimeZone",
".",
"getDefault",
"(",
")",
";",
"}",
"BuddhistChronology",
"chrono",
"=",
"cCache",
".",... | Standard instance of a Buddhist Chronology, that matches
Sun's BuddhistCalendar class. This means that it follows the
GregorianJulian calendar rules with a cutover date.
@param zone the time zone to use, null is default | [
"Standard",
"instance",
"of",
"a",
"Buddhist",
"Chronology",
"that",
"matches",
"Sun",
"s",
"BuddhistCalendar",
"class",
".",
"This",
"means",
"that",
"it",
"follows",
"the",
"GregorianJulian",
"calendar",
"rules",
"with",
"a",
"cutover",
"date",
"."
] | train | https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/chrono/BuddhistChronology.java#L104-L121 |
pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/type/TypeHandlerUtils.java | TypeHandlerUtils.convertClob | public static Object convertClob(Connection conn, String value) throws SQLException {
return convertClob(conn, value.getBytes());
} | java | public static Object convertClob(Connection conn, String value) throws SQLException {
return convertClob(conn, value.getBytes());
} | [
"public",
"static",
"Object",
"convertClob",
"(",
"Connection",
"conn",
",",
"String",
"value",
")",
"throws",
"SQLException",
"{",
"return",
"convertClob",
"(",
"conn",
",",
"value",
".",
"getBytes",
"(",
")",
")",
";",
"}"
] | Transfers data from String into sql.Blob
@param conn connection for which sql.Blob object would be created
@param value String
@return sql.Clob from String
@throws SQLException | [
"Transfers",
"data",
"from",
"String",
"into",
"sql",
".",
"Blob"
] | train | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/type/TypeHandlerUtils.java#L189-L191 |
gallandarakhneorg/afc | advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d1/dfx/GeomFactory1dfx.java | GeomFactory1dfx.newVector | @SuppressWarnings("static-method")
public Vector1dfx newVector(ObjectProperty<WeakReference<Segment1D<?, ?>>> segment, DoubleProperty x, DoubleProperty y) {
return new Vector1dfx(segment, x, y);
} | java | @SuppressWarnings("static-method")
public Vector1dfx newVector(ObjectProperty<WeakReference<Segment1D<?, ?>>> segment, DoubleProperty x, DoubleProperty y) {
return new Vector1dfx(segment, x, y);
} | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"public",
"Vector1dfx",
"newVector",
"(",
"ObjectProperty",
"<",
"WeakReference",
"<",
"Segment1D",
"<",
"?",
",",
"?",
">",
">",
">",
"segment",
",",
"DoubleProperty",
"x",
",",
"DoubleProperty",
"y",
")... | Create a vector with properties.
@param segment the segment property.
@param x the x property.
@param y the y property.
@return the vector. | [
"Create",
"a",
"vector",
"with",
"properties",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d1/dfx/GeomFactory1dfx.java#L131-L134 |
UrielCh/ovh-java-sdk | ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java | ApiOvhEmailexchange.organizationName_service_exchangeService_publicFolder_path_PUT | public void organizationName_service_exchangeService_publicFolder_path_PUT(String organizationName, String exchangeService, String path, OvhPublicFolder body) throws IOException {
String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/publicFolder/{path}";
StringBuilder sb = path(qPath, organi... | java | public void organizationName_service_exchangeService_publicFolder_path_PUT(String organizationName, String exchangeService, String path, OvhPublicFolder body) throws IOException {
String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/publicFolder/{path}";
StringBuilder sb = path(qPath, organi... | [
"public",
"void",
"organizationName_service_exchangeService_publicFolder_path_PUT",
"(",
"String",
"organizationName",
",",
"String",
"exchangeService",
",",
"String",
"path",
",",
"OvhPublicFolder",
"body",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/e... | Alter this object properties
REST: PUT /email/exchange/{organizationName}/service/{exchangeService}/publicFolder/{path}
@param body [required] New object properties
@param organizationName [required] The internal name of your exchange organization
@param exchangeService [required] The internal name of your exchange se... | [
"Alter",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L182-L186 |
mapsforge/mapsforge | mapsforge-poi/src/main/java/org/mapsforge/poi/storage/PoiCategoryRangeQueryGenerator.java | PoiCategoryRangeQueryGenerator.getSQLSelectString | public static String getSQLSelectString(PoiCategoryFilter filter, int count, int version) {
StringBuilder sb = new StringBuilder();
sb.append(DbConstants.FIND_IN_BOX_CLAUSE_SELECT);
if (version < 2) {
sb.append(DbConstants.JOIN_DATA_CLAUSE);
} else {
sb.append(DbC... | java | public static String getSQLSelectString(PoiCategoryFilter filter, int count, int version) {
StringBuilder sb = new StringBuilder();
sb.append(DbConstants.FIND_IN_BOX_CLAUSE_SELECT);
if (version < 2) {
sb.append(DbConstants.JOIN_DATA_CLAUSE);
} else {
sb.append(DbC... | [
"public",
"static",
"String",
"getSQLSelectString",
"(",
"PoiCategoryFilter",
"filter",
",",
"int",
"count",
",",
"int",
"version",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"sb",
".",
"append",
"(",
"DbConstants",
".",
"FI... | Gets the SQL query that looks up POI entries.
@param filter The filter object for determining all wanted categories.
@param count Count of patterns to search in points of interest names (may be 0).
@param version POI specification version.
@return The SQL query. | [
"Gets",
"the",
"SQL",
"query",
"that",
"looks",
"up",
"POI",
"entries",
"."
] | train | https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-poi/src/main/java/org/mapsforge/poi/storage/PoiCategoryRangeQueryGenerator.java#L40-L57 |
dvdme/forecastio-lib-java | src/com/github/dvdme/ForecastIOLib/ForecastIO.java | ForecastIO.setHTTPProxy | public void setHTTPProxy(String PROXYNAME, int PROXYPORT) {
if (PROXYNAME == null) {
this.proxy_to_use = null;
}
else {
this.proxy_to_use = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(PROXYNAME, PROXYPORT));
}
} | java | public void setHTTPProxy(String PROXYNAME, int PROXYPORT) {
if (PROXYNAME == null) {
this.proxy_to_use = null;
}
else {
this.proxy_to_use = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(PROXYNAME, PROXYPORT));
}
} | [
"public",
"void",
"setHTTPProxy",
"(",
"String",
"PROXYNAME",
",",
"int",
"PROXYPORT",
")",
"{",
"if",
"(",
"PROXYNAME",
"==",
"null",
")",
"{",
"this",
".",
"proxy_to_use",
"=",
"null",
";",
"}",
"else",
"{",
"this",
".",
"proxy_to_use",
"=",
"new",
"... | Sets the http-proxy to use.
@param PROXYNAME hostname or ip of the proxy to use (e.g. "127.0.0.1"). If proxyname equals null, no proxy will be used.
@param PROXYPORT port of the proxy to use (e.g. 8080) | [
"Sets",
"the",
"http",
"-",
"proxy",
"to",
"use",
"."
] | train | https://github.com/dvdme/forecastio-lib-java/blob/63c0ff17446eb7eb4e9f8bef4e19272f14c74e85/src/com/github/dvdme/ForecastIOLib/ForecastIO.java#L285-L292 |
google/error-prone-javac | src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstantsSummaryBuilder.java | ConstantsSummaryBuilder.buildClassConstantSummary | public void buildClassConstantSummary(XMLNode node, Content summariesTree)
throws DocletException {
SortedSet<TypeElement> classes = !currentPackage.isUnnamed()
? utils.getAllClasses(currentPackage)
: configuration.typeElementCatalog.allUnnamedClasses();
Conte... | java | public void buildClassConstantSummary(XMLNode node, Content summariesTree)
throws DocletException {
SortedSet<TypeElement> classes = !currentPackage.isUnnamed()
? utils.getAllClasses(currentPackage)
: configuration.typeElementCatalog.allUnnamedClasses();
Conte... | [
"public",
"void",
"buildClassConstantSummary",
"(",
"XMLNode",
"node",
",",
"Content",
"summariesTree",
")",
"throws",
"DocletException",
"{",
"SortedSet",
"<",
"TypeElement",
">",
"classes",
"=",
"!",
"currentPackage",
".",
"isUnnamed",
"(",
")",
"?",
"utils",
... | Build the summary for the current class.
@param node the XML element that specifies which components to document
@param summariesTree the tree to which the class constant summary will be added
@throws DocletException if there is a problem while building the documentation | [
"Build",
"the",
"summary",
"for",
"the",
"current",
"class",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstantsSummaryBuilder.java#L221-L237 |
netty/netty | codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java | HttpHeaders.setDateHeader | @Deprecated
public static void setDateHeader(HttpMessage message, String name, Iterable<Date> values) {
message.headers().set(name, values);
} | java | @Deprecated
public static void setDateHeader(HttpMessage message, String name, Iterable<Date> values) {
message.headers().set(name, values);
} | [
"@",
"Deprecated",
"public",
"static",
"void",
"setDateHeader",
"(",
"HttpMessage",
"message",
",",
"String",
"name",
",",
"Iterable",
"<",
"Date",
">",
"values",
")",
"{",
"message",
".",
"headers",
"(",
")",
".",
"set",
"(",
"name",
",",
"values",
")",... | @deprecated Use {@link #set(CharSequence, Iterable)} instead.
@see #setDateHeader(HttpMessage, CharSequence, Iterable) | [
"@deprecated",
"Use",
"{",
"@link",
"#set",
"(",
"CharSequence",
"Iterable",
")",
"}",
"instead",
"."
] | train | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java#L914-L917 |
dropbox/dropbox-sdk-java | src/main/java/com/dropbox/core/v1/DbxClientV1.java | DbxClientV1.getDeltaC | public <C> DbxDeltaC<C> getDeltaC(Collector<DbxDeltaC.Entry<DbxEntry>, C> collector, /*@Nullable*/String cursor)
throws DbxException
{
return getDeltaC(collector, cursor, false);
} | java | public <C> DbxDeltaC<C> getDeltaC(Collector<DbxDeltaC.Entry<DbxEntry>, C> collector, /*@Nullable*/String cursor)
throws DbxException
{
return getDeltaC(collector, cursor, false);
} | [
"public",
"<",
"C",
">",
"DbxDeltaC",
"<",
"C",
">",
"getDeltaC",
"(",
"Collector",
"<",
"DbxDeltaC",
".",
"Entry",
"<",
"DbxEntry",
">",
",",
"C",
">",
"collector",
",",
"/*@Nullable*/",
"String",
"cursor",
")",
"throws",
"DbxException",
"{",
"return",
... | Same as {@link #getDeltaC(Collector, String, boolean)} with {@code includeMediaInfo} set to {@code false}. | [
"Same",
"as",
"{"
] | train | https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/v1/DbxClientV1.java#L1508-L1512 |
astrapi69/mystic-crypt | crypt-data/src/main/java/de/alpharogroup/crypto/key/PublicKeyExtensions.java | PublicKeyExtensions.toPemFile | public static void toPemFile(final @NonNull PublicKey publicKey, final @NonNull File file)
throws IOException {
PublicKeyWriter.writeInPemFormat(publicKey, file);
} | java | public static void toPemFile(final @NonNull PublicKey publicKey, final @NonNull File file)
throws IOException {
PublicKeyWriter.writeInPemFormat(publicKey, file);
} | [
"public",
"static",
"void",
"toPemFile",
"(",
"final",
"@",
"NonNull",
"PublicKey",
"publicKey",
",",
"final",
"@",
"NonNull",
"File",
"file",
")",
"throws",
"IOException",
"{",
"PublicKeyWriter",
".",
"writeInPemFormat",
"(",
"publicKey",
",",
"file",
")",
";... | Write the given {@link PublicKey} into the given {@link File}.
@param publicKey
the public key
@param file
the file to write in
@throws IOException
Signals that an I/O exception has occurred. | [
"Write",
"the",
"given",
"{",
"@link",
"PublicKey",
"}",
"into",
"the",
"given",
"{",
"@link",
"File",
"}",
"."
] | train | https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/key/PublicKeyExtensions.java#L153-L156 |
apache/groovy | subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java | DateTimeExtensions.rightShift | public static Period rightShift(YearMonth self, YearMonth other) {
return Period.between(self.atDay(1), other.atDay(1));
} | java | public static Period rightShift(YearMonth self, YearMonth other) {
return Period.between(self.atDay(1), other.atDay(1));
} | [
"public",
"static",
"Period",
"rightShift",
"(",
"YearMonth",
"self",
",",
"YearMonth",
"other",
")",
"{",
"return",
"Period",
".",
"between",
"(",
"self",
".",
"atDay",
"(",
"1",
")",
",",
"other",
".",
"atDay",
"(",
"1",
")",
")",
";",
"}"
] | Returns a {@link java.time.Period} of time between the first day of this year/month (inclusive) and the
given {@link java.time.YearMonth} (exclusive).
@param self a YearMonth
@param other another YearMonth
@return a Period
@since 2.5.0 | [
"Returns",
"a",
"{",
"@link",
"java",
".",
"time",
".",
"Period",
"}",
"of",
"time",
"between",
"the",
"first",
"day",
"of",
"this",
"year",
"/",
"month",
"(",
"inclusive",
")",
"and",
"the",
"given",
"{",
"@link",
"java",
".",
"time",
".",
"YearMont... | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java#L1603-L1605 |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LocalNameRangeQuery.java | LocalNameRangeQuery.getUpperTerm | private static Term getUpperTerm(String upperName) {
String text;
if (upperName == null) {
text = "\uFFFF";
} else {
text = upperName;
}
return new Term(FieldNames.LOCAL_NAME, text);
} | java | private static Term getUpperTerm(String upperName) {
String text;
if (upperName == null) {
text = "\uFFFF";
} else {
text = upperName;
}
return new Term(FieldNames.LOCAL_NAME, text);
} | [
"private",
"static",
"Term",
"getUpperTerm",
"(",
"String",
"upperName",
")",
"{",
"String",
"text",
";",
"if",
"(",
"upperName",
"==",
"null",
")",
"{",
"text",
"=",
"\"\\uFFFF\"",
";",
"}",
"else",
"{",
"text",
"=",
"upperName",
";",
"}",
"return",
"... | Creates a {@link Term} for the upper bound local name.
@param upperName the upper bound local name.
@return a {@link Term} for the upper bound local name. | [
"Creates",
"a",
"{",
"@link",
"Term",
"}",
"for",
"the",
"upper",
"bound",
"local",
"name",
"."
] | train | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LocalNameRangeQuery.java#L68-L76 |
gallandarakhneorg/afc | core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphPath.java | GraphPath.removeUntilLast | public boolean removeUntilLast(ST obj, PT pt) {
return removeUntil(lastIndexOf(obj, pt), true);
} | java | public boolean removeUntilLast(ST obj, PT pt) {
return removeUntil(lastIndexOf(obj, pt), true);
} | [
"public",
"boolean",
"removeUntilLast",
"(",
"ST",
"obj",
",",
"PT",
"pt",
")",
"{",
"return",
"removeUntil",
"(",
"lastIndexOf",
"(",
"obj",
",",
"pt",
")",
",",
"true",
")",
";",
"}"
] | Remove the path's elements before the
specified one which is starting
at the specified point. The specified element will
be removed.
<p>This function removes until the <i>last occurence</i>
of the given object.
@param obj is the segment to remove
@param pt is the point on which the segment was connected
as its first ... | [
"Remove",
"the",
"path",
"s",
"elements",
"before",
"the",
"specified",
"one",
"which",
"is",
"starting",
"at",
"the",
"specified",
"point",
".",
"The",
"specified",
"element",
"will",
"be",
"removed",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphPath.java#L709-L711 |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java | SparkComputationGraph.scoreExamplesMultiDataSet | public <K> JavaPairRDD<K, Double> scoreExamplesMultiDataSet(JavaPairRDD<K, MultiDataSet> data,
boolean includeRegularizationTerms) {
return scoreExamplesMultiDataSet(data, includeRegularizationTerms, DEFAULT_EVAL_SCORE_BATCH_SIZE);
} | java | public <K> JavaPairRDD<K, Double> scoreExamplesMultiDataSet(JavaPairRDD<K, MultiDataSet> data,
boolean includeRegularizationTerms) {
return scoreExamplesMultiDataSet(data, includeRegularizationTerms, DEFAULT_EVAL_SCORE_BATCH_SIZE);
} | [
"public",
"<",
"K",
">",
"JavaPairRDD",
"<",
"K",
",",
"Double",
">",
"scoreExamplesMultiDataSet",
"(",
"JavaPairRDD",
"<",
"K",
",",
"MultiDataSet",
">",
"data",
",",
"boolean",
"includeRegularizationTerms",
")",
"{",
"return",
"scoreExamplesMultiDataSet",
"(",
... | Score the examples individually, using the default batch size {@link #DEFAULT_EVAL_SCORE_BATCH_SIZE}. Unlike {@link #calculateScore(JavaRDD, boolean)},
this method returns a score for each example separately<br>
Note: The provided JavaPairRDD has a key that is associated with each example and returned score.<br>
<b>Not... | [
"Score",
"the",
"examples",
"individually",
"using",
"the",
"default",
"batch",
"size",
"{",
"@link",
"#DEFAULT_EVAL_SCORE_BATCH_SIZE",
"}",
".",
"Unlike",
"{",
"@link",
"#calculateScore",
"(",
"JavaRDD",
"boolean",
")",
"}",
"this",
"method",
"returns",
"a",
"s... | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java#L501-L504 |
alkacon/opencms-core | src/org/opencms/xml/containerpage/CmsDynamicFunctionBean.java | CmsDynamicFunctionBean.getFormatForContainer | public Format getFormatForContainer(CmsObject cms, String type, int width) {
IdentityHashMap<CmsFormatterBean, Format> formatsByFormatter = new IdentityHashMap<CmsFormatterBean, Format>();
// relate formatters to formats so we can pick the corresponding format after a formatter has been selected
... | java | public Format getFormatForContainer(CmsObject cms, String type, int width) {
IdentityHashMap<CmsFormatterBean, Format> formatsByFormatter = new IdentityHashMap<CmsFormatterBean, Format>();
// relate formatters to formats so we can pick the corresponding format after a formatter has been selected
... | [
"public",
"Format",
"getFormatForContainer",
"(",
"CmsObject",
"cms",
",",
"String",
"type",
",",
"int",
"width",
")",
"{",
"IdentityHashMap",
"<",
"CmsFormatterBean",
",",
"Format",
">",
"formatsByFormatter",
"=",
"new",
"IdentityHashMap",
"<",
"CmsFormatterBean",
... | Finds the correct format for a given container type and width.<p>
@param cms the current CMS context
@param type the container type
@param width the container width
@return the format for the given container type and width | [
"Finds",
"the",
"correct",
"format",
"for",
"a",
"given",
"container",
"type",
"and",
"width",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/containerpage/CmsDynamicFunctionBean.java#L228-L247 |
ulisesbocchio/spring-boot-security-saml | spring-boot-security-saml/src/main/java/com/github/ulisesbocchio/spring/boot/security/saml/resource/KeystoreFactory.java | KeystoreFactory.addKeyToKeystore | @SneakyThrows
public void addKeyToKeystore(KeyStore keyStore, X509Certificate cert, RSAPrivateKey privateKey, String alias, String password) {
KeyStore.PasswordProtection pass = new KeyStore.PasswordProtection(password.toCharArray());
Certificate[] certificateChain = {cert};
keyStore.setEntr... | java | @SneakyThrows
public void addKeyToKeystore(KeyStore keyStore, X509Certificate cert, RSAPrivateKey privateKey, String alias, String password) {
KeyStore.PasswordProtection pass = new KeyStore.PasswordProtection(password.toCharArray());
Certificate[] certificateChain = {cert};
keyStore.setEntr... | [
"@",
"SneakyThrows",
"public",
"void",
"addKeyToKeystore",
"(",
"KeyStore",
"keyStore",
",",
"X509Certificate",
"cert",
",",
"RSAPrivateKey",
"privateKey",
",",
"String",
"alias",
",",
"String",
"password",
")",
"{",
"KeyStore",
".",
"PasswordProtection",
"pass",
... | Based on a public certificate, private key, alias and password, this method will load the certificate and
private key as an entry into the keystore, and it will set the provided alias and password to the keystore entry.
@param keyStore
@param cert
@param privateKey
@param alias
@param password | [
"Based",
"on",
"a",
"public",
"certificate",
"private",
"key",
"alias",
"and",
"password",
"this",
"method",
"will",
"load",
"the",
"certificate",
"and",
"private",
"key",
"as",
"an",
"entry",
"into",
"the",
"keystore",
"and",
"it",
"will",
"set",
"the",
"... | train | https://github.com/ulisesbocchio/spring-boot-security-saml/blob/63596fe9b4b5504053392b9ee9a925b9a77644d4/spring-boot-security-saml/src/main/java/com/github/ulisesbocchio/spring/boot/security/saml/resource/KeystoreFactory.java#L65-L70 |
google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/javax/xml/datatype/XMLGregorianCalendar.java | XMLGregorianCalendar.setTime | public void setTime(int hour, int minute, int second, int millisecond) {
setHour(hour);
setMinute(minute);
setSecond(second);
setMillisecond(millisecond);
} | java | public void setTime(int hour, int minute, int second, int millisecond) {
setHour(hour);
setMinute(minute);
setSecond(second);
setMillisecond(millisecond);
} | [
"public",
"void",
"setTime",
"(",
"int",
"hour",
",",
"int",
"minute",
",",
"int",
"second",
",",
"int",
"millisecond",
")",
"{",
"setHour",
"(",
"hour",
")",
";",
"setMinute",
"(",
"minute",
")",
";",
"setSecond",
"(",
"second",
")",
";",
"setMillisec... | <p>Set time as one unit, including optional milliseconds.</p>
@param hour value constraints are summarized in
<a href="#datetimefield-hour">hour field of date/time field mapping table</a>.
@param minute value constraints are summarized in
<a href="#datetimefield-minute">minute field of date/time field mapping table</a... | [
"<p",
">",
"Set",
"time",
"as",
"one",
"unit",
"including",
"optional",
"milliseconds",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/javax/xml/datatype/XMLGregorianCalendar.java#L444-L450 |
ksclarke/freelib-utils | src/main/java/info/freelibrary/util/FileUtils.java | FileUtils.toFile | public static File toFile(final URL aURL) throws MalformedURLException {
if (aURL.getProtocol().equals(FILE_TYPE)) {
return new File(aURL.toString().replace("file:", ""));
}
throw new MalformedURLException(LOGGER.getI18n(MessageCodes.UTIL_036, aURL));
} | java | public static File toFile(final URL aURL) throws MalformedURLException {
if (aURL.getProtocol().equals(FILE_TYPE)) {
return new File(aURL.toString().replace("file:", ""));
}
throw new MalformedURLException(LOGGER.getI18n(MessageCodes.UTIL_036, aURL));
} | [
"public",
"static",
"File",
"toFile",
"(",
"final",
"URL",
"aURL",
")",
"throws",
"MalformedURLException",
"{",
"if",
"(",
"aURL",
".",
"getProtocol",
"(",
")",
".",
"equals",
"(",
"FILE_TYPE",
")",
")",
"{",
"return",
"new",
"File",
"(",
"aURL",
".",
... | Returns a Java <code>File</code> for the supplied file-based URL.
@param aURL A URL that has a file protocol
@return A Java <code>File</code> for the supplied URL
@throws MalformedURLException If the supplied URL doesn't have a file protocol | [
"Returns",
"a",
"Java",
"<code",
">",
"File<",
"/",
"code",
">",
"for",
"the",
"supplied",
"file",
"-",
"based",
"URL",
"."
] | train | https://github.com/ksclarke/freelib-utils/blob/54e822ae4c11b3d74793fd82a1a535ffafffaf45/src/main/java/info/freelibrary/util/FileUtils.java#L326-L332 |
ironjacamar/ironjacamar | common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java | AbstractParser.attributeAsInt | protected Integer attributeAsInt(XMLStreamReader reader, String attributeName, Map<String, String> expressions)
throws XMLStreamException
{
String attributeString = rawAttributeText(reader, attributeName);
if (attributeName != null && expressions != null && attributeString != null &&
att... | java | protected Integer attributeAsInt(XMLStreamReader reader, String attributeName, Map<String, String> expressions)
throws XMLStreamException
{
String attributeString = rawAttributeText(reader, attributeName);
if (attributeName != null && expressions != null && attributeString != null &&
att... | [
"protected",
"Integer",
"attributeAsInt",
"(",
"XMLStreamReader",
"reader",
",",
"String",
"attributeName",
",",
"Map",
"<",
"String",
",",
"String",
">",
"expressions",
")",
"throws",
"XMLStreamException",
"{",
"String",
"attributeString",
"=",
"rawAttributeText",
... | convert an xml element in String value
@param reader the StAX reader
@param attributeName the name of the attribute
@param expressions The expressions
@return the string representing element
@throws XMLStreamException StAX exception | [
"convert",
"an",
"xml",
"element",
"in",
"String",
"value"
] | train | https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java#L217-L227 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/IdentityHashMap.java | IdentityHashMap.put | public V put(K key, V value) {
final Object k = maskNull(key);
retryAfterResize: for (;;) {
final Object[] tab = table;
final int len = tab.length;
int i = hash(k, len);
for (Object item; (item = tab[i]) != null;
i = nextKeyIndex(i, len)... | java | public V put(K key, V value) {
final Object k = maskNull(key);
retryAfterResize: for (;;) {
final Object[] tab = table;
final int len = tab.length;
int i = hash(k, len);
for (Object item; (item = tab[i]) != null;
i = nextKeyIndex(i, len)... | [
"public",
"V",
"put",
"(",
"K",
"key",
",",
"V",
"value",
")",
"{",
"final",
"Object",
"k",
"=",
"maskNull",
"(",
"key",
")",
";",
"retryAfterResize",
":",
"for",
"(",
";",
";",
")",
"{",
"final",
"Object",
"[",
"]",
"tab",
"=",
"table",
";",
"... | Associates the specified value with the specified key in this identity
hash map. If the map previously contained a mapping for the key, the
old value is replaced.
@param key the key with which the specified value is to be associated
@param value the value to be associated with the specified key
@return the previous v... | [
"Associates",
"the",
"specified",
"value",
"with",
"the",
"specified",
"key",
"in",
"this",
"identity",
"hash",
"map",
".",
"If",
"the",
"map",
"previously",
"contained",
"a",
"mapping",
"for",
"the",
"key",
"the",
"old",
"value",
"is",
"replaced",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/IdentityHashMap.java#L425-L455 |
js-lib-com/commons | src/main/java/js/lang/Config.java | Config.getProperty | public <T> T getProperty(String name, Class<T> type)
{
return getProperty(name, type, null);
} | java | public <T> T getProperty(String name, Class<T> type)
{
return getProperty(name, type, null);
} | [
"public",
"<",
"T",
">",
"T",
"getProperty",
"(",
"String",
"name",
",",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"return",
"getProperty",
"(",
"name",
",",
"type",
",",
"null",
")",
";",
"}"
] | Get configuration object property converter to requested type or null if there is no property with given name.
@param name property name.
@param type type to convert property value to.
@param <T> value type.
@return newly created value object or null.
@throws IllegalArgumentException if <code>name</code> argument is n... | [
"Get",
"configuration",
"object",
"property",
"converter",
"to",
"requested",
"type",
"or",
"null",
"if",
"there",
"is",
"no",
"property",
"with",
"given",
"name",
"."
] | train | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L409-L412 |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/OrientedBox3d.java | OrientedBox3d.setFirstAxisProperties | public void setFirstAxisProperties(Vector3d vector, DoubleProperty extent, CoordinateSystem3D system) {
this.axis1.setProperties(vector.xProperty,vector.yProperty,vector.zProperty);
assert(this.axis1.isUnitVector());
if (system.isLeftHanded()) {
this.axis3.set(this.axis1.crossLeftHand(this.axis2));
} else {
... | java | public void setFirstAxisProperties(Vector3d vector, DoubleProperty extent, CoordinateSystem3D system) {
this.axis1.setProperties(vector.xProperty,vector.yProperty,vector.zProperty);
assert(this.axis1.isUnitVector());
if (system.isLeftHanded()) {
this.axis3.set(this.axis1.crossLeftHand(this.axis2));
} else {
... | [
"public",
"void",
"setFirstAxisProperties",
"(",
"Vector3d",
"vector",
",",
"DoubleProperty",
"extent",
",",
"CoordinateSystem3D",
"system",
")",
"{",
"this",
".",
"axis1",
".",
"setProperties",
"(",
"vector",
".",
"xProperty",
",",
"vector",
".",
"yProperty",
"... | Set the second axis of the box.
The third axis is updated to be perpendicular to the two other axis.
@param vector
@param extent
@param system | [
"Set",
"the",
"second",
"axis",
"of",
"the",
"box",
".",
"The",
"third",
"axis",
"is",
"updated",
"to",
"be",
"perpendicular",
"to",
"the",
"two",
"other",
"axis",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/OrientedBox3d.java#L537-L546 |
nostra13/Android-Universal-Image-Loader | library/src/main/java/com/nostra13/universalimageloader/core/ImageLoader.java | ImageLoader.displayImage | public void displayImage(String uri, ImageView imageView, ImageLoadingListener listener) {
displayImage(uri, new ImageViewAware(imageView), null, listener, null);
} | java | public void displayImage(String uri, ImageView imageView, ImageLoadingListener listener) {
displayImage(uri, new ImageViewAware(imageView), null, listener, null);
} | [
"public",
"void",
"displayImage",
"(",
"String",
"uri",
",",
"ImageView",
"imageView",
",",
"ImageLoadingListener",
"listener",
")",
"{",
"displayImage",
"(",
"uri",
",",
"new",
"ImageViewAware",
"(",
"imageView",
")",
",",
"null",
",",
"listener",
",",
"null"... | Adds display image task to execution pool. Image will be set to ImageView when it's turn.<br />
Default {@linkplain DisplayImageOptions display image options} from {@linkplain ImageLoaderConfiguration
configuration} will be used.<br />
<b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before th... | [
"Adds",
"display",
"image",
"task",
"to",
"execution",
"pool",
".",
"Image",
"will",
"be",
"set",
"to",
"ImageView",
"when",
"it",
"s",
"turn",
".",
"<br",
"/",
">",
"Default",
"{",
"@linkplain",
"DisplayImageOptions",
"display",
"image",
"options",
"}",
"... | train | https://github.com/nostra13/Android-Universal-Image-Loader/blob/fc3c5f6779bb4f702e233653b61bd9d559e345cc/library/src/main/java/com/nostra13/universalimageloader/core/ImageLoader.java#L364-L366 |
aNNiMON/Lightweight-Stream-API | stream/src/main/java/com/annimon/stream/Collectors.java | Collectors.toCollection | @NotNull
public static <T, R extends Collection<T>> Collector<T, ?, R> toCollection(
@NotNull Supplier<R> collectionSupplier) {
return new CollectorsImpl<T, R, R>(
collectionSupplier,
new BiConsumer<R, T>() {
@Override
pub... | java | @NotNull
public static <T, R extends Collection<T>> Collector<T, ?, R> toCollection(
@NotNull Supplier<R> collectionSupplier) {
return new CollectorsImpl<T, R, R>(
collectionSupplier,
new BiConsumer<R, T>() {
@Override
pub... | [
"@",
"NotNull",
"public",
"static",
"<",
"T",
",",
"R",
"extends",
"Collection",
"<",
"T",
">",
">",
"Collector",
"<",
"T",
",",
"?",
",",
"R",
">",
"toCollection",
"(",
"@",
"NotNull",
"Supplier",
"<",
"R",
">",
"collectionSupplier",
")",
"{",
"retu... | Returns a {@code Collector} that fills new {@code Collection}, provided by {@code collectionSupplier},
with input elements.
@param <T> the type of the input elements
@param <R> the type of the resulting collection
@param collectionSupplier a supplier function that provides new collection
@return a {@code Collector} | [
"Returns",
"a",
"{",
"@code",
"Collector",
"}",
"that",
"fills",
"new",
"{",
"@code",
"Collection",
"}",
"provided",
"by",
"{",
"@code",
"collectionSupplier",
"}",
"with",
"input",
"elements",
"."
] | train | https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/Collectors.java#L50-L64 |
TheHortonMachine/hortonmachine | gears/src/main/java/oms3/Controller.java | Controller.mapOut | void mapOut(String out, Object comp, String comp_out) {
if (comp == ca.getComponent()) {
throw new ComponentException("cannot connect 'Out' with itself for " + out);
}
ComponentAccess ac_dest = lookup(comp);
FieldAccess destAccess = (FieldAccess) ac_dest.output(comp_out);
... | java | void mapOut(String out, Object comp, String comp_out) {
if (comp == ca.getComponent()) {
throw new ComponentException("cannot connect 'Out' with itself for " + out);
}
ComponentAccess ac_dest = lookup(comp);
FieldAccess destAccess = (FieldAccess) ac_dest.output(comp_out);
... | [
"void",
"mapOut",
"(",
"String",
"out",
",",
"Object",
"comp",
",",
"String",
"comp_out",
")",
"{",
"if",
"(",
"comp",
"==",
"ca",
".",
"getComponent",
"(",
")",
")",
"{",
"throw",
"new",
"ComponentException",
"(",
"\"cannot connect 'Out' with itself for \"",
... | Map two output fields.
@param out the output field name of this component
@param comp the component
@param comp_out the component output name; | [
"Map",
"two",
"output",
"fields",
"."
] | train | https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/oms3/Controller.java#L85-L106 |
StanKocken/EfficientAdapter | efficientadapter/src/main/java/com/skocken/efficientadapter/lib/util/ViewHelper.java | ViewHelper.setImageUri | public static void setImageUri(EfficientCacheView cacheView, int viewId, @Nullable Uri uri) {
View view = cacheView.findViewByIdEfficient(viewId);
if (view instanceof ImageView) {
((ImageView) view).setImageURI(uri);
}
} | java | public static void setImageUri(EfficientCacheView cacheView, int viewId, @Nullable Uri uri) {
View view = cacheView.findViewByIdEfficient(viewId);
if (view instanceof ImageView) {
((ImageView) view).setImageURI(uri);
}
} | [
"public",
"static",
"void",
"setImageUri",
"(",
"EfficientCacheView",
"cacheView",
",",
"int",
"viewId",
",",
"@",
"Nullable",
"Uri",
"uri",
")",
"{",
"View",
"view",
"=",
"cacheView",
".",
"findViewByIdEfficient",
"(",
"viewId",
")",
";",
"if",
"(",
"view",... | Equivalent to calling ImageView.setImageUri
@param cacheView The cache of views to get the view from
@param viewId The id of the view whose image should change
@param uri the Uri of an image, or {@code null} to clear the content | [
"Equivalent",
"to",
"calling",
"ImageView",
".",
"setImageUri"
] | train | https://github.com/StanKocken/EfficientAdapter/blob/0bcc3a20182cbce9d7901e1e2a9104251637167d/efficientadapter/src/main/java/com/skocken/efficientadapter/lib/util/ViewHelper.java#L217-L222 |
Cornutum/tcases | tcases-openapi/src/main/java/org/cornutum/tcases/openapi/io/TcasesOpenApiIO.java | TcasesOpenApiIO.getRequestInputModel | public static SystemInputDef getRequestInputModel( InputStream api, ModelOptions options)
{
try( OpenApiReader reader = new OpenApiReader( api))
{
return TcasesOpenApi.getRequestInputModel( reader.read(), options);
}
} | java | public static SystemInputDef getRequestInputModel( InputStream api, ModelOptions options)
{
try( OpenApiReader reader = new OpenApiReader( api))
{
return TcasesOpenApi.getRequestInputModel( reader.read(), options);
}
} | [
"public",
"static",
"SystemInputDef",
"getRequestInputModel",
"(",
"InputStream",
"api",
",",
"ModelOptions",
"options",
")",
"{",
"try",
"(",
"OpenApiReader",
"reader",
"=",
"new",
"OpenApiReader",
"(",
"api",
")",
")",
"{",
"return",
"TcasesOpenApi",
".",
"get... | Returns a {@link SystemInputDef system input definition} for the API requests defined by the given
OpenAPI specification. Returns null if the given spec defines no API requests to model. | [
"Returns",
"a",
"{"
] | train | https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-openapi/src/main/java/org/cornutum/tcases/openapi/io/TcasesOpenApiIO.java#L49-L55 |
JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/AbstractService.java | AbstractService.updateProgress | public void updateProgress(final Wave wave, final double workDone, final double totalWork, final double progressIncrement) {
if (wave.get(JRebirthWaves.SERVICE_TASK).checkProgressRatio(workDone, totalWork, progressIncrement)) {
// Increase the task progression
JRebirth.runIntoJAT("Serv... | java | public void updateProgress(final Wave wave, final double workDone, final double totalWork, final double progressIncrement) {
if (wave.get(JRebirthWaves.SERVICE_TASK).checkProgressRatio(workDone, totalWork, progressIncrement)) {
// Increase the task progression
JRebirth.runIntoJAT("Serv... | [
"public",
"void",
"updateProgress",
"(",
"final",
"Wave",
"wave",
",",
"final",
"double",
"workDone",
",",
"final",
"double",
"totalWork",
",",
"final",
"double",
"progressIncrement",
")",
"{",
"if",
"(",
"wave",
".",
"get",
"(",
"JRebirthWaves",
".",
"SERVI... | Update the progress of the service task related to the given wave.
@param wave the wave that trigger the service task call
@param workDone the amount of overall work done
@param totalWork the amount of total work to do
@param progressIncrement the value increment used to filter useless progress event | [
"Update",
"the",
"progress",
"of",
"the",
"service",
"task",
"related",
"to",
"the",
"given",
"wave",
"."
] | train | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/AbstractService.java#L330-L338 |
haraldk/TwelveMonkeys | imageio/imageio-icns/src/main/java/com/twelvemonkeys/imageio/plugins/icns/ICNSUtil.java | ICNSUtil.decompress | static void decompress(final DataInputStream input, final byte[] result, int offset, int length) throws IOException {
int resultPos = offset;
int remaining = length;
while (remaining > 0) {
byte run = input.readByte();
int runLength;
if ((run & 0x80) != 0) {... | java | static void decompress(final DataInputStream input, final byte[] result, int offset, int length) throws IOException {
int resultPos = offset;
int remaining = length;
while (remaining > 0) {
byte run = input.readByte();
int runLength;
if ((run & 0x80) != 0) {... | [
"static",
"void",
"decompress",
"(",
"final",
"DataInputStream",
"input",
",",
"final",
"byte",
"[",
"]",
"result",
",",
"int",
"offset",
",",
"int",
"length",
")",
"throws",
"IOException",
"{",
"int",
"resultPos",
"=",
"offset",
";",
"int",
"remaining",
"... | NOTE: This is very close to PackBits (as described by the Wikipedia article), but it is not PackBits! | [
"NOTE",
":",
"This",
"is",
"very",
"close",
"to",
"PackBits",
"(",
"as",
"described",
"by",
"the",
"Wikipedia",
"article",
")",
"but",
"it",
"is",
"not",
"PackBits!"
] | train | https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/imageio/imageio-icns/src/main/java/com/twelvemonkeys/imageio/plugins/icns/ICNSUtil.java#L75-L103 |
juebanlin/util4j | util4j/src/main/java/net/jueb/util4j/bytesStream/bytes/HexUtil.java | HexUtil.SimplePrettyHexDump | public static String SimplePrettyHexDump(byte bytes[], int offset, int length)
{
ByteArrayOutputStream bos = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(bos);
int rows = length / 16;//打印的行数
int ac = length % 16;//剩余的字节数
for (int i = 0; i < rows; ++i)
ps.printf... | java | public static String SimplePrettyHexDump(byte bytes[], int offset, int length)
{
ByteArrayOutputStream bos = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(bos);
int rows = length / 16;//打印的行数
int ac = length % 16;//剩余的字节数
for (int i = 0; i < rows; ++i)
ps.printf... | [
"public",
"static",
"String",
"SimplePrettyHexDump",
"(",
"byte",
"bytes",
"[",
"]",
",",
"int",
"offset",
",",
"int",
"length",
")",
"{",
"ByteArrayOutputStream",
"bos",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"PrintStream",
"ps",
"=",
"new",
"P... | 将字节转换成十六进制字符串
@param bytes 数据
@param offset 起始位置
@param length 从起始位置开始的长度
@return | [
"将字节转换成十六进制字符串"
] | train | https://github.com/juebanlin/util4j/blob/c404b2dbdedf7a8890533b351257fa8af4f1439f/util4j/src/main/java/net/jueb/util4j/bytesStream/bytes/HexUtil.java#L291-L338 |
sculptor/sculptor | sculptor-generator/sculptor-generator-core/src/main/java/org/sculptor/generator/util/HelperBase.java | HelperBase.getGetAccessor | public String getGetAccessor(TypedElement e, String prefix) {
String capName = toFirstUpper(e.getName());
if (prefix != null) {
capName = toFirstUpper(prefix) + capName;
}
// Note that Boolean object type is not named with is prefix (according
// to java beans spec)
String result = isBooleanPrimitiveType... | java | public String getGetAccessor(TypedElement e, String prefix) {
String capName = toFirstUpper(e.getName());
if (prefix != null) {
capName = toFirstUpper(prefix) + capName;
}
// Note that Boolean object type is not named with is prefix (according
// to java beans spec)
String result = isBooleanPrimitiveType... | [
"public",
"String",
"getGetAccessor",
"(",
"TypedElement",
"e",
",",
"String",
"prefix",
")",
"{",
"String",
"capName",
"=",
"toFirstUpper",
"(",
"e",
".",
"getName",
"(",
")",
")",
";",
"if",
"(",
"prefix",
"!=",
"null",
")",
"{",
"capName",
"=",
"toF... | Get-accessor method name of a property, according to JavaBeans naming
conventions. | [
"Get",
"-",
"accessor",
"method",
"name",
"of",
"a",
"property",
"according",
"to",
"JavaBeans",
"naming",
"conventions",
"."
] | train | https://github.com/sculptor/sculptor/blob/38df06ceb7e40f5f52dbd53b1cd1d07ee11aade5/sculptor-generator/sculptor-generator-core/src/main/java/org/sculptor/generator/util/HelperBase.java#L479-L488 |
drinkjava2/jDialects | core/src/main/java/com/github/drinkjava2/jdialects/StrUtils.java | StrUtils.countMatches | public static int countMatches(final CharSequence str, final char ch) {
if (isEmpty(str)) {
return 0;
}
int count = 0;
// We could also call str.toCharArray() for faster look ups but that
// would generate more garbage.
for (int i = 0; i < str.length(); i++) {
if (ch == str.charAt(i)) {
count++;
... | java | public static int countMatches(final CharSequence str, final char ch) {
if (isEmpty(str)) {
return 0;
}
int count = 0;
// We could also call str.toCharArray() for faster look ups but that
// would generate more garbage.
for (int i = 0; i < str.length(); i++) {
if (ch == str.charAt(i)) {
count++;
... | [
"public",
"static",
"int",
"countMatches",
"(",
"final",
"CharSequence",
"str",
",",
"final",
"char",
"ch",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"str",
")",
")",
"{",
"return",
"0",
";",
"}",
"int",
"count",
"=",
"0",
";",
"// We could also call str.toCh... | <p>
Counts how many times the char appears in the given string.
</p>
<p>
A {@code null} or empty ("") String input returns {@code 0}.
</p>
<pre>
StringUtils.countMatches(null, *) = 0
StringUtils.countMatches("", *) = 0
StringUtils.countMatches("abba", 0) = 0
StringUtils.countMatches("abba", 'a') = 2
... | [
"<p",
">",
"Counts",
"how",
"many",
"times",
"the",
"char",
"appears",
"in",
"the",
"given",
"string",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/drinkjava2/jDialects/blob/1c165f09c6042a599b681c279024abcc1b848b88/core/src/main/java/com/github/drinkjava2/jdialects/StrUtils.java#L821-L834 |
bitcoinj/bitcoinj | core/src/main/java/org/bitcoinj/protocols/channels/StoredPaymentChannelClientStates.java | StoredPaymentChannelClientStates.getAnnouncePeerGroup | private TransactionBroadcaster getAnnouncePeerGroup() {
try {
return announcePeerGroupFuture.get(MAX_SECONDS_TO_WAIT_FOR_BROADCASTER_TO_BE_SET, TimeUnit.SECONDS);
} catch (InterruptedException e) {
throw new RuntimeException(e);
} catch (ExecutionException e) {
... | java | private TransactionBroadcaster getAnnouncePeerGroup() {
try {
return announcePeerGroupFuture.get(MAX_SECONDS_TO_WAIT_FOR_BROADCASTER_TO_BE_SET, TimeUnit.SECONDS);
} catch (InterruptedException e) {
throw new RuntimeException(e);
} catch (ExecutionException e) {
... | [
"private",
"TransactionBroadcaster",
"getAnnouncePeerGroup",
"(",
")",
"{",
"try",
"{",
"return",
"announcePeerGroupFuture",
".",
"get",
"(",
"MAX_SECONDS_TO_WAIT_FOR_BROADCASTER_TO_BE_SET",
",",
"TimeUnit",
".",
"SECONDS",
")",
";",
"}",
"catch",
"(",
"InterruptedExcep... | If the peer group has not been set for MAX_SECONDS_TO_WAIT_FOR_BROADCASTER_TO_BE_SET seconds, then
the programmer probably forgot to set it and we should throw exception. | [
"If",
"the",
"peer",
"group",
"has",
"not",
"been",
"set",
"for",
"MAX_SECONDS_TO_WAIT_FOR_BROADCASTER_TO_BE_SET",
"seconds",
"then",
"the",
"programmer",
"probably",
"forgot",
"to",
"set",
"it",
"and",
"we",
"should",
"throw",
"exception",
"."
] | train | https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/protocols/channels/StoredPaymentChannelClientStates.java#L245-L257 |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/utility/ResourceCache.java | ResourceCache.wrapCallback | public static CompressedTextureCallback wrapCallback(
ResourceCache<GVRImage> cache, CompressedTextureCallback callback) {
return new CompressedTextureCallbackWrapper(cache, callback);
} | java | public static CompressedTextureCallback wrapCallback(
ResourceCache<GVRImage> cache, CompressedTextureCallback callback) {
return new CompressedTextureCallbackWrapper(cache, callback);
} | [
"public",
"static",
"CompressedTextureCallback",
"wrapCallback",
"(",
"ResourceCache",
"<",
"GVRImage",
">",
"cache",
",",
"CompressedTextureCallback",
"callback",
")",
"{",
"return",
"new",
"CompressedTextureCallbackWrapper",
"(",
"cache",
",",
"callback",
")",
";",
... | Wrap the callback, to cache the
{@link CompressedTextureCallback#loaded(GVRHybridObject, GVRAndroidResource)
loaded()} resource | [
"Wrap",
"the",
"callback",
"to",
"cache",
"the",
"{"
] | train | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/utility/ResourceCache.java#L77-L80 |
liferay/com-liferay-commerce | commerce-tax-service/src/main/java/com/liferay/commerce/tax/service/persistence/impl/CommerceTaxMethodPersistenceImpl.java | CommerceTaxMethodPersistenceImpl.findAll | @Override
public List<CommerceTaxMethod> findAll(int start, int end) {
return findAll(start, end, null);
} | java | @Override
public List<CommerceTaxMethod> findAll(int start, int end) {
return findAll(start, end, null);
} | [
"@",
"Override",
"public",
"List",
"<",
"CommerceTaxMethod",
">",
"findAll",
"(",
"int",
"start",
",",
"int",
"end",
")",
"{",
"return",
"findAll",
"(",
"start",
",",
"end",
",",
"null",
")",
";",
"}"
] | Returns a range of all the commerce tax methods.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>... | [
"Returns",
"a",
"range",
"of",
"all",
"the",
"commerce",
"tax",
"methods",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-tax-service/src/main/java/com/liferay/commerce/tax/service/persistence/impl/CommerceTaxMethodPersistenceImpl.java#L2005-L2008 |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaapreauthenticationpolicy_binding.java | aaapreauthenticationpolicy_binding.get | public static aaapreauthenticationpolicy_binding get(nitro_service service, String name) throws Exception{
aaapreauthenticationpolicy_binding obj = new aaapreauthenticationpolicy_binding();
obj.set_name(name);
aaapreauthenticationpolicy_binding response = (aaapreauthenticationpolicy_binding) obj.get_resource(serv... | java | public static aaapreauthenticationpolicy_binding get(nitro_service service, String name) throws Exception{
aaapreauthenticationpolicy_binding obj = new aaapreauthenticationpolicy_binding();
obj.set_name(name);
aaapreauthenticationpolicy_binding response = (aaapreauthenticationpolicy_binding) obj.get_resource(serv... | [
"public",
"static",
"aaapreauthenticationpolicy_binding",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"aaapreauthenticationpolicy_binding",
"obj",
"=",
"new",
"aaapreauthenticationpolicy_binding",
"(",
")",
";",
"obj",
... | Use this API to fetch aaapreauthenticationpolicy_binding resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"aaapreauthenticationpolicy_binding",
"resource",
"of",
"given",
"name",
"."
] | train | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaapreauthenticationpolicy_binding.java#L114-L119 |
liyiorg/weixin-popular | src/main/java/weixin/popular/api/CustomserviceAPI.java | CustomserviceAPI.kfsessionClose | public static BaseResult kfsessionClose(String access_token, String kf_account, String openid, String text) {
String postJsonData = String.format("{\"kf_account\":\"%1s\",\"openid\":\"%2s\",\"text\":\"%3s\"}",
kf_account,
openid,
text);
HttpUriRequest httpUriRequest = RequestBuilder.post()
... | java | public static BaseResult kfsessionClose(String access_token, String kf_account, String openid, String text) {
String postJsonData = String.format("{\"kf_account\":\"%1s\",\"openid\":\"%2s\",\"text\":\"%3s\"}",
kf_account,
openid,
text);
HttpUriRequest httpUriRequest = RequestBuilder.post()
... | [
"public",
"static",
"BaseResult",
"kfsessionClose",
"(",
"String",
"access_token",
",",
"String",
"kf_account",
",",
"String",
"openid",
",",
"String",
"text",
")",
"{",
"String",
"postJsonData",
"=",
"String",
".",
"format",
"(",
"\"{\\\"kf_account\\\":\\\"%1s\\\",... | 关闭会话
@param access_token access_token
@param kf_account 完整客服账号
@param openid 客户openid
@param text 附加信息,非必须
@return BaseResult | [
"关闭会话"
] | train | https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/CustomserviceAPI.java#L166-L178 |
ReactiveX/RxJavaAsyncUtil | src/main/java/rx/util/async/Async.java | Async.toAsync | public static <T1, T2, T3, T4, T5, T6, T7, T8, T9> Func9<T1, T2, T3, T4, T5, T6, T7, T8, T9, Observable<Void>> toAsync(Action9<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9> action) {
return toAsync(action, Schedulers.computation());
} | java | public static <T1, T2, T3, T4, T5, T6, T7, T8, T9> Func9<T1, T2, T3, T4, T5, T6, T7, T8, T9, Observable<Void>> toAsync(Action9<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9> action) {
return toAsync(action, Schedulers.computation());
} | [
"public",
"static",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"T4",
",",
"T5",
",",
"T6",
",",
"T7",
",",
"T8",
",",
"T9",
">",
"Func9",
"<",
"T1",
",",
"T2",
",",
"T3",
",",
"T4",
",",
"T5",
",",
"T6",
",",
"T7",
",",
"T8",
",",
"T9",
",",... | Convert a synchronous action call into an asynchronous function call through an Observable.
<p>
<img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toAsync.an.png" alt="">
@param <T1> the first parameter type
@param <T2> the second parameter type
@param <T3> the third parameter type
... | [
"Convert",
"a",
"synchronous",
"action",
"call",
"into",
"an",
"asynchronous",
"function",
"call",
"through",
"an",
"Observable",
".",
"<p",
">",
"<img",
"width",
"=",
"640",
"src",
"=",
"https",
":",
"//",
"raw",
".",
"github",
".",
"com",
"/",
"wiki",
... | train | https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L659-L661 |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policystringmap.java | policystringmap.get | public static policystringmap get(nitro_service service, String name) throws Exception{
policystringmap obj = new policystringmap();
obj.set_name(name);
policystringmap response = (policystringmap) obj.get_resource(service);
return response;
} | java | public static policystringmap get(nitro_service service, String name) throws Exception{
policystringmap obj = new policystringmap();
obj.set_name(name);
policystringmap response = (policystringmap) obj.get_resource(service);
return response;
} | [
"public",
"static",
"policystringmap",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"policystringmap",
"obj",
"=",
"new",
"policystringmap",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"pol... | Use this API to fetch policystringmap resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"policystringmap",
"resource",
"of",
"given",
"name",
"."
] | train | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policystringmap.java#L276-L281 |
ironjacamar/ironjacamar | codegenerator/src/main/java/org/ironjacamar/codegenerator/code/AoInterfaceCodeGen.java | AoInterfaceCodeGen.writeClassBody | @Override
public void writeClassBody(Definition def, Writer out) throws IOException
{
out.write("public interface " + getClassName(def));
if (def.isAdminObjectImplRaAssociation())
{
out.write(" extends Referenceable, Serializable");
}
writeLeftCurlyBracket(out, 0);
wri... | java | @Override
public void writeClassBody(Definition def, Writer out) throws IOException
{
out.write("public interface " + getClassName(def));
if (def.isAdminObjectImplRaAssociation())
{
out.write(" extends Referenceable, Serializable");
}
writeLeftCurlyBracket(out, 0);
wri... | [
"@",
"Override",
"public",
"void",
"writeClassBody",
"(",
"Definition",
"def",
",",
"Writer",
"out",
")",
"throws",
"IOException",
"{",
"out",
".",
"write",
"(",
"\"public interface \"",
"+",
"getClassName",
"(",
"def",
")",
")",
";",
"if",
"(",
"def",
"."... | Output class
@param def definition
@param out Writer
@throws IOException ioException | [
"Output",
"class"
] | train | https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/AoInterfaceCodeGen.java#L87-L101 |
hdbeukel/james-core | src/main/java/org/jamesframework/core/subset/neigh/adv/MultiSwapNeighbourhood.java | MultiSwapNeighbourhood.maxSwaps | private int maxSwaps(Set<Integer> addCandidates, Set<Integer> deleteCandidates){
return Math.min(maxSwaps, Math.min(addCandidates.size(), deleteCandidates.size()));
} | java | private int maxSwaps(Set<Integer> addCandidates, Set<Integer> deleteCandidates){
return Math.min(maxSwaps, Math.min(addCandidates.size(), deleteCandidates.size()));
} | [
"private",
"int",
"maxSwaps",
"(",
"Set",
"<",
"Integer",
">",
"addCandidates",
",",
"Set",
"<",
"Integer",
">",
"deleteCandidates",
")",
"{",
"return",
"Math",
".",
"min",
"(",
"maxSwaps",
",",
"Math",
".",
"min",
"(",
"addCandidates",
".",
"size",
"(",... | Computes the maximum number of swaps that can be performed, given the set of candidate IDs
for addition and deletion. Takes into account the desired maximum number of swaps \(k\) specified
at construction (if set). The maximum number of swaps is equal to the minimum of \(k\) and the
size of both candidate sets. Thus, i... | [
"Computes",
"the",
"maximum",
"number",
"of",
"swaps",
"that",
"can",
"be",
"performed",
"given",
"the",
"set",
"of",
"candidate",
"IDs",
"for",
"addition",
"and",
"deletion",
".",
"Takes",
"into",
"account",
"the",
"desired",
"maximum",
"number",
"of",
"swa... | train | https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/subset/neigh/adv/MultiSwapNeighbourhood.java#L215-L217 |
LearnLib/automatalib | commons/util/src/main/java/net/automatalib/commons/util/comparison/CmpUtil.java | CmpUtil.lexCompare | public static <U> int lexCompare(Iterable<? extends U> o1, Iterable<? extends U> o2, Comparator<U> elemComparator) {
Iterator<? extends U> it1 = o1.iterator(), it2 = o2.iterator();
while (it1.hasNext() && it2.hasNext()) {
int cmp = elemComparator.compare(it1.next(), it2.next());
... | java | public static <U> int lexCompare(Iterable<? extends U> o1, Iterable<? extends U> o2, Comparator<U> elemComparator) {
Iterator<? extends U> it1 = o1.iterator(), it2 = o2.iterator();
while (it1.hasNext() && it2.hasNext()) {
int cmp = elemComparator.compare(it1.next(), it2.next());
... | [
"public",
"static",
"<",
"U",
">",
"int",
"lexCompare",
"(",
"Iterable",
"<",
"?",
"extends",
"U",
">",
"o1",
",",
"Iterable",
"<",
"?",
"extends",
"U",
">",
"o2",
",",
"Comparator",
"<",
"U",
">",
"elemComparator",
")",
"{",
"Iterator",
"<",
"?",
... | Lexicographically compares two {@link Iterable}s. Comparison of the elements is done using the specified
comparator.
@param o1
the first iterable.
@param o2
the second iterable.
@param elemComparator
the comparator.
@return <code>< 0</code> iff o1 is lexicographically smaller, <code>0</code> if o1 equals o2 and <c... | [
"Lexicographically",
"compares",
"two",
"{",
"@link",
"Iterable",
"}",
"s",
".",
"Comparison",
"of",
"the",
"elements",
"is",
"done",
"using",
"the",
"specified",
"comparator",
"."
] | train | https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/commons/util/src/main/java/net/automatalib/commons/util/comparison/CmpUtil.java#L103-L119 |
Azure/azure-sdk-for-java | resources/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceGroupsInner.java | ResourceGroupsInner.listAsync | public Observable<Page<ResourceGroupInner>> listAsync(final String filter, final Integer top) {
return listWithServiceResponseAsync(filter, top)
.map(new Func1<ServiceResponse<Page<ResourceGroupInner>>, Page<ResourceGroupInner>>() {
@Override
public Page<ResourceGroup... | java | public Observable<Page<ResourceGroupInner>> listAsync(final String filter, final Integer top) {
return listWithServiceResponseAsync(filter, top)
.map(new Func1<ServiceResponse<Page<ResourceGroupInner>>, Page<ResourceGroupInner>>() {
@Override
public Page<ResourceGroup... | [
"public",
"Observable",
"<",
"Page",
"<",
"ResourceGroupInner",
">",
">",
"listAsync",
"(",
"final",
"String",
"filter",
",",
"final",
"Integer",
"top",
")",
"{",
"return",
"listWithServiceResponseAsync",
"(",
"filter",
",",
"top",
")",
".",
"map",
"(",
"new... | Gets all the resource groups for a subscription.
@param filter The filter to apply on the operation.
@param top The number of results to return. If null is passed, returns all resource groups.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the PagedList<ResourceG... | [
"Gets",
"all",
"the",
"resource",
"groups",
"for",
"a",
"subscription",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/resources/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceGroupsInner.java#L1079-L1087 |
weld/core | impl/src/main/java/org/jboss/weld/util/bytecode/BytecodeUtils.java | BytecodeUtils.addLoadInstruction | public static void addLoadInstruction(CodeAttribute code, String type, int variable) {
char tp = type.charAt(0);
if (tp != 'L' && tp != '[') {
// we have a primitive type
switch (tp) {
case 'J':
code.lload(variable);
break;
... | java | public static void addLoadInstruction(CodeAttribute code, String type, int variable) {
char tp = type.charAt(0);
if (tp != 'L' && tp != '[') {
// we have a primitive type
switch (tp) {
case 'J':
code.lload(variable);
break;
... | [
"public",
"static",
"void",
"addLoadInstruction",
"(",
"CodeAttribute",
"code",
",",
"String",
"type",
",",
"int",
"variable",
")",
"{",
"char",
"tp",
"=",
"type",
".",
"charAt",
"(",
"0",
")",
";",
"if",
"(",
"tp",
"!=",
"'",
"'",
"&&",
"tp",
"!=",
... | Adds the correct load instruction based on the type descriptor
@param code the bytecode to add the instruction to
@param type the type of the variable
@param variable the variable number | [
"Adds",
"the",
"correct",
"load",
"instruction",
"based",
"on",
"the",
"type",
"descriptor"
] | train | https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/util/bytecode/BytecodeUtils.java#L54-L74 |
threerings/nenya | core/src/main/java/com/threerings/media/image/ColorPository.java | ColorPository.getRandomStartingColor | public ColorRecord getRandomStartingColor (String className, Random rand)
{
// make sure the class exists
ClassRecord record = getClassRecord(className);
return (record == null) ? null : record.randomStartingColor(rand);
} | java | public ColorRecord getRandomStartingColor (String className, Random rand)
{
// make sure the class exists
ClassRecord record = getClassRecord(className);
return (record == null) ? null : record.randomStartingColor(rand);
} | [
"public",
"ColorRecord",
"getRandomStartingColor",
"(",
"String",
"className",
",",
"Random",
"rand",
")",
"{",
"// make sure the class exists",
"ClassRecord",
"record",
"=",
"getClassRecord",
"(",
"className",
")",
";",
"return",
"(",
"record",
"==",
"null",
")",
... | Returns a random starting color from the specified color class. | [
"Returns",
"a",
"random",
"starting",
"color",
"from",
"the",
"specified",
"color",
"class",
"."
] | train | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/image/ColorPository.java#L354-L359 |
lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/denoise/wavelet/SubbandShrink.java | SubbandShrink.performShrinkage | protected void performShrinkage( I transform , int numLevels ) {
// step through each layer in the pyramid.
for( int i = 0; i < numLevels; i++ ) {
int w = transform.width;
int h = transform.height;
int ww = w/2;
int hh = h/2;
Number threshold;
I subband;
// HL
subband = transform.subimage(... | java | protected void performShrinkage( I transform , int numLevels ) {
// step through each layer in the pyramid.
for( int i = 0; i < numLevels; i++ ) {
int w = transform.width;
int h = transform.height;
int ww = w/2;
int hh = h/2;
Number threshold;
I subband;
// HL
subband = transform.subimage(... | [
"protected",
"void",
"performShrinkage",
"(",
"I",
"transform",
",",
"int",
"numLevels",
")",
"{",
"// step through each layer in the pyramid.",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numLevels",
";",
"i",
"++",
")",
"{",
"int",
"w",
"=",
"trans... | Performs wavelet shrinking using the specified rule and by computing a threshold
for each subband.
@param transform The image being transformed.
@param numLevels Number of levels in the transform. | [
"Performs",
"wavelet",
"shrinking",
"using",
"the",
"specified",
"rule",
"and",
"by",
"computing",
"a",
"threshold",
"for",
"each",
"subband",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/denoise/wavelet/SubbandShrink.java#L56-L91 |
powermock/powermock | powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java | PowerMock.expectNew | public static synchronized <T> IExpectationSetters<T> expectNew(Class<T> type, Class<?>[] parameterTypes,
Object... arguments) throws Exception {
return doExpectNew(type, new DefaultMockStrategy(), parameterTypes, arguments);
} | java | public static synchronized <T> IExpectationSetters<T> expectNew(Class<T> type, Class<?>[] parameterTypes,
Object... arguments) throws Exception {
return doExpectNew(type, new DefaultMockStrategy(), parameterTypes, arguments);
} | [
"public",
"static",
"synchronized",
"<",
"T",
">",
"IExpectationSetters",
"<",
"T",
">",
"expectNew",
"(",
"Class",
"<",
"T",
">",
"type",
",",
"Class",
"<",
"?",
">",
"[",
"]",
"parameterTypes",
",",
"Object",
"...",
"arguments",
")",
"throws",
"Excepti... | Allows specifying expectations on new invocations. For example you might
want to throw an exception or return a mock. Note that you must replay
the class when using this method since this behavior is part of the class
mock.
<p/>
Use this method when you need to specify parameter types for the
constructor when PowerMock... | [
"Allows",
"specifying",
"expectations",
"on",
"new",
"invocations",
".",
"For",
"example",
"you",
"might",
"want",
"to",
"throw",
"an",
"exception",
"or",
"return",
"a",
"mock",
".",
"Note",
"that",
"you",
"must",
"replay",
"the",
"class",
"when",
"using",
... | train | https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java#L1615-L1618 |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/trees/GrammaticalRelation.java | GrammaticalRelation.valueOf | public static GrammaticalRelation valueOf(Language language, String s) {
GrammaticalRelation reln = (stringsToRelations.get(language) != null ? valueOf(s, stringsToRelations.get(language).values()) : null);
if (reln == null) {
// TODO this breaks the hierarchical structure of the classes,
// ... | java | public static GrammaticalRelation valueOf(Language language, String s) {
GrammaticalRelation reln = (stringsToRelations.get(language) != null ? valueOf(s, stringsToRelations.get(language).values()) : null);
if (reln == null) {
// TODO this breaks the hierarchical structure of the classes,
// ... | [
"public",
"static",
"GrammaticalRelation",
"valueOf",
"(",
"Language",
"language",
",",
"String",
"s",
")",
"{",
"GrammaticalRelation",
"reln",
"=",
"(",
"stringsToRelations",
".",
"get",
"(",
"language",
")",
"!=",
"null",
"?",
"valueOf",
"(",
"s",
",",
"st... | Convert from a String representation of a GrammaticalRelation to a
GrammaticalRelation. Where possible, you should avoid using this
method and simply work with true GrammaticalRelations rather than
String representations. Correct behavior of this method depends
on the underlying data structure resources used being ke... | [
"Convert",
"from",
"a",
"String",
"representation",
"of",
"a",
"GrammaticalRelation",
"to",
"a",
"GrammaticalRelation",
".",
"Where",
"possible",
"you",
"should",
"avoid",
"using",
"this",
"method",
"and",
"simply",
"work",
"with",
"true",
"GrammaticalRelations",
... | train | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/GrammaticalRelation.java#L176-L205 |
cdk/cdk | descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java | XLogPDescriptor.getCarbonsCount | private int getCarbonsCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
int ccounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("C")) {
if (!neighbour.getFlag(CDKConstants.ISAROMATIC)) {
... | java | private int getCarbonsCount(IAtomContainer ac, IAtom atom) {
List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
int ccounter = 0;
for (IAtom neighbour : neighbours) {
if (neighbour.getSymbol().equals("C")) {
if (!neighbour.getFlag(CDKConstants.ISAROMATIC)) {
... | [
"private",
"int",
"getCarbonsCount",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"List",
"<",
"IAtom",
">",
"neighbours",
"=",
"ac",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"int",
"ccounter",
"=",
"0",
";",
"for",
"(",
"IAto... | Gets the carbonsCount attribute of the XLogPDescriptor object.
@param ac Description of the Parameter
@param atom Description of the Parameter
@return The carbonsCount value | [
"Gets",
"the",
"carbonsCount",
"attribute",
"of",
"the",
"XLogPDescriptor",
"object",
"."
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1092-L1103 |
GoogleCloudPlatform/bigdata-interop | gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystemBase.java | GoogleHadoopFileSystemBase.initializeDelegationTokenSupport | private void initializeDelegationTokenSupport(Configuration config, URI path) throws IOException {
logger.atFine().log("GHFS.initializeDelegationTokenSupport");
// Load delegation token binding, if support is configured
GcsDelegationTokens dts = new GcsDelegationTokens();
Text service = new Text(getSche... | java | private void initializeDelegationTokenSupport(Configuration config, URI path) throws IOException {
logger.atFine().log("GHFS.initializeDelegationTokenSupport");
// Load delegation token binding, if support is configured
GcsDelegationTokens dts = new GcsDelegationTokens();
Text service = new Text(getSche... | [
"private",
"void",
"initializeDelegationTokenSupport",
"(",
"Configuration",
"config",
",",
"URI",
"path",
")",
"throws",
"IOException",
"{",
"logger",
".",
"atFine",
"(",
")",
".",
"log",
"(",
"\"GHFS.initializeDelegationTokenSupport\"",
")",
";",
"// Load delegation... | Initialize the delegation token support for this filesystem.
@param config The filesystem configuration
@param path The filesystem path
@throws IOException | [
"Initialize",
"the",
"delegation",
"token",
"support",
"for",
"this",
"filesystem",
"."
] | train | https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystemBase.java#L638-L654 |
lisicnu/droidUtil | src/main/java/com/github/lisicnu/libDroid/util/StringUtils.java | StringUtils.combine | public static String combine(String str1, String str2, String separator) {
if (separator == null || separator.isEmpty()) {
return str1 == null ? str2 : str1.concat(str2);
}
if (str1 == null)
str1 = "";
if (str2 == null)
str2 = "";
StringBuild... | java | public static String combine(String str1, String str2, String separator) {
if (separator == null || separator.isEmpty()) {
return str1 == null ? str2 : str1.concat(str2);
}
if (str1 == null)
str1 = "";
if (str2 == null)
str2 = "";
StringBuild... | [
"public",
"static",
"String",
"combine",
"(",
"String",
"str1",
",",
"String",
"str2",
",",
"String",
"separator",
")",
"{",
"if",
"(",
"separator",
"==",
"null",
"||",
"separator",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"str1",
"==",
"null",
"?... | e.g. str1= "aaaa/", str2= "/bbb" ,separator="/" will return "aaaa/bbb"
@param str1
@param str2
@param separator
@return | [
"e",
".",
"g",
".",
"str1",
"=",
"aaaa",
"/",
"str2",
"=",
"/",
"bbb",
"separator",
"=",
"/",
"will",
"return",
"aaaa",
"/",
"bbb"
] | train | https://github.com/lisicnu/droidUtil/blob/e4d6cf3e3f60e5efb5a75672607ded94d1725519/src/main/java/com/github/lisicnu/libDroid/util/StringUtils.java#L149-L174 |
elki-project/elki | elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/statistics/DistanceStatisticsWithClasses.java | DistanceStatisticsWithClasses.exactMinMax | private DoubleMinMax exactMinMax(Relation<O> relation, DistanceQuery<O> distFunc) {
final FiniteProgress progress = LOG.isVerbose() ? new FiniteProgress("Exact fitting distance computations", relation.size(), LOG) : null;
DoubleMinMax minmax = new DoubleMinMax();
// find exact minimum and maximum first.
... | java | private DoubleMinMax exactMinMax(Relation<O> relation, DistanceQuery<O> distFunc) {
final FiniteProgress progress = LOG.isVerbose() ? new FiniteProgress("Exact fitting distance computations", relation.size(), LOG) : null;
DoubleMinMax minmax = new DoubleMinMax();
// find exact minimum and maximum first.
... | [
"private",
"DoubleMinMax",
"exactMinMax",
"(",
"Relation",
"<",
"O",
">",
"relation",
",",
"DistanceQuery",
"<",
"O",
">",
"distFunc",
")",
"{",
"final",
"FiniteProgress",
"progress",
"=",
"LOG",
".",
"isVerbose",
"(",
")",
"?",
"new",
"FiniteProgress",
"(",... | Compute the exact maximum and minimum.
@param relation Relation to process
@param distFunc Distance function
@return Exact maximum and minimum | [
"Compute",
"the",
"exact",
"maximum",
"and",
"minimum",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/statistics/DistanceStatisticsWithClasses.java#L357-L374 |
SpartaTech/sparta-spring-web-utils | src/main/java/org/sparta/springwebutils/queryloader/impl/FileQueryLoader.java | FileQueryLoader.loadfromFromFile | private String loadfromFromFile(String queryName) throws IllegalStateException {
try (final InputStream is = getClass().getResourceAsStream(scriptsFolder + queryName + ".sql");) {
String sql = StringUtils.join(IOUtils.readLines(is, StandardCharsets.UTF_8), IOUtils.LINE_SEPARATOR);
// Look for token... | java | private String loadfromFromFile(String queryName) throws IllegalStateException {
try (final InputStream is = getClass().getResourceAsStream(scriptsFolder + queryName + ".sql");) {
String sql = StringUtils.join(IOUtils.readLines(is, StandardCharsets.UTF_8), IOUtils.LINE_SEPARATOR);
// Look for token... | [
"private",
"String",
"loadfromFromFile",
"(",
"String",
"queryName",
")",
"throws",
"IllegalStateException",
"{",
"try",
"(",
"final",
"InputStream",
"is",
"=",
"getClass",
"(",
")",
".",
"getResourceAsStream",
"(",
"scriptsFolder",
"+",
"queryName",
"+",
"\".sql\... | Loads the query from the informed path and adds to cache
@param queryName File name for the query to be loaded
@return requested Query
@throws IllegalStateException In case query was not found | [
"Loads",
"the",
"query",
"from",
"the",
"informed",
"path",
"and",
"adds",
"to",
"cache"
] | train | https://github.com/SpartaTech/sparta-spring-web-utils/blob/f5382474d46a6048d58707fc64e7936277e8b2ce/src/main/java/org/sparta/springwebutils/queryloader/impl/FileQueryLoader.java#L82-L102 |
UrielCh/ovh-java-sdk | ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java | ApiOvhDedicatedserver.serviceName_statistics_partition_partition_GET | public OvhRtmPartition serviceName_statistics_partition_partition_GET(String serviceName, String partition) throws IOException {
String qPath = "/dedicated/server/{serviceName}/statistics/partition/{partition}";
StringBuilder sb = path(qPath, serviceName, partition);
String resp = exec(qPath, "GET", sb.toString()... | java | public OvhRtmPartition serviceName_statistics_partition_partition_GET(String serviceName, String partition) throws IOException {
String qPath = "/dedicated/server/{serviceName}/statistics/partition/{partition}";
StringBuilder sb = path(qPath, serviceName, partition);
String resp = exec(qPath, "GET", sb.toString()... | [
"public",
"OvhRtmPartition",
"serviceName_statistics_partition_partition_GET",
"(",
"String",
"serviceName",
",",
"String",
"partition",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/dedicated/server/{serviceName}/statistics/partition/{partition}\"",
";",
"String... | Get this object properties
REST: GET /dedicated/server/{serviceName}/statistics/partition/{partition}
@param serviceName [required] The internal name of your dedicated server
@param partition [required] Partition | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L1264-L1269 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java | TimeZoneGenericNames.getPartialLocationName | private String getPartialLocationName(String tzID, String mzID, boolean isLong, String mzDisplayName) {
String letter = isLong ? "L" : "S";
String key = tzID + "&" + mzID + "#" + letter;
String name = _genericPartialLocationNamesMap.get(key);
if (name != null) {
return name;
... | java | private String getPartialLocationName(String tzID, String mzID, boolean isLong, String mzDisplayName) {
String letter = isLong ? "L" : "S";
String key = tzID + "&" + mzID + "#" + letter;
String name = _genericPartialLocationNamesMap.get(key);
if (name != null) {
return name;
... | [
"private",
"String",
"getPartialLocationName",
"(",
"String",
"tzID",
",",
"String",
"mzID",
",",
"boolean",
"isLong",
",",
"String",
"mzDisplayName",
")",
"{",
"String",
"letter",
"=",
"isLong",
"?",
"\"L\"",
":",
"\"S\"",
";",
"String",
"key",
"=",
"tzID",... | Private method for formatting partial location names. This format
is used when a generic name of a meta zone is available, but the given
time zone is not a reference zone (golden zone) of the meta zone.
@param tzID the canonical time zone ID
@param mzID the meta zone ID
@param isLong true when long generic name
@param... | [
"Private",
"method",
"for",
"formatting",
"partial",
"location",
"names",
".",
"This",
"format",
"is",
"used",
"when",
"a",
"generic",
"name",
"of",
"a",
"meta",
"zone",
"is",
"available",
"but",
"the",
"given",
"time",
"zone",
"is",
"not",
"a",
"reference... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java#L543-L583 |
kiegroup/jbpm | jbpm-query-jpa/src/main/java/org/jbpm/query/jpa/data/QueryWhere.java | QueryWhere.addParameter | public <T> QueryCriteria addParameter( String listId, T... param ) {
if( param.length == 0 ) {
return null;
}
if( QueryCriteriaType.REGEXP.equals(this.type) && ! (param[0] instanceof String) ) {
throw new IllegalArgumentException("Only String parameters may be used in reg... | java | public <T> QueryCriteria addParameter( String listId, T... param ) {
if( param.length == 0 ) {
return null;
}
if( QueryCriteriaType.REGEXP.equals(this.type) && ! (param[0] instanceof String) ) {
throw new IllegalArgumentException("Only String parameters may be used in reg... | [
"public",
"<",
"T",
">",
"QueryCriteria",
"addParameter",
"(",
"String",
"listId",
",",
"T",
"...",
"param",
")",
"{",
"if",
"(",
"param",
".",
"length",
"==",
"0",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"QueryCriteriaType",
".",
"REGEXP",
... | This method should be used for<ol>
<li>Normal parameters</li>
<li>Regular expression parameters</li>
</ol>
This method should <b>not</b> be used for<ol>
<li>Range parameters</li>
</ol>
@param listId
@param param
@return | [
"This",
"method",
"should",
"be",
"used",
"for<ol",
">",
"<li",
">",
"Normal",
"parameters<",
"/",
"li",
">",
"<li",
">",
"Regular",
"expression",
"parameters<",
"/",
"li",
">",
"<",
"/",
"ol",
">",
"This",
"method",
"should",
"<b",
">",
"not<",
"/",
... | train | https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-query-jpa/src/main/java/org/jbpm/query/jpa/data/QueryWhere.java#L126-L139 |
Samsung/GearVRf | GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRRigidBody.java | GVRRigidBody.setIgnoreCollisionCheck | public void setIgnoreCollisionCheck(GVRRigidBody collisionObject, boolean ignore) {
Native3DRigidBody.setIgnoreCollisionCheck(getNative(), collisionObject.getNative(), ignore);
} | java | public void setIgnoreCollisionCheck(GVRRigidBody collisionObject, boolean ignore) {
Native3DRigidBody.setIgnoreCollisionCheck(getNative(), collisionObject.getNative(), ignore);
} | [
"public",
"void",
"setIgnoreCollisionCheck",
"(",
"GVRRigidBody",
"collisionObject",
",",
"boolean",
"ignore",
")",
"{",
"Native3DRigidBody",
".",
"setIgnoreCollisionCheck",
"(",
"getNative",
"(",
")",
",",
"collisionObject",
".",
"getNative",
"(",
")",
",",
"ignore... | Set a {@linkplain GVRRigidBody rigid body} to be ignored (true) or not (false)
@param collisionObject rigidbody object on the collision check
@param ignore boolean to indicate if the specified object will be ignored or not | [
"Set",
"a",
"{",
"@linkplain",
"GVRRigidBody",
"rigid",
"body",
"}",
"to",
"be",
"ignored",
"(",
"true",
")",
"or",
"not",
"(",
"false",
")"
] | train | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRRigidBody.java#L361-L363 |
alkacon/opencms-core | src/org/opencms/gwt/CmsAliasHelper.java | CmsAliasHelper.saveAliases | public void saveAliases(CmsUUID structureId, List<CmsAliasBean> aliasBeans) throws CmsException {
CmsAliasManager aliasManager = OpenCms.getAliasManager();
CmsObject cms = m_cms;
List<CmsAlias> aliases = new ArrayList<CmsAlias>();
for (CmsAliasBean aliasBean : aliasBeans) {
... | java | public void saveAliases(CmsUUID structureId, List<CmsAliasBean> aliasBeans) throws CmsException {
CmsAliasManager aliasManager = OpenCms.getAliasManager();
CmsObject cms = m_cms;
List<CmsAlias> aliases = new ArrayList<CmsAlias>();
for (CmsAliasBean aliasBean : aliasBeans) {
... | [
"public",
"void",
"saveAliases",
"(",
"CmsUUID",
"structureId",
",",
"List",
"<",
"CmsAliasBean",
">",
"aliasBeans",
")",
"throws",
"CmsException",
"{",
"CmsAliasManager",
"aliasManager",
"=",
"OpenCms",
".",
"getAliasManager",
"(",
")",
";",
"CmsObject",
"cms",
... | Saves aliases.<p>
@param structureId the structure id
@param aliasBeans the alias beans
@throws CmsException if something goes wrong | [
"Saves",
"aliases",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/CmsAliasHelper.java#L120-L134 |
rubenlagus/TelegramBots | telegrambots-abilities/src/main/java/org/telegram/abilitybots/api/bot/BaseAbilityBot.java | BaseAbilityBot.getUser | protected User getUser(String username) {
Integer id = userIds().get(username.toLowerCase());
if (id == null) {
throw new IllegalStateException(format("Could not find ID corresponding to username [%s]", username));
}
return getUser(id);
} | java | protected User getUser(String username) {
Integer id = userIds().get(username.toLowerCase());
if (id == null) {
throw new IllegalStateException(format("Could not find ID corresponding to username [%s]", username));
}
return getUser(id);
} | [
"protected",
"User",
"getUser",
"(",
"String",
"username",
")",
"{",
"Integer",
"id",
"=",
"userIds",
"(",
")",
".",
"get",
"(",
"username",
".",
"toLowerCase",
"(",
")",
")",
";",
"if",
"(",
"id",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStat... | Gets the user with the specified username.
@param username the username of the required user
@return the user | [
"Gets",
"the",
"user",
"with",
"the",
"specified",
"username",
"."
] | train | https://github.com/rubenlagus/TelegramBots/blob/d62354915d7664597a40fd9858f16bce67ef1478/telegrambots-abilities/src/main/java/org/telegram/abilitybots/api/bot/BaseAbilityBot.java#L248-L255 |
soi-toolkit/soi-toolkit-mule | tools/soitoolkit-generator/soitoolkit-generator/src/main/java/org/soitoolkit/tools/generator/model/ModelFactory.java | ModelFactory.newModel | public static IModel newModel(String groupId, String artifactId, String version, String service, MuleVersionEnum muleVersion, DeploymentModelEnum deploymentModel, List<TransportEnum> transports) {
return doCreateNewModel(groupId, artifactId, version, service, muleVersion, deploymentModel, transports, null, null, Tran... | java | public static IModel newModel(String groupId, String artifactId, String version, String service, MuleVersionEnum muleVersion, DeploymentModelEnum deploymentModel, List<TransportEnum> transports) {
return doCreateNewModel(groupId, artifactId, version, service, muleVersion, deploymentModel, transports, null, null, Tran... | [
"public",
"static",
"IModel",
"newModel",
"(",
"String",
"groupId",
",",
"String",
"artifactId",
",",
"String",
"version",
",",
"String",
"service",
",",
"MuleVersionEnum",
"muleVersion",
",",
"DeploymentModelEnum",
"deploymentModel",
",",
"List",
"<",
"TransportEnu... | Constructor-method to use when service descriptors are not required (e.g. schema and wsdl for services)
@param groupId
@param artifactId
@param version
@param service
@param deploymentModel
@return the new model instance | [
"Constructor",
"-",
"method",
"to",
"use",
"when",
"service",
"descriptors",
"are",
"not",
"required",
"(",
"e",
".",
"g",
".",
"schema",
"and",
"wsdl",
"for",
"services",
")"
] | train | https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/tools/soitoolkit-generator/soitoolkit-generator/src/main/java/org/soitoolkit/tools/generator/model/ModelFactory.java#L109-L111 |
Impetus/Kundera | src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java | AbstractManagedType.onStrategyType | private InheritanceModel onStrategyType(InheritanceModel model, InheritanceType strategyType, String descriminator,
String descriminatorValue, String tableName, String schemaName)
{
switch (strategyType)
{
case SINGLE_TABLE:
// if single table
if (superC... | java | private InheritanceModel onStrategyType(InheritanceModel model, InheritanceType strategyType, String descriminator,
String descriminatorValue, String tableName, String schemaName)
{
switch (strategyType)
{
case SINGLE_TABLE:
// if single table
if (superC... | [
"private",
"InheritanceModel",
"onStrategyType",
"(",
"InheritanceModel",
"model",
",",
"InheritanceType",
"strategyType",
",",
"String",
"descriminator",
",",
"String",
"descriminatorValue",
",",
"String",
"tableName",
",",
"String",
"schemaName",
")",
"{",
"switch",
... | On strategy type.
@param model
the model
@param strategyType
the strategy type
@param descriminator
the descriminator
@param descriminatorValue
the descriminator value
@param tableName
the table name
@param schemaName
the schema name
@return the inheritance model | [
"On",
"strategy",
"type",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java#L1324-L1364 |
rundeck/rundeck | core/src/main/java/com/dtolabs/rundeck/core/dispatcher/DataContextUtils.java | DataContextUtils.replaceDataReferencesConverter | public static Converter<String,String> replaceDataReferencesConverter(final Map<String, Map<String, String>> data) {
return replaceDataReferencesConverter(data, null, false);
} | java | public static Converter<String,String> replaceDataReferencesConverter(final Map<String, Map<String, String>> data) {
return replaceDataReferencesConverter(data, null, false);
} | [
"public",
"static",
"Converter",
"<",
"String",
",",
"String",
">",
"replaceDataReferencesConverter",
"(",
"final",
"Map",
"<",
"String",
",",
"Map",
"<",
"String",
",",
"String",
">",
">",
"data",
")",
"{",
"return",
"replaceDataReferencesConverter",
"(",
"da... | Return a converter that can expand the property references within a string
@param data property context data
@return a Converter to expand property values within a string | [
"Return",
"a",
"converter",
"that",
"can",
"expand",
"the",
"property",
"references",
"within",
"a",
"string"
] | train | https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/dispatcher/DataContextUtils.java#L325-L327 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ApplicationGatewaysInner.java | ApplicationGatewaysInner.beginStop | public void beginStop(String resourceGroupName, String applicationGatewayName) {
beginStopWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().body();
} | java | public void beginStop(String resourceGroupName, String applicationGatewayName) {
beginStopWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().body();
} | [
"public",
"void",
"beginStop",
"(",
"String",
"resourceGroupName",
",",
"String",
"applicationGatewayName",
")",
"{",
"beginStopWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"applicationGatewayName",
")",
".",
"toBlocking",
"(",
")",
".",
"single",
"(",
")... | Stops the specified application gateway in a resource group.
@param resourceGroupName The name of the resource group.
@param applicationGatewayName The name of the application gateway.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected by ... | [
"Stops",
"the",
"specified",
"application",
"gateway",
"in",
"a",
"resource",
"group",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ApplicationGatewaysInner.java#L1320-L1322 |
ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java | AbstractLogger.catching | protected void catching(final String fqcn, final Level level, final Throwable t) {
if (isEnabled(level, CATCHING_MARKER, (Object) null, null)) {
logMessageSafely(fqcn, level, CATCHING_MARKER, catchingMsg(t), t);
}
} | java | protected void catching(final String fqcn, final Level level, final Throwable t) {
if (isEnabled(level, CATCHING_MARKER, (Object) null, null)) {
logMessageSafely(fqcn, level, CATCHING_MARKER, catchingMsg(t), t);
}
} | [
"protected",
"void",
"catching",
"(",
"final",
"String",
"fqcn",
",",
"final",
"Level",
"level",
",",
"final",
"Throwable",
"t",
")",
"{",
"if",
"(",
"isEnabled",
"(",
"level",
",",
"CATCHING_MARKER",
",",
"(",
"Object",
")",
"null",
",",
"null",
")",
... | Logs a Throwable that has been caught with location information.
@param fqcn The fully qualified class name of the <b>caller</b>.
@param level The logging level.
@param t The Throwable. | [
"Logs",
"a",
"Throwable",
"that",
"has",
"been",
"caught",
"with",
"location",
"information",
"."
] | train | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java#L176-L180 |
jbundle/jbundle | base/screen/control/servlet/src/main/java/org/jbundle/base/screen/control/servlet/BaseHttpTask.java | BaseHttpTask.setStatusText | public void setStatusText(String strStatus, int iWarningLevel)
{
if (strStatus == null)
strStatus = Constants.BLANK;
m_strCurrentStatus = strStatus;
m_iCurrentWarningLevel = iWarningLevel;
} | java | public void setStatusText(String strStatus, int iWarningLevel)
{
if (strStatus == null)
strStatus = Constants.BLANK;
m_strCurrentStatus = strStatus;
m_iCurrentWarningLevel = iWarningLevel;
} | [
"public",
"void",
"setStatusText",
"(",
"String",
"strStatus",
",",
"int",
"iWarningLevel",
")",
"{",
"if",
"(",
"strStatus",
"==",
"null",
")",
"strStatus",
"=",
"Constants",
".",
"BLANK",
";",
"m_strCurrentStatus",
"=",
"strStatus",
";",
"m_iCurrentWarningLeve... | Display this status message in the status box or at the bottom of the browser.
@param bWarning If true, display a message box that the user must dismiss. | [
"Display",
"this",
"status",
"message",
"in",
"the",
"status",
"box",
"or",
"at",
"the",
"bottom",
"of",
"the",
"browser",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/control/servlet/src/main/java/org/jbundle/base/screen/control/servlet/BaseHttpTask.java#L516-L522 |
twitter/cloudhopper-commons | ch-commons-gsm/src/main/java/com/cloudhopper/commons/gsm/DataCoding.java | DataCoding.createMessageClassGroup | static public DataCoding createMessageClassGroup(byte characterEncoding, byte messageClass) throws IllegalArgumentException {
// only default or 8bit are valid
if (!(characterEncoding == CHAR_ENC_DEFAULT || characterEncoding == CHAR_ENC_8BIT)) {
throw new IllegalArgumentException("Invalid ch... | java | static public DataCoding createMessageClassGroup(byte characterEncoding, byte messageClass) throws IllegalArgumentException {
// only default or 8bit are valid
if (!(characterEncoding == CHAR_ENC_DEFAULT || characterEncoding == CHAR_ENC_8BIT)) {
throw new IllegalArgumentException("Invalid ch... | [
"static",
"public",
"DataCoding",
"createMessageClassGroup",
"(",
"byte",
"characterEncoding",
",",
"byte",
"messageClass",
")",
"throws",
"IllegalArgumentException",
"{",
"// only default or 8bit are valid",
"if",
"(",
"!",
"(",
"characterEncoding",
"==",
"CHAR_ENC_DEFAULT... | Creates a "Message Class" group data coding scheme where 2 different
languages are supported (8BIT or DEFAULT). This method validates the
message class.
@param characterEncoding Either CHAR_ENC_DEFAULT or CHAR_ENC_8BIT
@param messageClass The 4 different possible message classes (0-3)
@return A new immutable DataCodin... | [
"Creates",
"a",
"Message",
"Class",
"group",
"data",
"coding",
"scheme",
"where",
"2",
"different",
"languages",
"are",
"supported",
"(",
"8BIT",
"or",
"DEFAULT",
")",
".",
"This",
"method",
"validates",
"the",
"message",
"class",
"."
] | train | https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-gsm/src/main/java/com/cloudhopper/commons/gsm/DataCoding.java#L220-L242 |
phax/ph-commons | ph-commons/src/main/java/com/helger/commons/datetime/PDTFormatter.java | PDTFormatter.getFormatterDate | @Nonnull
public static DateTimeFormatter getFormatterDate (@Nonnull final FormatStyle eStyle,
@Nullable final Locale aDisplayLocale,
@Nonnull final EDTFormatterMode eMode)
{
return _getFormatter (new CacheKey... | java | @Nonnull
public static DateTimeFormatter getFormatterDate (@Nonnull final FormatStyle eStyle,
@Nullable final Locale aDisplayLocale,
@Nonnull final EDTFormatterMode eMode)
{
return _getFormatter (new CacheKey... | [
"@",
"Nonnull",
"public",
"static",
"DateTimeFormatter",
"getFormatterDate",
"(",
"@",
"Nonnull",
"final",
"FormatStyle",
"eStyle",
",",
"@",
"Nullable",
"final",
"Locale",
"aDisplayLocale",
",",
"@",
"Nonnull",
"final",
"EDTFormatterMode",
"eMode",
")",
"{",
"ret... | Get the date formatter for the passed locale.
@param eStyle
The format style to be used. May not be <code>null</code>.
@param aDisplayLocale
The display locale to be used. May be <code>null</code>.
@param eMode
Print or parse? May not be <code>null</code>.
@return The created date formatter. Never <code>null</code>.
@... | [
"Get",
"the",
"date",
"formatter",
"for",
"the",
"passed",
"locale",
"."
] | train | https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/datetime/PDTFormatter.java#L257-L263 |
lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/util/PathPattern.java | PathPattern.matches | public boolean matches(String[] path) {
if (nbAny == 0 && path.length != nbWildcards)
return false;
if (path.length < nbWildcards)
return false;
return check(path, 0, 0, nbWildcards, nbAny);
} | java | public boolean matches(String[] path) {
if (nbAny == 0 && path.length != nbWildcards)
return false;
if (path.length < nbWildcards)
return false;
return check(path, 0, 0, nbWildcards, nbAny);
} | [
"public",
"boolean",
"matches",
"(",
"String",
"[",
"]",
"path",
")",
"{",
"if",
"(",
"nbAny",
"==",
"0",
"&&",
"path",
".",
"length",
"!=",
"nbWildcards",
")",
"return",
"false",
";",
"if",
"(",
"path",
".",
"length",
"<",
"nbWildcards",
")",
"retur... | Return true if the given list of path elements is matching this pattern. | [
"Return",
"true",
"if",
"the",
"given",
"list",
"of",
"path",
"elements",
"is",
"matching",
"this",
"pattern",
"."
] | train | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/util/PathPattern.java#L55-L61 |
googleads/googleads-java-lib | modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/Streams.java | Streams.copy | public static void copy(final InputStream inputStream, final OutputStream outputStream)
throws IOException {
new ByteSource() {
@Override
public InputStream openStream() {
return inputStream;
}
}.copyTo(new ByteSink() {
@Override
public OutputStream openStream() {
... | java | public static void copy(final InputStream inputStream, final OutputStream outputStream)
throws IOException {
new ByteSource() {
@Override
public InputStream openStream() {
return inputStream;
}
}.copyTo(new ByteSink() {
@Override
public OutputStream openStream() {
... | [
"public",
"static",
"void",
"copy",
"(",
"final",
"InputStream",
"inputStream",
",",
"final",
"OutputStream",
"outputStream",
")",
"throws",
"IOException",
"{",
"new",
"ByteSource",
"(",
")",
"{",
"@",
"Override",
"public",
"InputStream",
"openStream",
"(",
")",... | Copies the {@code inputStream} into the {@code outputSteam} and finally
closes the both streams. | [
"Copies",
"the",
"{"
] | train | https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/Streams.java#L131-L144 |
UrielCh/ovh-java-sdk | ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java | ApiOvhVps.serviceName_use_GET | public OvhUnitAndValue<Double> serviceName_use_GET(String serviceName, OvhVpsStatisticTypeEnum type) throws IOException {
String qPath = "/vps/{serviceName}/use";
StringBuilder sb = path(qPath, serviceName);
query(sb, "type", type);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp,... | java | public OvhUnitAndValue<Double> serviceName_use_GET(String serviceName, OvhVpsStatisticTypeEnum type) throws IOException {
String qPath = "/vps/{serviceName}/use";
StringBuilder sb = path(qPath, serviceName);
query(sb, "type", type);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp,... | [
"public",
"OvhUnitAndValue",
"<",
"Double",
">",
"serviceName_use_GET",
"(",
"String",
"serviceName",
",",
"OvhVpsStatisticTypeEnum",
"type",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/vps/{serviceName}/use\"",
";",
"StringBuilder",
"sb",
"=",
"pat... | Return many statistics about the virtual machine at that time
REST: GET /vps/{serviceName}/use
@param type [required] The type of statistic to be fetched
@param serviceName [required] The internal name of your VPS offer | [
"Return",
"many",
"statistics",
"about",
"the",
"virtual",
"machine",
"at",
"that",
"time"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java#L357-L363 |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/code/Types.java | Types.makeIntersectionType | public Type makeIntersectionType(Type bound1, Type bound2) {
return makeIntersectionType(List.of(bound1, bound2));
} | java | public Type makeIntersectionType(Type bound1, Type bound2) {
return makeIntersectionType(List.of(bound1, bound2));
} | [
"public",
"Type",
"makeIntersectionType",
"(",
"Type",
"bound1",
",",
"Type",
"bound2",
")",
"{",
"return",
"makeIntersectionType",
"(",
"List",
".",
"of",
"(",
"bound1",
",",
"bound2",
")",
")",
";",
"}"
] | A convenience wrapper for {@link #makeIntersectionType(List)}; the
arguments are converted to a list and passed to the other
method. Note that this might cause a symbol completion.
Hence, this version of makeIntersectionType may not be called
during a classfile read. | [
"A",
"convenience",
"wrapper",
"for",
"{"
] | train | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/code/Types.java#L2308-L2310 |
samskivert/samskivert | src/main/java/com/samskivert/util/ConfigUtil.java | ConfigUtil.loadProperties | public static Properties loadProperties (String path, ClassLoader loader)
throws IOException
{
Properties props = new Properties();
loadProperties(path, loader, props);
return props;
} | java | public static Properties loadProperties (String path, ClassLoader loader)
throws IOException
{
Properties props = new Properties();
loadProperties(path, loader, props);
return props;
} | [
"public",
"static",
"Properties",
"loadProperties",
"(",
"String",
"path",
",",
"ClassLoader",
"loader",
")",
"throws",
"IOException",
"{",
"Properties",
"props",
"=",
"new",
"Properties",
"(",
")",
";",
"loadProperties",
"(",
"path",
",",
"loader",
",",
"prop... | Like {@link #loadProperties(String)} but this method uses the supplied class loader rather
than the class loader used to load the <code>ConfigUtil</code> class. | [
"Like",
"{"
] | train | https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/ConfigUtil.java#L66-L72 |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemLiteralResult.java | ElemLiteralResult.callChildVisitors | protected void callChildVisitors(XSLTVisitor visitor, boolean callAttrs)
{
if (callAttrs && null != m_avts)
{
int nAttrs = m_avts.size();
for (int i = (nAttrs - 1); i >= 0; i--)
{
AVT avt = (AVT) m_avts.get(i);
avt.callVisitors(visitor);
}
}
... | java | protected void callChildVisitors(XSLTVisitor visitor, boolean callAttrs)
{
if (callAttrs && null != m_avts)
{
int nAttrs = m_avts.size();
for (int i = (nAttrs - 1); i >= 0; i--)
{
AVT avt = (AVT) m_avts.get(i);
avt.callVisitors(visitor);
}
}
... | [
"protected",
"void",
"callChildVisitors",
"(",
"XSLTVisitor",
"visitor",
",",
"boolean",
"callAttrs",
")",
"{",
"if",
"(",
"callAttrs",
"&&",
"null",
"!=",
"m_avts",
")",
"{",
"int",
"nAttrs",
"=",
"m_avts",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",... | Call the children visitors.
@param visitor The visitor whose appropriate method will be called. | [
"Call",
"the",
"children",
"visitors",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemLiteralResult.java#L1450-L1463 |
google/error-prone-javac | src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java | BaseFileManager.handleOption | public boolean handleOption(Option option, String value) {
switch (option) {
case ENCODING:
encodingName = value;
return true;
case MULTIRELEASE:
multiReleaseValue = value;
locations.setMultiReleaseValue(value);
... | java | public boolean handleOption(Option option, String value) {
switch (option) {
case ENCODING:
encodingName = value;
return true;
case MULTIRELEASE:
multiReleaseValue = value;
locations.setMultiReleaseValue(value);
... | [
"public",
"boolean",
"handleOption",
"(",
"Option",
"option",
",",
"String",
"value",
")",
"{",
"switch",
"(",
"option",
")",
"{",
"case",
"ENCODING",
":",
"encodingName",
"=",
"value",
";",
"return",
"true",
";",
"case",
"MULTIRELEASE",
":",
"multiReleaseVa... | Common back end for OptionHelper handleFileManagerOption.
@param option the option whose value to be set
@param value the value for the option
@return true if successful, and false otherwise | [
"Common",
"back",
"end",
"for",
"OptionHelper",
"handleFileManagerOption",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java#L257-L271 |
ModeShape/modeshape | modeshape-jcr/src/main/java/org/modeshape/jcr/clustering/ClusteringService.java | ClusteringService.startStandalone | public static ClusteringService startStandalone(String clusterName, Channel channel) {
ClusteringService clusteringService = new StandaloneClusteringService(clusterName, channel);
clusteringService.init();
return clusteringService;
} | java | public static ClusteringService startStandalone(String clusterName, Channel channel) {
ClusteringService clusteringService = new StandaloneClusteringService(clusterName, channel);
clusteringService.init();
return clusteringService;
} | [
"public",
"static",
"ClusteringService",
"startStandalone",
"(",
"String",
"clusterName",
",",
"Channel",
"channel",
")",
"{",
"ClusteringService",
"clusteringService",
"=",
"new",
"StandaloneClusteringService",
"(",
"clusterName",
",",
"channel",
")",
";",
"clusteringS... | Starts a standalone clustering service which uses the supplied channel.
@param clusterName the name of the cluster to which the JGroups channel should connect; may not be null
@param channel a {@link Channel} instance, may not be {@code null}
@return a {@link org.modeshape.jcr.clustering.ClusteringService} instance,... | [
"Starts",
"a",
"standalone",
"clustering",
"service",
"which",
"uses",
"the",
"supplied",
"channel",
"."
] | train | https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/clustering/ClusteringService.java#L275-L279 |
alkacon/opencms-core | src/org/opencms/db/oracle/CmsUserDriver.java | CmsUserDriver.internalWriteUserInfo | @Override
protected void internalWriteUserInfo(CmsDbContext dbc, CmsUUID userId, String key, Object value)
throws CmsDataAccessException {
PreparedStatement stmt = null;
Connection conn = null;
try {
// get connection
conn = m_sqlManager.getConnection(dbc);
... | java | @Override
protected void internalWriteUserInfo(CmsDbContext dbc, CmsUUID userId, String key, Object value)
throws CmsDataAccessException {
PreparedStatement stmt = null;
Connection conn = null;
try {
// get connection
conn = m_sqlManager.getConnection(dbc);
... | [
"@",
"Override",
"protected",
"void",
"internalWriteUserInfo",
"(",
"CmsDbContext",
"dbc",
",",
"CmsUUID",
"userId",
",",
"String",
"key",
",",
"Object",
"value",
")",
"throws",
"CmsDataAccessException",
"{",
"PreparedStatement",
"stmt",
"=",
"null",
";",
"Connect... | Writes a new additional user info.<p>
@param dbc the current dbc
@param userId the user id to add the user info for
@param key the name of the additional user info
@param value the value of the additional user info
@throws CmsDataAccessException if something goes wrong | [
"Writes",
"a",
"new",
"additional",
"user",
"info",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/oracle/CmsUserDriver.java#L261-L289 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.