repository_name stringlengths 7 58 | func_path_in_repository stringlengths 11 218 | func_name stringlengths 4 140 | whole_func_string stringlengths 153 5.32k | language stringclasses 1
value | func_code_string stringlengths 72 4k | func_code_tokens listlengths 20 832 | func_documentation_string stringlengths 61 2k | func_documentation_tokens listlengths 1 647 | split_name stringclasses 1
value | func_code_url stringlengths 102 339 |
|---|---|---|---|---|---|---|---|---|---|---|
lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/EllipseClustersIntoGrid.java | EllipseClustersIntoGrid.computeNodeInfo | void computeNodeInfo(List<EllipseRotated_F64> ellipses , List<Node> cluster ) {
"""
For each cluster create a {@link NodeInfo} and compute different properties
"""
// create an info object for each member inside of the cluster
listInfo.reset();
for (int i = 0; i < cluster.size(); i++) {
Node n = clus... | java | void computeNodeInfo(List<EllipseRotated_F64> ellipses , List<Node> cluster ) {
// create an info object for each member inside of the cluster
listInfo.reset();
for (int i = 0; i < cluster.size(); i++) {
Node n = cluster.get(i);
EllipseRotated_F64 t = ellipses.get( n.which );
NodeInfo info = listInfo.g... | [
"void",
"computeNodeInfo",
"(",
"List",
"<",
"EllipseRotated_F64",
">",
"ellipses",
",",
"List",
"<",
"Node",
">",
"cluster",
")",
"{",
"// create an info object for each member inside of the cluster",
"listInfo",
".",
"reset",
"(",
")",
";",
"for",
"(",
"int",
"i... | For each cluster create a {@link NodeInfo} and compute different properties | [
"For",
"each",
"cluster",
"create",
"a",
"{"
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/EllipseClustersIntoGrid.java#L267-L283 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/util/InvocationUtil.java | InvocationUtil.invokeOnStableClusterSerial | public static ICompletableFuture<Object> invokeOnStableClusterSerial(NodeEngine nodeEngine,
Supplier<? extends Operation> operationSupplier,
int maxRetries) {
"""
Invoke... | java | public static ICompletableFuture<Object> invokeOnStableClusterSerial(NodeEngine nodeEngine,
Supplier<? extends Operation> operationSupplier,
int maxRetries) {
Cluste... | [
"public",
"static",
"ICompletableFuture",
"<",
"Object",
">",
"invokeOnStableClusterSerial",
"(",
"NodeEngine",
"nodeEngine",
",",
"Supplier",
"<",
"?",
"extends",
"Operation",
">",
"operationSupplier",
",",
"int",
"maxRetries",
")",
"{",
"ClusterService",
"clusterSer... | Invoke operation on all cluster members.
The invocation is serial: It iterates over all members starting from the oldest member to the youngest one.
If there is a cluster membership change while invoking then it will restart invocations on all members. This
implies the operation should be idempotent.
If there is an e... | [
"Invoke",
"operation",
"on",
"all",
"cluster",
"members",
"."
] | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/InvocationUtil.java#L63-L87 |
alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java | CmsSerialDateView.showCurrentDates | public void showCurrentDates(Collection<CmsPair<Date, Boolean>> dates) {
"""
Shows the provided list of dates as current dates.
@param dates the current dates to show, accompanied with the information if they are exceptions or not.
"""
m_overviewList.setDatesWithCheckState(dates);
m_overviewP... | java | public void showCurrentDates(Collection<CmsPair<Date, Boolean>> dates) {
m_overviewList.setDatesWithCheckState(dates);
m_overviewPopup.center();
} | [
"public",
"void",
"showCurrentDates",
"(",
"Collection",
"<",
"CmsPair",
"<",
"Date",
",",
"Boolean",
">",
">",
"dates",
")",
"{",
"m_overviewList",
".",
"setDatesWithCheckState",
"(",
"dates",
")",
";",
"m_overviewPopup",
".",
"center",
"(",
")",
";",
"}"
] | Shows the provided list of dates as current dates.
@param dates the current dates to show, accompanied with the information if they are exceptions or not. | [
"Shows",
"the",
"provided",
"list",
"of",
"dates",
"as",
"current",
"dates",
"."
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L339-L344 |
gwtbootstrap3/gwtbootstrap3 | gwtbootstrap3/src/main/java/org/gwtbootstrap3/client/ui/base/mixin/AttributeMixin.java | AttributeMixin.setAttribute | public void setAttribute(final String attributeName, final String attributeValue) {
"""
Sets the attribute on the UiObject
@param attributeName attribute name
@param attributeValue attribute value
"""
uiObject.getElement().setAttribute(attributeName, attributeValue);
} | java | public void setAttribute(final String attributeName, final String attributeValue) {
uiObject.getElement().setAttribute(attributeName, attributeValue);
} | [
"public",
"void",
"setAttribute",
"(",
"final",
"String",
"attributeName",
",",
"final",
"String",
"attributeValue",
")",
"{",
"uiObject",
".",
"getElement",
"(",
")",
".",
"setAttribute",
"(",
"attributeName",
",",
"attributeValue",
")",
";",
"}"
] | Sets the attribute on the UiObject
@param attributeName attribute name
@param attributeValue attribute value | [
"Sets",
"the",
"attribute",
"on",
"the",
"UiObject"
] | train | https://github.com/gwtbootstrap3/gwtbootstrap3/blob/54bdbd0b12ba7a436b278c007df960d1adf2e641/gwtbootstrap3/src/main/java/org/gwtbootstrap3/client/ui/base/mixin/AttributeMixin.java#L40-L42 |
deeplearning4j/deeplearning4j | nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDNN.java | SDNN.batchNorm | public SDVariable batchNorm(String name, SDVariable input, SDVariable mean,
SDVariable variance, SDVariable gamma,
SDVariable beta, double epsilon, int... axis) {
"""
Neural network batch normalization operation.<br>
For details, see <a href="http://... | java | public SDVariable batchNorm(String name, SDVariable input, SDVariable mean,
SDVariable variance, SDVariable gamma,
SDVariable beta, double epsilon, int... axis) {
return batchNorm(name, input, mean, variance, gamma, beta, true, true, epsilon, axis)... | [
"public",
"SDVariable",
"batchNorm",
"(",
"String",
"name",
",",
"SDVariable",
"input",
",",
"SDVariable",
"mean",
",",
"SDVariable",
"variance",
",",
"SDVariable",
"gamma",
",",
"SDVariable",
"beta",
",",
"double",
"epsilon",
",",
"int",
"...",
"axis",
")",
... | Neural network batch normalization operation.<br>
For details, see <a href="http://arxiv.org/abs/1502.03167">http://arxiv.org/abs/1502.03167</a>
@param name Name of the output variable
@param input Input variable.
@param mean Mean value. For 1d axis, this should match input.size(axis)
@param variance Varian... | [
"Neural",
"network",
"batch",
"normalization",
"operation",
".",
"<br",
">",
"For",
"details",
"see",
"<a",
"href",
"=",
"http",
":",
"//",
"arxiv",
".",
"org",
"/",
"abs",
"/",
"1502",
".",
"03167",
">",
"http",
":",
"//",
"arxiv",
".",
"org",
"/",
... | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDNN.java#L69-L73 |
mgormley/pacaya | src/main/java/edu/jhu/pacaya/parse/dep/EdgeScores.java | EdgeScores.childContains | public static boolean childContains(double[][] child, double value, double delta) {
"""
Safely checks whether the child array contains a value -- ignoring diagonal entries.
"""
for (int i=0; i<child.length; i++) {
for (int j=0; j<child.length; j++) {
if (i == j) { continue; ... | java | public static boolean childContains(double[][] child, double value, double delta) {
for (int i=0; i<child.length; i++) {
for (int j=0; j<child.length; j++) {
if (i == j) { continue; }
if (Primitives.equals(child[i][j], value, delta)) {
return true;... | [
"public",
"static",
"boolean",
"childContains",
"(",
"double",
"[",
"]",
"[",
"]",
"child",
",",
"double",
"value",
",",
"double",
"delta",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"child",
".",
"length",
";",
"i",
"++",
")",
"{... | Safely checks whether the child array contains a value -- ignoring diagonal entries. | [
"Safely",
"checks",
"whether",
"the",
"child",
"array",
"contains",
"a",
"value",
"--",
"ignoring",
"diagonal",
"entries",
"."
] | train | https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/parse/dep/EdgeScores.java#L54-L64 |
TheCoder4eu/BootsFaces-OSP | src/main/java/net/bootsfaces/component/selectBooleanCheckbox/SelectBooleanCheckboxRenderer.java | SelectBooleanCheckboxRenderer.renderInputTagEnd | protected void renderInputTagEnd(ResponseWriter rw, SelectBooleanCheckbox selectBooleanCheckbox)
throws IOException {
"""
Closes the input tag. This method is protected in order to allow
third-party frameworks to derive from it.
@param rw
the response writer
@param selectBooleanCheckbox
the component to ... | java | protected void renderInputTagEnd(ResponseWriter rw, SelectBooleanCheckbox selectBooleanCheckbox)
throws IOException {
rw.endElement("input");
String caption = selectBooleanCheckbox.getCaption();
if (null != caption) {
if (selectBooleanCheckbox.isEscape()) {
rw.writeText(" " + caption, null);
} else {... | [
"protected",
"void",
"renderInputTagEnd",
"(",
"ResponseWriter",
"rw",
",",
"SelectBooleanCheckbox",
"selectBooleanCheckbox",
")",
"throws",
"IOException",
"{",
"rw",
".",
"endElement",
"(",
"\"input\"",
")",
";",
"String",
"caption",
"=",
"selectBooleanCheckbox",
"."... | Closes the input tag. This method is protected in order to allow
third-party frameworks to derive from it.
@param rw
the response writer
@param selectBooleanCheckbox
the component to render
@throws IOException
may be thrown by the response writer | [
"Closes",
"the",
"input",
"tag",
".",
"This",
"method",
"is",
"protected",
"in",
"order",
"to",
"allow",
"third",
"-",
"party",
"frameworks",
"to",
"derive",
"from",
"it",
"."
] | train | https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/selectBooleanCheckbox/SelectBooleanCheckboxRenderer.java#L340-L353 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java | ArrayUtil.swap | public static Object swap(Object array, int index1, int index2) {
"""
交换数组中两个位置的值
@param array 数组对象
@param index1 位置1
@param index2 位置2
@return 交换后的数组,与传入数组为同一对象
@since 4.0.7
"""
if (isEmpty(array)) {
throw new IllegalArgumentException("Array must not empty !");
}
Object tmp = get(array, in... | java | public static Object swap(Object array, int index1, int index2) {
if (isEmpty(array)) {
throw new IllegalArgumentException("Array must not empty !");
}
Object tmp = get(array, index1);
Array.set(array, index1, Array.get(array, index2));
Array.set(array, index2, tmp);
return array;
} | [
"public",
"static",
"Object",
"swap",
"(",
"Object",
"array",
",",
"int",
"index1",
",",
"int",
"index2",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"array",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Array must not empty !\"",
")",
";",
... | 交换数组中两个位置的值
@param array 数组对象
@param index1 位置1
@param index2 位置2
@return 交换后的数组,与传入数组为同一对象
@since 4.0.7 | [
"交换数组中两个位置的值"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java#L3762-L3770 |
jillesvangurp/jsonj | src/main/java/com/github/jsonj/tools/JsonXmlConverter.java | JsonXmlConverter.getW3cDocument | public static org.w3c.dom.Document getW3cDocument(JsonElement value, String rootName) {
"""
Convert any JsonElement into an w3c DOM tree.
@param value
a json element
@param rootName
the root name of the xml
@return a Document
"""
Element root = getElement(value, rootName);
try {
... | java | public static org.w3c.dom.Document getW3cDocument(JsonElement value, String rootName) {
Element root = getElement(value, rootName);
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
DocumentBuilder builder = ... | [
"public",
"static",
"org",
".",
"w3c",
".",
"dom",
".",
"Document",
"getW3cDocument",
"(",
"JsonElement",
"value",
",",
"String",
"rootName",
")",
"{",
"Element",
"root",
"=",
"getElement",
"(",
"value",
",",
"rootName",
")",
";",
"try",
"{",
"DocumentBuil... | Convert any JsonElement into an w3c DOM tree.
@param value
a json element
@param rootName
the root name of the xml
@return a Document | [
"Convert",
"any",
"JsonElement",
"into",
"an",
"w3c",
"DOM",
"tree",
"."
] | train | https://github.com/jillesvangurp/jsonj/blob/1da0c44c5bdb60c0cd806c48d2da5a8a75bf84af/src/main/java/com/github/jsonj/tools/JsonXmlConverter.java#L120-L132 |
pmayweg/sonar-groovy | sonar-groovy-plugin/src/main/java/org/sonar/plugins/groovy/jacoco/JaCoCoReportReader.java | JaCoCoReportReader.analyzeFiles | public CoverageBuilder analyzeFiles(ExecutionDataStore executionDataStore, Collection<File> classFiles) {
"""
Caller must guarantee that {@code classFiles} are actually class file.
"""
CoverageBuilder coverageBuilder = new CoverageBuilder();
if (useCurrentBinaryFormat) {
Analyzer analyzer = new A... | java | public CoverageBuilder analyzeFiles(ExecutionDataStore executionDataStore, Collection<File> classFiles) {
CoverageBuilder coverageBuilder = new CoverageBuilder();
if (useCurrentBinaryFormat) {
Analyzer analyzer = new Analyzer(executionDataStore, coverageBuilder);
for (File classFile : classFiles) {
... | [
"public",
"CoverageBuilder",
"analyzeFiles",
"(",
"ExecutionDataStore",
"executionDataStore",
",",
"Collection",
"<",
"File",
">",
"classFiles",
")",
"{",
"CoverageBuilder",
"coverageBuilder",
"=",
"new",
"CoverageBuilder",
"(",
")",
";",
"if",
"(",
"useCurrentBinaryF... | Caller must guarantee that {@code classFiles} are actually class file. | [
"Caller",
"must",
"guarantee",
"that",
"{"
] | train | https://github.com/pmayweg/sonar-groovy/blob/2d78d6578304601613db928795d81de340e6fa34/sonar-groovy-plugin/src/main/java/org/sonar/plugins/groovy/jacoco/JaCoCoReportReader.java#L107-L121 |
roskart/dropwizard-jaxws | dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/JAXWSBundle.java | JAXWSBundle.publishEndpoint | public Endpoint publishEndpoint(String path, Object service, SessionFactory sessionFactory) {
"""
Publish JAX-WS endpoint with Dropwizard Hibernate Bundle integration. Service is scanned for @UnitOfWork
annotations. EndpointBuilder is published relative to the CXF servlet path.
@param path Relative endpoint path... | java | public Endpoint publishEndpoint(String path, Object service, SessionFactory sessionFactory) {
return this.publishEndpoint(path, service, null, sessionFactory);
} | [
"public",
"Endpoint",
"publishEndpoint",
"(",
"String",
"path",
",",
"Object",
"service",
",",
"SessionFactory",
"sessionFactory",
")",
"{",
"return",
"this",
".",
"publishEndpoint",
"(",
"path",
",",
"service",
",",
"null",
",",
"sessionFactory",
")",
";",
"}... | Publish JAX-WS endpoint with Dropwizard Hibernate Bundle integration. Service is scanned for @UnitOfWork
annotations. EndpointBuilder is published relative to the CXF servlet path.
@param path Relative endpoint path.
@param service Service implementation.
@param sessionFactory Hibernate session factory.
@return javax.x... | [
"Publish",
"JAX",
"-",
"WS",
"endpoint",
"with",
"Dropwizard",
"Hibernate",
"Bundle",
"integration",
".",
"Service",
"is",
"scanned",
"for",
"@UnitOfWork",
"annotations",
".",
"EndpointBuilder",
"is",
"published",
"relative",
"to",
"the",
"CXF",
"servlet",
"path",... | train | https://github.com/roskart/dropwizard-jaxws/blob/972eb63ba9626f3282d4a1d6127dc2b60b28f2bc/dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/JAXWSBundle.java#L110-L112 |
apache/incubator-gobblin | gobblin-salesforce/src/main/java/org/apache/gobblin/salesforce/SalesforceSource.java | SalesforceSource.getRefinedHistogram | private Histogram getRefinedHistogram(SalesforceConnector connector, String entity, String watermarkColumn,
SourceState state, Partition partition, Histogram histogram) {
"""
Refine the histogram by probing to split large buckets
@return the refined histogram
"""
final int maxPartitions = state.getP... | java | private Histogram getRefinedHistogram(SalesforceConnector connector, String entity, String watermarkColumn,
SourceState state, Partition partition, Histogram histogram) {
final int maxPartitions = state.getPropAsInt(ConfigurationKeys.SOURCE_MAX_NUMBER_OF_PARTITIONS,
ConfigurationKeys.DEFAULT_MAX_NUMBE... | [
"private",
"Histogram",
"getRefinedHistogram",
"(",
"SalesforceConnector",
"connector",
",",
"String",
"entity",
",",
"String",
"watermarkColumn",
",",
"SourceState",
"state",
",",
"Partition",
"partition",
",",
"Histogram",
"histogram",
")",
"{",
"final",
"int",
"m... | Refine the histogram by probing to split large buckets
@return the refined histogram | [
"Refine",
"the",
"histogram",
"by",
"probing",
"to",
"split",
"large",
"buckets"
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-salesforce/src/main/java/org/apache/gobblin/salesforce/SalesforceSource.java#L388-L438 |
Netflix/conductor | core/src/main/java/com/netflix/conductor/service/WorkflowServiceImpl.java | WorkflowServiceImpl.rerunWorkflow | @Service
public String rerunWorkflow(String workflowId, RerunWorkflowRequest request) {
"""
Reruns the workflow from a specific task.
@param workflowId WorkflowId of the workflow you want to rerun.
@param request (@link RerunWorkflowRequest) for the workflow.
@return WorkflowId of the rerun workflow.
... | java | @Service
public String rerunWorkflow(String workflowId, RerunWorkflowRequest request) {
request.setReRunFromWorkflowId(workflowId);
return workflowExecutor.rerun(request);
} | [
"@",
"Service",
"public",
"String",
"rerunWorkflow",
"(",
"String",
"workflowId",
",",
"RerunWorkflowRequest",
"request",
")",
"{",
"request",
".",
"setReRunFromWorkflowId",
"(",
"workflowId",
")",
";",
"return",
"workflowExecutor",
".",
"rerun",
"(",
"request",
"... | Reruns the workflow from a specific task.
@param workflowId WorkflowId of the workflow you want to rerun.
@param request (@link RerunWorkflowRequest) for the workflow.
@return WorkflowId of the rerun workflow. | [
"Reruns",
"the",
"workflow",
"from",
"a",
"specific",
"task",
"."
] | train | https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/WorkflowServiceImpl.java#L279-L283 |
jeremylong/DependencyCheck | utils/src/main/java/org/owasp/dependencycheck/utils/Settings.java | Settings.getLong | public long getLong(@NotNull final String key) throws InvalidSettingException {
"""
Returns a long value from the properties file. If the value was specified
as a system property or passed in via the -Dprop=value argument - this
method will return the value from the system properties before the values
in the co... | java | public long getLong(@NotNull final String key) throws InvalidSettingException {
try {
return Long.parseLong(getString(key));
} catch (NumberFormatException ex) {
throw new InvalidSettingException("Could not convert property '" + key + "' to a long.", ex);
}
} | [
"public",
"long",
"getLong",
"(",
"@",
"NotNull",
"final",
"String",
"key",
")",
"throws",
"InvalidSettingException",
"{",
"try",
"{",
"return",
"Long",
".",
"parseLong",
"(",
"getString",
"(",
"key",
")",
")",
";",
"}",
"catch",
"(",
"NumberFormatException"... | Returns a long value from the properties file. If the value was specified
as a system property or passed in via the -Dprop=value argument - this
method will return the value from the system properties before the values
in the contained configuration file.
@param key the key to lookup within the properties file
@return... | [
"Returns",
"a",
"long",
"value",
"from",
"the",
"properties",
"file",
".",
"If",
"the",
"value",
"was",
"specified",
"as",
"a",
"system",
"property",
"or",
"passed",
"in",
"via",
"the",
"-",
"Dprop",
"=",
"value",
"argument",
"-",
"this",
"method",
"will... | train | https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/utils/src/main/java/org/owasp/dependencycheck/utils/Settings.java#L1018-L1024 |
stripe/stripe-java | src/main/java/com/stripe/model/Invoice.java | Invoice.sendInvoice | public Invoice sendInvoice() throws StripeException {
"""
Stripe will automatically send invoices to customers according to your <a
href="https://dashboard.stripe.com/account/billing/automatic">subscriptions settings</a>.
However, if you’d like to manually send an invoice to your customer out of the normal sched... | java | public Invoice sendInvoice() throws StripeException {
return sendInvoice((Map<String, Object>) null, (RequestOptions) null);
} | [
"public",
"Invoice",
"sendInvoice",
"(",
")",
"throws",
"StripeException",
"{",
"return",
"sendInvoice",
"(",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"null",
",",
"(",
"RequestOptions",
")",
"null",
")",
";",
"}"
] | Stripe will automatically send invoices to customers according to your <a
href="https://dashboard.stripe.com/account/billing/automatic">subscriptions settings</a>.
However, if you’d like to manually send an invoice to your customer out of the normal schedule,
you can do so. When sending invoices that have already been ... | [
"Stripe",
"will",
"automatically",
"send",
"invoices",
"to",
"customers",
"according",
"to",
"your",
"<a",
"href",
"=",
"https",
":",
"//",
"dashboard",
".",
"stripe",
".",
"com",
"/",
"account",
"/",
"billing",
"/",
"automatic",
">",
"subscriptions",
"setti... | train | https://github.com/stripe/stripe-java/blob/acfa8becef3e73bfe3e9d8880bea3f3f30dadeac/src/main/java/com/stripe/model/Invoice.java#L1017-L1019 |
UrielCh/ovh-java-sdk | ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java | ApiOvhCloud.serviceName_pca_pcaServiceName_sessions_sessionId_PUT | public void serviceName_pca_pcaServiceName_sessions_sessionId_PUT(String serviceName, String pcaServiceName, String sessionId, net.minidev.ovh.api.pca.OvhSession body) throws IOException {
"""
Alter this object properties
REST: PUT /cloud/{serviceName}/pca/{pcaServiceName}/sessions/{sessionId}
@param body [req... | java | public void serviceName_pca_pcaServiceName_sessions_sessionId_PUT(String serviceName, String pcaServiceName, String sessionId, net.minidev.ovh.api.pca.OvhSession body) throws IOException {
String qPath = "/cloud/{serviceName}/pca/{pcaServiceName}/sessions/{sessionId}";
StringBuilder sb = path(qPath, serviceName, pc... | [
"public",
"void",
"serviceName_pca_pcaServiceName_sessions_sessionId_PUT",
"(",
"String",
"serviceName",
",",
"String",
"pcaServiceName",
",",
"String",
"sessionId",
",",
"net",
".",
"minidev",
".",
"ovh",
".",
"api",
".",
"pca",
".",
"OvhSession",
"body",
")",
"t... | Alter this object properties
REST: PUT /cloud/{serviceName}/pca/{pcaServiceName}/sessions/{sessionId}
@param body [required] New object properties
@param serviceName [required] The internal name of your public cloud passport
@param pcaServiceName [required] The internal name of your PCA offer
@param sessionId [require... | [
"Alter",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L2483-L2487 |
icode/ameba | src/main/java/ameba/container/Container.java | Container.registerBinder | protected void registerBinder(ResourceConfig configuration) {
"""
<p>registerBinder.</p>
@param configuration a {@link org.glassfish.jersey.server.ResourceConfig} object.
@since 0.1.6e
"""
configuration.register(new AbstractBinder() {
@Override
protected void configure() {
... | java | protected void registerBinder(ResourceConfig configuration) {
configuration.register(new AbstractBinder() {
@Override
protected void configure() {
bind(Container.this).to(Container.class).proxy(false);
}
});
configuration.registerInstances(new ... | [
"protected",
"void",
"registerBinder",
"(",
"ResourceConfig",
"configuration",
")",
"{",
"configuration",
".",
"register",
"(",
"new",
"AbstractBinder",
"(",
")",
"{",
"@",
"Override",
"protected",
"void",
"configure",
"(",
")",
"{",
"bind",
"(",
"Container",
... | <p>registerBinder.</p>
@param configuration a {@link org.glassfish.jersey.server.ResourceConfig} object.
@since 0.1.6e | [
"<p",
">",
"registerBinder",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/container/Container.java#L75-L102 |
dropbox/dropbox-sdk-java | src/main/java/com/dropbox/core/v1/DbxClientV1.java | DbxClientV1.chunkedUploadAppend | public long chunkedUploadAppend(String uploadId, long uploadOffset, byte[] data, int dataOffset, int dataLength)
throws DbxException {
"""
Append data to a chunked upload session.
@param uploadId
The identifier returned by {@link #chunkedUploadFirst} to identify the chunked upload
session.
@param u... | java | public long chunkedUploadAppend(String uploadId, long uploadOffset, byte[] data, int dataOffset, int dataLength)
throws DbxException
{
return chunkedUploadAppend(uploadId, uploadOffset, dataLength, new DbxStreamWriter.ByteArrayCopier(data, dataOffset, dataLength));
} | [
"public",
"long",
"chunkedUploadAppend",
"(",
"String",
"uploadId",
",",
"long",
"uploadOffset",
",",
"byte",
"[",
"]",
"data",
",",
"int",
"dataOffset",
",",
"int",
"dataLength",
")",
"throws",
"DbxException",
"{",
"return",
"chunkedUploadAppend",
"(",
"uploadI... | Append data to a chunked upload session.
@param uploadId
The identifier returned by {@link #chunkedUploadFirst} to identify the chunked upload
session.
@param uploadOffset
The current number of bytes uploaded to the chunked upload session. The server checks
this value to make sure it is correct. If it is correct, t... | [
"Append",
"data",
"to",
"a",
"chunked",
"upload",
"session",
"."
] | train | https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/v1/DbxClientV1.java#L1103-L1107 |
mongodb/stitch-android-sdk | server/core/src/main/java/com/mongodb/stitch/server/core/auth/providers/userpassword/internal/UserPasswordAuthProviderClientImpl.java | UserPasswordAuthProviderClientImpl.resetPassword | public void resetPassword(final String token, final String tokenId, final String password) {
"""
Resets the password of a user with the given token, token id, and new password.
@param token the reset password token.
@param tokenId the id of the reset password token.
@param password the new password for the us... | java | public void resetPassword(final String token, final String tokenId, final String password) {
resetPasswordInternal(token, tokenId, password);
} | [
"public",
"void",
"resetPassword",
"(",
"final",
"String",
"token",
",",
"final",
"String",
"tokenId",
",",
"final",
"String",
"password",
")",
"{",
"resetPasswordInternal",
"(",
"token",
",",
"tokenId",
",",
"password",
")",
";",
"}"
] | Resets the password of a user with the given token, token id, and new password.
@param token the reset password token.
@param tokenId the id of the reset password token.
@param password the new password for the user. The password must be between
6 and 128 characters long. | [
"Resets",
"the",
"password",
"of",
"a",
"user",
"with",
"the",
"given",
"token",
"token",
"id",
"and",
"new",
"password",
"."
] | train | https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/server/core/src/main/java/com/mongodb/stitch/server/core/auth/providers/userpassword/internal/UserPasswordAuthProviderClientImpl.java#L82-L84 |
pf4j/pf4j-update | src/main/java/org/pf4j/update/UpdateManager.java | UpdateManager.installPlugin | public synchronized boolean installPlugin(String id, String version) throws PluginException {
"""
Installs a plugin by id and version.
@param id the id of plugin to install
@param version the version of plugin to install, on SemVer format, or null for latest
@return true if installation successful and plugin ... | java | public synchronized boolean installPlugin(String id, String version) throws PluginException {
// Download to temporary location
Path downloaded = downloadPlugin(id, version);
Path pluginsRoot = pluginManager.getPluginsRoot();
Path file = pluginsRoot.resolve(downloaded.getFileName());
... | [
"public",
"synchronized",
"boolean",
"installPlugin",
"(",
"String",
"id",
",",
"String",
"version",
")",
"throws",
"PluginException",
"{",
"// Download to temporary location",
"Path",
"downloaded",
"=",
"downloadPlugin",
"(",
"id",
",",
"version",
")",
";",
"Path",... | Installs a plugin by id and version.
@param id the id of plugin to install
@param version the version of plugin to install, on SemVer format, or null for latest
@return true if installation successful and plugin started
@exception PluginException if plugin does not exist in repos or problems during | [
"Installs",
"a",
"plugin",
"by",
"id",
"and",
"version",
"."
] | train | https://github.com/pf4j/pf4j-update/blob/80cf04b8f2790808d0cf9dff3602dc5d730ac979/src/main/java/org/pf4j/update/UpdateManager.java#L232-L248 |
opencb/biodata | biodata-tools/src/main/java/org/opencb/biodata/tools/variant/metadata/VariantMetadataManager.java | VariantMetadataManager.removeCohort | public void removeCohort(Cohort cohort, String studyId) {
"""
Remove a cohort of a given variant study metadata (from study ID).
@param cohort Cohort
@param studyId Study ID
"""
// Sanity check
if (cohort == null) {
logger.error("Cohort is null.");
return;
... | java | public void removeCohort(Cohort cohort, String studyId) {
// Sanity check
if (cohort == null) {
logger.error("Cohort is null.");
return;
}
removeCohort(cohort.getId(), studyId);
} | [
"public",
"void",
"removeCohort",
"(",
"Cohort",
"cohort",
",",
"String",
"studyId",
")",
"{",
"// Sanity check",
"if",
"(",
"cohort",
"==",
"null",
")",
"{",
"logger",
".",
"error",
"(",
"\"Cohort is null.\"",
")",
";",
"return",
";",
"}",
"removeCohort",
... | Remove a cohort of a given variant study metadata (from study ID).
@param cohort Cohort
@param studyId Study ID | [
"Remove",
"a",
"cohort",
"of",
"a",
"given",
"variant",
"study",
"metadata",
"(",
"from",
"study",
"ID",
")",
"."
] | train | https://github.com/opencb/biodata/blob/21b3d51d71f578efab908422aca4bab7a73097b1/biodata-tools/src/main/java/org/opencb/biodata/tools/variant/metadata/VariantMetadataManager.java#L431-L438 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/LocalNetworkGatewaysInner.java | LocalNetworkGatewaysInner.beginCreateOrUpdate | public LocalNetworkGatewayInner beginCreateOrUpdate(String resourceGroupName, String localNetworkGatewayName, LocalNetworkGatewayInner parameters) {
"""
Creates or updates a local network gateway in the specified resource group.
@param resourceGroupName The name of the resource group.
@param localNetworkGatewa... | java | public LocalNetworkGatewayInner beginCreateOrUpdate(String resourceGroupName, String localNetworkGatewayName, LocalNetworkGatewayInner parameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, parameters).toBlocking().single().body();
} | [
"public",
"LocalNetworkGatewayInner",
"beginCreateOrUpdate",
"(",
"String",
"resourceGroupName",
",",
"String",
"localNetworkGatewayName",
",",
"LocalNetworkGatewayInner",
"parameters",
")",
"{",
"return",
"beginCreateOrUpdateWithServiceResponseAsync",
"(",
"resourceGroupName",
"... | Creates or updates a local network gateway in the specified resource group.
@param resourceGroupName The name of the resource group.
@param localNetworkGatewayName The name of the local network gateway.
@param parameters Parameters supplied to the create or update local network gateway operation.
@throws IllegalArgume... | [
"Creates",
"or",
"updates",
"a",
"local",
"network",
"gateway",
"in",
"the",
"specified",
"resource",
"group",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/LocalNetworkGatewaysInner.java#L193-L195 |
Metatavu/edelphi | edelphi/src/main/java/fi/metatavu/edelphi/pages/panel/admin/report/thesis/ThesisTimelineQueryReportPage.java | ThesisTimelineQueryReportPage.createStatistics | private QueryFieldDataStatistics createStatistics(List<Double> data, double min, double max, double step) {
"""
Creates statistics object
@param data data
@param min min
@param max max
@param step step
@return statistics object
"""
Map<Double, String> dataNames = new HashMap<>();
for (doubl... | java | private QueryFieldDataStatistics createStatistics(List<Double> data, double min, double max, double step) {
Map<Double, String> dataNames = new HashMap<>();
for (double d = min; d <= max; d += step) {
String caption = step % 1 == 0 ? Long.toString(Math.round(d)) : Double.toString(d);
dataNames.... | [
"private",
"QueryFieldDataStatistics",
"createStatistics",
"(",
"List",
"<",
"Double",
">",
"data",
",",
"double",
"min",
",",
"double",
"max",
",",
"double",
"step",
")",
"{",
"Map",
"<",
"Double",
",",
"String",
">",
"dataNames",
"=",
"new",
"HashMap",
"... | Creates statistics object
@param data data
@param min min
@param max max
@param step step
@return statistics object | [
"Creates",
"statistics",
"object"
] | train | https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi/src/main/java/fi/metatavu/edelphi/pages/panel/admin/report/thesis/ThesisTimelineQueryReportPage.java#L142-L151 |
openengsb/openengsb | components/edbi/jdbc/src/main/java/org/openengsb/core/edbi/jdbc/AbstractTableFactory.java | AbstractTableFactory.onMissingTypeVisit | protected void onMissingTypeVisit(Table table, IndexField<?> field) {
"""
Called when type map returns null.
@param table the table to be created
@param field the field being visited and has no type information
"""
if (!Introspector.isModelClass(field.getType())) {
return;
}
... | java | protected void onMissingTypeVisit(Table table, IndexField<?> field) {
if (!Introspector.isModelClass(field.getType())) {
return;
}
Field idField = Introspector.getOpenEngSBModelIdField(field.getType());
if (idField == null) {
LOG.warn("@Model class {} does not h... | [
"protected",
"void",
"onMissingTypeVisit",
"(",
"Table",
"table",
",",
"IndexField",
"<",
"?",
">",
"field",
")",
"{",
"if",
"(",
"!",
"Introspector",
".",
"isModelClass",
"(",
"field",
".",
"getType",
"(",
")",
")",
")",
"{",
"return",
";",
"}",
"Fiel... | Called when type map returns null.
@param table the table to be created
@param field the field being visited and has no type information | [
"Called",
"when",
"type",
"map",
"returns",
"null",
"."
] | train | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edbi/jdbc/src/main/java/org/openengsb/core/edbi/jdbc/AbstractTableFactory.java#L98-L123 |
lastaflute/lastaflute | src/main/java/org/lastaflute/core/magic/ThreadCacheContext.java | ThreadCacheContext.setObject | public static void setObject(String key, Object value) {
"""
Set the value of the object.
@param key The key of the object. (NotNull)
@param value The value of the object. (NullAllowed)
"""
if (!exists()) {
throwThreadCacheNotInitializedException(key);
}
threadLocal.get().... | java | public static void setObject(String key, Object value) {
if (!exists()) {
throwThreadCacheNotInitializedException(key);
}
threadLocal.get().put(key, value);
} | [
"public",
"static",
"void",
"setObject",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"!",
"exists",
"(",
")",
")",
"{",
"throwThreadCacheNotInitializedException",
"(",
"key",
")",
";",
"}",
"threadLocal",
".",
"get",
"(",
")",
".",... | Set the value of the object.
@param key The key of the object. (NotNull)
@param value The value of the object. (NullAllowed) | [
"Set",
"the",
"value",
"of",
"the",
"object",
"."
] | train | https://github.com/lastaflute/lastaflute/blob/17b56dda8322e4c6d79043532c1dda917d6b60a8/src/main/java/org/lastaflute/core/magic/ThreadCacheContext.java#L146-L151 |
Erudika/para | para-server/src/main/java/com/erudika/para/security/filters/GenericOAuth2Filter.java | GenericOAuth2Filter.attemptAuthentication | @Override
public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)
throws IOException {
"""
Handles an authentication request.
@param request HTTP request
@param response HTTP response
@return an authentication object that contains the principal object if success... | java | @Override
public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)
throws IOException {
final String requestURI = request.getRequestURI();
UserAuthentication userAuth = null;
if (requestURI.endsWith(OAUTH2_ACTION)) {
String authCode = request.getParameter("code... | [
"@",
"Override",
"public",
"Authentication",
"attemptAuthentication",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
")",
"throws",
"IOException",
"{",
"final",
"String",
"requestURI",
"=",
"request",
".",
"getRequestURI",
"(",
")",
";",... | Handles an authentication request.
@param request HTTP request
@param response HTTP response
@return an authentication object that contains the principal object if successful.
@throws IOException ex | [
"Handles",
"an",
"authentication",
"request",
"."
] | train | https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/security/filters/GenericOAuth2Filter.java#L94-L133 |
liferay/com-liferay-commerce | commerce-product-type-grouped-service/src/main/java/com/liferay/commerce/product/type/grouped/service/persistence/impl/CPDefinitionGroupedEntryPersistenceImpl.java | CPDefinitionGroupedEntryPersistenceImpl.removeByUuid_C | @Override
public void removeByUuid_C(String uuid, long companyId) {
"""
Removes all the cp definition grouped entries where uuid = ? and companyId = ? from the database.
@param uuid the uuid
@param companyId the company ID
"""
for (CPDefinitionGroupedEntry cpDefinitionGroupedEntry : findByUuid_C... | java | @Override
public void removeByUuid_C(String uuid, long companyId) {
for (CPDefinitionGroupedEntry cpDefinitionGroupedEntry : findByUuid_C(
uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
remove(cpDefinitionGroupedEntry);
}
} | [
"@",
"Override",
"public",
"void",
"removeByUuid_C",
"(",
"String",
"uuid",
",",
"long",
"companyId",
")",
"{",
"for",
"(",
"CPDefinitionGroupedEntry",
"cpDefinitionGroupedEntry",
":",
"findByUuid_C",
"(",
"uuid",
",",
"companyId",
",",
"QueryUtil",
".",
"ALL_POS"... | Removes all the cp definition grouped entries where uuid = ? and companyId = ? from the database.
@param uuid the uuid
@param companyId the company ID | [
"Removes",
"all",
"the",
"cp",
"definition",
"grouped",
"entries",
"where",
"uuid",
"=",
"?",
";",
"and",
"companyId",
"=",
"?",
";",
"from",
"the",
"database",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-type-grouped-service/src/main/java/com/liferay/commerce/product/type/grouped/service/persistence/impl/CPDefinitionGroupedEntryPersistenceImpl.java#L1418-L1424 |
canoo/dolphin-platform | platform/dolphin-platform-remoting-server/src/main/java/com/canoo/dp/impl/server/legacy/ServerModelStore.java | ServerModelStore.presentationModel | public ServerPresentationModel presentationModel(final String id, final String presentationModelType, final DTO dto) {
"""
Create a presentation model on the server side, add it to the model store, and withContent a command to
the client, advising him to do the same.
@throws IllegalArgumentException if a prese... | java | public ServerPresentationModel presentationModel(final String id, final String presentationModelType, final DTO dto) {
List<ServerAttribute> attributes = new ArrayList<ServerAttribute>();
for (final Slot slot : dto.getSlots()) {
final ServerAttribute result = new ServerAttribute(slot.getProp... | [
"public",
"ServerPresentationModel",
"presentationModel",
"(",
"final",
"String",
"id",
",",
"final",
"String",
"presentationModelType",
",",
"final",
"DTO",
"dto",
")",
"{",
"List",
"<",
"ServerAttribute",
">",
"attributes",
"=",
"new",
"ArrayList",
"<",
"ServerA... | Create a presentation model on the server side, add it to the model store, and withContent a command to
the client, advising him to do the same.
@throws IllegalArgumentException if a presentation model for this id already exists. No commands are sent in this case. | [
"Create",
"a",
"presentation",
"model",
"on",
"the",
"server",
"side",
"add",
"it",
"to",
"the",
"model",
"store",
"and",
"withContent",
"a",
"command",
"to",
"the",
"client",
"advising",
"him",
"to",
"do",
"the",
"same",
"."
] | train | https://github.com/canoo/dolphin-platform/blob/fb99c1fab24df80d2fa094d8688b546140146874/platform/dolphin-platform-remoting-server/src/main/java/com/canoo/dp/impl/server/legacy/ServerModelStore.java#L205-L222 |
bazaarvoice/emodb | databus-client-common/src/main/java/com/bazaarvoice/emodb/databus/client/DatabusClient.java | DatabusClient.getMoveStatus | @Override
public MoveSubscriptionStatus getMoveStatus(String apiKey, String reference) {
"""
Any server can get the move status, no need for @PartitionKey
"""
checkNotNull(reference, "reference");
try {
URI uri = _databus.clone()
.segment("_move")
... | java | @Override
public MoveSubscriptionStatus getMoveStatus(String apiKey, String reference) {
checkNotNull(reference, "reference");
try {
URI uri = _databus.clone()
.segment("_move")
.segment(reference)
.build();
return _... | [
"@",
"Override",
"public",
"MoveSubscriptionStatus",
"getMoveStatus",
"(",
"String",
"apiKey",
",",
"String",
"reference",
")",
"{",
"checkNotNull",
"(",
"reference",
",",
"\"reference\"",
")",
";",
"try",
"{",
"URI",
"uri",
"=",
"_databus",
".",
"clone",
"(",... | Any server can get the move status, no need for @PartitionKey | [
"Any",
"server",
"can",
"get",
"the",
"move",
"status",
"no",
"need",
"for"
] | train | https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/databus-client-common/src/main/java/com/bazaarvoice/emodb/databus/client/DatabusClient.java#L352-L366 |
algolia/algoliasearch-client-java | src/main/java/com/algolia/search/saas/Index.java | Index.deleteBy | public JSONObject deleteBy(Query query, RequestOptions requestOptions) throws AlgoliaException {
"""
Delete all objects matching a query
@param query the query string
@param requestOptions Options to pass to this request
"""
String paramsString = query.getQueryString();
JSONObject body = n... | java | public JSONObject deleteBy(Query query, RequestOptions requestOptions) throws AlgoliaException {
String paramsString = query.getQueryString();
JSONObject body = new JSONObject();
try {
body.put("params", paramsString);
} catch (JSONException e) {
throw new RuntimeException(e);
}
retu... | [
"public",
"JSONObject",
"deleteBy",
"(",
"Query",
"query",
",",
"RequestOptions",
"requestOptions",
")",
"throws",
"AlgoliaException",
"{",
"String",
"paramsString",
"=",
"query",
".",
"getQueryString",
"(",
")",
";",
"JSONObject",
"body",
"=",
"new",
"JSONObject"... | Delete all objects matching a query
@param query the query string
@param requestOptions Options to pass to this request | [
"Delete",
"all",
"objects",
"matching",
"a",
"query"
] | train | https://github.com/algolia/algoliasearch-client-java/blob/a05da2f66c099fe6f77295c7b6a8a12c24e95f9b/src/main/java/com/algolia/search/saas/Index.java#L599-L608 |
aws/aws-sdk-java | aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/Get.java | Get.withKey | public Get withKey(java.util.Map<String, AttributeValue> key) {
"""
<p>
A map of attribute names to <code>AttributeValue</code> objects that specifies the primary key of the item to
retrieve.
</p>
@param key
A map of attribute names to <code>AttributeValue</code> objects that specifies the primary key of th... | java | public Get withKey(java.util.Map<String, AttributeValue> key) {
setKey(key);
return this;
} | [
"public",
"Get",
"withKey",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"AttributeValue",
">",
"key",
")",
"{",
"setKey",
"(",
"key",
")",
";",
"return",
"this",
";",
"}"
] | <p>
A map of attribute names to <code>AttributeValue</code> objects that specifies the primary key of the item to
retrieve.
</p>
@param key
A map of attribute names to <code>AttributeValue</code> objects that specifies the primary key of the item
to retrieve.
@return Returns a reference to this object so that method c... | [
"<p",
">",
"A",
"map",
"of",
"attribute",
"names",
"to",
"<code",
">",
"AttributeValue<",
"/",
"code",
">",
"objects",
"that",
"specifies",
"the",
"primary",
"key",
"of",
"the",
"item",
"to",
"retrieve",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/Get.java#L99-L102 |
ironjacamar/ironjacamar | codegenerator/src/main/java/org/ironjacamar/codegenerator/code/McCodeGen.java | McCodeGen.writeImport | @Override
public void writeImport(Definition def, Writer out) throws IOException {
"""
Output class import
@param def definition
@param out Writer
@throws IOException ioException
"""
out.write("package " + def.getRaPackage() + ";\n\n");
if (def.isSupportEis())
{
out.write("i... | java | @Override
public void writeImport(Definition def, Writer out) throws IOException
{
out.write("package " + def.getRaPackage() + ";\n\n");
if (def.isSupportEis())
{
out.write("import java.io.IOException;\n");
}
out.write("import java.io.PrintWriter;\n");
if (def.isSupp... | [
"@",
"Override",
"public",
"void",
"writeImport",
"(",
"Definition",
"def",
",",
"Writer",
"out",
")",
"throws",
"IOException",
"{",
"out",
".",
"write",
"(",
"\"package \"",
"+",
"def",
".",
"getRaPackage",
"(",
")",
"+",
"\";\\n\\n\"",
")",
";",
"if",
... | Output class import
@param def definition
@param out Writer
@throws IOException ioException | [
"Output",
"class",
"import"
] | train | https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/McCodeGen.java#L131-L163 |
vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java | JsonModelCoder.encodeNullToBlank | public void encodeNullToBlank(Writer writer, T obj) throws IOException {
"""
Encodes the given value into the JSON format, and writes it using the given writer.<br>
Writes "{}" if null is given.
@param writer {@link Writer} to be used for writing value
@param obj Value to encoded
@throws IOException
"""
... | java | public void encodeNullToBlank(Writer writer, T obj) throws IOException {
if (obj == null) {
writer.write("{}");
writer.flush();
return;
}
encodeNullToNull(writer, obj);
} | [
"public",
"void",
"encodeNullToBlank",
"(",
"Writer",
"writer",
",",
"T",
"obj",
")",
"throws",
"IOException",
"{",
"if",
"(",
"obj",
"==",
"null",
")",
"{",
"writer",
".",
"write",
"(",
"\"{}\"",
")",
";",
"writer",
".",
"flush",
"(",
")",
";",
"ret... | Encodes the given value into the JSON format, and writes it using the given writer.<br>
Writes "{}" if null is given.
@param writer {@link Writer} to be used for writing value
@param obj Value to encoded
@throws IOException | [
"Encodes",
"the",
"given",
"value",
"into",
"the",
"JSON",
"format",
"and",
"writes",
"it",
"using",
"the",
"given",
"writer",
".",
"<br",
">",
"Writes",
"{}",
"if",
"null",
"is",
"given",
"."
] | train | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java#L411-L419 |
tvesalainen/util | util/src/main/java/org/vesalainen/ui/Scaler.java | Scaler.getLevelFor | public ScaleLevel getLevelFor(Font font, FontRenderContext frc, DoubleTransform transformer, boolean horizontal, double xy) {
"""
Returns highest level where drawn labels don't overlap
@param font
@param frc
@param transformer
@param horizontal
@param xy Lines constant value
@return
"""
return ge... | java | public ScaleLevel getLevelFor(Font font, FontRenderContext frc, DoubleTransform transformer, boolean horizontal, double xy)
{
return getLevelFor(font, frc, transformer, horizontal, xy, null);
} | [
"public",
"ScaleLevel",
"getLevelFor",
"(",
"Font",
"font",
",",
"FontRenderContext",
"frc",
",",
"DoubleTransform",
"transformer",
",",
"boolean",
"horizontal",
",",
"double",
"xy",
")",
"{",
"return",
"getLevelFor",
"(",
"font",
",",
"frc",
",",
"transformer",... | Returns highest level where drawn labels don't overlap
@param font
@param frc
@param transformer
@param horizontal
@param xy Lines constant value
@return | [
"Returns",
"highest",
"level",
"where",
"drawn",
"labels",
"don",
"t",
"overlap"
] | train | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/ui/Scaler.java#L160-L163 |
phax/ph-commons | ph-commons/src/main/java/com/helger/commons/string/StringHelper.java | StringHelper.containsNone | public static boolean containsNone (@Nullable final String sStr, @Nullable final ICharPredicate aFilter) {
"""
Check if the passed {@link String} contains no character matching the
provided filter.
@param sStr
String to check. May be <code>null</code>.
@param aFilter
The filter to use. May be <code>null</co... | java | public static boolean containsNone (@Nullable final String sStr, @Nullable final ICharPredicate aFilter)
{
final int nLen = getLength (sStr);
if (aFilter == null)
return nLen == 0;
if (nLen > 0)
for (final char c : sStr.toCharArray ())
if (aFilter.test (c))
return false;
... | [
"public",
"static",
"boolean",
"containsNone",
"(",
"@",
"Nullable",
"final",
"String",
"sStr",
",",
"@",
"Nullable",
"final",
"ICharPredicate",
"aFilter",
")",
"{",
"final",
"int",
"nLen",
"=",
"getLength",
"(",
"sStr",
")",
";",
"if",
"(",
"aFilter",
"==... | Check if the passed {@link String} contains no character matching the
provided filter.
@param sStr
String to check. May be <code>null</code>.
@param aFilter
The filter to use. May be <code>null</code>.
@return <code>true</code> if the filter is <code>null</code> and the string
is empty. <code>true</code> if the filter... | [
"Check",
"if",
"the",
"passed",
"{",
"@link",
"String",
"}",
"contains",
"no",
"character",
"matching",
"the",
"provided",
"filter",
"."
] | train | https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L284-L295 |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/processor/http/AddHeadersProcessor.java | AddHeadersProcessor.setHeaders | @SuppressWarnings("unchecked")
public void setHeaders(final Map<String, Object> headers) {
"""
A map of the header key value pairs. Keys are strings and values are either list of strings or a
string.
@param headers the header map
"""
this.headers.clear();
for (Map.Entry<String, Object>... | java | @SuppressWarnings("unchecked")
public void setHeaders(final Map<String, Object> headers) {
this.headers.clear();
for (Map.Entry<String, Object> entry: headers.entrySet()) {
if (entry.getValue() instanceof List) {
List value = (List) entry.getValue();
// ve... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"setHeaders",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"headers",
")",
"{",
"this",
".",
"headers",
".",
"clear",
"(",
")",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
... | A map of the header key value pairs. Keys are strings and values are either list of strings or a
string.
@param headers the header map | [
"A",
"map",
"of",
"the",
"header",
"key",
"value",
"pairs",
".",
"Keys",
"are",
"strings",
"and",
"values",
"are",
"either",
"list",
"of",
"strings",
"or",
"a",
"string",
"."
] | train | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/http/AddHeadersProcessor.java#L66-L85 |
geomajas/geomajas-project-server | impl/src/main/java/org/geomajas/internal/rendering/writer/vml/geometry/PointWriter.java | PointWriter.writeObject | public void writeObject(Object o, GraphicsDocument document, boolean asChild) throws RenderException {
"""
Writes the object to the specified document, optionally creating a child
element. The object in this case should be a point.
@param o the object (of type Point).
@param document the document to write to.... | java | public void writeObject(Object o, GraphicsDocument document, boolean asChild) throws RenderException {
document.writeElement("vml:shape", asChild);
Point p = (Point) o;
String adj = document.getFormatter().format(p.getX()) + ","
+ document.getFormatter().format(p.getY());
document.writeAttribute("adj", adj)... | [
"public",
"void",
"writeObject",
"(",
"Object",
"o",
",",
"GraphicsDocument",
"document",
",",
"boolean",
"asChild",
")",
"throws",
"RenderException",
"{",
"document",
".",
"writeElement",
"(",
"\"vml:shape\"",
",",
"asChild",
")",
";",
"Point",
"p",
"=",
"(",... | Writes the object to the specified document, optionally creating a child
element. The object in this case should be a point.
@param o the object (of type Point).
@param document the document to write to.
@param asChild create child element if true.
@throws RenderException | [
"Writes",
"the",
"object",
"to",
"the",
"specified",
"document",
"optionally",
"creating",
"a",
"child",
"element",
".",
"The",
"object",
"in",
"this",
"case",
"should",
"be",
"a",
"point",
"."
] | train | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/rendering/writer/vml/geometry/PointWriter.java#L38-L44 |
alkacon/opencms-core | src/org/opencms/configuration/CmsSystemConfiguration.java | CmsSystemConfiguration.setHistorySettings | public void setHistorySettings(String historyEnabled, String historyVersions, String historyVersionsAfterDeletion) {
"""
VFS version history settings are set here.<p>
@param historyEnabled if true the history is enabled
@param historyVersions the maximum number of versions that are kept per VFS resource
@para... | java | public void setHistorySettings(String historyEnabled, String historyVersions, String historyVersionsAfterDeletion) {
m_historyEnabled = Boolean.valueOf(historyEnabled).booleanValue();
m_historyVersions = Integer.valueOf(historyVersions).intValue();
m_historyVersionsAfterDeletion = Integer.value... | [
"public",
"void",
"setHistorySettings",
"(",
"String",
"historyEnabled",
",",
"String",
"historyVersions",
",",
"String",
"historyVersionsAfterDeletion",
")",
"{",
"m_historyEnabled",
"=",
"Boolean",
".",
"valueOf",
"(",
"historyEnabled",
")",
".",
"booleanValue",
"("... | VFS version history settings are set here.<p>
@param historyEnabled if true the history is enabled
@param historyVersions the maximum number of versions that are kept per VFS resource
@param historyVersionsAfterDeletion the maximum number of versions for deleted resources | [
"VFS",
"version",
"history",
"settings",
"are",
"set",
"here",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/configuration/CmsSystemConfiguration.java#L2108-L2121 |
cycorp/api-suite | core-api/src/main/java/com/cyc/kb/exception/KbRuntimeException.java | KbRuntimeException.fromThrowable | public static KbRuntimeException fromThrowable(String message, Throwable cause) {
"""
Converts a Throwable to a KbRuntimeException with the specified detail message. If the
Throwable is a KbRuntimeException and if the Throwable's message is identical to the
one supplied, the Throwable will be passed through unmo... | java | public static KbRuntimeException fromThrowable(String message, Throwable cause) {
return (cause instanceof KbRuntimeException && Objects.equals(message, cause.getMessage()))
? (KbRuntimeException) cause
: new KbRuntimeException(message, cause);
} | [
"public",
"static",
"KbRuntimeException",
"fromThrowable",
"(",
"String",
"message",
",",
"Throwable",
"cause",
")",
"{",
"return",
"(",
"cause",
"instanceof",
"KbRuntimeException",
"&&",
"Objects",
".",
"equals",
"(",
"message",
",",
"cause",
".",
"getMessage",
... | Converts a Throwable to a KbRuntimeException with the specified detail message. If the
Throwable is a KbRuntimeException and if the Throwable's message is identical to the
one supplied, the Throwable will be passed through unmodified; otherwise, it will be wrapped in
a new KbRuntimeException with the detail message.
@... | [
"Converts",
"a",
"Throwable",
"to",
"a",
"KbRuntimeException",
"with",
"the",
"specified",
"detail",
"message",
".",
"If",
"the",
"Throwable",
"is",
"a",
"KbRuntimeException",
"and",
"if",
"the",
"Throwable",
"s",
"message",
"is",
"identical",
"to",
"the",
"on... | train | https://github.com/cycorp/api-suite/blob/1d52affabc4635e3715a059e38741712cbdbf2d5/core-api/src/main/java/com/cyc/kb/exception/KbRuntimeException.java#L68-L72 |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java | CrosstabBuilder.addInvisibleMeasure | public CrosstabBuilder addInvisibleMeasure(String property, String className, String title) {
"""
Adds a measure to the crosstab. A crosstab can have many measures. DJ will lay out one measure above
the other.
A measure is what is shown on each intersection of a column and a row. A calculation is performed to
... | java | public CrosstabBuilder addInvisibleMeasure(String property, String className, String title) {
DJCrosstabMeasure measure = new DJCrosstabMeasure(property, className, DJCalculation.NOTHING, title);
measure.setVisible(false);
crosstab.getMeasures().add(measure);
return this;
} | [
"public",
"CrosstabBuilder",
"addInvisibleMeasure",
"(",
"String",
"property",
",",
"String",
"className",
",",
"String",
"title",
")",
"{",
"DJCrosstabMeasure",
"measure",
"=",
"new",
"DJCrosstabMeasure",
"(",
"property",
",",
"className",
",",
"DJCalculation",
"."... | Adds a measure to the crosstab. A crosstab can have many measures. DJ will lay out one measure above
the other.
A measure is what is shown on each intersection of a column and a row. A calculation is performed to
all occurrences in the datasource where the column and row values matches (between elements)
The only dif... | [
"Adds",
"a",
"measure",
"to",
"the",
"crosstab",
".",
"A",
"crosstab",
"can",
"have",
"many",
"measures",
".",
"DJ",
"will",
"lay",
"out",
"one",
"measure",
"above",
"the",
"other",
"."
] | train | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java#L216-L221 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java | ForkJoinPool.tryCreateExternalQueue | private void tryCreateExternalQueue(int index) {
"""
Constructs and tries to install a new external queue,
failing if the workQueues array already has a queue at
the given index.
@param index the index of the new queue
"""
AuxState aux;
if ((aux = auxState) != null && index >= 0) {
... | java | private void tryCreateExternalQueue(int index) {
AuxState aux;
if ((aux = auxState) != null && index >= 0) {
WorkQueue q = new WorkQueue(this, null);
q.config = index;
q.scanState = ~UNSIGNALLED;
q.qlock = 1; // lock queue
boo... | [
"private",
"void",
"tryCreateExternalQueue",
"(",
"int",
"index",
")",
"{",
"AuxState",
"aux",
";",
"if",
"(",
"(",
"aux",
"=",
"auxState",
")",
"!=",
"null",
"&&",
"index",
">=",
"0",
")",
"{",
"WorkQueue",
"q",
"=",
"new",
"WorkQueue",
"(",
"this",
... | Constructs and tries to install a new external queue,
failing if the workQueues array already has a queue at
the given index.
@param index the index of the new queue | [
"Constructs",
"and",
"tries",
"to",
"install",
"a",
"new",
"external",
"queue",
"failing",
"if",
"the",
"workQueues",
"array",
"already",
"has",
"a",
"queue",
"at",
"the",
"given",
"index",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java#L2487-L2514 |
sirthias/pegdown | src/main/java/org/pegdown/Parser.java | Parser.SetextHeading1 | public Rule SetextHeading1() {
"""
vsch: #186 add isSetext flag to header node to distinguish header types
"""
return Sequence(
SetextInline(), push(new HeaderNode(1, popAsNode(), true)),
ZeroOrMore(SetextInline(), addAsChild()),
wrapInAnchor(),
... | java | public Rule SetextHeading1() {
return Sequence(
SetextInline(), push(new HeaderNode(1, popAsNode(), true)),
ZeroOrMore(SetextInline(), addAsChild()),
wrapInAnchor(),
Sp(), Newline(), NOrMore('=', 3), Sp(), Newline()
);
} | [
"public",
"Rule",
"SetextHeading1",
"(",
")",
"{",
"return",
"Sequence",
"(",
"SetextInline",
"(",
")",
",",
"push",
"(",
"new",
"HeaderNode",
"(",
"1",
",",
"popAsNode",
"(",
")",
",",
"true",
")",
")",
",",
"ZeroOrMore",
"(",
"SetextInline",
"(",
")"... | vsch: #186 add isSetext flag to header node to distinguish header types | [
"vsch",
":",
"#186",
"add",
"isSetext",
"flag",
"to",
"header",
"node",
"to",
"distinguish",
"header",
"types"
] | train | https://github.com/sirthias/pegdown/blob/19ca3d3d2bea5df19eb885260ab24f1200a16452/src/main/java/org/pegdown/Parser.java#L284-L291 |
albfernandez/itext2 | src/main/java/com/lowagie/text/pdf/PdfStamperImp.java | PdfStamperImp.setTransition | void setTransition(PdfTransition transition, int page) {
"""
Sets the transition for the page
@param transition the transition object. A <code>null</code> removes the transition
@param page the page where the transition will be applied. The first page is 1
"""
PdfDictionary pg = reader.getPageN(pag... | java | void setTransition(PdfTransition transition, int page) {
PdfDictionary pg = reader.getPageN(page);
if (transition == null)
pg.remove(PdfName.TRANS);
else
pg.put(PdfName.TRANS, transition.getTransitionDictionary());
markUsed(pg);
} | [
"void",
"setTransition",
"(",
"PdfTransition",
"transition",
",",
"int",
"page",
")",
"{",
"PdfDictionary",
"pg",
"=",
"reader",
".",
"getPageN",
"(",
"page",
")",
";",
"if",
"(",
"transition",
"==",
"null",
")",
"pg",
".",
"remove",
"(",
"PdfName",
".",... | Sets the transition for the page
@param transition the transition object. A <code>null</code> removes the transition
@param page the page where the transition will be applied. The first page is 1 | [
"Sets",
"the",
"transition",
"for",
"the",
"page"
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfStamperImp.java#L1432-L1439 |
upwork/java-upwork | src/com/Upwork/api/Routers/Reports/Finance/Billings.java | Billings.getByFreelancersCompany | public JSONObject getByFreelancersCompany(String freelancerCompanyReference, HashMap<String, String> params) throws JSONException {
"""
Generate Billing Reports for a Specific Freelancer's Company
@param freelancerCompanyReference Freelancer's company reference
@param params Parameters
@throws JSONExcepti... | java | public JSONObject getByFreelancersCompany(String freelancerCompanyReference, HashMap<String, String> params) throws JSONException {
return oClient.get("/finreports/v2/provider_companies/" + freelancerCompanyReference + "/billings", params);
} | [
"public",
"JSONObject",
"getByFreelancersCompany",
"(",
"String",
"freelancerCompanyReference",
",",
"HashMap",
"<",
"String",
",",
"String",
">",
"params",
")",
"throws",
"JSONException",
"{",
"return",
"oClient",
".",
"get",
"(",
"\"/finreports/v2/provider_companies/\... | Generate Billing Reports for a Specific Freelancer's Company
@param freelancerCompanyReference Freelancer's company reference
@param params Parameters
@throws JSONException If error occurred
@return {@link JSONObject} | [
"Generate",
"Billing",
"Reports",
"for",
"a",
"Specific",
"Freelancer",
"s",
"Company"
] | train | https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Reports/Finance/Billings.java#L78-L80 |
j256/ormlite-core | src/main/java/com/j256/ormlite/field/DatabaseFieldConfig.java | DatabaseFieldConfig.fromField | public static DatabaseFieldConfig fromField(DatabaseType databaseType, String tableName, Field field)
throws SQLException {
"""
Create and return a config converted from a {@link Field} that may have one of the following annotations:
{@link DatabaseField}, {@link ForeignCollectionField}, or javax.persistence..... | java | public static DatabaseFieldConfig fromField(DatabaseType databaseType, String tableName, Field field)
throws SQLException {
// first we lookup the @DatabaseField annotation
DatabaseField databaseField = field.getAnnotation(DatabaseField.class);
if (databaseField != null) {
if (databaseField.persisted()) {
... | [
"public",
"static",
"DatabaseFieldConfig",
"fromField",
"(",
"DatabaseType",
"databaseType",
",",
"String",
"tableName",
",",
"Field",
"field",
")",
"throws",
"SQLException",
"{",
"// first we lookup the @DatabaseField annotation",
"DatabaseField",
"databaseField",
"=",
"fi... | Create and return a config converted from a {@link Field} that may have one of the following annotations:
{@link DatabaseField}, {@link ForeignCollectionField}, or javax.persistence... | [
"Create",
"and",
"return",
"a",
"config",
"converted",
"from",
"a",
"{"
] | train | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/field/DatabaseFieldConfig.java#L511-L539 |
tango-controls/JTango | server/src/main/java/org/tango/server/admin/AdminDevice.java | AdminDevice.getLoggingLevel | @Command(name = "GetLoggingLevel", inTypeDesc = "Device list", outTypeDesc = "Lg[i]=Logging Level. Str[i]=Device name.")
public DevVarLongStringArray getLoggingLevel(final String[] deviceNames) {
"""
Get the logging level
@param deviceNames
@return the current logging levels
"""
final int[] lev... | java | @Command(name = "GetLoggingLevel", inTypeDesc = "Device list", outTypeDesc = "Lg[i]=Logging Level. Str[i]=Device name.")
public DevVarLongStringArray getLoggingLevel(final String[] deviceNames) {
final int[] levels = new int[deviceNames.length];
for (int i = 0; i < levels.length; i++) {
... | [
"@",
"Command",
"(",
"name",
"=",
"\"GetLoggingLevel\"",
",",
"inTypeDesc",
"=",
"\"Device list\"",
",",
"outTypeDesc",
"=",
"\"Lg[i]=Logging Level. Str[i]=Device name.\"",
")",
"public",
"DevVarLongStringArray",
"getLoggingLevel",
"(",
"final",
"String",
"[",
"]",
"dev... | Get the logging level
@param deviceNames
@return the current logging levels | [
"Get",
"the",
"logging",
"level"
] | train | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/admin/AdminDevice.java#L358-L365 |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/stat/autoscale/autoscalepolicy_stats.java | autoscalepolicy_stats.get | public static autoscalepolicy_stats get(nitro_service service, String name) throws Exception {
"""
Use this API to fetch statistics of autoscalepolicy_stats resource of given name .
"""
autoscalepolicy_stats obj = new autoscalepolicy_stats();
obj.set_name(name);
autoscalepolicy_stats response = (autoscal... | java | public static autoscalepolicy_stats get(nitro_service service, String name) throws Exception{
autoscalepolicy_stats obj = new autoscalepolicy_stats();
obj.set_name(name);
autoscalepolicy_stats response = (autoscalepolicy_stats) obj.stat_resource(service);
return response;
} | [
"public",
"static",
"autoscalepolicy_stats",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"autoscalepolicy_stats",
"obj",
"=",
"new",
"autoscalepolicy_stats",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
... | Use this API to fetch statistics of autoscalepolicy_stats resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"statistics",
"of",
"autoscalepolicy_stats",
"resource",
"of",
"given",
"name",
"."
] | train | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/autoscale/autoscalepolicy_stats.java#L169-L174 |
UrielCh/ovh-java-sdk | ovh-java-sdk-dedicatednas/src/main/java/net/minidev/ovh/api/ApiOvhDedicatednas.java | ApiOvhDedicatednas.serviceName_partition_partitionName_access_ip_GET | public OvhAccess serviceName_partition_partitionName_access_ip_GET(String serviceName, String partitionName, String ip) throws IOException {
"""
Get this object properties
REST: GET /dedicated/nas/{serviceName}/partition/{partitionName}/access/{ip}
@param serviceName [required] The internal name of your storag... | java | public OvhAccess serviceName_partition_partitionName_access_ip_GET(String serviceName, String partitionName, String ip) throws IOException {
String qPath = "/dedicated/nas/{serviceName}/partition/{partitionName}/access/{ip}";
StringBuilder sb = path(qPath, serviceName, partitionName, ip);
String resp = exec(qPath... | [
"public",
"OvhAccess",
"serviceName_partition_partitionName_access_ip_GET",
"(",
"String",
"serviceName",
",",
"String",
"partitionName",
",",
"String",
"ip",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/dedicated/nas/{serviceName}/partition/{partitionName}/ac... | Get this object properties
REST: GET /dedicated/nas/{serviceName}/partition/{partitionName}/access/{ip}
@param serviceName [required] The internal name of your storage
@param partitionName [required] the given name of partition
@param ip [required] the ip in root on storage | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatednas/src/main/java/net/minidev/ovh/api/ApiOvhDedicatednas.java#L165-L170 |
leancloud/java-sdk-all | android-sdk/realtime-android/src/main/java/cn/leancloud/push/AndroidNotificationManager.java | AndroidNotificationManager.processMixNotification | public void processMixNotification(String message, String defaultAction) {
"""
处理混合推送通知栏消息点击后的事件(现在支持小米、魅族,华为不支持)
处理逻辑:如果是自定义 action 的消息点击事件,则发送 broadcast,否则按照 sdk 自有逻辑打开相应的 activity
@param message
"""
if (StringUtil.isEmpty(message)) {
LOGGER.e("message is empty, ignore.");
} else {
Stri... | java | public void processMixNotification(String message, String defaultAction) {
if (StringUtil.isEmpty(message)) {
LOGGER.e("message is empty, ignore.");
} else {
String channel = getChannel(message);
if (channel == null || !containsDefaultPushCallback(channel)) {
channel = AVOSCloud.getApp... | [
"public",
"void",
"processMixNotification",
"(",
"String",
"message",
",",
"String",
"defaultAction",
")",
"{",
"if",
"(",
"StringUtil",
".",
"isEmpty",
"(",
"message",
")",
")",
"{",
"LOGGER",
".",
"e",
"(",
"\"message is empty, ignore.\"",
")",
";",
"}",
"... | 处理混合推送通知栏消息点击后的事件(现在支持小米、魅族,华为不支持)
处理逻辑:如果是自定义 action 的消息点击事件,则发送 broadcast,否则按照 sdk 自有逻辑打开相应的 activity
@param message | [
"处理混合推送通知栏消息点击后的事件(现在支持小米、魅族,华为不支持)",
"处理逻辑:如果是自定义",
"action",
"的消息点击事件,则发送",
"broadcast,否则按照",
"sdk",
"自有逻辑打开相应的",
"activity"
] | train | https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/android-sdk/realtime-android/src/main/java/cn/leancloud/push/AndroidNotificationManager.java#L183-L213 |
spring-projects/spring-security-oauth | spring-security-jwt/src/main/java/org/springframework/security/jwt/JwtHelper.java | JwtHelper.decode | public static Jwt decode(String token) {
"""
Creates a token from an encoded token string.
@param token the (non-null) encoded token (three Base-64 encoded strings separated
by "." characters)
"""
int firstPeriod = token.indexOf('.');
int lastPeriod = token.lastIndexOf('.');
if (firstPeriod <= 0 || ... | java | public static Jwt decode(String token) {
int firstPeriod = token.indexOf('.');
int lastPeriod = token.lastIndexOf('.');
if (firstPeriod <= 0 || lastPeriod <= firstPeriod) {
throw new IllegalArgumentException("JWT must have 3 tokens");
}
CharBuffer buffer = CharBuffer.wrap(token, 0, firstPeriod);
// TODO... | [
"public",
"static",
"Jwt",
"decode",
"(",
"String",
"token",
")",
"{",
"int",
"firstPeriod",
"=",
"token",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"int",
"lastPeriod",
"=",
"token",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"firstPerio... | Creates a token from an encoded token string.
@param token the (non-null) encoded token (three Base-64 encoded strings separated
by "." characters) | [
"Creates",
"a",
"token",
"from",
"an",
"encoded",
"token",
"string",
"."
] | train | https://github.com/spring-projects/spring-security-oauth/blob/bbae0027eceb2c74a21ac26bbc86142dc732ffbe/spring-security-jwt/src/main/java/org/springframework/security/jwt/JwtHelper.java#L44-L73 |
UrielCh/ovh-java-sdk | ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java | ApiOvhXdsl.templateModem_name_GET | public OvhTemplateModem templateModem_name_GET(String name) throws IOException {
"""
Get this object properties
REST: GET /xdsl/templateModem/{name}
@param name [required] Name of the Modem Template
API beta
"""
String qPath = "/xdsl/templateModem/{name}";
StringBuilder sb = path(qPath, name);
Str... | java | public OvhTemplateModem templateModem_name_GET(String name) throws IOException {
String qPath = "/xdsl/templateModem/{name}";
StringBuilder sb = path(qPath, name);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhTemplateModem.class);
} | [
"public",
"OvhTemplateModem",
"templateModem_name_GET",
"(",
"String",
"name",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/xdsl/templateModem/{name}\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qPath",
",",
"name",
")",
";",
"String",
"res... | Get this object properties
REST: GET /xdsl/templateModem/{name}
@param name [required] Name of the Modem Template
API beta | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L122-L127 |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/Record.java | Record.getTime | public Date getTime(int field) throws MPXJException {
"""
Accessor method used to retrieve an Date instance representing the
contents of an individual field. If the field does not exist in the
record, null is returned.
@param field the index number of the field to be retrieved
@return the value of the requir... | java | public Date getTime(int field) throws MPXJException
{
try
{
Date result;
if ((field < m_fields.length) && (m_fields[field].length() != 0))
{
result = m_formats.getTimeFormat().parse(m_fields[field]);
}
else
{
result = null;
... | [
"public",
"Date",
"getTime",
"(",
"int",
"field",
")",
"throws",
"MPXJException",
"{",
"try",
"{",
"Date",
"result",
";",
"if",
"(",
"(",
"field",
"<",
"m_fields",
".",
"length",
")",
"&&",
"(",
"m_fields",
"[",
"field",
"]",
".",
"length",
"(",
")",... | Accessor method used to retrieve an Date instance representing the
contents of an individual field. If the field does not exist in the
record, null is returned.
@param field the index number of the field to be retrieved
@return the value of the required field
@throws MPXJException normally thrown when parsing fails | [
"Accessor",
"method",
"used",
"to",
"retrieve",
"an",
"Date",
"instance",
"representing",
"the",
"contents",
"of",
"an",
"individual",
"field",
".",
"If",
"the",
"field",
"does",
"not",
"exist",
"in",
"the",
"record",
"null",
"is",
"returned",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/Record.java#L316-L338 |
netty/netty | handler/src/main/java/io/netty/handler/ssl/SslContext.java | SslContext.newHandler | public SslHandler newHandler(ByteBufAllocator alloc, Executor delegatedTaskExecutor) {
"""
Creates a new {@link SslHandler}.
<p>If {@link SslProvider#OPENSSL_REFCNT} is used then the returned {@link SslHandler} will release the engine
that is wrapped. If the returned {@link SslHandler} is not inserted into a pip... | java | public SslHandler newHandler(ByteBufAllocator alloc, Executor delegatedTaskExecutor) {
return newHandler(alloc, startTls, delegatedTaskExecutor);
} | [
"public",
"SslHandler",
"newHandler",
"(",
"ByteBufAllocator",
"alloc",
",",
"Executor",
"delegatedTaskExecutor",
")",
"{",
"return",
"newHandler",
"(",
"alloc",
",",
"startTls",
",",
"delegatedTaskExecutor",
")",
";",
"}"
] | Creates a new {@link SslHandler}.
<p>If {@link SslProvider#OPENSSL_REFCNT} is used then the returned {@link SslHandler} will release the engine
that is wrapped. If the returned {@link SslHandler} is not inserted into a pipeline then you may leak native
memory!
<p><b>Beware</b>: the underlying generated {@link SSLEngine... | [
"Creates",
"a",
"new",
"{"
] | train | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslContext.java#L924-L926 |
OpenLiberty/open-liberty | dev/com.ibm.ws.channelfw/src/com/ibm/ws/udpchannel/internal/WorkQueueManager.java | WorkQueueManager.getMultiThreadedWorker | protected MultiThreadedWorker getMultiThreadedWorker(SelectionKey key, long threadIdfWQM) {
"""
Retrieve a MultiThreadedWorker object from the object pool.
@param key
@param threadIdfWQM
@return MultiThreadedWorker
"""
MultiThreadedWorker worker = null;
synchronized (multiThreadedObjectPo... | java | protected MultiThreadedWorker getMultiThreadedWorker(SelectionKey key, long threadIdfWQM) {
MultiThreadedWorker worker = null;
synchronized (multiThreadedObjectPool) {
worker = (MultiThreadedWorker) multiThreadedObjectPool.get();
}
if (worker == null) {
worker =... | [
"protected",
"MultiThreadedWorker",
"getMultiThreadedWorker",
"(",
"SelectionKey",
"key",
",",
"long",
"threadIdfWQM",
")",
"{",
"MultiThreadedWorker",
"worker",
"=",
"null",
";",
"synchronized",
"(",
"multiThreadedObjectPool",
")",
"{",
"worker",
"=",
"(",
"MultiThre... | Retrieve a MultiThreadedWorker object from the object pool.
@param key
@param threadIdfWQM
@return MultiThreadedWorker | [
"Retrieve",
"a",
"MultiThreadedWorker",
"object",
"from",
"the",
"object",
"pool",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/udpchannel/internal/WorkQueueManager.java#L1062-L1075 |
lucee/Lucee | core/src/main/java/lucee/runtime/reflection/Reflector.java | Reflector.getGetter | public static MethodInstance getGetter(Class clazz, String prop) throws PageException, NoSuchMethodException {
"""
to get a Getter Method of a Object
@param clazz Class to invoke method from
@param prop Name of the Method without get
@return return Value of the getter Method
@throws NoSuchMethodException
@t... | java | public static MethodInstance getGetter(Class clazz, String prop) throws PageException, NoSuchMethodException {
String getterName = "get" + StringUtil.ucFirst(prop);
MethodInstance mi = getMethodInstanceEL(null, clazz, KeyImpl.getInstance(getterName), ArrayUtil.OBJECT_EMPTY);
if (mi == null) {
String isName = "... | [
"public",
"static",
"MethodInstance",
"getGetter",
"(",
"Class",
"clazz",
",",
"String",
"prop",
")",
"throws",
"PageException",
",",
"NoSuchMethodException",
"{",
"String",
"getterName",
"=",
"\"get\"",
"+",
"StringUtil",
".",
"ucFirst",
"(",
"prop",
")",
";",
... | to get a Getter Method of a Object
@param clazz Class to invoke method from
@param prop Name of the Method without get
@return return Value of the getter Method
@throws NoSuchMethodException
@throws PageException | [
"to",
"get",
"a",
"Getter",
"Method",
"of",
"a",
"Object"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Reflector.java#L946-L967 |
apache/predictionio-sdk-java | client/src/main/java/org/apache/predictionio/sdk/java/EventClient.java | EventClient.setUser | public String setUser(String uid, Map<String, Object> properties)
throws ExecutionException, InterruptedException, IOException {
"""
Sets properties of a user. Same as {@link #setUser(String, Map, DateTime)} except event time is
not specified and recorded as the time when the function is called.
"""
... | java | public String setUser(String uid, Map<String, Object> properties)
throws ExecutionException, InterruptedException, IOException {
return setUser(uid, properties, new DateTime());
} | [
"public",
"String",
"setUser",
"(",
"String",
"uid",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
")",
"throws",
"ExecutionException",
",",
"InterruptedException",
",",
"IOException",
"{",
"return",
"setUser",
"(",
"uid",
",",
"properties",
","... | Sets properties of a user. Same as {@link #setUser(String, Map, DateTime)} except event time is
not specified and recorded as the time when the function is called. | [
"Sets",
"properties",
"of",
"a",
"user",
".",
"Same",
"as",
"{"
] | train | https://github.com/apache/predictionio-sdk-java/blob/16052c96b136340c175c3f9c2692e720850df219/client/src/main/java/org/apache/predictionio/sdk/java/EventClient.java#L333-L336 |
google/closure-templates | java/src/com/google/template/soy/error/SoyErrors.java | SoyErrors.getClosest | @Nullable
@VisibleForTesting
static String getClosest(Iterable<String> allNames, String wrongName) {
"""
Returns the member of {@code allNames} that is closest to {@code wrongName}, or {@code null} if
{@code allNames} is empty.
<p>The distance metric is a case insensitive Levenshtein distance.
@throws I... | java | @Nullable
@VisibleForTesting
static String getClosest(Iterable<String> allNames, String wrongName) {
// only suggest matches that are closer than this. This magic heuristic is based on what llvm
// and javac do
int shortest = (wrongName.length() + 2) / 3 + 1;
String closestName = null;
for (Str... | [
"@",
"Nullable",
"@",
"VisibleForTesting",
"static",
"String",
"getClosest",
"(",
"Iterable",
"<",
"String",
">",
"allNames",
",",
"String",
"wrongName",
")",
"{",
"// only suggest matches that are closer than this. This magic heuristic is based on what llvm",
"// and javac do... | Returns the member of {@code allNames} that is closest to {@code wrongName}, or {@code null} if
{@code allNames} is empty.
<p>The distance metric is a case insensitive Levenshtein distance.
@throws IllegalArgumentException if {@code wrongName} is a member of {@code allNames} | [
"Returns",
"the",
"member",
"of",
"{",
"@code",
"allNames",
"}",
"that",
"is",
"closest",
"to",
"{",
"@code",
"wrongName",
"}",
"or",
"{",
"@code",
"null",
"}",
"if",
"{",
"@code",
"allNames",
"}",
"is",
"empty",
"."
] | train | https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/error/SoyErrors.java#L69-L90 |
Netflix/conductor | client/src/main/java/com/netflix/conductor/client/http/MetadataClient.java | MetadataClient.getWorkflowDef | public WorkflowDef getWorkflowDef(String name, Integer version) {
"""
Retrieve the workflow definition
@param name the name of the workflow
@param version the version of the workflow def
@return Workflow definition for the given workflow and version
"""
Preconditions.checkArgument(StringUtils.i... | java | public WorkflowDef getWorkflowDef(String name, Integer version) {
Preconditions.checkArgument(StringUtils.isNotBlank(name), "name cannot be blank");
return getForEntity("metadata/workflow/{name}", new Object[]{"version", version}, WorkflowDef.class, name);
} | [
"public",
"WorkflowDef",
"getWorkflowDef",
"(",
"String",
"name",
",",
"Integer",
"version",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"StringUtils",
".",
"isNotBlank",
"(",
"name",
")",
",",
"\"name cannot be blank\"",
")",
";",
"return",
"getForEntit... | Retrieve the workflow definition
@param name the name of the workflow
@param version the version of the workflow def
@return Workflow definition for the given workflow and version | [
"Retrieve",
"the",
"workflow",
"definition"
] | train | https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/MetadataClient.java#L115-L118 |
TheHortonMachine/hortonmachine | gears/src/main/java/org/hortonmachine/gears/utils/files/FileUtilities.java | FileUtilities.deleteFileOrDir | public static boolean deleteFileOrDir( File filehandle ) throws IOException {
"""
Returns true if all deletions were successful. If a deletion fails, the method stops attempting to delete and
returns false.
@param filehandle the file or folder to remove.
@return true if all deletions were successful
@throw... | java | public static boolean deleteFileOrDir( File filehandle ) throws IOException {
if (filehandle.isDirectory()) {
Files.walkFileTree(Paths.get(filehandle.getAbsolutePath()), new SimpleFileVisitor<Path>(){
@Override
public FileVisitResult visitFile( Path file, BasicFileAt... | [
"public",
"static",
"boolean",
"deleteFileOrDir",
"(",
"File",
"filehandle",
")",
"throws",
"IOException",
"{",
"if",
"(",
"filehandle",
".",
"isDirectory",
"(",
")",
")",
"{",
"Files",
".",
"walkFileTree",
"(",
"Paths",
".",
"get",
"(",
"filehandle",
".",
... | Returns true if all deletions were successful. If a deletion fails, the method stops attempting to delete and
returns false.
@param filehandle the file or folder to remove.
@return true if all deletions were successful
@throws IOException | [
"Returns",
"true",
"if",
"all",
"deletions",
"were",
"successful",
".",
"If",
"a",
"deletion",
"fails",
"the",
"method",
"stops",
"attempting",
"to",
"delete",
"and",
"returns",
"false",
"."
] | train | https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/files/FileUtilities.java#L64-L93 |
mcxiaoke/Android-Next | ui/src/main/java/com/mcxiaoke/next/ui/list/AdapterExtend.java | AdapterExtend.getView | @Override
public View getView(int position, View convertView, ViewGroup parent) {
"""
Get a View that displays the data at the specified
position in the data set. In this case, if we are at
the end of the list and we are still in append mode, we
ask for a pending view and return it, plus kick off the
backg... | java | @Override
public View getView(int position, View convertView, ViewGroup parent) {
if (position == super.getCount() && isEnableRefreshing()) {
return (mFooter);
}
return (super.getView(position, convertView, parent));
} | [
"@",
"Override",
"public",
"View",
"getView",
"(",
"int",
"position",
",",
"View",
"convertView",
",",
"ViewGroup",
"parent",
")",
"{",
"if",
"(",
"position",
"==",
"super",
".",
"getCount",
"(",
")",
"&&",
"isEnableRefreshing",
"(",
")",
")",
"{",
"retu... | Get a View that displays the data at the specified
position in the data set. In this case, if we are at
the end of the list and we are still in append mode, we
ask for a pending view and return it, plus kick off the
background task to append more data to the wrapped
adapter.
@param position Position of the item who... | [
"Get",
"a",
"View",
"that",
"displays",
"the",
"data",
"at",
"the",
"specified",
"position",
"in",
"the",
"data",
"set",
".",
"In",
"this",
"case",
"if",
"we",
"are",
"at",
"the",
"end",
"of",
"the",
"list",
"and",
"we",
"are",
"still",
"in",
"append... | train | https://github.com/mcxiaoke/Android-Next/blob/1bfdf99d0b81a849aa0fa6697c53ed673151ca39/ui/src/main/java/com/mcxiaoke/next/ui/list/AdapterExtend.java#L146-L152 |
apache/flink | flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/TableSchema.java | TableSchema.fromTypeInfo | public static TableSchema fromTypeInfo(TypeInformation<?> typeInfo) {
"""
Creates a table schema from a {@link TypeInformation} instance. If the type information is
a {@link CompositeType}, the field names and types for the composite type are used to
construct the {@link TableSchema} instance. Otherwise, a table... | java | public static TableSchema fromTypeInfo(TypeInformation<?> typeInfo) {
if (typeInfo instanceof CompositeType<?>) {
final CompositeType<?> compositeType = (CompositeType<?>) typeInfo;
// get field names and types from composite type
final String[] fieldNames = compositeType.getFieldNames();
final TypeInform... | [
"public",
"static",
"TableSchema",
"fromTypeInfo",
"(",
"TypeInformation",
"<",
"?",
">",
"typeInfo",
")",
"{",
"if",
"(",
"typeInfo",
"instanceof",
"CompositeType",
"<",
"?",
">",
")",
"{",
"final",
"CompositeType",
"<",
"?",
">",
"compositeType",
"=",
"(",... | Creates a table schema from a {@link TypeInformation} instance. If the type information is
a {@link CompositeType}, the field names and types for the composite type are used to
construct the {@link TableSchema} instance. Otherwise, a table schema with a single field
is created. The field name is "f0" and the field type... | [
"Creates",
"a",
"table",
"schema",
"from",
"a",
"{",
"@link",
"TypeInformation",
"}",
"instance",
".",
"If",
"the",
"type",
"information",
"is",
"a",
"{",
"@link",
"CompositeType",
"}",
"the",
"field",
"names",
"and",
"types",
"for",
"the",
"composite",
"t... | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/TableSchema.java#L216-L232 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/config/Config.java | Config.setRingbufferConfigs | public Config setRingbufferConfigs(Map<String, RingbufferConfig> ringbufferConfigs) {
"""
Sets the map of {@link com.hazelcast.ringbuffer.Ringbuffer} configurations,
mapped by config name. The config name may be a pattern with which the
configuration will be obtained in the future.
@param ringbufferConfigs th... | java | public Config setRingbufferConfigs(Map<String, RingbufferConfig> ringbufferConfigs) {
this.ringbufferConfigs.clear();
this.ringbufferConfigs.putAll(ringbufferConfigs);
for (Entry<String, RingbufferConfig> entry : ringbufferConfigs.entrySet()) {
entry.getValue().setName(entry.getKey()... | [
"public",
"Config",
"setRingbufferConfigs",
"(",
"Map",
"<",
"String",
",",
"RingbufferConfig",
">",
"ringbufferConfigs",
")",
"{",
"this",
".",
"ringbufferConfigs",
".",
"clear",
"(",
")",
";",
"this",
".",
"ringbufferConfigs",
".",
"putAll",
"(",
"ringbufferCo... | Sets the map of {@link com.hazelcast.ringbuffer.Ringbuffer} configurations,
mapped by config name. The config name may be a pattern with which the
configuration will be obtained in the future.
@param ringbufferConfigs the ringbuffer configuration map to set
@return this config instance | [
"Sets",
"the",
"map",
"of",
"{",
"@link",
"com",
".",
"hazelcast",
".",
"ringbuffer",
".",
"Ringbuffer",
"}",
"configurations",
"mapped",
"by",
"config",
"name",
".",
"The",
"config",
"name",
"may",
"be",
"a",
"pattern",
"with",
"which",
"the",
"configurat... | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/Config.java#L1296-L1303 |
raydac/java-binary-block-parser | jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java | JBBPDslBuilder.UShortArray | public JBBPDslBuilder UShortArray(final String name, final String sizeExpression) {
"""
Add named fixed unsigned short array which size calculated through expression.
@param name name of the field, if null then anonymous
@param sizeExpression expression to be used to calculate size, must not be null
... | java | public JBBPDslBuilder UShortArray(final String name, final String sizeExpression) {
final Item item = new Item(BinType.USHORT_ARRAY, name, this.byteOrder);
item.sizeExpression = assertExpressionChars(sizeExpression);
this.addItem(item);
return this;
} | [
"public",
"JBBPDslBuilder",
"UShortArray",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"sizeExpression",
")",
"{",
"final",
"Item",
"item",
"=",
"new",
"Item",
"(",
"BinType",
".",
"USHORT_ARRAY",
",",
"name",
",",
"this",
".",
"byteOrder",
")",
... | Add named fixed unsigned short array which size calculated through expression.
@param name name of the field, if null then anonymous
@param sizeExpression expression to be used to calculate size, must not be null
@return the builder instance, must not be null | [
"Add",
"named",
"fixed",
"unsigned",
"short",
"array",
"which",
"size",
"calculated",
"through",
"expression",
"."
] | train | https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java#L1058-L1063 |
Carbonado/Carbonado | src/main/java/com/amazon/carbonado/gen/StorableGenerator.java | StorableGenerator.loadThisProperty | private void loadThisProperty(CodeBuilder b, StorableProperty property) {
"""
Loads the property value of the current storable onto the stack. If the
property is derived the read method is used, otherwise it just loads the
value from the appropriate field.
entry stack: [
exit stack: [value
@param b - {@li... | java | private void loadThisProperty(CodeBuilder b, StorableProperty property) {
loadThisProperty(b, property, TypeDesc.forClass(property.getType()));
} | [
"private",
"void",
"loadThisProperty",
"(",
"CodeBuilder",
"b",
",",
"StorableProperty",
"property",
")",
"{",
"loadThisProperty",
"(",
"b",
",",
"property",
",",
"TypeDesc",
".",
"forClass",
"(",
"property",
".",
"getType",
"(",
")",
")",
")",
";",
"}"
] | Loads the property value of the current storable onto the stack. If the
property is derived the read method is used, otherwise it just loads the
value from the appropriate field.
entry stack: [
exit stack: [value
@param b - {@link CodeBuilder} to which to add the load code
@param property - property to load | [
"Loads",
"the",
"property",
"value",
"of",
"the",
"current",
"storable",
"onto",
"the",
"stack",
".",
"If",
"the",
"property",
"is",
"derived",
"the",
"read",
"method",
"is",
"used",
"otherwise",
"it",
"just",
"loads",
"the",
"value",
"from",
"the",
"appro... | train | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L2061-L2063 |
spotbugs/spotbugs | spotbugs/src/main/java/edu/umd/cs/findbugs/SourceLineAnnotation.java | SourceLineAnnotation.createUnknown | public static SourceLineAnnotation createUnknown(@DottedClassName String className, String sourceFile) {
"""
Factory method to create an unknown source line annotation.
@param className
the class name
@param sourceFile
the source file name
@return the SourceLineAnnotation
"""
return createUnknow... | java | public static SourceLineAnnotation createUnknown(@DottedClassName String className, String sourceFile) {
return createUnknown(className, sourceFile, -1, -1);
} | [
"public",
"static",
"SourceLineAnnotation",
"createUnknown",
"(",
"@",
"DottedClassName",
"String",
"className",
",",
"String",
"sourceFile",
")",
"{",
"return",
"createUnknown",
"(",
"className",
",",
"sourceFile",
",",
"-",
"1",
",",
"-",
"1",
")",
";",
"}"
... | Factory method to create an unknown source line annotation.
@param className
the class name
@param sourceFile
the source file name
@return the SourceLineAnnotation | [
"Factory",
"method",
"to",
"create",
"an",
"unknown",
"source",
"line",
"annotation",
"."
] | train | https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/SourceLineAnnotation.java#L167-L169 |
fhoeben/hsac-fitnesse-fixtures | src/main/java/nl/hsac/fitnesse/fixture/util/FileUtil.java | FileUtil.loadFile | public static String loadFile(String filename) {
"""
Reads content of UTF-8 file on classpath to String.
@param filename file to read.
@return file's content.
@throws IllegalArgumentException if file could not be found.
@throws IllegalStateException if file could not be read.
"""
ClassLoader c... | java | public static String loadFile(String filename) {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
InputStream is = classLoader.getResourceAsStream(filename);
if (is == null) {
throw new IllegalArgumentException("Unable to locate: " + filename);
}
... | [
"public",
"static",
"String",
"loadFile",
"(",
"String",
"filename",
")",
"{",
"ClassLoader",
"classLoader",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getContextClassLoader",
"(",
")",
";",
"InputStream",
"is",
"=",
"classLoader",
".",
"getResourceAsS... | Reads content of UTF-8 file on classpath to String.
@param filename file to read.
@return file's content.
@throws IllegalArgumentException if file could not be found.
@throws IllegalStateException if file could not be read. | [
"Reads",
"content",
"of",
"UTF",
"-",
"8",
"file",
"on",
"classpath",
"to",
"String",
"."
] | train | https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/FileUtil.java#L38-L45 |
ehcache/ehcache3 | impl/src/main/java/org/ehcache/config/builders/CacheConfigurationBuilder.java | CacheConfigurationBuilder.withValueCopier | public CacheConfigurationBuilder<K, V> withValueCopier(Copier<V> valueCopier) {
"""
Adds by-value semantic using the provided {@link Copier} for the value on heap.
<p>
{@link Copier}s are what enable control of by-reference / by-value semantics for on-heap tier.
@param valueCopier the value copier to use
@re... | java | public CacheConfigurationBuilder<K, V> withValueCopier(Copier<V> valueCopier) {
return withCopier(new DefaultCopierConfiguration<>(requireNonNull(valueCopier, "Null value copier"), DefaultCopierConfiguration.Type.VALUE));
} | [
"public",
"CacheConfigurationBuilder",
"<",
"K",
",",
"V",
">",
"withValueCopier",
"(",
"Copier",
"<",
"V",
">",
"valueCopier",
")",
"{",
"return",
"withCopier",
"(",
"new",
"DefaultCopierConfiguration",
"<>",
"(",
"requireNonNull",
"(",
"valueCopier",
",",
"\"N... | Adds by-value semantic using the provided {@link Copier} for the value on heap.
<p>
{@link Copier}s are what enable control of by-reference / by-value semantics for on-heap tier.
@param valueCopier the value copier to use
@return a new builder with the added value copier | [
"Adds",
"by",
"-",
"value",
"semantic",
"using",
"the",
"provided",
"{",
"@link",
"Copier",
"}",
"for",
"the",
"value",
"on",
"heap",
".",
"<p",
">",
"{",
"@link",
"Copier",
"}",
"s",
"are",
"what",
"enable",
"control",
"of",
"by",
"-",
"reference",
... | train | https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/config/builders/CacheConfigurationBuilder.java#L432-L434 |
Azure/azure-sdk-for-java | containerregistry/resource-manager/v2017_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2017_06_01_preview/implementation/ReplicationsInner.java | ReplicationsInner.beginCreateAsync | public Observable<ReplicationInner> beginCreateAsync(String resourceGroupName, String registryName, String replicationName, ReplicationInner replication) {
"""
Creates a replication for a container registry with the specified parameters.
@param resourceGroupName The name of the resource group to which the conta... | java | public Observable<ReplicationInner> beginCreateAsync(String resourceGroupName, String registryName, String replicationName, ReplicationInner replication) {
return beginCreateWithServiceResponseAsync(resourceGroupName, registryName, replicationName, replication).map(new Func1<ServiceResponse<ReplicationInner>, R... | [
"public",
"Observable",
"<",
"ReplicationInner",
">",
"beginCreateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"registryName",
",",
"String",
"replicationName",
",",
"ReplicationInner",
"replication",
")",
"{",
"return",
"beginCreateWithServiceResponseAsync",
... | Creates a replication for a container registry with the specified parameters.
@param resourceGroupName The name of the resource group to which the container registry belongs.
@param registryName The name of the container registry.
@param replicationName The name of the replication.
@param replication The parameters fo... | [
"Creates",
"a",
"replication",
"for",
"a",
"container",
"registry",
"with",
"the",
"specified",
"parameters",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2017_06_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2017_06_01_preview/implementation/ReplicationsInner.java#L323-L330 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/sequence/SequenceManagerHelper.java | SequenceManagerHelper.firstFoundTableName | private static String firstFoundTableName(PersistenceBroker brokerForClass, ClassDescriptor cld) {
"""
try to find the first none null table name for the given class-descriptor.
If cld has extent classes, all of these cld's searched for the first none null
table name.
"""
String name = null;
... | java | private static String firstFoundTableName(PersistenceBroker brokerForClass, ClassDescriptor cld)
{
String name = null;
if (!cld.isInterface() && cld.getFullTableName() != null)
{
return cld.getFullTableName();
}
if (cld.isExtent())
{
C... | [
"private",
"static",
"String",
"firstFoundTableName",
"(",
"PersistenceBroker",
"brokerForClass",
",",
"ClassDescriptor",
"cld",
")",
"{",
"String",
"name",
"=",
"null",
";",
"if",
"(",
"!",
"cld",
".",
"isInterface",
"(",
")",
"&&",
"cld",
".",
"getFullTableN... | try to find the first none null table name for the given class-descriptor.
If cld has extent classes, all of these cld's searched for the first none null
table name. | [
"try",
"to",
"find",
"the",
"first",
"none",
"null",
"table",
"name",
"for",
"the",
"given",
"class",
"-",
"descriptor",
".",
"If",
"cld",
"has",
"extent",
"classes",
"all",
"of",
"these",
"cld",
"s",
"searched",
"for",
"the",
"first",
"none",
"null",
... | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerHelper.java#L220-L238 |
alkacon/opencms-core | src-setup/org/opencms/setup/xml/CmsXmlConfigUpdater.java | CmsXmlConfigUpdater.getConfigFiles | private List<File> getConfigFiles() {
"""
Gets existing config files.
@return the existing config files
"""
String[] filenames = {
"opencms-modules.xml",
"opencms-system.xml",
"opencms-vfs.xml",
"opencms-importexport.xml",
"opencms-sites.x... | java | private List<File> getConfigFiles() {
String[] filenames = {
"opencms-modules.xml",
"opencms-system.xml",
"opencms-vfs.xml",
"opencms-importexport.xml",
"opencms-sites.xml",
"opencms-variables.xml",
"opencms-scheduler.xml",
... | [
"private",
"List",
"<",
"File",
">",
"getConfigFiles",
"(",
")",
"{",
"String",
"[",
"]",
"filenames",
"=",
"{",
"\"opencms-modules.xml\"",
",",
"\"opencms-system.xml\"",
",",
"\"opencms-vfs.xml\"",
",",
"\"opencms-importexport.xml\"",
",",
"\"opencms-sites.xml\"",
",... | Gets existing config files.
@return the existing config files | [
"Gets",
"existing",
"config",
"files",
"."
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/xml/CmsXmlConfigUpdater.java#L274-L294 |
javactic/javactic | src/main/java/com/github/javactic/Accumulation.java | Accumulation.when | @SuppressWarnings("unchecked")
@SafeVarargs
public static <G, ERR> Or<G, Every<ERR>>
when(Or<? extends G, ? extends Every<? extends ERR>> or, Function<? super G, ? extends Validation<ERR>>... validations) {
"""
Enables further validation on an existing accumulating Or by passing validation functions.
@par... | java | @SuppressWarnings("unchecked")
@SafeVarargs
public static <G, ERR> Or<G, Every<ERR>>
when(Or<? extends G, ? extends Every<? extends ERR>> or, Function<? super G, ? extends Validation<ERR>>... validations) {
return when(or, Stream.of(validations));
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"SafeVarargs",
"public",
"static",
"<",
"G",
",",
"ERR",
">",
"Or",
"<",
"G",
",",
"Every",
"<",
"ERR",
">",
">",
"when",
"(",
"Or",
"<",
"?",
"extends",
"G",
",",
"?",
"extends",
"Every",
"<... | Enables further validation on an existing accumulating Or by passing validation functions.
@param <G> the Good type of the argument Or
@param <ERR> the type of the error message contained in the accumulating failure
@param or the accumulating or
@param validations the validation functions
@retur... | [
"Enables",
"further",
"validation",
"on",
"an",
"existing",
"accumulating",
"Or",
"by",
"passing",
"validation",
"functions",
"."
] | train | https://github.com/javactic/javactic/blob/dfa040062178c259c3067fd9b59cb4498022d8bc/src/main/java/com/github/javactic/Accumulation.java#L161-L166 |
bingoohuang/excel2javabeans | src/main/java/com/github/bingoohuang/excel2beans/BeansToExcelOnTemplate.java | BeansToExcelOnTemplate.fixCellValue | private void fixCellValue(MergeRow mergeRowAnn, int fromRow, int col) {
"""
修复合并单元格的数据。
1. 去除指导合并的取值前缀,例如1^a中的1^;
@param mergeRowAnn 纵向合并单元格注解。
@param fromRow 开始合并行索引。
@param col 纵向列索引。
"""
val sep = mergeRowAnn.prefixSeperate();
if (StringUtils.isEmpty(sep)) return;
... | java | private void fixCellValue(MergeRow mergeRowAnn, int fromRow, int col) {
val sep = mergeRowAnn.prefixSeperate();
if (StringUtils.isEmpty(sep)) return;
val cell = sheet.getRow(fromRow).getCell(col);
val old = PoiUtil.getCellStringValue(cell);
val fixed = substringAfterSep(old, sep... | [
"private",
"void",
"fixCellValue",
"(",
"MergeRow",
"mergeRowAnn",
",",
"int",
"fromRow",
",",
"int",
"col",
")",
"{",
"val",
"sep",
"=",
"mergeRowAnn",
".",
"prefixSeperate",
"(",
")",
";",
"if",
"(",
"StringUtils",
".",
"isEmpty",
"(",
"sep",
")",
")",... | 修复合并单元格的数据。
1. 去除指导合并的取值前缀,例如1^a中的1^;
@param mergeRowAnn 纵向合并单元格注解。
@param fromRow 开始合并行索引。
@param col 纵向列索引。 | [
"修复合并单元格的数据。",
"1",
".",
"去除指导合并的取值前缀,例如1^a中的1^",
";"
] | train | https://github.com/bingoohuang/excel2javabeans/blob/db136d460b93b649814366c0d84a982698b96dc3/src/main/java/com/github/bingoohuang/excel2beans/BeansToExcelOnTemplate.java#L197-L206 |
deeplearning4j/deeplearning4j | nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/classification/EvaluationCalibration.java | EvaluationCalibration.getResidualPlot | public Histogram getResidualPlot(int labelClassIdx) {
"""
Get the residual plot, only for examples of the specified class.. The residual plot is defined as a histogram of<br>
|label_i - prob(class_i | input)| for all and examples; for this particular method, only predictions where
i == labelClassIdx are included... | java | public Histogram getResidualPlot(int labelClassIdx) {
String title = "Residual Plot - Predictions for Label Class " + labelClassIdx;
int[] counts = residualPlotByLabelClass.getColumn(labelClassIdx).dup().data().asInt();
return new Histogram(title, 0.0, 1.0, counts);
} | [
"public",
"Histogram",
"getResidualPlot",
"(",
"int",
"labelClassIdx",
")",
"{",
"String",
"title",
"=",
"\"Residual Plot - Predictions for Label Class \"",
"+",
"labelClassIdx",
";",
"int",
"[",
"]",
"counts",
"=",
"residualPlotByLabelClass",
".",
"getColumn",
"(",
"... | Get the residual plot, only for examples of the specified class.. The residual plot is defined as a histogram of<br>
|label_i - prob(class_i | input)| for all and examples; for this particular method, only predictions where
i == labelClassIdx are included.<br>
In general, small residuals indicate a superior classifier ... | [
"Get",
"the",
"residual",
"plot",
"only",
"for",
"examples",
"of",
"the",
"specified",
"class",
"..",
"The",
"residual",
"plot",
"is",
"defined",
"as",
"a",
"histogram",
"of<br",
">",
"|label_i",
"-",
"prob",
"(",
"class_i",
"|",
"input",
")",
"|",
"for"... | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/classification/EvaluationCalibration.java#L443-L447 |
netty/netty | handler/src/main/java/io/netty/handler/ssl/SslContext.java | SslContext.newServerContext | @Deprecated
public static SslContext newServerContext(File certChainFile, File keyFile) throws SSLException {
"""
Creates a new server-side {@link SslContext}.
@param certChainFile an X.509 certificate chain file in PEM format
@param keyFile a PKCS#8 private key file in PEM format
@return a new server-sid... | java | @Deprecated
public static SslContext newServerContext(File certChainFile, File keyFile) throws SSLException {
return newServerContext(certChainFile, keyFile, null);
} | [
"@",
"Deprecated",
"public",
"static",
"SslContext",
"newServerContext",
"(",
"File",
"certChainFile",
",",
"File",
"keyFile",
")",
"throws",
"SSLException",
"{",
"return",
"newServerContext",
"(",
"certChainFile",
",",
"keyFile",
",",
"null",
")",
";",
"}"
] | Creates a new server-side {@link SslContext}.
@param certChainFile an X.509 certificate chain file in PEM format
@param keyFile a PKCS#8 private key file in PEM format
@return a new server-side {@link SslContext}
@deprecated Replaced by {@link SslContextBuilder} | [
"Creates",
"a",
"new",
"server",
"-",
"side",
"{",
"@link",
"SslContext",
"}",
"."
] | train | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslContext.java#L135-L138 |
icode/ameba-utils | src/main/java/ameba/util/bean/BeanMap.java | BeanMap.put | @Override
public Object put(String name, Object value) throws IllegalArgumentException, ClassCastException {
"""
{@inheritDoc}
Sets the bean property with the given name to the given value.
"""
if (bean != null) {
Object oldValue = get(name);
BeanInvoker invoker = getWrit... | java | @Override
public Object put(String name, Object value) throws IllegalArgumentException, ClassCastException {
if (bean != null) {
Object oldValue = get(name);
BeanInvoker invoker = getWriteInvoker(name);
if (invoker == null) {
return null;
}
... | [
"@",
"Override",
"public",
"Object",
"put",
"(",
"String",
"name",
",",
"Object",
"value",
")",
"throws",
"IllegalArgumentException",
",",
"ClassCastException",
"{",
"if",
"(",
"bean",
"!=",
"null",
")",
"{",
"Object",
"oldValue",
"=",
"get",
"(",
"name",
... | {@inheritDoc}
Sets the bean property with the given name to the given value. | [
"{",
"@inheritDoc",
"}"
] | train | https://github.com/icode/ameba-utils/blob/1aad5317a22e546c83dfe2dc0c80a1dc1fa0ea35/src/main/java/ameba/util/bean/BeanMap.java#L255-L278 |
lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageBandMath.java | ImageBandMath.stdDev | public static void stdDev(Planar<GrayU8> input, GrayU8 output, @Nullable GrayU8 avg) {
"""
Computes the standard deviation for each pixel across all bands in the {@link Planar}
image.
@param input Planar image - not modified
@param output Gray scale image containing average pixel values - modified
@para... | java | public static void stdDev(Planar<GrayU8> input, GrayU8 output, @Nullable GrayU8 avg) {
stdDev(input,output,avg,0,input.getNumBands() - 1);
} | [
"public",
"static",
"void",
"stdDev",
"(",
"Planar",
"<",
"GrayU8",
">",
"input",
",",
"GrayU8",
"output",
",",
"@",
"Nullable",
"GrayU8",
"avg",
")",
"{",
"stdDev",
"(",
"input",
",",
"output",
",",
"avg",
",",
"0",
",",
"input",
".",
"getNumBands",
... | Computes the standard deviation for each pixel across all bands in the {@link Planar}
image.
@param input Planar image - not modified
@param output Gray scale image containing average pixel values - modified
@param avg Input Gray scale image containing average image. Can be null | [
"Computes",
"the",
"standard",
"deviation",
"for",
"each",
"pixel",
"across",
"all",
"bands",
"in",
"the",
"{"
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageBandMath.java#L195-L197 |
lessthanoptimal/BoofCV | main/boofcv-types/src/main/java/boofcv/concurrency/BoofConcurrency.java | BoofConcurrency.loopFor | public static void loopFor(int start , int endExclusive , int step , IntConsumer consumer ) {
"""
Concurrent for loop. Each loop with spawn as a thread up to the maximum number of threads.
@param start starting value, inclusive
@param endExclusive ending value, exclusive
@param consumer The consumer
"""
... | java | public static void loopFor(int start , int endExclusive , int step , IntConsumer consumer ) {
try {
int range = endExclusive-start;
pool.submit(() ->IntStream.range(0, range/step).parallel().forEach(i-> consumer.accept(start+i*step))).get();
} catch (InterruptedException | ExecutionException e) {
e.printSt... | [
"public",
"static",
"void",
"loopFor",
"(",
"int",
"start",
",",
"int",
"endExclusive",
",",
"int",
"step",
",",
"IntConsumer",
"consumer",
")",
"{",
"try",
"{",
"int",
"range",
"=",
"endExclusive",
"-",
"start",
";",
"pool",
".",
"submit",
"(",
"(",
"... | Concurrent for loop. Each loop with spawn as a thread up to the maximum number of threads.
@param start starting value, inclusive
@param endExclusive ending value, exclusive
@param consumer The consumer | [
"Concurrent",
"for",
"loop",
".",
"Each",
"loop",
"with",
"spawn",
"as",
"a",
"thread",
"up",
"to",
"the",
"maximum",
"number",
"of",
"threads",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/concurrency/BoofConcurrency.java#L75-L82 |
samskivert/samskivert | src/main/java/com/samskivert/net/PathUtil.java | PathUtil.computeRelativePath | public static String computeRelativePath (File file, File relativeTo)
throws IOException {
"""
Computes a relative path between to Files
@param file the file we're referencing
@param relativeTo the path from which we want to refer to the file
"""
String[] realDirs = getCanonicalPathElements... | java | public static String computeRelativePath (File file, File relativeTo)
throws IOException
{
String[] realDirs = getCanonicalPathElements(file);
String[] relativeToDirs = getCanonicalPathElements(relativeTo);
// Eliminate the common root
int common = 0;
for (; common <... | [
"public",
"static",
"String",
"computeRelativePath",
"(",
"File",
"file",
",",
"File",
"relativeTo",
")",
"throws",
"IOException",
"{",
"String",
"[",
"]",
"realDirs",
"=",
"getCanonicalPathElements",
"(",
"file",
")",
";",
"String",
"[",
"]",
"relativeToDirs",
... | Computes a relative path between to Files
@param file the file we're referencing
@param relativeTo the path from which we want to refer to the file | [
"Computes",
"a",
"relative",
"path",
"between",
"to",
"Files"
] | train | https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/net/PathUtil.java#L82-L109 |
devnied/EMV-NFC-Paycard-Enrollment | library/src/main/java/com/github/devnied/emvnfccard/utils/TrackUtils.java | TrackUtils.extractTrack2EquivalentData | public static EmvTrack2 extractTrack2EquivalentData(final byte[] pRawTrack2) {
"""
Extract track 2 Equivalent data
@param pRawTrack2 Raw track 2 data
@return EmvTrack2 object data or null
"""
EmvTrack2 ret = null;
if (pRawTrack2 != null) {
EmvTrack2 track2 = new EmvTrack2();
track2.setRaw(pRawTr... | java | public static EmvTrack2 extractTrack2EquivalentData(final byte[] pRawTrack2) {
EmvTrack2 ret = null;
if (pRawTrack2 != null) {
EmvTrack2 track2 = new EmvTrack2();
track2.setRaw(pRawTrack2);
String data = BytesUtils.bytesToStringNoSpace(pRawTrack2);
Matcher m = TRACK2_EQUIVALENT_PATTERN.matcher(data);
... | [
"public",
"static",
"EmvTrack2",
"extractTrack2EquivalentData",
"(",
"final",
"byte",
"[",
"]",
"pRawTrack2",
")",
"{",
"EmvTrack2",
"ret",
"=",
"null",
";",
"if",
"(",
"pRawTrack2",
"!=",
"null",
")",
"{",
"EmvTrack2",
"track2",
"=",
"new",
"EmvTrack2",
"("... | Extract track 2 Equivalent data
@param pRawTrack2 Raw track 2 data
@return EmvTrack2 object data or null | [
"Extract",
"track",
"2",
"Equivalent",
"data"
] | train | https://github.com/devnied/EMV-NFC-Paycard-Enrollment/blob/bfbd3960708689154a7a75c8a9a934197d738a5b/library/src/main/java/com/github/devnied/emvnfccard/utils/TrackUtils.java#L70-L96 |
Azure/azure-sdk-for-java | sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java | DatabasesInner.beginResumeAsync | public Observable<Void> beginResumeAsync(String resourceGroupName, String serverName, String databaseName) {
"""
Resumes a data warehouse.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param serv... | java | public Observable<Void> beginResumeAsync(String resourceGroupName, String serverName, String databaseName) {
return beginResumeWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<V... | [
"public",
"Observable",
"<",
"Void",
">",
"beginResumeAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"serverName",
",",
"String",
"databaseName",
")",
"{",
"return",
"beginResumeWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"serverName",
",",
"... | Resumes a data warehouse.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param serverName The name of the server.
@param databaseName The name of the data warehouse to resume.
@throws IllegalArgumentExcep... | [
"Resumes",
"a",
"data",
"warehouse",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java#L439-L446 |
JetBrains/xodus | environment/src/main/java/jetbrains/exodus/tree/patricia/MutableNode.java | MutableNode.addRightChild | void addRightChild(final byte b, @NotNull final MutableNode child) {
"""
Adds child which is greater (i.e. its next byte greater) than any other.
@param b next byte of child suffix.
@param child child node.
"""
final ChildReference right = children.getRight();
if (right != null && (righ... | java | void addRightChild(final byte b, @NotNull final MutableNode child) {
final ChildReference right = children.getRight();
if (right != null && (right.firstByte & 0xff) >= (b & 0xff)) {
throw new IllegalArgumentException();
}
children.putRight(new ChildReferenceMutable(b, child))... | [
"void",
"addRightChild",
"(",
"final",
"byte",
"b",
",",
"@",
"NotNull",
"final",
"MutableNode",
"child",
")",
"{",
"final",
"ChildReference",
"right",
"=",
"children",
".",
"getRight",
"(",
")",
";",
"if",
"(",
"right",
"!=",
"null",
"&&",
"(",
"right",... | Adds child which is greater (i.e. its next byte greater) than any other.
@param b next byte of child suffix.
@param child child node. | [
"Adds",
"child",
"which",
"is",
"greater",
"(",
"i",
".",
"e",
".",
"its",
"next",
"byte",
"greater",
")",
"than",
"any",
"other",
"."
] | train | https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/environment/src/main/java/jetbrains/exodus/tree/patricia/MutableNode.java#L176-L182 |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/Quaternion.java | Quaternion.getAxis | @Pure
public final Vector3f getAxis() {
"""
Replies the rotation axis-angle represented by this quaternion.
@return the rotation axis-angle.
"""
double mag = this.x*this.x + this.y*this.y + this.z*this.z;
if ( mag > EPS ) {
mag = Math.sqrt(mag);
double invMag = 1f/mag;
return new Vector3f(... | java | @Pure
public final Vector3f getAxis() {
double mag = this.x*this.x + this.y*this.y + this.z*this.z;
if ( mag > EPS ) {
mag = Math.sqrt(mag);
double invMag = 1f/mag;
return new Vector3f(
this.x*invMag,
this.y*invMag,
this.z*invMag);
}
return new Vector3f(0f, 0f, 1f);
} | [
"@",
"Pure",
"public",
"final",
"Vector3f",
"getAxis",
"(",
")",
"{",
"double",
"mag",
"=",
"this",
".",
"x",
"*",
"this",
".",
"x",
"+",
"this",
".",
"y",
"*",
"this",
".",
"y",
"+",
"this",
".",
"z",
"*",
"this",
".",
"z",
";",
"if",
"(",
... | Replies the rotation axis-angle represented by this quaternion.
@return the rotation axis-angle. | [
"Replies",
"the",
"rotation",
"axis",
"-",
"angle",
"represented",
"by",
"this",
"quaternion",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/Quaternion.java#L672-L686 |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ReceiveMessageBuilder.java | ReceiveMessageBuilder.headerFragment | public T headerFragment(Object model) {
"""
Expect this message header data as model object which is marshalled to a character sequence using the default object to xml mapper that
is available in Spring bean application context.
@param model
@return
"""
Assert.notNull(applicationContext, "Citrus a... | java | public T headerFragment(Object model) {
Assert.notNull(applicationContext, "Citrus application context is not initialized!");
if (!CollectionUtils.isEmpty(applicationContext.getBeansOfType(Marshaller.class))) {
return headerFragment(model, applicationContext.getBean(Marshaller.class));
... | [
"public",
"T",
"headerFragment",
"(",
"Object",
"model",
")",
"{",
"Assert",
".",
"notNull",
"(",
"applicationContext",
",",
"\"Citrus application context is not initialized!\"",
")",
";",
"if",
"(",
"!",
"CollectionUtils",
".",
"isEmpty",
"(",
"applicationContext",
... | Expect this message header data as model object which is marshalled to a character sequence using the default object to xml mapper that
is available in Spring bean application context.
@param model
@return | [
"Expect",
"this",
"message",
"header",
"data",
"as",
"model",
"object",
"which",
"is",
"marshalled",
"to",
"a",
"character",
"sequence",
"using",
"the",
"default",
"object",
"to",
"xml",
"mapper",
"that",
"is",
"available",
"in",
"Spring",
"bean",
"application... | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ReceiveMessageBuilder.java#L340-L350 |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.jwt/src/com/ibm/ws/security/jwt/utils/TokenBuilder.java | TokenBuilder.createTokenString | public String createTokenString(String builderConfigId) {
"""
create an MP-JWT token using the builder API. Assumes the user is already
authenticated.
@param builderConfigId
- the id of the builder element in server.xml
@return the token string, or null if a mandatory param was null or empty.
"""
try {... | java | public String createTokenString(String builderConfigId) {
try {
return createTokenString(builderConfigId, WSSubject.getRunAsSubject(), null, null);
// JwtBuilder builder = JwtBuilder.create(builderConfigId);
//
// // all the "normal" stuff like issuer, aud, etc. is handled
// // by the builder, we onl... | [
"public",
"String",
"createTokenString",
"(",
"String",
"builderConfigId",
")",
"{",
"try",
"{",
"return",
"createTokenString",
"(",
"builderConfigId",
",",
"WSSubject",
".",
"getRunAsSubject",
"(",
")",
",",
"null",
",",
"null",
")",
";",
"// JwtBuilder builder =... | create an MP-JWT token using the builder API. Assumes the user is already
authenticated.
@param builderConfigId
- the id of the builder element in server.xml
@return the token string, or null if a mandatory param was null or empty. | [
"create",
"an",
"MP",
"-",
"JWT",
"token",
"using",
"the",
"builder",
"API",
".",
"Assumes",
"the",
"user",
"is",
"already",
"authenticated",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jwt/src/com/ibm/ws/security/jwt/utils/TokenBuilder.java#L62-L87 |
baratine/baratine | framework/src/main/java/com/caucho/v5/vfs/Jar.java | Jar.createDepend | public static PersistentDependency createDepend(PathImpl backing, long digest) {
"""
Return a Jar for the path. If the backing already exists, return
the old jar.
"""
Jar jar = create(backing);
return new JarDigestDepend(jar.getJarDepend(), digest);
} | java | public static PersistentDependency createDepend(PathImpl backing, long digest)
{
Jar jar = create(backing);
return new JarDigestDepend(jar.getJarDepend(), digest);
} | [
"public",
"static",
"PersistentDependency",
"createDepend",
"(",
"PathImpl",
"backing",
",",
"long",
"digest",
")",
"{",
"Jar",
"jar",
"=",
"create",
"(",
"backing",
")",
";",
"return",
"new",
"JarDigestDepend",
"(",
"jar",
".",
"getJarDepend",
"(",
")",
","... | Return a Jar for the path. If the backing already exists, return
the old jar. | [
"Return",
"a",
"Jar",
"for",
"the",
"path",
".",
"If",
"the",
"backing",
"already",
"exists",
"return",
"the",
"old",
"jar",
"."
] | train | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/Jar.java#L168-L173 |
hawkular/hawkular-agent | hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/LoggingJBossASClient.java | LoggingJBossASClient.getLoggerLevel | public String getLoggerLevel(String loggerName) throws Exception {
"""
Returns the level of the given logger.
@param loggerName the name of the logger (this is also known as the category name)
@return level of the logger
@throws Exception if the log level could not be obtained (typically because the logger do... | java | public String getLoggerLevel(String loggerName) throws Exception {
Address addr = Address.root().add(SUBSYSTEM, LOGGING, LOGGER, loggerName);
return getStringAttribute("level", addr);
} | [
"public",
"String",
"getLoggerLevel",
"(",
"String",
"loggerName",
")",
"throws",
"Exception",
"{",
"Address",
"addr",
"=",
"Address",
".",
"root",
"(",
")",
".",
"add",
"(",
"SUBSYSTEM",
",",
"LOGGING",
",",
"LOGGER",
",",
"loggerName",
")",
";",
"return"... | Returns the level of the given logger.
@param loggerName the name of the logger (this is also known as the category name)
@return level of the logger
@throws Exception if the log level could not be obtained (typically because the logger doesn't exist) | [
"Returns",
"the",
"level",
"of",
"the",
"given",
"logger",
"."
] | train | https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/LoggingJBossASClient.java#L56-L59 |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/vpc/VpcClient.java | VpcClient.createVpc | public CreateVpcResponse createVpc(String name, String cidr) {
"""
Create a vpc with the specified options.
@param name The name of vpc
@param cidr The CIDR of vpc
@return List of vpcId newly created
"""
CreateVpcRequest request = new CreateVpcRequest();
request.withName(name).withCidr(cidr)... | java | public CreateVpcResponse createVpc(String name, String cidr) {
CreateVpcRequest request = new CreateVpcRequest();
request.withName(name).withCidr(cidr);
return createVpc(request);
} | [
"public",
"CreateVpcResponse",
"createVpc",
"(",
"String",
"name",
",",
"String",
"cidr",
")",
"{",
"CreateVpcRequest",
"request",
"=",
"new",
"CreateVpcRequest",
"(",
")",
";",
"request",
".",
"withName",
"(",
"name",
")",
".",
"withCidr",
"(",
"cidr",
")",... | Create a vpc with the specified options.
@param name The name of vpc
@param cidr The CIDR of vpc
@return List of vpcId newly created | [
"Create",
"a",
"vpc",
"with",
"the",
"specified",
"options",
"."
] | train | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/vpc/VpcClient.java#L156-L160 |
graphhopper/graphhopper | api/src/main/java/com/graphhopper/util/PointList.java | PointList.shallowCopy | public PointList shallowCopy(final int from, final int end, boolean makeImmutable) {
"""
Create a shallow copy of this Pointlist from from to end, excluding end.
@param makeImmutable makes this PointList immutable. If you don't ensure the consistency it might happen that due to changes of this
object, the shal... | java | public PointList shallowCopy(final int from, final int end, boolean makeImmutable) {
if (makeImmutable)
this.makeImmutable();
return new ShallowImmutablePointList(from, end, this);
} | [
"public",
"PointList",
"shallowCopy",
"(",
"final",
"int",
"from",
",",
"final",
"int",
"end",
",",
"boolean",
"makeImmutable",
")",
"{",
"if",
"(",
"makeImmutable",
")",
"this",
".",
"makeImmutable",
"(",
")",
";",
"return",
"new",
"ShallowImmutablePointList"... | Create a shallow copy of this Pointlist from from to end, excluding end.
@param makeImmutable makes this PointList immutable. If you don't ensure the consistency it might happen that due to changes of this
object, the shallow copy might contain incorrect or corrupt data. | [
"Create",
"a",
"shallow",
"copy",
"of",
"this",
"Pointlist",
"from",
"from",
"to",
"end",
"excluding",
"end",
"."
] | train | https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/api/src/main/java/com/graphhopper/util/PointList.java#L521-L525 |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/PubSubInputHandler.java | PubSubInputHandler.sendNotFlushedMessage | @Override
public void sendNotFlushedMessage(SIBUuid8 target, SIBUuid12 streamID, long requestID) {
"""
/*
(non-Javadoc)
@see com.ibm.ws.sib.processor.impl.interfaces.DownstreamControl#sendNotFlushedMessage(com.ibm.ws.sib.utils.SIBUuid12, long)
Not called as flushQuery is processed by PubSubOuptutHandler... | java | @Override
public void sendNotFlushedMessage(SIBUuid8 target, SIBUuid12 streamID, long requestID)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "sendNotFlushedMessage",
new Object[] { target, streamID, new Long(requestID) });
... | [
"@",
"Override",
"public",
"void",
"sendNotFlushedMessage",
"(",
"SIBUuid8",
"target",
",",
"SIBUuid12",
"streamID",
",",
"long",
"requestID",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
... | /*
(non-Javadoc)
@see com.ibm.ws.sib.processor.impl.interfaces.DownstreamControl#sendNotFlushedMessage(com.ibm.ws.sib.utils.SIBUuid12, long)
Not called as flushQuery is processed by PubSubOuptutHandler | [
"/",
"*",
"(",
"non",
"-",
"Javadoc",
")"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/PubSubInputHandler.java#L3245-L3274 |
facebookarchive/hadoop-20 | src/core/org/apache/hadoop/io/compress/Lz4Codec.java | Lz4Codec.createCompressor | @Override
public Compressor createCompressor() {
"""
Create a new {@link Compressor} for use by this {@link CompressionCodec}.
@return a new compressor for use by this codec
"""
if (!isNativeCodeLoaded()) {
throw new RuntimeException("native lz4 library not available");
}
int bufferSize ... | java | @Override
public Compressor createCompressor() {
if (!isNativeCodeLoaded()) {
throw new RuntimeException("native lz4 library not available");
}
int bufferSize = conf.getInt(
IO_COMPRESSION_CODEC_LZ4_BUFFERSIZE_KEY,
IO_COMPRESSION_CODEC_LZ4_BUFFERSIZE_DEFAULT);
boolean useLz4HC = ... | [
"@",
"Override",
"public",
"Compressor",
"createCompressor",
"(",
")",
"{",
"if",
"(",
"!",
"isNativeCodeLoaded",
"(",
")",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"native lz4 library not available\"",
")",
";",
"}",
"int",
"bufferSize",
"=",
"conf"... | Create a new {@link Compressor} for use by this {@link CompressionCodec}.
@return a new compressor for use by this codec | [
"Create",
"a",
"new",
"{",
"@link",
"Compressor",
"}",
"for",
"use",
"by",
"this",
"{",
"@link",
"CompressionCodec",
"}",
"."
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/io/compress/Lz4Codec.java#L146-L158 |
dustin/java-memcached-client | src/main/java/net/spy/memcached/internal/OperationFuture.java | OperationFuture.getCas | public Long getCas() {
"""
Get the CAS for this operation.
The interrupted status of the current thread is cleared by this method.
Inspect the returned OperationStatus to check whether an interruption has taken place.
@throws UnsupportedOperationException If this is for an ASCII protocol
configured client.... | java | public Long getCas() {
if (cas == null) {
try {
get();
} catch (InterruptedException e) {
status = new OperationStatus(false, "Interrupted", StatusCode.INTERRUPTED);
} catch (ExecutionException e) {
getLogger().warn("Error getting cas of operation", e);
}
}
if... | [
"public",
"Long",
"getCas",
"(",
")",
"{",
"if",
"(",
"cas",
"==",
"null",
")",
"{",
"try",
"{",
"get",
"(",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"e",
")",
"{",
"status",
"=",
"new",
"OperationStatus",
"(",
"false",
",",
"\"Interrupte... | Get the CAS for this operation.
The interrupted status of the current thread is cleared by this method.
Inspect the returned OperationStatus to check whether an interruption has taken place.
@throws UnsupportedOperationException If this is for an ASCII protocol
configured client.
@return the CAS for this operation or... | [
"Get",
"the",
"CAS",
"for",
"this",
"operation",
"."
] | train | https://github.com/dustin/java-memcached-client/blob/c232307ad8e0c7ccc926e495dd7d5aad2d713318/src/main/java/net/spy/memcached/internal/OperationFuture.java#L218-L233 |
Azure/azure-sdk-for-java | mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java | ContentKeyAuthorizationPolicy.unlinkOptions | public static EntityUnlinkOperation unlinkOptions(String contentKeyAuthorizationPolicyId,
String contentKeyAuthorizationPolicyOptionId) {
"""
Unlink content key authorization policy options.
@param assetId
the asset id
@param adpId
the Asset Delivery Policy id
@return the entity action operation... | java | public static EntityUnlinkOperation unlinkOptions(String contentKeyAuthorizationPolicyId,
String contentKeyAuthorizationPolicyOptionId) {
return new EntityUnlinkOperation(ENTITY_SET, contentKeyAuthorizationPolicyId, "Options", contentKeyAuthorizationPolicyOptionId);
} | [
"public",
"static",
"EntityUnlinkOperation",
"unlinkOptions",
"(",
"String",
"contentKeyAuthorizationPolicyId",
",",
"String",
"contentKeyAuthorizationPolicyOptionId",
")",
"{",
"return",
"new",
"EntityUnlinkOperation",
"(",
"ENTITY_SET",
",",
"contentKeyAuthorizationPolicyId",
... | Unlink content key authorization policy options.
@param assetId
the asset id
@param adpId
the Asset Delivery Policy id
@return the entity action operation | [
"Unlink",
"content",
"key",
"authorization",
"policy",
"options",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java#L160-L163 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java | ModelsImpl.getHierarchicalEntityRole | public EntityRole getHierarchicalEntityRole(UUID appId, String versionId, UUID hEntityId, UUID roleId) {
"""
Get one entity role for a given entity.
@param appId The application ID.
@param versionId The version ID.
@param hEntityId The hierarchical entity extractor ID.
@param roleId entity role ID.
@throws ... | java | public EntityRole getHierarchicalEntityRole(UUID appId, String versionId, UUID hEntityId, UUID roleId) {
return getHierarchicalEntityRoleWithServiceResponseAsync(appId, versionId, hEntityId, roleId).toBlocking().single().body();
} | [
"public",
"EntityRole",
"getHierarchicalEntityRole",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"UUID",
"hEntityId",
",",
"UUID",
"roleId",
")",
"{",
"return",
"getHierarchicalEntityRoleWithServiceResponseAsync",
"(",
"appId",
",",
"versionId",
",",
"hEnti... | Get one entity role for a given entity.
@param appId The application ID.
@param versionId The version ID.
@param hEntityId The hierarchical entity extractor ID.
@param roleId entity role ID.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws ErrorResponseException thrown if the request i... | [
"Get",
"one",
"entity",
"role",
"for",
"a",
"given",
"entity",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L13160-L13162 |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java | ClassicLayoutManager.setTextAndClassToExpression | protected void setTextAndClassToExpression(JRDesignExpression expression, DJGroupVariable var, AbstractColumn col, String variableName) {
"""
If a variable has a DJValueFormatter, we must use it in the expression, otherwise, use plain $V{...}
@param expression
@param var
@param col
@param variableName
"""
... | java | protected void setTextAndClassToExpression(JRDesignExpression expression, DJGroupVariable var, AbstractColumn col, String variableName) {
if (var.getValueFormatter() != null){
expression.setText(var.getTextForValueFormatterExpression(variableName));
expression.setValueClassName(var.getValueFormatter().getClass... | [
"protected",
"void",
"setTextAndClassToExpression",
"(",
"JRDesignExpression",
"expression",
",",
"DJGroupVariable",
"var",
",",
"AbstractColumn",
"col",
",",
"String",
"variableName",
")",
"{",
"if",
"(",
"var",
".",
"getValueFormatter",
"(",
")",
"!=",
"null",
"... | If a variable has a DJValueFormatter, we must use it in the expression, otherwise, use plain $V{...}
@param expression
@param var
@param col
@param variableName | [
"If",
"a",
"variable",
"has",
"a",
"DJValueFormatter",
"we",
"must",
"use",
"it",
"in",
"the",
"expression",
"otherwise",
"use",
"plain",
"$V",
"{",
"...",
"}"
] | train | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java#L1194-L1209 |
Azure/azure-sdk-for-java | edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/StorageAccountCredentialsInner.java | StorageAccountCredentialsInner.beginCreateOrUpdate | public StorageAccountCredentialInner beginCreateOrUpdate(String deviceName, String name, String resourceGroupName, StorageAccountCredentialInner storageAccountCredential) {
"""
Creates or updates the storage account credential.
@param deviceName The device name.
@param name The storage account credential name.... | java | public StorageAccountCredentialInner beginCreateOrUpdate(String deviceName, String name, String resourceGroupName, StorageAccountCredentialInner storageAccountCredential) {
return beginCreateOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroupName, storageAccountCredential).toBlocking().single().bod... | [
"public",
"StorageAccountCredentialInner",
"beginCreateOrUpdate",
"(",
"String",
"deviceName",
",",
"String",
"name",
",",
"String",
"resourceGroupName",
",",
"StorageAccountCredentialInner",
"storageAccountCredential",
")",
"{",
"return",
"beginCreateOrUpdateWithServiceResponseA... | Creates or updates the storage account credential.
@param deviceName The device name.
@param name The storage account credential name.
@param resourceGroupName The resource group name.
@param storageAccountCredential The storage account credential.
@throws IllegalArgumentException thrown if parameters fail the validat... | [
"Creates",
"or",
"updates",
"the",
"storage",
"account",
"credential",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/StorageAccountCredentialsInner.java#L406-L408 |
Azure/azure-sdk-for-java | labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabsInner.java | LabsInner.addUsersAsync | public Observable<Void> addUsersAsync(String resourceGroupName, String labAccountName, String labName, List<String> emailAddresses) {
"""
Add users to a lab.
@param resourceGroupName The name of the resource group.
@param labAccountName The name of the lab Account.
@param labName The name of the lab.
@param ... | java | public Observable<Void> addUsersAsync(String resourceGroupName, String labAccountName, String labName, List<String> emailAddresses) {
return addUsersWithServiceResponseAsync(resourceGroupName, labAccountName, labName, emailAddresses).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
... | [
"public",
"Observable",
"<",
"Void",
">",
"addUsersAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"labAccountName",
",",
"String",
"labName",
",",
"List",
"<",
"String",
">",
"emailAddresses",
")",
"{",
"return",
"addUsersWithServiceResponseAsync",
"(",
... | Add users to a lab.
@param resourceGroupName The name of the resource group.
@param labAccountName The name of the lab Account.
@param labName The name of the lab.
@param emailAddresses List of user emails addresses to add to the lab.
@throws IllegalArgumentException thrown if parameters fail the validation
@return th... | [
"Add",
"users",
"to",
"a",
"lab",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabsInner.java#L964-L971 |
rundeck/rundeck | core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java | JarPluginProviderLoader.createCachedJar | protected File createCachedJar(final File dir, final String jarName) throws PluginException {
"""
Creates a single cached version of the pluginJar located within pluginJarCacheDirectory
deleting all existing versions of pluginJar
@param jarName
"""
File cachedJar;
try {
cachedJar ... | java | protected File createCachedJar(final File dir, final String jarName) throws PluginException {
File cachedJar;
try {
cachedJar = new File(dir, jarName);
cachedJar.deleteOnExit();
FileUtils.fileCopy(pluginJar, cachedJar, true);
} catch (IOException e) {
... | [
"protected",
"File",
"createCachedJar",
"(",
"final",
"File",
"dir",
",",
"final",
"String",
"jarName",
")",
"throws",
"PluginException",
"{",
"File",
"cachedJar",
";",
"try",
"{",
"cachedJar",
"=",
"new",
"File",
"(",
"dir",
",",
"jarName",
")",
";",
"cac... | Creates a single cached version of the pluginJar located within pluginJarCacheDirectory
deleting all existing versions of pluginJar
@param jarName | [
"Creates",
"a",
"single",
"cached",
"version",
"of",
"the",
"pluginJar",
"located",
"within",
"pluginJarCacheDirectory",
"deleting",
"all",
"existing",
"versions",
"of",
"pluginJar"
] | train | https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L405-L415 |
Alluxio/alluxio | core/common/src/main/java/alluxio/concurrent/jsr/CompletableFuture.java | CompletableFuture.orpush | final void orpush(CompletableFuture<?> b, BiCompletion<?, ?, ?> c) {
"""
Pushes completion to this and b unless either done. Caller should first check that result and
b.result are both null.
"""
if (c != null) {
while (!tryPushStack(c)) {
if (result != null) {
lazySetNext(c, null);... | java | final void orpush(CompletableFuture<?> b, BiCompletion<?, ?, ?> c) {
if (c != null) {
while (!tryPushStack(c)) {
if (result != null) {
lazySetNext(c, null);
break;
}
}
if (result != null)
c.tryFire(SYNC);
else
b.unipush(new CoCompletion(c))... | [
"final",
"void",
"orpush",
"(",
"CompletableFuture",
"<",
"?",
">",
"b",
",",
"BiCompletion",
"<",
"?",
",",
"?",
",",
"?",
">",
"c",
")",
"{",
"if",
"(",
"c",
"!=",
"null",
")",
"{",
"while",
"(",
"!",
"tryPushStack",
"(",
"c",
")",
")",
"{",
... | Pushes completion to this and b unless either done. Caller should first check that result and
b.result are both null. | [
"Pushes",
"completion",
"to",
"this",
"and",
"b",
"unless",
"either",
"done",
".",
"Caller",
"should",
"first",
"check",
"that",
"result",
"and",
"b",
".",
"result",
"are",
"both",
"null",
"."
] | train | https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/concurrent/jsr/CompletableFuture.java#L1185-L1198 |
kiegroup/jbpm | jbpm-human-task/jbpm-human-task-audit/src/main/java/org/jbpm/services/task/lifecycle/listeners/BAMTaskEventListener.java | BAMTaskEventListener.createTask | protected BAMTaskSummaryImpl createTask(TaskEvent event, Status newStatus, BAMTaskWorker worker) {
"""
Creates or updates a bam task summary instance.
@param ti The source task
@param newStatus The new state for the task.
@param worker Perform additional operations to the bam task summary instance.
@return T... | java | protected BAMTaskSummaryImpl createTask(TaskEvent event, Status newStatus, BAMTaskWorker worker) {
BAMTaskSummaryImpl result = null;
Task ti = event.getTask();
TaskPersistenceContext persistenceContext = getPersistenceContext(((TaskContext)event.getTaskContext()).getPersistenceContext());
... | [
"protected",
"BAMTaskSummaryImpl",
"createTask",
"(",
"TaskEvent",
"event",
",",
"Status",
"newStatus",
",",
"BAMTaskWorker",
"worker",
")",
"{",
"BAMTaskSummaryImpl",
"result",
"=",
"null",
";",
"Task",
"ti",
"=",
"event",
".",
"getTask",
"(",
")",
";",
"Task... | Creates or updates a bam task summary instance.
@param ti The source task
@param newStatus The new state for the task.
@param worker Perform additional operations to the bam task summary instance.
@return The created or updated bam task summary instance. | [
"Creates",
"or",
"updates",
"a",
"bam",
"task",
"summary",
"instance",
"."
] | train | https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-human-task/jbpm-human-task-audit/src/main/java/org/jbpm/services/task/lifecycle/listeners/BAMTaskEventListener.java#L218-L244 |
weld/core | impl/src/main/java/org/jboss/weld/resolution/TypeSafeResolver.java | TypeSafeResolver.resolve | public F resolve(R resolvable, boolean cache) {
"""
Get the possible beans for the given element
@param resolvable The resolving criteria
@return An unmodifiable set of matching beans
"""
R wrappedResolvable = wrap(resolvable);
if (cache) {
return resolved.getValue(wrappedResolv... | java | public F resolve(R resolvable, boolean cache) {
R wrappedResolvable = wrap(resolvable);
if (cache) {
return resolved.getValue(wrappedResolvable);
} else {
return resolverFunction.apply(wrappedResolvable);
}
} | [
"public",
"F",
"resolve",
"(",
"R",
"resolvable",
",",
"boolean",
"cache",
")",
"{",
"R",
"wrappedResolvable",
"=",
"wrap",
"(",
"resolvable",
")",
";",
"if",
"(",
"cache",
")",
"{",
"return",
"resolved",
".",
"getValue",
"(",
"wrappedResolvable",
")",
"... | Get the possible beans for the given element
@param resolvable The resolving criteria
@return An unmodifiable set of matching beans | [
"Get",
"the",
"possible",
"beans",
"for",
"the",
"given",
"element"
] | train | https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/resolution/TypeSafeResolver.java#L85-L92 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.