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 |
|---|---|---|---|---|---|---|---|---|---|---|
EdwardRaff/JSAT | JSAT/src/jsat/linear/RowColumnOps.java | RowColumnOps.divRow | public static void divRow(Matrix A, int i, int start, int to, double c) {
"""
Updates the values of row <tt>i</tt> in the given matrix to be A[i,:] = A[i,:] / c
@param A the matrix to perform he update on
@param i the row to update
@param start the first index of the row to update from (inclusive)
@param to ... | java | public static void divRow(Matrix A, int i, int start, int to, double c)
{
for(int j = start; j < to; j++)
A.set(i, j, A.get(i, j)/c);
} | [
"public",
"static",
"void",
"divRow",
"(",
"Matrix",
"A",
",",
"int",
"i",
",",
"int",
"start",
",",
"int",
"to",
",",
"double",
"c",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"start",
";",
"j",
"<",
"to",
";",
"j",
"++",
")",
"A",
".",
"set",
... | Updates the values of row <tt>i</tt> in the given matrix to be A[i,:] = A[i,:] / c
@param A the matrix to perform he update on
@param i the row to update
@param start the first index of the row to update from (inclusive)
@param to the last index of the row to update (exclusive)
@param c the constant to divide each ele... | [
"Updates",
"the",
"values",
"of",
"row",
"<tt",
">",
"i<",
"/",
"tt",
">",
"in",
"the",
"given",
"matrix",
"to",
"be",
"A",
"[",
"i",
":",
"]",
"=",
"A",
"[",
"i",
":",
"]",
"/",
"c"
] | train | https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/linear/RowColumnOps.java#L150-L154 |
alkacon/opencms-core | src/org/opencms/importexport/CmsImportVersion7.java | CmsImportVersion7.addAccountsGroupRules | protected void addAccountsGroupRules(Digester digester, String xpath) {
"""
Adds the XML digester rules for groups.<p>
@param digester the digester to add the rules to
@param xpath the base xpath for the rules
"""
String xp_group = xpath + N_GROUPS + "/" + N_GROUP;
digester.addCallMethod(x... | java | protected void addAccountsGroupRules(Digester digester, String xpath) {
String xp_group = xpath + N_GROUPS + "/" + N_GROUP;
digester.addCallMethod(xp_group, "importGroup");
xp_group += "/";
digester.addCallMethod(xp_group + N_NAME, "setGroupName", 0);
digester.addCallMethod(xp_g... | [
"protected",
"void",
"addAccountsGroupRules",
"(",
"Digester",
"digester",
",",
"String",
"xpath",
")",
"{",
"String",
"xp_group",
"=",
"xpath",
"+",
"N_GROUPS",
"+",
"\"/\"",
"+",
"N_GROUP",
";",
"digester",
".",
"addCallMethod",
"(",
"xp_group",
",",
"\"impo... | Adds the XML digester rules for groups.<p>
@param digester the digester to add the rules to
@param xpath the base xpath for the rules | [
"Adds",
"the",
"XML",
"digester",
"rules",
"for",
"groups",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/CmsImportVersion7.java#L2976-L2985 |
iipc/webarchive-commons | src/main/java/org/archive/util/DevUtils.java | DevUtils.warnHandle | public static void warnHandle(Throwable ex, String note) {
"""
Log a warning message to the logger 'org.archive.util.DevUtils' made of
the passed 'note' and a stack trace based off passed exception.
@param ex Exception we print a stacktrace on.
@param note Message to print ahead of the stacktrace.
"""
... | java | public static void warnHandle(Throwable ex, String note) {
logger.warning(TextUtils.exceptionToString(note, ex));
} | [
"public",
"static",
"void",
"warnHandle",
"(",
"Throwable",
"ex",
",",
"String",
"note",
")",
"{",
"logger",
".",
"warning",
"(",
"TextUtils",
".",
"exceptionToString",
"(",
"note",
",",
"ex",
")",
")",
";",
"}"
] | Log a warning message to the logger 'org.archive.util.DevUtils' made of
the passed 'note' and a stack trace based off passed exception.
@param ex Exception we print a stacktrace on.
@param note Message to print ahead of the stacktrace. | [
"Log",
"a",
"warning",
"message",
"to",
"the",
"logger",
"org",
".",
"archive",
".",
"util",
".",
"DevUtils",
"made",
"of",
"the",
"passed",
"note",
"and",
"a",
"stack",
"trace",
"based",
"off",
"passed",
"exception",
"."
] | train | https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/util/DevUtils.java#L46-L48 |
netty/netty | codec/src/main/java/io/netty/handler/codec/HeadersUtils.java | HeadersUtils.getAsString | public static <K, V> String getAsString(Headers<K, V, ?> headers, K name) {
"""
{@link Headers#get(Object)} and convert the result to a {@link String}.
@param headers the headers to get the {@code name} from
@param name the name of the header to retrieve
@return the first header value if the header is found. {@... | java | public static <K, V> String getAsString(Headers<K, V, ?> headers, K name) {
V orig = headers.get(name);
return orig != null ? orig.toString() : null;
} | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"String",
"getAsString",
"(",
"Headers",
"<",
"K",
",",
"V",
",",
"?",
">",
"headers",
",",
"K",
"name",
")",
"{",
"V",
"orig",
"=",
"headers",
".",
"get",
"(",
"name",
")",
";",
"return",
"orig",
"!... | {@link Headers#get(Object)} and convert the result to a {@link String}.
@param headers the headers to get the {@code name} from
@param name the name of the header to retrieve
@return the first header value if the header is found. {@code null} if there's no such entry. | [
"{"
] | train | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/HeadersUtils.java#L63-L66 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/util/hashslot/impl/HashSlotArrayBase.java | HashSlotArrayBase.move | private long move(long fromBaseAddress, long capacity, MemoryAllocator fromMalloc, MemoryAllocator toMalloc) {
"""
Copies a block from one allocator to another, then frees the source block.
"""
final long allocatedSize = HEADER_SIZE + capacity * slotLength;
final long toBaseAddress = toMalloc.a... | java | private long move(long fromBaseAddress, long capacity, MemoryAllocator fromMalloc, MemoryAllocator toMalloc) {
final long allocatedSize = HEADER_SIZE + capacity * slotLength;
final long toBaseAddress = toMalloc.allocate(allocatedSize) + HEADER_SIZE;
mem.copyMemory(fromBaseAddress - HEADER_SIZE, ... | [
"private",
"long",
"move",
"(",
"long",
"fromBaseAddress",
",",
"long",
"capacity",
",",
"MemoryAllocator",
"fromMalloc",
",",
"MemoryAllocator",
"toMalloc",
")",
"{",
"final",
"long",
"allocatedSize",
"=",
"HEADER_SIZE",
"+",
"capacity",
"*",
"slotLength",
";",
... | Copies a block from one allocator to another, then frees the source block. | [
"Copies",
"a",
"block",
"from",
"one",
"allocator",
"to",
"another",
"then",
"frees",
"the",
"source",
"block",
"."
] | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/hashslot/impl/HashSlotArrayBase.java#L473-L479 |
alkacon/opencms-core | src/org/opencms/xml/content/CmsXmlContentPropertyHelper.java | CmsXmlContentPropertyHelper.saveProperties | public static void saveProperties(
CmsObject cms,
Element parentElement,
Map<String, String> properties,
Map<String, CmsXmlContentProperty> propertiesConf) {
"""
Saves the given properties to the given xml element.<p>
@param cms the current CMS context
@param parentElement the p... | java | public static void saveProperties(
CmsObject cms,
Element parentElement,
Map<String, String> properties,
Map<String, CmsXmlContentProperty> propertiesConf) {
// remove old entries
for (Object propElement : parentElement.elements(CmsXmlContentProperty.XmlNode.Properties.n... | [
"public",
"static",
"void",
"saveProperties",
"(",
"CmsObject",
"cms",
",",
"Element",
"parentElement",
",",
"Map",
"<",
"String",
",",
"String",
">",
"properties",
",",
"Map",
"<",
"String",
",",
"CmsXmlContentProperty",
">",
"propertiesConf",
")",
"{",
"// r... | Saves the given properties to the given xml element.<p>
@param cms the current CMS context
@param parentElement the parent xml element
@param properties the properties to save, if there is a list of resources, every entry can be a site path or a UUID
@param propertiesConf the configuration of the properties | [
"Saves",
"the",
"given",
"properties",
"to",
"the",
"given",
"xml",
"element",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsXmlContentPropertyHelper.java#L724-L763 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java | Instance.setMetadata | public Operation setMetadata(Map<String, String> metadata, OperationOption... options) {
"""
Sets the metadata for this instance, fingerprint value is taken from this instance's {@code
tags().fingerprint()}.
@return a zone operation if the set request was issued correctly, {@code null} if the instance
was not... | java | public Operation setMetadata(Map<String, String> metadata, OperationOption... options) {
return setMetadata(getMetadata().toBuilder().setValues(metadata).build(), options);
} | [
"public",
"Operation",
"setMetadata",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"metadata",
",",
"OperationOption",
"...",
"options",
")",
"{",
"return",
"setMetadata",
"(",
"getMetadata",
"(",
")",
".",
"toBuilder",
"(",
")",
".",
"setValues",
"(",
"... | Sets the metadata for this instance, fingerprint value is taken from this instance's {@code
tags().fingerprint()}.
@return a zone operation if the set request was issued correctly, {@code null} if the instance
was not found
@throws ComputeException upon failure | [
"Sets",
"the",
"metadata",
"for",
"this",
"instance",
"fingerprint",
"value",
"is",
"taken",
"from",
"this",
"instance",
"s",
"{",
"@code",
"tags",
"()",
".",
"fingerprint",
"()",
"}",
"."
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java#L371-L373 |
docusign/docusign-java-client | src/main/java/com/docusign/esign/api/EnvelopesApi.java | EnvelopesApi.getEnvelope | public Envelope getEnvelope(String accountId, String envelopeId) throws ApiException {
"""
Gets the status of a envelope.
Retrieves the overall status for the specified envelope.
@param accountId The external account number (int) or account ID Guid. (required)
@param envelopeId The envelopeId Guid of the envelo... | java | public Envelope getEnvelope(String accountId, String envelopeId) throws ApiException {
return getEnvelope(accountId, envelopeId, null);
} | [
"public",
"Envelope",
"getEnvelope",
"(",
"String",
"accountId",
",",
"String",
"envelopeId",
")",
"throws",
"ApiException",
"{",
"return",
"getEnvelope",
"(",
"accountId",
",",
"envelopeId",
",",
"null",
")",
";",
"}"
] | Gets the status of a envelope.
Retrieves the overall status for the specified envelope.
@param accountId The external account number (int) or account ID Guid. (required)
@param envelopeId The envelopeId Guid of the envelope being accessed. (required)
@return Envelope | [
"Gets",
"the",
"status",
"of",
"a",
"envelope",
".",
"Retrieves",
"the",
"overall",
"status",
"for",
"the",
"specified",
"envelope",
"."
] | train | https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/EnvelopesApi.java#L2594-L2596 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableNavigatorContext.java | PortableNavigatorContext.initFinalPositionAndOffset | private void initFinalPositionAndOffset(BufferObjectDataInput in, ClassDefinition cd) {
"""
Initialises the finalPosition and offset and validates the fieldCount against the given class definition
"""
int fieldCount;
try {
// final position after portable is read
finalPo... | java | private void initFinalPositionAndOffset(BufferObjectDataInput in, ClassDefinition cd) {
int fieldCount;
try {
// final position after portable is read
finalPosition = in.readInt();
fieldCount = in.readInt();
} catch (IOException e) {
throw new Haze... | [
"private",
"void",
"initFinalPositionAndOffset",
"(",
"BufferObjectDataInput",
"in",
",",
"ClassDefinition",
"cd",
")",
"{",
"int",
"fieldCount",
";",
"try",
"{",
"// final position after portable is read",
"finalPosition",
"=",
"in",
".",
"readInt",
"(",
")",
";",
... | Initialises the finalPosition and offset and validates the fieldCount against the given class definition | [
"Initialises",
"the",
"finalPosition",
"and",
"offset",
"and",
"validates",
"the",
"fieldCount",
"against",
"the",
"given",
"class",
"definition"
] | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableNavigatorContext.java#L72-L85 |
RestComm/media-core | rtp/src/main/java/org/restcomm/media/core/rtp/crypto/SRTCPCryptoContext.java | SRTCPCryptoContext.processPacketAESF8 | public void processPacketAESF8(RawPacket pkt, int index) {
"""
Perform F8 Mode AES encryption / decryption
@param pkt the RTP packet to be encrypted / decrypted
"""
// byte[] iv = new byte[16];
// 4 bytes of the iv are zero
// the first byte of the RTP header is not used.
... | java | public void processPacketAESF8(RawPacket pkt, int index) {
// byte[] iv = new byte[16];
// 4 bytes of the iv are zero
// the first byte of the RTP header is not used.
ivStore[0] = 0;
ivStore[1] = 0;
ivStore[2] = 0;
ivStore[3] = 0;
// Need... | [
"public",
"void",
"processPacketAESF8",
"(",
"RawPacket",
"pkt",
",",
"int",
"index",
")",
"{",
"// byte[] iv = new byte[16];\r",
"// 4 bytes of the iv are zero\r",
"// the first byte of the RTP header is not used.\r",
"ivStore",
"[",
"0",
"]",
"=",
"0",
";",
"ivStore",
"... | Perform F8 Mode AES encryption / decryption
@param pkt the RTP packet to be encrypted / decrypted | [
"Perform",
"F8",
"Mode",
"AES",
"encryption",
"/",
"decryption"
] | train | https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/main/java/org/restcomm/media/core/rtp/crypto/SRTCPCryptoContext.java#L416-L445 |
lawloretienne/ImageGallery | library/src/main/java/com/etiennelawlor/imagegallery/library/ui/TouchImageView.java | TouchImageView.translateMatrixAfterRotate | private void translateMatrixAfterRotate(int axis, float trans, float prevImageSize, float imageSize, int prevViewSize, int viewSize, int drawableSize) {
"""
After rotating, the matrix needs to be translated. This function finds the area of image
which was previously centered and adjusts translations so that is ag... | java | private void translateMatrixAfterRotate(int axis, float trans, float prevImageSize, float imageSize, int prevViewSize, int viewSize, int drawableSize) {
if (imageSize < viewSize) {
//
// The width/height of image is less than the view's width/height. Center it.
//
... | [
"private",
"void",
"translateMatrixAfterRotate",
"(",
"int",
"axis",
",",
"float",
"trans",
",",
"float",
"prevImageSize",
",",
"float",
"imageSize",
",",
"int",
"prevViewSize",
",",
"int",
"viewSize",
",",
"int",
"drawableSize",
")",
"{",
"if",
"(",
"imageSiz... | After rotating, the matrix needs to be translated. This function finds the area of image
which was previously centered and adjusts translations so that is again the center, post-rotation.
@param axis Matrix.MTRANS_X or Matrix.MTRANS_Y
@param trans the value of trans in that axis before the rotation
@p... | [
"After",
"rotating",
"the",
"matrix",
"needs",
"to",
"be",
"translated",
".",
"This",
"function",
"finds",
"the",
"area",
"of",
"image",
"which",
"was",
"previously",
"centered",
"and",
"adjusts",
"translations",
"so",
"that",
"is",
"again",
"the",
"center",
... | train | https://github.com/lawloretienne/ImageGallery/blob/960d68dfb2b81d05322a576723ac4f090e10eda7/library/src/main/java/com/etiennelawlor/imagegallery/library/ui/TouchImageView.java#L710-L732 |
twilio/twilio-java | src/main/java/com/twilio/rest/messaging/v1/SessionReader.java | SessionReader.nextPage | @Override
public Page<Session> nextPage(final Page<Session> page,
final TwilioRestClient client) {
"""
Retrieve the next page from the Twilio API.
@param page current page
@param client TwilioRestClient with which to make the request
@return Next Page
"""
Req... | java | @Override
public Page<Session> nextPage(final Page<Session> page,
final TwilioRestClient client) {
Request request = new Request(
HttpMethod.GET,
page.getNextPageUrl(
Domains.MESSAGING.toString(),
client.getRegion()
... | [
"@",
"Override",
"public",
"Page",
"<",
"Session",
">",
"nextPage",
"(",
"final",
"Page",
"<",
"Session",
">",
"page",
",",
"final",
"TwilioRestClient",
"client",
")",
"{",
"Request",
"request",
"=",
"new",
"Request",
"(",
"HttpMethod",
".",
"GET",
",",
... | Retrieve the next page from the Twilio API.
@param page current page
@param client TwilioRestClient with which to make the request
@return Next Page | [
"Retrieve",
"the",
"next",
"page",
"from",
"the",
"Twilio",
"API",
"."
] | train | https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/rest/messaging/v1/SessionReader.java#L84-L95 |
sundrio/sundrio | components/swagger/src/main/java/io/sundr/swagger/language/JavaFluentCodegen.java | JavaFluentCodegen.addOperationToGroup | @SuppressWarnings("static-method")
public void addOperationToGroup(String tag, String resourcePath, Operation operation, CodegenOperation co, Map<String, List<CodegenOperation>> operations) {
"""
Add operation to group
@param tag name of the tag
@param resourcePath path of the resource
@param operation Sw... | java | @SuppressWarnings("static-method")
public void addOperationToGroup(String tag, String resourcePath, Operation operation, CodegenOperation co, Map<String, List<CodegenOperation>> operations) {
String prefix = co.returnBaseType != null && co.returnBaseType.contains(".")
? co.returnBaseType.su... | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"public",
"void",
"addOperationToGroup",
"(",
"String",
"tag",
",",
"String",
"resourcePath",
",",
"Operation",
"operation",
",",
"CodegenOperation",
"co",
",",
"Map",
"<",
"String",
",",
"List",
"<",
"Code... | Add operation to group
@param tag name of the tag
@param resourcePath path of the resource
@param operation Swagger Operation object
@param co Codegen Operation object
@param operations map of Codegen operations | [
"Add",
"operation",
"to",
"group"
] | train | https://github.com/sundrio/sundrio/blob/4e38368f4db0d950f7c41a8c75e15b0baff1f69a/components/swagger/src/main/java/io/sundr/swagger/language/JavaFluentCodegen.java#L349-L360 |
alkacon/opencms-core | src-modules/org/opencms/workplace/explorer/CmsTree.java | CmsTree.getNode | private String getNode(String path, String title, int type, boolean folder, CmsResourceState state, boolean grey) {
"""
Creates the output for a tree node.<p>
@param path the path of the resource represented by this tree node
@param title the resource name
@param type the resource type
@param folder if the r... | java | private String getNode(String path, String title, int type, boolean folder, CmsResourceState state, boolean grey) {
StringBuffer result = new StringBuffer(64);
String parent = CmsResource.getParentFolder(path);
result.append("parent.aC(\"");
// name
result.append(title);
... | [
"private",
"String",
"getNode",
"(",
"String",
"path",
",",
"String",
"title",
",",
"int",
"type",
",",
"boolean",
"folder",
",",
"CmsResourceState",
"state",
",",
"boolean",
"grey",
")",
"{",
"StringBuffer",
"result",
"=",
"new",
"StringBuffer",
"(",
"64",
... | Creates the output for a tree node.<p>
@param path the path of the resource represented by this tree node
@param title the resource name
@param type the resource type
@param folder if the resource is a folder
@param state the resource state
@param grey if true, the node is displayed in grey
@return the output for a t... | [
"Creates",
"the",
"output",
"for",
"a",
"tree",
"node",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/explorer/CmsTree.java#L691-L726 |
querydsl/querydsl | querydsl-sql/src/main/java/com/querydsl/sql/dml/AbstractSQLUpdateClause.java | AbstractSQLUpdateClause.addBatch | @WithBridgeMethods(value = SQLUpdateClause.class, castRequired = true)
public C addBatch() {
"""
Add the current state of bindings as a batch item
@return the current object
"""
batches.add(new SQLUpdateBatch(metadata, updates));
updates = Maps.newLinkedHashMap();
metadata = new ... | java | @WithBridgeMethods(value = SQLUpdateClause.class, castRequired = true)
public C addBatch() {
batches.add(new SQLUpdateBatch(metadata, updates));
updates = Maps.newLinkedHashMap();
metadata = new DefaultQueryMetadata();
metadata.addJoin(JoinType.DEFAULT, entity);
return (C) th... | [
"@",
"WithBridgeMethods",
"(",
"value",
"=",
"SQLUpdateClause",
".",
"class",
",",
"castRequired",
"=",
"true",
")",
"public",
"C",
"addBatch",
"(",
")",
"{",
"batches",
".",
"add",
"(",
"new",
"SQLUpdateBatch",
"(",
"metadata",
",",
"updates",
")",
")",
... | Add the current state of bindings as a batch item
@return the current object | [
"Add",
"the",
"current",
"state",
"of",
"bindings",
"as",
"a",
"batch",
"item"
] | train | https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/dml/AbstractSQLUpdateClause.java#L109-L116 |
forge/core | facets/api/src/main/java/org/jboss/forge/addon/facets/constraints/FacetInspector.java | FacetInspector.getOptionalFacets | public static <FACETTYPE extends Facet<?>> Set<Class<FACETTYPE>> getOptionalFacets(final Class<?> inspectedType) {
"""
Inspect the given {@link Class} for any {@link FacetConstraintType#OPTIONAL} dependency {@link Facet} types.
"""
return getRelatedFacets(inspectedType, FacetConstraintType.OPTIONAL);
... | java | public static <FACETTYPE extends Facet<?>> Set<Class<FACETTYPE>> getOptionalFacets(final Class<?> inspectedType)
{
return getRelatedFacets(inspectedType, FacetConstraintType.OPTIONAL);
} | [
"public",
"static",
"<",
"FACETTYPE",
"extends",
"Facet",
"<",
"?",
">",
">",
"Set",
"<",
"Class",
"<",
"FACETTYPE",
">",
">",
"getOptionalFacets",
"(",
"final",
"Class",
"<",
"?",
">",
"inspectedType",
")",
"{",
"return",
"getRelatedFacets",
"(",
"inspect... | Inspect the given {@link Class} for any {@link FacetConstraintType#OPTIONAL} dependency {@link Facet} types. | [
"Inspect",
"the",
"given",
"{"
] | train | https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/facets/api/src/main/java/org/jboss/forge/addon/facets/constraints/FacetInspector.java#L63-L66 |
lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java | MultiViewOps.createFundamental | public static DMatrixRMaj createFundamental(DMatrixRMaj E, DMatrixRMaj K) {
"""
Computes a Fundamental matrix given an Essential matrix and the camera calibration matrix.
F = (K<sup>-1</sup>)<sup>T</sup>*E*K<sup>-1</sup>
@param E Essential matrix
@param K Intrinsic camera calibration matrix
@return Fundame... | java | public static DMatrixRMaj createFundamental(DMatrixRMaj E, DMatrixRMaj K) {
DMatrixRMaj K_inv = new DMatrixRMaj(3,3);
CommonOps_DDRM.invert(K,K_inv);
DMatrixRMaj F = new DMatrixRMaj(3,3);
PerspectiveOps.multTranA(K_inv,E,K_inv,F);
return F;
} | [
"public",
"static",
"DMatrixRMaj",
"createFundamental",
"(",
"DMatrixRMaj",
"E",
",",
"DMatrixRMaj",
"K",
")",
"{",
"DMatrixRMaj",
"K_inv",
"=",
"new",
"DMatrixRMaj",
"(",
"3",
",",
"3",
")",
";",
"CommonOps_DDRM",
".",
"invert",
"(",
"K",
",",
"K_inv",
")... | Computes a Fundamental matrix given an Essential matrix and the camera calibration matrix.
F = (K<sup>-1</sup>)<sup>T</sup>*E*K<sup>-1</sup>
@param E Essential matrix
@param K Intrinsic camera calibration matrix
@return Fundamental matrix | [
"Computes",
"a",
"Fundamental",
"matrix",
"given",
"an",
"Essential",
"matrix",
"and",
"the",
"camera",
"calibration",
"matrix",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L687-L695 |
webdriverextensions/webdriverextensions | src/main/java/com/github/webdriverextensions/internal/junitrunner/AnnotationUtils.java | AnnotationUtils.getDefaultValue | public static Object getDefaultValue(Class<? extends Annotation> annotationType, String attributeName) {
"""
Retrieve the <em>default value</em> of a named Annotation attribute, given the {@link Class annotation type}.
@param annotationType the <em>annotation type</em> for which the default value should be retrie... | java | public static Object getDefaultValue(Class<? extends Annotation> annotationType, String attributeName) {
try {
Method method = annotationType.getDeclaredMethod(attributeName, new Class[0]);
return method.getDefaultValue();
}
catch (Exception ex) {
return null;... | [
"public",
"static",
"Object",
"getDefaultValue",
"(",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"annotationType",
",",
"String",
"attributeName",
")",
"{",
"try",
"{",
"Method",
"method",
"=",
"annotationType",
".",
"getDeclaredMethod",
"(",
"attributeName"... | Retrieve the <em>default value</em> of a named Annotation attribute, given the {@link Class annotation type}.
@param annotationType the <em>annotation type</em> for which the default value should be retrieved
@param attributeName the name of the attribute value to retrieve.
@return the default value of the named attrib... | [
"Retrieve",
"the",
"<em",
">",
"default",
"value<",
"/",
"em",
">",
"of",
"a",
"named",
"Annotation",
"attribute",
"given",
"the",
"{"
] | train | https://github.com/webdriverextensions/webdriverextensions/blob/80151a2bb4fe92b093e60b1e628b8c3d73fb1cc1/src/main/java/com/github/webdriverextensions/internal/junitrunner/AnnotationUtils.java#L179-L187 |
BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/util/PhysicalEntityChain.java | PhysicalEntityChain.intersects | public boolean intersects(PhysicalEntityChain rpeh, boolean ignoreEndPoints) {
"""
Checks if two chains intersect.
@param rpeh second chain
@param ignoreEndPoints flag to ignore intersections at the endpoints of the chains
@return true if they intersect
"""
for (PhysicalEntity pe1 : pes)
{
for (Physi... | java | public boolean intersects(PhysicalEntityChain rpeh, boolean ignoreEndPoints)
{
for (PhysicalEntity pe1 : pes)
{
for (PhysicalEntity pe2 : rpeh.pes)
{
if (pe1 == pe2)
{
if (ignoreEndPoints)
{
if ((pes[0] == pe1 || pes[pes.length-1] == pe1) &&
(rpeh.pes[0] == pe2 || rpeh.pes[rpeh... | [
"public",
"boolean",
"intersects",
"(",
"PhysicalEntityChain",
"rpeh",
",",
"boolean",
"ignoreEndPoints",
")",
"{",
"for",
"(",
"PhysicalEntity",
"pe1",
":",
"pes",
")",
"{",
"for",
"(",
"PhysicalEntity",
"pe2",
":",
"rpeh",
".",
"pes",
")",
"{",
"if",
"("... | Checks if two chains intersect.
@param rpeh second chain
@param ignoreEndPoints flag to ignore intersections at the endpoints of the chains
@return true if they intersect | [
"Checks",
"if",
"two",
"chains",
"intersect",
"."
] | train | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/util/PhysicalEntityChain.java#L162-L184 |
apache/incubator-druid | processing/src/main/java/org/apache/druid/segment/VirtualColumns.java | VirtualColumns.makeColumnValueSelector | public ColumnValueSelector<?> makeColumnValueSelector(String columnName, ColumnSelectorFactory factory) {
"""
Create a column value selector.
@param columnName column mame
@param factory base column selector factory
@return selector
@throws IllegalArgumentException if the virtual column does not exist... | java | public ColumnValueSelector<?> makeColumnValueSelector(String columnName, ColumnSelectorFactory factory)
{
final VirtualColumn virtualColumn = getVirtualColumn(columnName);
if (virtualColumn == null) {
throw new IAE("No such virtual column[%s]", columnName);
} else {
final ColumnValueSelector<?... | [
"public",
"ColumnValueSelector",
"<",
"?",
">",
"makeColumnValueSelector",
"(",
"String",
"columnName",
",",
"ColumnSelectorFactory",
"factory",
")",
"{",
"final",
"VirtualColumn",
"virtualColumn",
"=",
"getVirtualColumn",
"(",
"columnName",
")",
";",
"if",
"(",
"vi... | Create a column value selector.
@param columnName column mame
@param factory base column selector factory
@return selector
@throws IllegalArgumentException if the virtual column does not exist (see {@link #exists(String)} | [
"Create",
"a",
"column",
"value",
"selector",
"."
] | train | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/segment/VirtualColumns.java#L184-L194 |
Azure/azure-sdk-for-java | sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/InstanceFailoverGroupsInner.java | InstanceFailoverGroupsInner.listByLocationAsync | public Observable<Page<InstanceFailoverGroupInner>> listByLocationAsync(final String resourceGroupName, final String locationName) {
"""
Lists the failover groups in a location.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource ... | java | public Observable<Page<InstanceFailoverGroupInner>> listByLocationAsync(final String resourceGroupName, final String locationName) {
return listByLocationWithServiceResponseAsync(resourceGroupName, locationName)
.map(new Func1<ServiceResponse<Page<InstanceFailoverGroupInner>>, Page<InstanceFailoverG... | [
"public",
"Observable",
"<",
"Page",
"<",
"InstanceFailoverGroupInner",
">",
">",
"listByLocationAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"locationName",
")",
"{",
"return",
"listByLocationWithServiceResponseAsync",
"(",
"resourceGroupN... | Lists the failover groups in a location.
@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 locationName The name of the region where the resource is located.
@throws IllegalArgumentException thrown if ... | [
"Lists",
"the",
"failover",
"groups",
"in",
"a",
"location",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/InstanceFailoverGroupsInner.java#L609-L617 |
b3dgs/lionengine | lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/collision/CollisionFunctionConfig.java | CollisionFunctionConfig.exports | public static void exports(Xml root, CollisionFunction function) {
"""
Export the collision function data as a node.
@param root The node root (must not be <code>null</code>).
@param function The collision function to export (must not be <code>null</code>).
@throws LionEngineException If error on writing.
... | java | public static void exports(Xml root, CollisionFunction function)
{
Check.notNull(root);
Check.notNull(function);
final Xml node = root.createChild(FUNCTION);
if (function instanceof CollisionFunctionLinear)
{
final CollisionFunctionLinear linear = (Collis... | [
"public",
"static",
"void",
"exports",
"(",
"Xml",
"root",
",",
"CollisionFunction",
"function",
")",
"{",
"Check",
".",
"notNull",
"(",
"root",
")",
";",
"Check",
".",
"notNull",
"(",
"function",
")",
";",
"final",
"Xml",
"node",
"=",
"root",
".",
"cr... | Export the collision function data as a node.
@param root The node root (must not be <code>null</code>).
@param function The collision function to export (must not be <code>null</code>).
@throws LionEngineException If error on writing. | [
"Export",
"the",
"collision",
"function",
"data",
"as",
"a",
"node",
"."
] | train | https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/collision/CollisionFunctionConfig.java#L83-L100 |
jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/KeyArea.java | KeyArea.reverseKeyBuffer | public void reverseKeyBuffer(BaseBuffer bufferSource, int iAreaDesc) // Move these keys back to the record {
"""
Move the key area to the record.
<pre>
Remember to do the following: (before calling this method!)
if (bufferSource != null)
bufferSource.resetPosition();
</pre>
@param destBuffer A BaseBuf... | java | public void reverseKeyBuffer(BaseBuffer bufferSource, int iAreaDesc) // Move these keys back to the record
{
boolean bForceUniqueKey = true;
int iKeyFieldCount = this.getKeyFields(bForceUniqueKey, false);
for (int iKeyFieldSeq = DBConstants.MAIN_KEY_FIELD; iKeyFieldSeq < iKeyFieldCoun... | [
"public",
"void",
"reverseKeyBuffer",
"(",
"BaseBuffer",
"bufferSource",
",",
"int",
"iAreaDesc",
")",
"// Move these keys back to the record",
"{",
"boolean",
"bForceUniqueKey",
"=",
"true",
";",
"int",
"iKeyFieldCount",
"=",
"this",
".",
"getKeyFields",
"(",
"bForce... | Move the key area to the record.
<pre>
Remember to do the following: (before calling this method!)
if (bufferSource != null)
bufferSource.resetPosition();
</pre>
@param destBuffer A BaseBuffer to fill with data (ignore if null).
@param iAreaDesc The (optional) temporary area to copy the current fields to. | [
"Move",
"the",
"key",
"area",
"to",
"the",
"record",
".",
"<pre",
">",
"Remember",
"to",
"do",
"the",
"following",
":",
"(",
"before",
"calling",
"this",
"method!",
")",
"if",
"(",
"bufferSource",
"!",
"=",
"null",
")",
"bufferSource",
".",
"resetPositio... | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/KeyArea.java#L447-L463 |
vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java | JsonModelCoder.encodeListNullToNull | public void encodeListNullToNull(Writer writer, List<? extends T> list) throws IOException {
"""
Encodes the given {@link List} of values into the JSON format, and writes it using the given writer.<br>
Writes "null" if null is given.
@param writer {@link Writer} to be used for writing value
@param list {@link... | java | public void encodeListNullToNull(Writer writer, List<? extends T> list) throws IOException {
if (list == null) {
writer.write("null");
writer.flush();
return;
}
JsonUtil.startArray(writer);
int size = list.size();
for (int i = 0; i < size; i++) {
encodeNullToNull(writer, list.get(i));
if (i ... | [
"public",
"void",
"encodeListNullToNull",
"(",
"Writer",
"writer",
",",
"List",
"<",
"?",
"extends",
"T",
">",
"list",
")",
"throws",
"IOException",
"{",
"if",
"(",
"list",
"==",
"null",
")",
"{",
"writer",
".",
"write",
"(",
"\"null\"",
")",
";",
"wri... | Encodes the given {@link List} of values into the JSON format, and writes it using the given writer.<br>
Writes "null" if null is given.
@param writer {@link Writer} to be used for writing value
@param list {@link List} of values to be encoded
@throws IOException | [
"Encodes",
"the",
"given",
"{",
"@link",
"List",
"}",
"of",
"values",
"into",
"the",
"JSON",
"format",
"and",
"writes",
"it",
"using",
"the",
"given",
"writer",
".",
"<br",
">",
"Writes",
"null",
"if",
"null",
"is",
"given",
"."
] | train | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java#L355-L376 |
spotify/helios | helios-services/src/main/java/com/spotify/helios/agent/ZooKeeperAgentModel.java | ZooKeeperAgentModel.getTaskStatus | @Override
public TaskStatus getTaskStatus(final JobId jobId) {
"""
Get the {@link TaskStatus} for the job identified by {@code jobId}.
"""
final byte[] data = taskStatuses.get(jobId.toString());
if (data == null) {
return null;
}
try {
return parse(data, TaskStatus.class);
} c... | java | @Override
public TaskStatus getTaskStatus(final JobId jobId) {
final byte[] data = taskStatuses.get(jobId.toString());
if (data == null) {
return null;
}
try {
return parse(data, TaskStatus.class);
} catch (IOException e) {
throw new RuntimeException(e);
}
} | [
"@",
"Override",
"public",
"TaskStatus",
"getTaskStatus",
"(",
"final",
"JobId",
"jobId",
")",
"{",
"final",
"byte",
"[",
"]",
"data",
"=",
"taskStatuses",
".",
"get",
"(",
"jobId",
".",
"toString",
"(",
")",
")",
";",
"if",
"(",
"data",
"==",
"null",
... | Get the {@link TaskStatus} for the job identified by {@code jobId}. | [
"Get",
"the",
"{"
] | train | https://github.com/spotify/helios/blob/c9000bc1d6908651570be8b057d4981bba4df5b4/helios-services/src/main/java/com/spotify/helios/agent/ZooKeeperAgentModel.java#L180-L191 |
visallo/vertexium | security/src/main/java/org/vertexium/security/ByteSequence.java | ByteSequence.compareBytes | public static int compareBytes(ByteSequence bs1, ByteSequence bs2) {
"""
Compares the two given byte sequences, byte by byte, returning a negative,
zero, or positive result if the first sequence is less than, equal to, or
greater than the second. The comparison is performed starting with the
first byte of each ... | java | public static int compareBytes(ByteSequence bs1, ByteSequence bs2) {
int minLen = Math.min(bs1.length(), bs2.length());
for (int i = 0; i < minLen; i++) {
int a = (bs1.byteAt(i) & 0xff);
int b = (bs2.byteAt(i) & 0xff);
if (a != b) {
return a - b;
... | [
"public",
"static",
"int",
"compareBytes",
"(",
"ByteSequence",
"bs1",
",",
"ByteSequence",
"bs2",
")",
"{",
"int",
"minLen",
"=",
"Math",
".",
"min",
"(",
"bs1",
".",
"length",
"(",
")",
",",
"bs2",
".",
"length",
"(",
")",
")",
";",
"for",
"(",
"... | Compares the two given byte sequences, byte by byte, returning a negative,
zero, or positive result if the first sequence is less than, equal to, or
greater than the second. The comparison is performed starting with the
first byte of each sequence, and proceeds until a pair of bytes differs,
or one sequence runs out of... | [
"Compares",
"the",
"two",
"given",
"byte",
"sequences",
"byte",
"by",
"byte",
"returning",
"a",
"negative",
"zero",
"or",
"positive",
"result",
"if",
"the",
"first",
"sequence",
"is",
"less",
"than",
"equal",
"to",
"or",
"greater",
"than",
"the",
"second",
... | train | https://github.com/visallo/vertexium/blob/bb132b5425ac168957667164e1409b78adbea769/security/src/main/java/org/vertexium/security/ByteSequence.java#L90-L104 |
asterisk-java/asterisk-java | src/main/java/org/asteriskjava/fastagi/AbstractAgiServer.java | AbstractAgiServer.createPool | protected ThreadPoolExecutor createPool() {
"""
Creates a new ThreadPoolExecutor to serve the AGI requests. The nature of
this pool defines how many concurrent requests can be handled. The
default implementation returns a dynamic thread pool defined by the
poolSize and maximumPoolSize properties.
<p>
You can ... | java | protected ThreadPoolExecutor createPool()
{
return new ThreadPoolExecutor(poolSize, (maximumPoolSize < poolSize) ? poolSize : maximumPoolSize, 50000L,
TimeUnit.MILLISECONDS, new SynchronousQueue<Runnable>(), new DaemonThreadFactory());
} | [
"protected",
"ThreadPoolExecutor",
"createPool",
"(",
")",
"{",
"return",
"new",
"ThreadPoolExecutor",
"(",
"poolSize",
",",
"(",
"maximumPoolSize",
"<",
"poolSize",
")",
"?",
"poolSize",
":",
"maximumPoolSize",
",",
"50000L",
",",
"TimeUnit",
".",
"MILLISECONDS",... | Creates a new ThreadPoolExecutor to serve the AGI requests. The nature of
this pool defines how many concurrent requests can be handled. The
default implementation returns a dynamic thread pool defined by the
poolSize and maximumPoolSize properties.
<p>
You can override this method to change this behavior. For example ... | [
"Creates",
"a",
"new",
"ThreadPoolExecutor",
"to",
"serve",
"the",
"AGI",
"requests",
".",
"The",
"nature",
"of",
"this",
"pool",
"defines",
"how",
"many",
"concurrent",
"requests",
"can",
"be",
"handled",
".",
"The",
"default",
"implementation",
"returns",
"a... | train | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/fastagi/AbstractAgiServer.java#L293-L297 |
Mangopay/mangopay2-java-sdk | src/main/java/com/mangopay/core/APIs/ApiBase.java | ApiBase.createObject | protected <T extends Dto> T createObject(Class<T> classOfT, String idempotencyKey, String methodKey, T entity) throws Exception {
"""
Creates the Dto instance.
@param <T> Type on behalf of which the request is being called.
@param classOfT Type on behalf of which the request is being calle... | java | protected <T extends Dto> T createObject(Class<T> classOfT, String idempotencyKey, String methodKey, T entity) throws Exception {
return createObject(classOfT, idempotencyKey, methodKey, entity, "");
} | [
"protected",
"<",
"T",
"extends",
"Dto",
">",
"T",
"createObject",
"(",
"Class",
"<",
"T",
">",
"classOfT",
",",
"String",
"idempotencyKey",
",",
"String",
"methodKey",
",",
"T",
"entity",
")",
"throws",
"Exception",
"{",
"return",
"createObject",
"(",
"cl... | Creates the Dto instance.
@param <T> Type on behalf of which the request is being called.
@param classOfT Type on behalf of which the request is being called.
@param idempotencyKey idempotency key for this request.
@param methodKey Relevant method key.
@param entity Dto inst... | [
"Creates",
"the",
"Dto",
"instance",
"."
] | train | https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/APIs/ApiBase.java#L273-L275 |
citrusframework/citrus | modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/data/DataSetCreator.java | DataSetCreator.createDataSet | public DataSet createDataSet(final Message response, final MessageType messageType) {
"""
Converts Citrus result set representation to db driver model result set.
@param response The result set to convert
@return A DataSet the jdbc driver can understand
"""
try {
if (response.getPayload()... | java | public DataSet createDataSet(final Message response, final MessageType messageType) {
try {
if (response.getPayload() instanceof DataSet) {
return response.getPayload(DataSet.class);
} else if (isReadyToMarshal(response, messageType)) {
return marshalRespo... | [
"public",
"DataSet",
"createDataSet",
"(",
"final",
"Message",
"response",
",",
"final",
"MessageType",
"messageType",
")",
"{",
"try",
"{",
"if",
"(",
"response",
".",
"getPayload",
"(",
")",
"instanceof",
"DataSet",
")",
"{",
"return",
"response",
".",
"ge... | Converts Citrus result set representation to db driver model result set.
@param response The result set to convert
@return A DataSet the jdbc driver can understand | [
"Converts",
"Citrus",
"result",
"set",
"representation",
"to",
"db",
"driver",
"model",
"result",
"set",
"."
] | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/data/DataSetCreator.java#L42-L54 |
stratosphere/stratosphere | stratosphere-runtime/src/main/java/eu/stratosphere/nephele/execution/librarycache/LibraryCacheManager.java | LibraryCacheManager.writeLibraryToStream | public static void writeLibraryToStream(final String libraryFileName, final DataOutput out) throws IOException {
"""
Writes data from the library with the given file name to the specified stream.
@param libraryFileName
the name of the library
@param out
the stream to write the data to
@throws IOException
t... | java | public static void writeLibraryToStream(final String libraryFileName, final DataOutput out) throws IOException {
final LibraryCacheManager lib = get();
lib.writeLibraryToStreamInternal(libraryFileName, out);
} | [
"public",
"static",
"void",
"writeLibraryToStream",
"(",
"final",
"String",
"libraryFileName",
",",
"final",
"DataOutput",
"out",
")",
"throws",
"IOException",
"{",
"final",
"LibraryCacheManager",
"lib",
"=",
"get",
"(",
")",
";",
"lib",
".",
"writeLibraryToStream... | Writes data from the library with the given file name to the specified stream.
@param libraryFileName
the name of the library
@param out
the stream to write the data to
@throws IOException
thrown if an error occurs while writing the data | [
"Writes",
"data",
"from",
"the",
"library",
"with",
"the",
"given",
"file",
"name",
"to",
"the",
"specified",
"stream",
"."
] | train | https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/execution/librarycache/LibraryCacheManager.java#L497-L502 |
airomem/airomem | airomem-core/src/main/java/pl/setblack/airomem/core/impl/PersistenceControllerImpl.java | PersistenceControllerImpl.executeAndQuery | @Override
public <R> R executeAndQuery(Command<ROOT, R> cmd) {
"""
Perform command on system.
<p>
Inside command can be any code doing any changes. Such changes are
guaranteed to be preserved (if only command ended without exception).
@param cmd
"""
return this.executeAndQuery((ContextCommand... | java | @Override
public <R> R executeAndQuery(Command<ROOT, R> cmd) {
return this.executeAndQuery((ContextCommand<ROOT, R>) cmd);
} | [
"@",
"Override",
"public",
"<",
"R",
">",
"R",
"executeAndQuery",
"(",
"Command",
"<",
"ROOT",
",",
"R",
">",
"cmd",
")",
"{",
"return",
"this",
".",
"executeAndQuery",
"(",
"(",
"ContextCommand",
"<",
"ROOT",
",",
"R",
">",
")",
"cmd",
")",
";",
"... | Perform command on system.
<p>
Inside command can be any code doing any changes. Such changes are
guaranteed to be preserved (if only command ended without exception).
@param cmd | [
"Perform",
"command",
"on",
"system",
".",
"<p",
">",
"Inside",
"command",
"can",
"be",
"any",
"code",
"doing",
"any",
"changes",
".",
"Such",
"changes",
"are",
"guaranteed",
"to",
"be",
"preserved",
"(",
"if",
"only",
"command",
"ended",
"without",
"excep... | train | https://github.com/airomem/airomem/blob/281ce18ff64836fccfb0edab18b8d677f1101a32/airomem-core/src/main/java/pl/setblack/airomem/core/impl/PersistenceControllerImpl.java#L108-L111 |
http-builder-ng/http-builder-ng | http-builder-ng-core/src/main/java/groovyx/net/http/HttpBuilder.java | HttpBuilder.getAsync | public CompletableFuture<Object> getAsync(final Consumer<HttpConfig> configuration) {
"""
Executes an asynchronous GET request on the configured URI (asynchronous alias to `get(Consumer)`), with additional configuration provided by the
configuration function.
This method is generally used for Java-specific con... | java | public CompletableFuture<Object> getAsync(final Consumer<HttpConfig> configuration) {
return CompletableFuture.supplyAsync(() -> get(configuration), getExecutor());
} | [
"public",
"CompletableFuture",
"<",
"Object",
">",
"getAsync",
"(",
"final",
"Consumer",
"<",
"HttpConfig",
">",
"configuration",
")",
"{",
"return",
"CompletableFuture",
".",
"supplyAsync",
"(",
"(",
")",
"->",
"get",
"(",
"configuration",
")",
",",
"getExecu... | Executes an asynchronous GET request on the configured URI (asynchronous alias to `get(Consumer)`), with additional configuration provided by the
configuration function.
This method is generally used for Java-specific configuration.
[source,java]
----
HttpBuilder http = HttpBuilder.configure(config -> {
config.getReq... | [
"Executes",
"an",
"asynchronous",
"GET",
"request",
"on",
"the",
"configured",
"URI",
"(",
"asynchronous",
"alias",
"to",
"get",
"(",
"Consumer",
")",
")",
"with",
"additional",
"configuration",
"provided",
"by",
"the",
"configuration",
"function",
"."
] | train | https://github.com/http-builder-ng/http-builder-ng/blob/865f37732c102c748d3db8b905199dac9222a525/http-builder-ng-core/src/main/java/groovyx/net/http/HttpBuilder.java#L440-L442 |
line/centraldogma | server/src/main/java/com/linecorp/centraldogma/server/internal/api/ContentServiceV1.java | ContentServiceV1.getFiles | @Get("regex:/projects/(?<projectName>[^/]+)/repos/(?<repoName>[^/]+)/contents(?<path>(|/.*))$")
public CompletableFuture<?> getFiles(
@Param("path") String path, @Param("revision") @Default("-1") String revision,
Repository repository,
@RequestConverter(WatchRequestConverter.clas... | java | @Get("regex:/projects/(?<projectName>[^/]+)/repos/(?<repoName>[^/]+)/contents(?<path>(|/.*))$")
public CompletableFuture<?> getFiles(
@Param("path") String path, @Param("revision") @Default("-1") String revision,
Repository repository,
@RequestConverter(WatchRequestConverter.clas... | [
"@",
"Get",
"(",
"\"regex:/projects/(?<projectName>[^/]+)/repos/(?<repoName>[^/]+)/contents(?<path>(|/.*))$\"",
")",
"public",
"CompletableFuture",
"<",
"?",
">",
"getFiles",
"(",
"@",
"Param",
"(",
"\"path\"",
")",
"String",
"path",
",",
"@",
"Param",
"(",
"\"revision\... | GET /projects/{projectName}/repos/{repoName}/contents{path}?revision={revision}&
jsonpath={jsonpath}
<p>Returns the entry of files in the path. This is same with
{@link #listFiles(String, String, Repository)} except that containing the content of the files.
Note that if the {@link HttpHeaderNames#IF_NONE_MATCH} in... | [
"GET",
"/",
"projects",
"/",
"{",
"projectName",
"}",
"/",
"repos",
"/",
"{",
"repoName",
"}",
"/",
"contents",
"{",
"path",
"}",
"?revision",
"=",
"{",
"revision",
"}",
"&",
";",
"jsonpath",
"=",
"{",
"jsonpath",
"}"
] | train | https://github.com/line/centraldogma/blob/b9e46c67fbc26628c2186ce2f46e7fb303c831e9/server/src/main/java/com/linecorp/centraldogma/server/internal/api/ContentServiceV1.java#L223-L254 |
aws/aws-sdk-java | aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/util/StepFactory.java | StepFactory.newScriptRunnerStep | public HadoopJarStepConfig newScriptRunnerStep(String script, String... args) {
"""
Runs a specified script on the master node of your cluster.
@param script
The script to run.
@param args
Arguments that get passed to the script.
@return HadoopJarStepConfig that can be passed to your job flow.
"""
... | java | public HadoopJarStepConfig newScriptRunnerStep(String script, String... args) {
List<String> argsList = new ArrayList<String>();
argsList.add(script);
for (String arg : args) {
argsList.add(arg);
}
return new HadoopJarStepConfig()
.withJar("s3://" + bucket... | [
"public",
"HadoopJarStepConfig",
"newScriptRunnerStep",
"(",
"String",
"script",
",",
"String",
"...",
"args",
")",
"{",
"List",
"<",
"String",
">",
"argsList",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"argsList",
".",
"add",
"(",
"scrip... | Runs a specified script on the master node of your cluster.
@param script
The script to run.
@param args
Arguments that get passed to the script.
@return HadoopJarStepConfig that can be passed to your job flow. | [
"Runs",
"a",
"specified",
"script",
"on",
"the",
"master",
"node",
"of",
"your",
"cluster",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/util/StepFactory.java#L132-L141 |
geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java | DomHelper.createOrUpdateGroup | public Element createOrUpdateGroup(Object parent, Object object, Matrix transformation, Style style) {
"""
Creates a group element in the technology (SVG/VML/...) of this context. A group is meant to group other elements
together. Also this method gives you the opportunity to specify a specific width and height.
... | java | public Element createOrUpdateGroup(Object parent, Object object, Matrix transformation, Style style) {
switch (namespace) {
case SVG:
return createSvgGroup(parent, object, transformation, style);
case VML:
return createVmlGroup(parent, object, transformation);
case HTML:
default:
return create... | [
"public",
"Element",
"createOrUpdateGroup",
"(",
"Object",
"parent",
",",
"Object",
"object",
",",
"Matrix",
"transformation",
",",
"Style",
"style",
")",
"{",
"switch",
"(",
"namespace",
")",
"{",
"case",
"SVG",
":",
"return",
"createSvgGroup",
"(",
"parent",... | Creates a group element in the technology (SVG/VML/...) of this context. A group is meant to group other elements
together. Also this method gives you the opportunity to specify a specific width and height.
@param parent
parent group object
@param object
group object
@param transformation
On each group, it is possible... | [
"Creates",
"a",
"group",
"element",
"in",
"the",
"technology",
"(",
"SVG",
"/",
"VML",
"/",
"...",
")",
"of",
"this",
"context",
".",
"A",
"group",
"is",
"meant",
"to",
"group",
"other",
"elements",
"together",
".",
"Also",
"this",
"method",
"gives",
"... | train | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L336-L346 |
pushbit/sprockets | src/main/java/net/sf/sprockets/sql/Statements.java | Statements.setLongs | public static PreparedStatement setLongs(int index, PreparedStatement stmt, long... params)
throws SQLException {
"""
Set the statement parameters, starting at the index, in the order of the params.
@since 3.0.0
"""
return set(index, stmt, null, params, null);
} | java | public static PreparedStatement setLongs(int index, PreparedStatement stmt, long... params)
throws SQLException {
return set(index, stmt, null, params, null);
} | [
"public",
"static",
"PreparedStatement",
"setLongs",
"(",
"int",
"index",
",",
"PreparedStatement",
"stmt",
",",
"long",
"...",
"params",
")",
"throws",
"SQLException",
"{",
"return",
"set",
"(",
"index",
",",
"stmt",
",",
"null",
",",
"params",
",",
"null",... | Set the statement parameters, starting at the index, in the order of the params.
@since 3.0.0 | [
"Set",
"the",
"statement",
"parameters",
"starting",
"at",
"the",
"index",
"in",
"the",
"order",
"of",
"the",
"params",
"."
] | train | https://github.com/pushbit/sprockets/blob/5d967317cbb2374c69d33271d3c7b7311e1ea4ac/src/main/java/net/sf/sprockets/sql/Statements.java#L80-L83 |
pietermartin/sqlg | sqlg-core/src/main/java/org/umlg/sqlg/sql/parse/ColumnList.java | ColumnList.getAlias | private String getAlias(String schema, String table, String column, int stepDepth) {
"""
get an alias if the column is already in the list
@param schema
@param table
@param column
@return
"""
//PropertyType is not part of equals or hashCode so not needed for the lookup.
Column c = new Col... | java | private String getAlias(String schema, String table, String column, int stepDepth) {
//PropertyType is not part of equals or hashCode so not needed for the lookup.
Column c = new Column(schema, table, column, null, stepDepth);
return columns.get(c);
} | [
"private",
"String",
"getAlias",
"(",
"String",
"schema",
",",
"String",
"table",
",",
"String",
"column",
",",
"int",
"stepDepth",
")",
"{",
"//PropertyType is not part of equals or hashCode so not needed for the lookup.",
"Column",
"c",
"=",
"new",
"Column",
"(",
"s... | get an alias if the column is already in the list
@param schema
@param table
@param column
@return | [
"get",
"an",
"alias",
"if",
"the",
"column",
"is",
"already",
"in",
"the",
"list"
] | train | https://github.com/pietermartin/sqlg/blob/c1845a1b31328a5ffda646873b0369ee72af56a7/sqlg-core/src/main/java/org/umlg/sqlg/sql/parse/ColumnList.java#L152-L156 |
att/AAF | authz/authz-cass/src/main/java/com/att/dao/aaf/cass/HistoryDAO.java | HistoryDAO.readByUser | public Result<List<Data>> readByUser(AuthzTrans trans, String user, int ... yyyymm) {
"""
Gets the history for a user in the specified year and month
year - the year in yyyy format
month - the month in a year ...values 1 - 12
"""
if(yyyymm.length==0) {
return Result.err(Status.ERR_BadData, "No or inv... | java | public Result<List<Data>> readByUser(AuthzTrans trans, String user, int ... yyyymm) {
if(yyyymm.length==0) {
return Result.err(Status.ERR_BadData, "No or invalid yyyymm specified");
}
Result<ResultSet> rs = readByUser.exec(trans, "user", user);
if(rs.notOK()) {
return Result.err(rs);
}
return ... | [
"public",
"Result",
"<",
"List",
"<",
"Data",
">",
">",
"readByUser",
"(",
"AuthzTrans",
"trans",
",",
"String",
"user",
",",
"int",
"...",
"yyyymm",
")",
"{",
"if",
"(",
"yyyymm",
".",
"length",
"==",
"0",
")",
"{",
"return",
"Result",
".",
"err",
... | Gets the history for a user in the specified year and month
year - the year in yyyy format
month - the month in a year ...values 1 - 12 | [
"Gets",
"the",
"history",
"for",
"a",
"user",
"in",
"the",
"specified",
"year",
"and",
"month",
"year",
"-",
"the",
"year",
"in",
"yyyy",
"format",
"month",
"-",
"the",
"month",
"in",
"a",
"year",
"...",
"values",
"1",
"-",
"12"
] | train | https://github.com/att/AAF/blob/090562e956c0035db972aafba844dc6d3fc948ee/authz/authz-cass/src/main/java/com/att/dao/aaf/cass/HistoryDAO.java#L177-L186 |
spring-cloud/spring-cloud-aws | spring-cloud-aws-messaging/src/main/java/org/springframework/cloud/aws/messaging/core/NotificationMessagingTemplate.java | NotificationMessagingTemplate.sendNotification | public void sendNotification(Object message, String subject) {
"""
Convenience method that sends a notification with the given {@literal message} and
{@literal subject} to the {@literal destination}. The {@literal subject} is sent as
header as defined in the
<a href="https://docs.aws.amazon.com/sns/latest/dg/js... | java | public void sendNotification(Object message, String subject) {
this.convertAndSend(getRequiredDefaultDestination(), message, Collections
.singletonMap(TopicMessageChannel.NOTIFICATION_SUBJECT_HEADER, subject));
} | [
"public",
"void",
"sendNotification",
"(",
"Object",
"message",
",",
"String",
"subject",
")",
"{",
"this",
".",
"convertAndSend",
"(",
"getRequiredDefaultDestination",
"(",
")",
",",
"message",
",",
"Collections",
".",
"singletonMap",
"(",
"TopicMessageChannel",
... | Convenience method that sends a notification with the given {@literal message} and
{@literal subject} to the {@literal destination}. The {@literal subject} is sent as
header as defined in the
<a href="https://docs.aws.amazon.com/sns/latest/dg/json-formats.html">SNS message
JSON formats</a>. The configured default desti... | [
"Convenience",
"method",
"that",
"sends",
"a",
"notification",
"with",
"the",
"given",
"{"
] | train | https://github.com/spring-cloud/spring-cloud-aws/blob/26f7ca6c29ac66922f64b37c2bc5ce6f842462ee/spring-cloud-aws-messaging/src/main/java/org/springframework/cloud/aws/messaging/core/NotificationMessagingTemplate.java#L92-L95 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/EmulatedFields.java | EmulatedFields.get | public int get(String name, int defaultValue) throws IllegalArgumentException {
"""
Finds and returns the int value of a given field named {@code name} in the
receiver. If the field has not been assigned any value yet, the default
value {@code defaultValue} is returned instead.
@param name
the name of the fi... | java | public int get(String name, int defaultValue) throws IllegalArgumentException {
ObjectSlot slot = findMandatorySlot(name, int.class);
return slot.defaulted ? defaultValue : ((Integer) slot.fieldValue).intValue();
} | [
"public",
"int",
"get",
"(",
"String",
"name",
",",
"int",
"defaultValue",
")",
"throws",
"IllegalArgumentException",
"{",
"ObjectSlot",
"slot",
"=",
"findMandatorySlot",
"(",
"name",
",",
"int",
".",
"class",
")",
";",
"return",
"slot",
".",
"defaulted",
"?... | Finds and returns the int value of a given field named {@code name} in the
receiver. If the field has not been assigned any value yet, the default
value {@code defaultValue} is returned instead.
@param name
the name of the field to find.
@param defaultValue
return value in case the field has not been assigned to yet.
... | [
"Finds",
"and",
"returns",
"the",
"int",
"value",
"of",
"a",
"given",
"field",
"named",
"{",
"@code",
"name",
"}",
"in",
"the",
"receiver",
".",
"If",
"the",
"field",
"has",
"not",
"been",
"assigned",
"any",
"value",
"yet",
"the",
"default",
"value",
"... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/EmulatedFields.java#L288-L291 |
spotbugs/spotbugs | spotbugs/src/main/java/edu/umd/cs/findbugs/ba/SignatureParser.java | SignatureParser.getNumParametersForInvocation | public static int getNumParametersForInvocation(InvokeInstruction inv, ConstantPoolGen cpg) {
"""
Get the number of parameters passed to method invocation.
@param inv
@param cpg
@return int number of parameters
"""
SignatureParser sigParser = new SignatureParser(inv.getSignature(cpg));
ret... | java | public static int getNumParametersForInvocation(InvokeInstruction inv, ConstantPoolGen cpg) {
SignatureParser sigParser = new SignatureParser(inv.getSignature(cpg));
return sigParser.getNumParameters();
} | [
"public",
"static",
"int",
"getNumParametersForInvocation",
"(",
"InvokeInstruction",
"inv",
",",
"ConstantPoolGen",
"cpg",
")",
"{",
"SignatureParser",
"sigParser",
"=",
"new",
"SignatureParser",
"(",
"inv",
".",
"getSignature",
"(",
"cpg",
")",
")",
";",
"return... | Get the number of parameters passed to method invocation.
@param inv
@param cpg
@return int number of parameters | [
"Get",
"the",
"number",
"of",
"parameters",
"passed",
"to",
"method",
"invocation",
"."
] | train | https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/SignatureParser.java#L249-L252 |
fozziethebeat/S-Space | src/main/java/edu/ucla/sspace/matrix/GrowingSparseMatrix.java | GrowingSparseMatrix.set | public void set(int row, int col, double val) {
"""
{@inheritDoc}
<p>The size of the matrix will be expanded if either row or col is larger
than the largest previously seen row or column value. When the matrix
is expanded by either dimension, the values for the new row/column will
all be assumed to be zer... | java | public void set(int row, int col, double val) {
checkIndices(row, col);
// Check whether the dimensions need to be updated
if (row + 1 > rows)
rows = row + 1;
if (col + 1 > cols)
cols = col + 1;
updateRow(row).set(col, val);
} | [
"public",
"void",
"set",
"(",
"int",
"row",
",",
"int",
"col",
",",
"double",
"val",
")",
"{",
"checkIndices",
"(",
"row",
",",
"col",
")",
";",
"// Check whether the dimensions need to be updated",
"if",
"(",
"row",
"+",
"1",
">",
"rows",
")",
"rows",
"... | {@inheritDoc}
<p>The size of the matrix will be expanded if either row or col is larger
than the largest previously seen row or column value. When the matrix
is expanded by either dimension, the values for the new row/column will
all be assumed to be zero. | [
"{",
"@inheritDoc",
"}"
] | train | https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/matrix/GrowingSparseMatrix.java#L200-L210 |
alkacon/opencms-core | src-modules/org/opencms/workplace/CmsWidgetDialog.java | CmsWidgetDialog.buildRemoveElement | public String buildRemoveElement(String elementName, int index, boolean enabled) {
"""
Returns the html for a button to remove an optional element.<p>
@param elementName name of the element
@param index the element index of the element to remove
@param enabled if true, the button to remove an element is shown... | java | public String buildRemoveElement(String elementName, int index, boolean enabled) {
if (enabled) {
StringBuffer href = new StringBuffer(4);
href.append("javascript:removeElement('");
href.append(elementName);
href.append("', ");
href.append(index);
... | [
"public",
"String",
"buildRemoveElement",
"(",
"String",
"elementName",
",",
"int",
"index",
",",
"boolean",
"enabled",
")",
"{",
"if",
"(",
"enabled",
")",
"{",
"StringBuffer",
"href",
"=",
"new",
"StringBuffer",
"(",
"4",
")",
";",
"href",
".",
"append",... | Returns the html for a button to remove an optional element.<p>
@param elementName name of the element
@param index the element index of the element to remove
@param enabled if true, the button to remove an element is shown, otherwise a spacer is returned
@return the html for a button to remove an optional element | [
"Returns",
"the",
"html",
"for",
"a",
"button",
"to",
"remove",
"an",
"optional",
"element",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/CmsWidgetDialog.java#L259-L272 |
UrielCh/ovh-java-sdk | ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java | ApiOvhEmaildomain.delegatedAccount_email_responder_GET | public OvhResponderAccount delegatedAccount_email_responder_GET(String email) throws IOException {
"""
Get this object properties
REST: GET /email/domain/delegatedAccount/{email}/responder
@param email [required] Email
"""
String qPath = "/email/domain/delegatedAccount/{email}/responder";
StringBuilder... | java | public OvhResponderAccount delegatedAccount_email_responder_GET(String email) throws IOException {
String qPath = "/email/domain/delegatedAccount/{email}/responder";
StringBuilder sb = path(qPath, email);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhResponderAccount.class);
... | [
"public",
"OvhResponderAccount",
"delegatedAccount_email_responder_GET",
"(",
"String",
"email",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/email/domain/delegatedAccount/{email}/responder\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qPath",
",",
... | Get this object properties
REST: GET /email/domain/delegatedAccount/{email}/responder
@param email [required] Email | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L297-L302 |
mbenson/therian | core/src/main/java/therian/operator/convert/Converter.java | Converter.supports | @Override
public boolean supports(TherianContext context, Convert<? extends SOURCE, ? super TARGET> convert) {
"""
{@inheritDoc}
@return {@code true} if the source value is an instance of our SOURCE bound and the target type is assignable
from our TARGET bound. If, the source value is an instance of the ta... | java | @Override
public boolean supports(TherianContext context, Convert<? extends SOURCE, ? super TARGET> convert) {
return !(isNoop(convert) && isRejectNoop())
&& TypeUtils.isAssignable(convert.getSourceType().getType(), getSourceBound())
&& TypeUtils.isAssignable(getTargetBound(), conver... | [
"@",
"Override",
"public",
"boolean",
"supports",
"(",
"TherianContext",
"context",
",",
"Convert",
"<",
"?",
"extends",
"SOURCE",
",",
"?",
"super",
"TARGET",
">",
"convert",
")",
"{",
"return",
"!",
"(",
"isNoop",
"(",
"convert",
")",
"&&",
"isRejectNoop... | {@inheritDoc}
@return {@code true} if the source value is an instance of our SOURCE bound and the target type is assignable
from our TARGET bound. If, the source value is an instance of the target type, returns !
{@link #isRejectNoop()}. | [
"{",
"@inheritDoc",
"}"
] | train | https://github.com/mbenson/therian/blob/0653505f73e2a6f5b0abc394ea6d83af03408254/core/src/main/java/therian/operator/convert/Converter.java#L95-L100 |
jronrun/benayn | benayn-ustyle/src/main/java/com/benayn/ustyle/string/Strs.java | Strs.before | public static Betner before(String target, String separator) {
"""
Returns a {@code String} between matcher that matches any character in the beginning and given right
@param target
@param separator
@return
"""
return betn(target).before(separator);
} | java | public static Betner before(String target, String separator) {
return betn(target).before(separator);
} | [
"public",
"static",
"Betner",
"before",
"(",
"String",
"target",
",",
"String",
"separator",
")",
"{",
"return",
"betn",
"(",
"target",
")",
".",
"before",
"(",
"separator",
")",
";",
"}"
] | Returns a {@code String} between matcher that matches any character in the beginning and given right
@param target
@param separator
@return | [
"Returns",
"a",
"{",
"@code",
"String",
"}",
"between",
"matcher",
"that",
"matches",
"any",
"character",
"in",
"the",
"beginning",
"and",
"given",
"right"
] | train | https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/string/Strs.java#L477-L479 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/lock/RaftLock.java | RaftLock.acquire | AcquireResult acquire(LockInvocationKey key, boolean wait) {
"""
Assigns the lock to the endpoint, if the lock is not held. Lock count is
incremented if the endpoint already holds the lock. If some other
endpoint holds the lock and the second argument is true, a wait key is
created and added to the wait queue. ... | java | AcquireResult acquire(LockInvocationKey key, boolean wait) {
LockEndpoint endpoint = key.endpoint();
UUID invocationUid = key.invocationUid();
RaftLockOwnershipState memorized = ownerInvocationRefUids.get(Tuple2.of(endpoint, invocationUid));
if (memorized != null) {
AcquireSt... | [
"AcquireResult",
"acquire",
"(",
"LockInvocationKey",
"key",
",",
"boolean",
"wait",
")",
"{",
"LockEndpoint",
"endpoint",
"=",
"key",
".",
"endpoint",
"(",
")",
";",
"UUID",
"invocationUid",
"=",
"key",
".",
"invocationUid",
"(",
")",
";",
"RaftLockOwnershipS... | Assigns the lock to the endpoint, if the lock is not held. Lock count is
incremented if the endpoint already holds the lock. If some other
endpoint holds the lock and the second argument is true, a wait key is
created and added to the wait queue. Lock count is not incremented if
the lock request is a retry of the lock ... | [
"Assigns",
"the",
"lock",
"to",
"the",
"endpoint",
"if",
"the",
"lock",
"is",
"not",
"held",
".",
"Lock",
"count",
"is",
"incremented",
"if",
"the",
"endpoint",
"already",
"holds",
"the",
"lock",
".",
"If",
"some",
"other",
"endpoint",
"holds",
"the",
"l... | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/lock/RaftLock.java#L95-L129 |
ixa-ehu/kaflib | src/main/java/ixa/kaflib/KAFDocument.java | KAFDocument.addLinguisticProcessor | public LinguisticProcessor addLinguisticProcessor(String layer, String name) {
"""
Adds a linguistic processor to the document header. The timestamp is added implicitly.
"""
LinguisticProcessor lp = new LinguisticProcessor(name, layer);
//lp.setBeginTimestamp(timestamp); // no default timestamp
List<Linguis... | java | public LinguisticProcessor addLinguisticProcessor(String layer, String name) {
LinguisticProcessor lp = new LinguisticProcessor(name, layer);
//lp.setBeginTimestamp(timestamp); // no default timestamp
List<LinguisticProcessor> layerLps = lps.get(layer);
if (layerLps == null) {
layerLps = new ArrayList<Linguist... | [
"public",
"LinguisticProcessor",
"addLinguisticProcessor",
"(",
"String",
"layer",
",",
"String",
"name",
")",
"{",
"LinguisticProcessor",
"lp",
"=",
"new",
"LinguisticProcessor",
"(",
"name",
",",
"layer",
")",
";",
"//lp.setBeginTimestamp(timestamp); // no default times... | Adds a linguistic processor to the document header. The timestamp is added implicitly. | [
"Adds",
"a",
"linguistic",
"processor",
"to",
"the",
"document",
"header",
".",
"The",
"timestamp",
"is",
"added",
"implicitly",
"."
] | train | https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L436-L446 |
Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java | KeyVaultClientBaseImpl.getSasDefinitionsWithServiceResponseAsync | public Observable<ServiceResponse<Page<SasDefinitionItem>>> getSasDefinitionsWithServiceResponseAsync(final String vaultBaseUrl, final String storageAccountName, final Integer maxresults) {
"""
List storage SAS definitions for the given storage account. This operation requires the storage/listsas permission.
@p... | java | public Observable<ServiceResponse<Page<SasDefinitionItem>>> getSasDefinitionsWithServiceResponseAsync(final String vaultBaseUrl, final String storageAccountName, final Integer maxresults) {
return getSasDefinitionsSinglePageAsync(vaultBaseUrl, storageAccountName, maxresults)
.concatMap(new Func1<Ser... | [
"public",
"Observable",
"<",
"ServiceResponse",
"<",
"Page",
"<",
"SasDefinitionItem",
">",
">",
">",
"getSasDefinitionsWithServiceResponseAsync",
"(",
"final",
"String",
"vaultBaseUrl",
",",
"final",
"String",
"storageAccountName",
",",
"final",
"Integer",
"maxresults"... | List storage SAS definitions for the given storage account. This operation requires the storage/listsas permission.
@param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
@param storageAccountName The name of the storage account.
@param maxresults Maximum number of results to return in a page... | [
"List",
"storage",
"SAS",
"definitions",
"for",
"the",
"given",
"storage",
"account",
".",
"This",
"operation",
"requires",
"the",
"storage",
"/",
"listsas",
"permission",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L10562-L10574 |
facebookarchive/hadoop-20 | src/core/org/apache/hadoop/http/HtmlQuoting.java | HtmlQuoting.quoteOutputStream | public static OutputStream quoteOutputStream(final OutputStream out
) throws IOException {
"""
Return an output stream that quotes all of the output.
@param out the stream to write the quoted output to
@return a new stream that the application show write to
@throws... | java | public static OutputStream quoteOutputStream(final OutputStream out
) throws IOException {
return new OutputStream() {
private byte[] data = new byte[1];
@Override
public void write(byte[] data, int off, int len) throws IOException {
quoteHtml... | [
"public",
"static",
"OutputStream",
"quoteOutputStream",
"(",
"final",
"OutputStream",
"out",
")",
"throws",
"IOException",
"{",
"return",
"new",
"OutputStream",
"(",
")",
"{",
"private",
"byte",
"[",
"]",
"data",
"=",
"new",
"byte",
"[",
"1",
"]",
";",
"@... | Return an output stream that quotes all of the output.
@param out the stream to write the quoted output to
@return a new stream that the application show write to
@throws IOException if the underlying output fails | [
"Return",
"an",
"output",
"stream",
"that",
"quotes",
"all",
"of",
"the",
"output",
"."
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/http/HtmlQuoting.java#L121-L146 |
reactor/reactor-netty | src/main/java/reactor/netty/http/client/HttpClient.java | HttpClient.doOnResponse | public final HttpClient doOnResponse(BiConsumer<? super HttpClientResponse, ? super Connection> doOnResponse) {
"""
Setup a callback called after {@link HttpClientResponse} headers have been
received
@param doOnResponse a consumer observing connected events
@return a new {@link HttpClient}
"""
Objects... | java | public final HttpClient doOnResponse(BiConsumer<? super HttpClientResponse, ? super Connection> doOnResponse) {
Objects.requireNonNull(doOnResponse, "doOnResponse");
return new HttpClientDoOn(this, null, null, doOnResponse, null);
} | [
"public",
"final",
"HttpClient",
"doOnResponse",
"(",
"BiConsumer",
"<",
"?",
"super",
"HttpClientResponse",
",",
"?",
"super",
"Connection",
">",
"doOnResponse",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"doOnResponse",
",",
"\"doOnResponse\"",
")",
";",
... | Setup a callback called after {@link HttpClientResponse} headers have been
received
@param doOnResponse a consumer observing connected events
@return a new {@link HttpClient} | [
"Setup",
"a",
"callback",
"called",
"after",
"{",
"@link",
"HttpClientResponse",
"}",
"headers",
"have",
"been",
"received"
] | train | https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/http/client/HttpClient.java#L556-L559 |
Tourenathan-G5organisation/SiliCompressor | silicompressor/src/main/java/com/iceteck/silicompressorr/SiliCompressor.java | SiliCompressor.compressVideo | public String compressVideo(String videoFilePath, String destinationDir) throws URISyntaxException {
"""
Perform background video compression. Make sure the videofileUri and destinationUri are valid
resources because this method does not account for missing directories hence your converted file
could be in an un... | java | public String compressVideo(String videoFilePath, String destinationDir) throws URISyntaxException {
return compressVideo(videoFilePath, destinationDir, 0, 0, 0);
} | [
"public",
"String",
"compressVideo",
"(",
"String",
"videoFilePath",
",",
"String",
"destinationDir",
")",
"throws",
"URISyntaxException",
"{",
"return",
"compressVideo",
"(",
"videoFilePath",
",",
"destinationDir",
",",
"0",
",",
"0",
",",
"0",
")",
";",
"}"
] | Perform background video compression. Make sure the videofileUri and destinationUri are valid
resources because this method does not account for missing directories hence your converted file
could be in an unknown location
This uses default values for the converted videos
@param videoFilePath source path for the vide... | [
"Perform",
"background",
"video",
"compression",
".",
"Make",
"sure",
"the",
"videofileUri",
"and",
"destinationUri",
"are",
"valid",
"resources",
"because",
"this",
"method",
"does",
"not",
"account",
"for",
"missing",
"directories",
"hence",
"your",
"converted",
... | train | https://github.com/Tourenathan-G5organisation/SiliCompressor/blob/546f6cd7b2a7a783e1122df46c1e237f8938fe72/silicompressor/src/main/java/com/iceteck/silicompressorr/SiliCompressor.java#L315-L317 |
hexagonframework/spring-data-ebean | src/main/java/org/springframework/data/ebean/repository/support/EbeanRepositoryFactory.java | EbeanRepositoryFactory.getTargetRepository | protected <T extends Persistable, ID extends Serializable> SimpleEbeanRepository<T, ID> getTargetRepository(
RepositoryInformation information, EbeanServer ebeanServer) {
"""
Callback to create a {@link EbeanRepository} instance with the given {@link EbeanServer}
@param <T>
@param <ID>
@param ebe... | java | protected <T extends Persistable, ID extends Serializable> SimpleEbeanRepository<T, ID> getTargetRepository(
RepositoryInformation information, EbeanServer ebeanServer) {
return getTargetRepositoryViaReflection(information, information.getDomainType(), ebeanServer);
} | [
"protected",
"<",
"T",
"extends",
"Persistable",
",",
"ID",
"extends",
"Serializable",
">",
"SimpleEbeanRepository",
"<",
"T",
",",
"ID",
">",
"getTargetRepository",
"(",
"RepositoryInformation",
"information",
",",
"EbeanServer",
"ebeanServer",
")",
"{",
"return",
... | Callback to create a {@link EbeanRepository} instance with the given {@link EbeanServer}
@param <T>
@param <ID>
@param ebeanServer
@return | [
"Callback",
"to",
"create",
"a",
"{",
"@link",
"EbeanRepository",
"}",
"instance",
"with",
"the",
"given",
"{",
"@link",
"EbeanServer",
"}"
] | train | https://github.com/hexagonframework/spring-data-ebean/blob/dd11b97654982403b50dd1d5369cadad71fce410/src/main/java/org/springframework/data/ebean/repository/support/EbeanRepositoryFactory.java#L85-L89 |
killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.enterOfflinePayment | public Transaction enterOfflinePayment(final String invoiceId, final Transaction payment) {
"""
Enter an offline payment for a manual invoice (beta) - Recurly Enterprise Feature
@param invoiceId String Recurly Invoice ID
@param payment The external payment
"""
return doPOST(Invoices.INVOICES_RESO... | java | public Transaction enterOfflinePayment(final String invoiceId, final Transaction payment) {
return doPOST(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/transactions", payment, Transaction.class);
} | [
"public",
"Transaction",
"enterOfflinePayment",
"(",
"final",
"String",
"invoiceId",
",",
"final",
"Transaction",
"payment",
")",
"{",
"return",
"doPOST",
"(",
"Invoices",
".",
"INVOICES_RESOURCE",
"+",
"\"/\"",
"+",
"invoiceId",
"+",
"\"/transactions\"",
",",
"pa... | Enter an offline payment for a manual invoice (beta) - Recurly Enterprise Feature
@param invoiceId String Recurly Invoice ID
@param payment The external payment | [
"Enter",
"an",
"offline",
"payment",
"for",
"a",
"manual",
"invoice",
"(",
"beta",
")",
"-",
"Recurly",
"Enterprise",
"Feature"
] | train | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1342-L1344 |
Azure/azure-sdk-for-java | logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/MapsInner.java | MapsInner.createOrUpdateAsync | public Observable<IntegrationAccountMapInner> createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String mapName, IntegrationAccountMapInner map) {
"""
Creates or updates an integration account map.
@param resourceGroupName The resource group name.
@param integrationAccountName The int... | java | public Observable<IntegrationAccountMapInner> createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String mapName, IntegrationAccountMapInner map) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, mapName, map).map(new Func1<ServiceResponse<Integr... | [
"public",
"Observable",
"<",
"IntegrationAccountMapInner",
">",
"createOrUpdateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"integrationAccountName",
",",
"String",
"mapName",
",",
"IntegrationAccountMapInner",
"map",
")",
"{",
"return",
"createOrUpdateWithSer... | Creates or updates an integration account map.
@param resourceGroupName The resource group name.
@param integrationAccountName The integration account name.
@param mapName The integration account map name.
@param map The integration account map.
@throws IllegalArgumentException thrown if parameters fail the validation... | [
"Creates",
"or",
"updates",
"an",
"integration",
"account",
"map",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/MapsInner.java#L477-L484 |
VoltDB/voltdb | src/frontend/org/voltdb/expressions/ComparisonExpression.java | ComparisonExpression.rangeFilterFromPrefixLike | static private ComparisonExpression rangeFilterFromPrefixLike(AbstractExpression leftExpr, ExpressionType rangeComparator, String comparand) {
"""
Construct the upper or lower bound expression that is implied by a prefix LIKE operator, given its required elements.
@param leftExpr - the LIKE operator's (and the re... | java | static private ComparisonExpression rangeFilterFromPrefixLike(AbstractExpression leftExpr, ExpressionType rangeComparator, String comparand) {
ConstantValueExpression cve = new ConstantValueExpression();
cve.setValueType(VoltType.STRING);
cve.setValue(comparand);
cve.setValueSize(compara... | [
"static",
"private",
"ComparisonExpression",
"rangeFilterFromPrefixLike",
"(",
"AbstractExpression",
"leftExpr",
",",
"ExpressionType",
"rangeComparator",
",",
"String",
"comparand",
")",
"{",
"ConstantValueExpression",
"cve",
"=",
"new",
"ConstantValueExpression",
"(",
")"... | Construct the upper or lower bound expression that is implied by a prefix LIKE operator, given its required elements.
@param leftExpr - the LIKE operator's (and the result's) lhs expression
@param rangeComparator - a GTE or LT operator to indicate lower or upper bound, respectively,
@param comparand - a string operand ... | [
"Construct",
"the",
"upper",
"or",
"lower",
"bound",
"expression",
"that",
"is",
"implied",
"by",
"a",
"prefix",
"LIKE",
"operator",
"given",
"its",
"required",
"elements",
"."
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/ComparisonExpression.java#L144-L151 |
jMotif/SAX | src/main/java/net/seninp/util/UCRUtils.java | UCRUtils.datasetStats | public static String datasetStats(Map<String, List<double[]>> data, String name) {
"""
Prints the dataset statistics.
@param data the UCRdataset.
@param name the dataset name to use.
@return stats.
"""
int globalMinLength = Integer.MAX_VALUE;
int globalMaxLength = Integer.MIN_VALUE;
double g... | java | public static String datasetStats(Map<String, List<double[]>> data, String name) {
int globalMinLength = Integer.MAX_VALUE;
int globalMaxLength = Integer.MIN_VALUE;
double globalMinValue = Double.MAX_VALUE;
double globalMaxValue = Double.MIN_VALUE;
for (Entry<String, List<double[]>> e : data.entr... | [
"public",
"static",
"String",
"datasetStats",
"(",
"Map",
"<",
"String",
",",
"List",
"<",
"double",
"[",
"]",
">",
">",
"data",
",",
"String",
"name",
")",
"{",
"int",
"globalMinLength",
"=",
"Integer",
".",
"MAX_VALUE",
";",
"int",
"globalMaxLength",
"... | Prints the dataset statistics.
@param data the UCRdataset.
@param name the dataset name to use.
@return stats. | [
"Prints",
"the",
"dataset",
"statistics",
"."
] | train | https://github.com/jMotif/SAX/blob/39ee07a69facaa330def5130b8790aeda85f1061/src/main/java/net/seninp/util/UCRUtils.java#L78-L112 |
liferay/com-liferay-commerce | commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountUserRelPersistenceImpl.java | CommerceAccountUserRelPersistenceImpl.findAll | @Override
public List<CommerceAccountUserRel> findAll() {
"""
Returns all the commerce account user rels.
@return the commerce account user rels
"""
return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
} | java | @Override
public List<CommerceAccountUserRel> findAll() {
return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
} | [
"@",
"Override",
"public",
"List",
"<",
"CommerceAccountUserRel",
">",
"findAll",
"(",
")",
"{",
"return",
"findAll",
"(",
"QueryUtil",
".",
"ALL_POS",
",",
"QueryUtil",
".",
"ALL_POS",
",",
"null",
")",
";",
"}"
] | Returns all the commerce account user rels.
@return the commerce account user rels | [
"Returns",
"all",
"the",
"commerce",
"account",
"user",
"rels",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountUserRelPersistenceImpl.java#L1618-L1621 |
meltmedia/cadmium | core/src/main/java/com/meltmedia/cadmium/core/util/Jsr250Utils.java | Jsr250Utils.findInstancesInScopes | public static Set<Object> findInstancesInScopes(Injector injector, Class<? extends Annotation>... scopeAnnotations) {
"""
Finds all of the instances in the specified scopes.
<p>
Returns a list of the objects from the specified scope, sorted by their class name.
</p>
@param injector the injector to search.
... | java | public static Set<Object> findInstancesInScopes(Injector injector, Class<? extends Annotation>... scopeAnnotations) {
Set<Object> objects = new TreeSet<Object>(new Comparator<Object>() {
@Override
public int compare(Object o0, Object o1) {
return o0.getClass().getName().compareTo(o1.getClass().... | [
"public",
"static",
"Set",
"<",
"Object",
">",
"findInstancesInScopes",
"(",
"Injector",
"injector",
",",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"...",
"scopeAnnotations",
")",
"{",
"Set",
"<",
"Object",
">",
"objects",
"=",
"new",
"TreeSet",
"<",
... | Finds all of the instances in the specified scopes.
<p>
Returns a list of the objects from the specified scope, sorted by their class name.
</p>
@param injector the injector to search.
@param scopeAnnotations the scopes to search for.
@return the objects bound in the injector. | [
"Finds",
"all",
"of",
"the",
"instances",
"in",
"the",
"specified",
"scopes",
"."
] | train | https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/core/src/main/java/com/meltmedia/cadmium/core/util/Jsr250Utils.java#L276-L290 |
ibm-bluemix-mobile-services/bms-clientsdk-android-push | lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/push/api/MFPPush.java | MFPPush.getTags | public void getTags(final MFPPushResponseListener<List<String>> listener) {
"""
Get the list of tags
@param listener Mandatory listener class. When the list of tags are
successfully retrieved the {@link MFPPushResponseListener}
.onSuccess method is called with the list of tagNames
{@link MFPPushResponseListe... | java | public void getTags(final MFPPushResponseListener<List<String>> listener) {
MFPPushUrlBuilder builder = new MFPPushUrlBuilder(applicationId);
String path = builder.getTagsUrl();
MFPPushInvoker invoker = MFPPushInvoker.newInstance(appContext, path, Request.GET, clientSecret);
invoker.setResponseListener... | [
"public",
"void",
"getTags",
"(",
"final",
"MFPPushResponseListener",
"<",
"List",
"<",
"String",
">",
">",
"listener",
")",
"{",
"MFPPushUrlBuilder",
"builder",
"=",
"new",
"MFPPushUrlBuilder",
"(",
"applicationId",
")",
";",
"String",
"path",
"=",
"builder",
... | Get the list of tags
@param listener Mandatory listener class. When the list of tags are
successfully retrieved the {@link MFPPushResponseListener}
.onSuccess method is called with the list of tagNames
{@link MFPPushResponseListener}.onFailure method is called
otherwise | [
"Get",
"the",
"list",
"of",
"tags"
] | train | https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-android-push/blob/26c048637e81a6942004693919558f3d9aa8c674/lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/push/api/MFPPush.java#L549-L585 |
UrielCh/ovh-java-sdk | ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java | ApiOvhTelephony.billingAccount_service_serviceName_faxConsumption_consumptionId_GET | public OvhFaxConsumption billingAccount_service_serviceName_faxConsumption_consumptionId_GET(String billingAccount, String serviceName, Long consumptionId) throws IOException {
"""
Get this object properties
REST: GET /telephony/{billingAccount}/service/{serviceName}/faxConsumption/{consumptionId}
@param billi... | java | public OvhFaxConsumption billingAccount_service_serviceName_faxConsumption_consumptionId_GET(String billingAccount, String serviceName, Long consumptionId) throws IOException {
String qPath = "/telephony/{billingAccount}/service/{serviceName}/faxConsumption/{consumptionId}";
StringBuilder sb = path(qPath, billingAc... | [
"public",
"OvhFaxConsumption",
"billingAccount_service_serviceName_faxConsumption_consumptionId_GET",
"(",
"String",
"billingAccount",
",",
"String",
"serviceName",
",",
"Long",
"consumptionId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/telephony/{billingAc... | Get this object properties
REST: GET /telephony/{billingAccount}/service/{serviceName}/faxConsumption/{consumptionId}
@param billingAccount [required] The name of your billingAccount
@param serviceName [required]
@param consumptionId [required] | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L4053-L4058 |
pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/ContentSpec.java | ContentSpec.appendChild | protected void appendChild(final Node child, boolean checkForType) {
"""
Adds a Child node to the Content Spec. If the Child node already has a parent, then it is removed from that parent and added
to this content spec.
@param child A Child Node to be added to the ContentSpec.
@param checkForType If th... | java | protected void appendChild(final Node child, boolean checkForType) {
if (checkForType && child instanceof KeyValueNode) {
appendKeyValueNode((KeyValueNode<?>) child);
} else if (checkForType && child instanceof Level) {
getBaseLevel().appendChild(child);
} else if (checkF... | [
"protected",
"void",
"appendChild",
"(",
"final",
"Node",
"child",
",",
"boolean",
"checkForType",
")",
"{",
"if",
"(",
"checkForType",
"&&",
"child",
"instanceof",
"KeyValueNode",
")",
"{",
"appendKeyValueNode",
"(",
"(",
"KeyValueNode",
"<",
"?",
">",
")",
... | Adds a Child node to the Content Spec. If the Child node already has a parent, then it is removed from that parent and added
to this content spec.
@param child A Child Node to be added to the ContentSpec.
@param checkForType If the method should check the type of the child, and use a type specific method instea... | [
"Adds",
"a",
"Child",
"node",
"to",
"the",
"Content",
"Spec",
".",
"If",
"the",
"Child",
"node",
"already",
"has",
"a",
"parent",
"then",
"it",
"is",
"removed",
"from",
"that",
"parent",
"and",
"added",
"to",
"this",
"content",
"spec",
"."
] | train | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/ContentSpec.java#L2214-L2228 |
HotelsDotCom/corc | corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java | CorcInputFormat.setTypeInfo | public static void setTypeInfo(Configuration conf, StructTypeInfo typeInfo) {
"""
Sets the StructTypeInfo that declares the columns to be read in the configuration
"""
conf.set(INPUT_TYPE_INFO, typeInfo.getTypeName());
LOG.debug("Set input typeInfo on conf: {}", typeInfo);
} | java | public static void setTypeInfo(Configuration conf, StructTypeInfo typeInfo) {
conf.set(INPUT_TYPE_INFO, typeInfo.getTypeName());
LOG.debug("Set input typeInfo on conf: {}", typeInfo);
} | [
"public",
"static",
"void",
"setTypeInfo",
"(",
"Configuration",
"conf",
",",
"StructTypeInfo",
"typeInfo",
")",
"{",
"conf",
".",
"set",
"(",
"INPUT_TYPE_INFO",
",",
"typeInfo",
".",
"getTypeName",
"(",
")",
")",
";",
"LOG",
".",
"debug",
"(",
"\"Set input ... | Sets the StructTypeInfo that declares the columns to be read in the configuration | [
"Sets",
"the",
"StructTypeInfo",
"that",
"declares",
"the",
"columns",
"to",
"be",
"read",
"in",
"the",
"configuration"
] | train | https://github.com/HotelsDotCom/corc/blob/37ecb5966315e4cf630a878ffcbada61c50bdcd3/corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java#L113-L116 |
motown-io/motown | utils/rest/src/main/java/io/motown/utils/rest/response/ResponseBuilder.java | ResponseBuilder.buildResponse | public static <T> Response<T> buildResponse(final HttpServletRequest request, final int offset, final int limit, final long total, final List<T> elements) {
"""
Build a {@link Response} from the request, offset, limit, total and list of elements.
@param request The {@link javax.servlet.http.HttpServletRequest... | java | public static <T> Response<T> buildResponse(final HttpServletRequest request, final int offset, final int limit, final long total, final List<T> elements) {
checkArgument(offset >= 0);
checkArgument(limit >= 1);
checkArgument(total >= 0);
checkArgument(total == 0 || offset < total);
... | [
"public",
"static",
"<",
"T",
">",
"Response",
"<",
"T",
">",
"buildResponse",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"int",
"offset",
",",
"final",
"int",
"limit",
",",
"final",
"long",
"total",
",",
"final",
"List",
"<",
"T",
">",... | Build a {@link Response} from the request, offset, limit, total and list of elements.
@param request The {@link javax.servlet.http.HttpServletRequest} which was executed.
@param offset The offset of the results.
@param limit The maximum number of results.
@param total The total number of elements.
@param ... | [
"Build",
"a",
"{",
"@link",
"Response",
"}",
"from",
"the",
"request",
"offset",
"limit",
"total",
"and",
"list",
"of",
"elements",
"."
] | train | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/utils/rest/src/main/java/io/motown/utils/rest/response/ResponseBuilder.java#L45-L61 |
JoeKerouac/utils | src/main/java/com/joe/utils/common/DateUtil.java | DateUtil.convert | public static String convert(String date, String format, String newFormat) {
"""
将一种格式的日期转换为另一种格式
@param date 日期字符串
@param format 日期对应的格式
@param newFormat 要转换的新格式
@return 新格式的日期
"""
return getFormatDate(newFormat, parse(date, format));
} | java | public static String convert(String date, String format, String newFormat) {
return getFormatDate(newFormat, parse(date, format));
} | [
"public",
"static",
"String",
"convert",
"(",
"String",
"date",
",",
"String",
"format",
",",
"String",
"newFormat",
")",
"{",
"return",
"getFormatDate",
"(",
"newFormat",
",",
"parse",
"(",
"date",
",",
"format",
")",
")",
";",
"}"
] | 将一种格式的日期转换为另一种格式
@param date 日期字符串
@param format 日期对应的格式
@param newFormat 要转换的新格式
@return 新格式的日期 | [
"将一种格式的日期转换为另一种格式"
] | train | https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/common/DateUtil.java#L54-L56 |
xcesco/kripton | kripton-core/src/main/java/com/abubusoft/kripton/common/StringUtils.java | StringUtils.bytesToHex | public static String bytesToHex(byte[] bytes, int size) {
"""
Bytes to hex.
@param bytes the bytes
@param size the size
@return the string
"""
size=Math.min(bytes.length, size);
char[] hexChars = new char[size * 2];
for ( int j = 0; j < size; j++ ) {
int v = bytes[j] & 0xFF;
... | java | public static String bytesToHex(byte[] bytes, int size) {
size=Math.min(bytes.length, size);
char[] hexChars = new char[size * 2];
for ( int j = 0; j < size; j++ ) {
int v = bytes[j] & 0xFF;
hexChars[j * 2] = hexArray[v >>> 4];
hexChars[j * 2 + 1] = hexArray[v & 0x0F];
}
... | [
"public",
"static",
"String",
"bytesToHex",
"(",
"byte",
"[",
"]",
"bytes",
",",
"int",
"size",
")",
"{",
"size",
"=",
"Math",
".",
"min",
"(",
"bytes",
".",
"length",
",",
"size",
")",
";",
"char",
"[",
"]",
"hexChars",
"=",
"new",
"char",
"[",
... | Bytes to hex.
@param bytes the bytes
@param size the size
@return the string | [
"Bytes",
"to",
"hex",
"."
] | train | https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/StringUtils.java#L102-L111 |
bitcoinj/bitcoinj | core/src/main/java/org/bitcoinj/script/Script.java | Script.getSigOpCount | private static int getSigOpCount(List<ScriptChunk> chunks, boolean accurate) throws ScriptException {
"""
//////////////////// Interface used during verification of transactions/blocks ////////////////////////////////
"""
int sigOps = 0;
int lastOpCode = OP_INVALIDOPCODE;
for (ScriptChu... | java | private static int getSigOpCount(List<ScriptChunk> chunks, boolean accurate) throws ScriptException {
int sigOps = 0;
int lastOpCode = OP_INVALIDOPCODE;
for (ScriptChunk chunk : chunks) {
if (chunk.isOpCode()) {
switch (chunk.opcode) {
case OP_CHECKSIG... | [
"private",
"static",
"int",
"getSigOpCount",
"(",
"List",
"<",
"ScriptChunk",
">",
"chunks",
",",
"boolean",
"accurate",
")",
"throws",
"ScriptException",
"{",
"int",
"sigOps",
"=",
"0",
";",
"int",
"lastOpCode",
"=",
"OP_INVALIDOPCODE",
";",
"for",
"(",
"Sc... | //////////////////// Interface used during verification of transactions/blocks //////////////////////////////// | [
"////////////////////",
"Interface",
"used",
"during",
"verification",
"of",
"transactions",
"/",
"blocks",
"////////////////////////////////"
] | train | https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/script/Script.java#L510-L534 |
neo4j-contrib/neo4j-apoc-procedures | src/main/java/apoc/algo/algorithms/Chunks.java | Chunks.sumUp | public void sumUp() {
"""
special operation implemented inline to compute and store sum up until here
"""
int offset=0;
int tmp=0;
for (int i = 0; i < numChunks; i++) {
int[] chunk = chunks[i];
if (chunk==null) throw new IllegalStateException("Chunks are not cont... | java | public void sumUp() {
int offset=0;
int tmp=0;
for (int i = 0; i < numChunks; i++) {
int[] chunk = chunks[i];
if (chunk==null) throw new IllegalStateException("Chunks are not continous, null fragement at offset "+i);
for (int j = 0; j < chunkSize; j++) {
... | [
"public",
"void",
"sumUp",
"(",
")",
"{",
"int",
"offset",
"=",
"0",
";",
"int",
"tmp",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numChunks",
";",
"i",
"++",
")",
"{",
"int",
"[",
"]",
"chunk",
"=",
"chunks",
"[",
"i"... | special operation implemented inline to compute and store sum up until here | [
"special",
"operation",
"implemented",
"inline",
"to",
"compute",
"and",
"store",
"sum",
"up",
"until",
"here"
] | train | https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/algo/algorithms/Chunks.java#L135-L147 |
Azure/azure-sdk-for-java | batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/CertificatesImpl.java | CertificatesImpl.cancelDeletionAsync | public Observable<Void> cancelDeletionAsync(String thumbprintAlgorithm, String thumbprint) {
"""
Cancels a failed deletion of a certificate from the specified account.
If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate changes to deleteFailed. If you dec... | java | public Observable<Void> cancelDeletionAsync(String thumbprintAlgorithm, String thumbprint) {
return cancelDeletionWithServiceResponseAsync(thumbprintAlgorithm, thumbprint).map(new Func1<ServiceResponseWithHeaders<Void, CertificateCancelDeletionHeaders>, Void>() {
@Override
public Void ca... | [
"public",
"Observable",
"<",
"Void",
">",
"cancelDeletionAsync",
"(",
"String",
"thumbprintAlgorithm",
",",
"String",
"thumbprint",
")",
"{",
"return",
"cancelDeletionWithServiceResponseAsync",
"(",
"thumbprintAlgorithm",
",",
"thumbprint",
")",
".",
"map",
"(",
"new"... | Cancels a failed deletion of a certificate from the specified account.
If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this operation to set the status of th... | [
"Cancels",
"a",
"failed",
"deletion",
"of",
"a",
"certificate",
"from",
"the",
"specified",
"account",
".",
"If",
"you",
"try",
"to",
"delete",
"a",
"certificate",
"that",
"is",
"being",
"used",
"by",
"a",
"pool",
"or",
"compute",
"node",
"the",
"status",
... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/CertificatesImpl.java#L609-L616 |
Samsung/GearVRf | GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java | GVRScriptManager.loadScriptBundle | @Override
public IScriptBundle loadScriptBundle(String filePath, GVRResourceVolume volume) throws IOException {
"""
Load a script bundle file. It defines bindings between scripts and GVRf objects
(e.g., scene objects and the {@link GVRMain} object).
@param filePath
The path and filename of the script bund... | java | @Override
public IScriptBundle loadScriptBundle(String filePath, GVRResourceVolume volume) throws IOException {
GVRScriptBundle bundle = GVRScriptBundle.loadFromFile(mGvrContext, filePath, volume);
return bundle;
} | [
"@",
"Override",
"public",
"IScriptBundle",
"loadScriptBundle",
"(",
"String",
"filePath",
",",
"GVRResourceVolume",
"volume",
")",
"throws",
"IOException",
"{",
"GVRScriptBundle",
"bundle",
"=",
"GVRScriptBundle",
".",
"loadFromFile",
"(",
"mGvrContext",
",",
"filePa... | Load a script bundle file. It defines bindings between scripts and GVRf objects
(e.g., scene objects and the {@link GVRMain} object).
@param filePath
The path and filename of the script bundle.
@param volume
The {@link GVRResourceVolume} from which to load the bundle file and scripts.
@return
The loaded {@linkplain GV... | [
"Load",
"a",
"script",
"bundle",
"file",
".",
"It",
"defines",
"bindings",
"between",
"scripts",
"and",
"GVRf",
"objects",
"(",
"e",
".",
"g",
".",
"scene",
"objects",
"and",
"the",
"{",
"@link",
"GVRMain",
"}",
"object",
")",
"."
] | train | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java#L251-L255 |
calimero-project/calimero-core | src/tuwien/auto/calimero/knxnetip/ConnectionBase.java | ConnectionBase.fireFrameReceived | protected void fireFrameReceived(final CEMI frame) {
"""
Fires a frame received event ({@link KNXListener#frameReceived(FrameEvent)}) for the supplied cEMI
<code>frame</code>.
@param frame the cEMI to generate the event for
"""
final FrameEvent fe = new FrameEvent(this, frame);
listeners.fire(l -> l.fr... | java | protected void fireFrameReceived(final CEMI frame)
{
final FrameEvent fe = new FrameEvent(this, frame);
listeners.fire(l -> l.frameReceived(fe));
} | [
"protected",
"void",
"fireFrameReceived",
"(",
"final",
"CEMI",
"frame",
")",
"{",
"final",
"FrameEvent",
"fe",
"=",
"new",
"FrameEvent",
"(",
"this",
",",
"frame",
")",
";",
"listeners",
".",
"fire",
"(",
"l",
"->",
"l",
".",
"frameReceived",
"(",
"fe",... | Fires a frame received event ({@link KNXListener#frameReceived(FrameEvent)}) for the supplied cEMI
<code>frame</code>.
@param frame the cEMI to generate the event for | [
"Fires",
"a",
"frame",
"received",
"event",
"(",
"{",
"@link",
"KNXListener#frameReceived",
"(",
"FrameEvent",
")",
"}",
")",
"for",
"the",
"supplied",
"cEMI",
"<code",
">",
"frame<",
"/",
"code",
">",
"."
] | train | https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/knxnetip/ConnectionBase.java#L355-L359 |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileField.java | DBaseFileField.updateSizes | @SuppressWarnings("checkstyle:cyclomaticcomplexity")
void updateSizes(int fieldLength, int decimalPointPosition) {
"""
Update the sizes with the given ones if and only if
they are greater than the existing ones.
This test is done according to the type of the field.
@param fieldLength is the size of this fiel... | java | @SuppressWarnings("checkstyle:cyclomaticcomplexity")
void updateSizes(int fieldLength, int decimalPointPosition) {
switch (this.type) {
case STRING:
if (fieldLength > this.length) {
this.length = fieldLength;
}
break;
case FLOATING_NUMBER:
case NUMBER:
if (decimalPointPosition > this.decimal) {... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:cyclomaticcomplexity\"",
")",
"void",
"updateSizes",
"(",
"int",
"fieldLength",
",",
"int",
"decimalPointPosition",
")",
"{",
"switch",
"(",
"this",
".",
"type",
")",
"{",
"case",
"STRING",
":",
"if",
"(",
"fieldLength... | Update the sizes with the given ones if and only if
they are greater than the existing ones.
This test is done according to the type of the field.
@param fieldLength is the size of this field
@param decimalPointPosition is the position of the decimal point. | [
"Update",
"the",
"sizes",
"with",
"the",
"given",
"ones",
"if",
"and",
"only",
"if",
"they",
"are",
"greater",
"than",
"the",
"existing",
"ones",
".",
"This",
"test",
"is",
"done",
"according",
"to",
"the",
"type",
"of",
"the",
"field",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileField.java#L254-L277 |
NLPchina/elasticsearch-sql | src/main/java/org/nlpcn/es4sql/query/maker/AggMaker.java | AggMaker.makeFieldAgg | public AggregationBuilder makeFieldAgg(MethodField field, AggregationBuilder parent) throws SqlParseException {
"""
Create aggregation according to the SQL function.
zhongshu-comment 根据sql中的函数来生成一些agg,例如sql中的count()、sum()函数,这是agg链中最里边的那个agg了,eg:
select a,b,count(c),sum(d) from tbl group by a,b
@param field SQL... | java | public AggregationBuilder makeFieldAgg(MethodField field, AggregationBuilder parent) throws SqlParseException {
//question 加到groupMap里是为了什么
groupMap.put(field.getAlias(), new KVValue("FIELD", parent));
ValuesSourceAggregationBuilder builder;
field.setAlias(fixAlias(field.getAlias()));
... | [
"public",
"AggregationBuilder",
"makeFieldAgg",
"(",
"MethodField",
"field",
",",
"AggregationBuilder",
"parent",
")",
"throws",
"SqlParseException",
"{",
"//question 加到groupMap里是为了什么",
"groupMap",
".",
"put",
"(",
"field",
".",
"getAlias",
"(",
")",
",",
"new",
"KV... | Create aggregation according to the SQL function.
zhongshu-comment 根据sql中的函数来生成一些agg,例如sql中的count()、sum()函数,这是agg链中最里边的那个agg了,eg:
select a,b,count(c),sum(d) from tbl group by a,b
@param field SQL function
@param parent parentAggregation
@return AggregationBuilder represents the SQL function
@throws SqlParseException i... | [
"Create",
"aggregation",
"according",
"to",
"the",
"SQL",
"function",
".",
"zhongshu",
"-",
"comment",
"根据sql中的函数来生成一些agg,例如sql中的count",
"()",
"、sum",
"()",
"函数,这是agg链中最里边的那个agg了,eg:",
"select",
"a",
"b",
"count",
"(",
"c",
")",
"sum",
"(",
"d",
")",
"from",
"... | train | https://github.com/NLPchina/elasticsearch-sql/blob/eaab70b4bf1729978911b83eb96e816ebcfe6e7f/src/main/java/org/nlpcn/es4sql/query/maker/AggMaker.java#L128-L167 |
wdtinc/mapbox-vector-tile-java | src/main/java/com/wdtinc/mapbox_vector_tile/adapt/jts/JtsAdapter.java | JtsAdapter.moveCursor | private static void moveCursor(Vec2d cursor, List<Integer> geomCmds, Vec2d mvtPos) {
"""
<p>Appends {@link ZigZag#encode(int)} of delta in x,y from {@code cursor} to {@code mvtPos} into the {@code geomCmds} buffer.</p>
<p>Afterwards, the {@code cursor} values are changed to match the {@code mvtPos} values.</p>
... | java | private static void moveCursor(Vec2d cursor, List<Integer> geomCmds, Vec2d mvtPos) {
// Delta, then zigzag
geomCmds.add(ZigZag.encode((int)mvtPos.x - (int)cursor.x));
geomCmds.add(ZigZag.encode((int)mvtPos.y - (int)cursor.y));
cursor.set(mvtPos);
} | [
"private",
"static",
"void",
"moveCursor",
"(",
"Vec2d",
"cursor",
",",
"List",
"<",
"Integer",
">",
"geomCmds",
",",
"Vec2d",
"mvtPos",
")",
"{",
"// Delta, then zigzag",
"geomCmds",
".",
"add",
"(",
"ZigZag",
".",
"encode",
"(",
"(",
"int",
")",
"mvtPos"... | <p>Appends {@link ZigZag#encode(int)} of delta in x,y from {@code cursor} to {@code mvtPos} into the {@code geomCmds} buffer.</p>
<p>Afterwards, the {@code cursor} values are changed to match the {@code mvtPos} values.</p>
@param cursor MVT cursor position
@param geomCmds geometry command list
@param mvtPos next MVT ... | [
"<p",
">",
"Appends",
"{",
"@link",
"ZigZag#encode",
"(",
"int",
")",
"}",
"of",
"delta",
"in",
"x",
"y",
"from",
"{",
"@code",
"cursor",
"}",
"to",
"{",
"@code",
"mvtPos",
"}",
"into",
"the",
"{",
"@code",
"geomCmds",
"}",
"buffer",
".",
"<",
"/",... | train | https://github.com/wdtinc/mapbox-vector-tile-java/blob/e5e3df3fc2260709e289f972a1348c0a1ea30339/src/main/java/com/wdtinc/mapbox_vector_tile/adapt/jts/JtsAdapter.java#L600-L607 |
primefaces-extensions/core | src/main/java/org/primefaces/extensions/component/sheet/SheetRenderer.java | SheetRenderer.decodeSelection | private void decodeSelection(final FacesContext context, final Sheet sheet, final String jsonSelection) {
"""
Decodes the user Selection JSON data
@param context
@param sheet
@param jsonSelection
"""
if (LangUtils.isValueBlank(jsonSelection)) {
return;
}
try {
... | java | private void decodeSelection(final FacesContext context, final Sheet sheet, final String jsonSelection) {
if (LangUtils.isValueBlank(jsonSelection)) {
return;
}
try {
// data comes in: [ [row, col, oldValue, newValue] ... ]
final JSONArray array = new JSONArr... | [
"private",
"void",
"decodeSelection",
"(",
"final",
"FacesContext",
"context",
",",
"final",
"Sheet",
"sheet",
",",
"final",
"String",
"jsonSelection",
")",
"{",
"if",
"(",
"LangUtils",
".",
"isValueBlank",
"(",
"jsonSelection",
")",
")",
"{",
"return",
";",
... | Decodes the user Selection JSON data
@param context
@param sheet
@param jsonSelection | [
"Decodes",
"the",
"user",
"Selection",
"JSON",
"data"
] | train | https://github.com/primefaces-extensions/core/blob/afdbca591f60f47898e3517e1e939bc2f63d5355/src/main/java/org/primefaces/extensions/component/sheet/SheetRenderer.java#L935-L952 |
aws/aws-sdk-java | aws-java-sdk-cloudsearch/src/main/java/com/amazonaws/services/cloudsearchv2/model/ListDomainNamesResult.java | ListDomainNamesResult.withDomainNames | public ListDomainNamesResult withDomainNames(java.util.Map<String, String> domainNames) {
"""
<p>
The names of the search domains owned by an account.
</p>
@param domainNames
The names of the search domains owned by an account.
@return Returns a reference to this object so that method calls can be chained t... | java | public ListDomainNamesResult withDomainNames(java.util.Map<String, String> domainNames) {
setDomainNames(domainNames);
return this;
} | [
"public",
"ListDomainNamesResult",
"withDomainNames",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"domainNames",
")",
"{",
"setDomainNames",
"(",
"domainNames",
")",
";",
"return",
"this",
";",
"}"
] | <p>
The names of the search domains owned by an account.
</p>
@param domainNames
The names of the search domains owned by an account.
@return Returns a reference to this object so that method calls can be chained together. | [
"<p",
">",
"The",
"names",
"of",
"the",
"search",
"domains",
"owned",
"by",
"an",
"account",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudsearch/src/main/java/com/amazonaws/services/cloudsearchv2/model/ListDomainNamesResult.java#L71-L74 |
xdcrafts/flower | flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapDotApi.java | MapDotApi.dotGetNullableOptional | public static <T> Optional<T> dotGetNullableOptional(
final Map map, final String pathString, final Class<T> clazz
) {
"""
Get optional value by path.
@param <T> optional value type
@param clazz type of value
@param map subject
@param pathString nodes to walk in map
@return value
"""
... | java | public static <T> Optional<T> dotGetNullableOptional(
final Map map, final String pathString, final Class<T> clazz
) {
return dotGetNullable(map, Optional.class, pathString);
} | [
"public",
"static",
"<",
"T",
">",
"Optional",
"<",
"T",
">",
"dotGetNullableOptional",
"(",
"final",
"Map",
"map",
",",
"final",
"String",
"pathString",
",",
"final",
"Class",
"<",
"T",
">",
"clazz",
")",
"{",
"return",
"dotGetNullable",
"(",
"map",
","... | Get optional value by path.
@param <T> optional value type
@param clazz type of value
@param map subject
@param pathString nodes to walk in map
@return value | [
"Get",
"optional",
"value",
"by",
"path",
"."
] | train | https://github.com/xdcrafts/flower/blob/96a8e49102fea434bd383a3c7852f0ee9545f999/flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapDotApi.java#L254-L258 |
beanshell/beanshell | src/main/java/bsh/engine/ScriptContextEngineView.java | ScriptContextEngineView.putAll | @Override
public void putAll(Map<? extends String, ? extends Object> t) {
"""
Put the bindings into the ENGINE_SCOPE of the context.
@param t Mappings to be stored in this map.
@throws UnsupportedOperationException if the <tt>putAll</tt> method is not
supported by this map.
@throws ClassCastException ... | java | @Override
public void putAll(Map<? extends String, ? extends Object> t) {
context.getBindings(ENGINE_SCOPE).putAll(t);
} | [
"@",
"Override",
"public",
"void",
"putAll",
"(",
"Map",
"<",
"?",
"extends",
"String",
",",
"?",
"extends",
"Object",
">",
"t",
")",
"{",
"context",
".",
"getBindings",
"(",
"ENGINE_SCOPE",
")",
".",
"putAll",
"(",
"t",
")",
";",
"}"
] | Put the bindings into the ENGINE_SCOPE of the context.
@param t Mappings to be stored in this map.
@throws UnsupportedOperationException if the <tt>putAll</tt> method is not
supported by this map.
@throws ClassCastException if the class of a key or value in the specified
map prevents it from being stored in ... | [
"Put",
"the",
"bindings",
"into",
"the",
"ENGINE_SCOPE",
"of",
"the",
"context",
"."
] | train | https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/engine/ScriptContextEngineView.java#L153-L156 |
groupon/odo | proxyui/src/main/java/com/groupon/odo/controllers/ControllerUtils.java | ControllerUtils.convertProfileAndPathIdentifier | public static Identifiers convertProfileAndPathIdentifier(String profileIdentifier, String pathIdentifier) throws Exception {
"""
Obtain the IDs of profile and path as Identifiers
@param profileIdentifier actual ID or friendly name of profile
@param pathIdentifier actual ID or friendly name of path
@return... | java | public static Identifiers convertProfileAndPathIdentifier(String profileIdentifier, String pathIdentifier) throws Exception {
Identifiers id = new Identifiers();
Integer profileId = null;
try {
profileId = ControllerUtils.convertProfileIdentifier(profileIdentifier);
} catch ... | [
"public",
"static",
"Identifiers",
"convertProfileAndPathIdentifier",
"(",
"String",
"profileIdentifier",
",",
"String",
"pathIdentifier",
")",
"throws",
"Exception",
"{",
"Identifiers",
"id",
"=",
"new",
"Identifiers",
"(",
")",
";",
"Integer",
"profileId",
"=",
"n... | Obtain the IDs of profile and path as Identifiers
@param profileIdentifier actual ID or friendly name of profile
@param pathIdentifier actual ID or friendly name of path
@return
@throws Exception | [
"Obtain",
"the",
"IDs",
"of",
"profile",
"and",
"path",
"as",
"Identifiers"
] | train | https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxyui/src/main/java/com/groupon/odo/controllers/ControllerUtils.java#L122-L137 |
devnied/EMV-NFC-Paycard-Enrollment | library/src/main/java/com/github/devnied/emvnfccard/parser/impl/AbstractParser.java | AbstractParser.getLogFormat | protected List<TagAndLength> getLogFormat() throws CommunicationException {
"""
Method used to get log format
@return list of tag and length for the log format
@throws CommunicationException communication error
"""
List<TagAndLength> ret = new ArrayList<TagAndLength>();
if (LOGGER.isDebugEnabled()) {
... | java | protected List<TagAndLength> getLogFormat() throws CommunicationException {
List<TagAndLength> ret = new ArrayList<TagAndLength>();
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("GET log format");
}
// Get log format
byte[] data = template.get().getProvider().transceive(new CommandApdu(CommandEnum.GET_DATA, ... | [
"protected",
"List",
"<",
"TagAndLength",
">",
"getLogFormat",
"(",
")",
"throws",
"CommunicationException",
"{",
"List",
"<",
"TagAndLength",
">",
"ret",
"=",
"new",
"ArrayList",
"<",
"TagAndLength",
">",
"(",
")",
";",
"if",
"(",
"LOGGER",
".",
"isDebugEna... | Method used to get log format
@return list of tag and length for the log format
@throws CommunicationException communication error | [
"Method",
"used",
"to",
"get",
"log",
"format"
] | train | https://github.com/devnied/EMV-NFC-Paycard-Enrollment/blob/bfbd3960708689154a7a75c8a9a934197d738a5b/library/src/main/java/com/github/devnied/emvnfccard/parser/impl/AbstractParser.java#L214-L227 |
payneteasy/superfly | superfly-service/src/main/java/com/payneteasy/superfly/spring/velocity/VelocityEngineFactory.java | VelocityEngineFactory.initSpringResourceLoader | protected void initSpringResourceLoader(VelocityEngine velocityEngine, String resourceLoaderPath) {
"""
Initialize a SpringResourceLoader for the given VelocityEngine.
<p>Called by {@code initVelocityResourceLoader}.
@param velocityEngine the VelocityEngine to configure
@param resourceLoaderPath the path to loa... | java | protected void initSpringResourceLoader(VelocityEngine velocityEngine, String resourceLoaderPath) {
velocityEngine.setProperty(
RuntimeConstants.RESOURCE_LOADER, SpringResourceLoader.NAME);
velocityEngine.setProperty(
SpringResourceLoader.SPRING_RESOURCE_LOADER_CLASS, SpringResourceLoader.class.getName());
... | [
"protected",
"void",
"initSpringResourceLoader",
"(",
"VelocityEngine",
"velocityEngine",
",",
"String",
"resourceLoaderPath",
")",
"{",
"velocityEngine",
".",
"setProperty",
"(",
"RuntimeConstants",
".",
"RESOURCE_LOADER",
",",
"SpringResourceLoader",
".",
"NAME",
")",
... | Initialize a SpringResourceLoader for the given VelocityEngine.
<p>Called by {@code initVelocityResourceLoader}.
@param velocityEngine the VelocityEngine to configure
@param resourceLoaderPath the path to load Velocity resources from
@see SpringResourceLoader
@see #initVelocityResourceLoader | [
"Initialize",
"a",
"SpringResourceLoader",
"for",
"the",
"given",
"VelocityEngine",
".",
"<p",
">",
"Called",
"by",
"{"
] | train | https://github.com/payneteasy/superfly/blob/4cad6d0f8e951a61f3c302c49b13a51d179076f8/superfly-service/src/main/java/com/payneteasy/superfly/spring/velocity/VelocityEngineFactory.java#L329-L340 |
killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyJs.java | RecurlyJs.getRecurlySignature | public static String getRecurlySignature(String privateJsKey, Long unixTime, String nonce, List<String> extraParams) {
"""
Get Recurly.js Signature with extra parameter strings in the format "[param]=[value]"
See spec here: https://docs.recurly.com/deprecated-api-docs/recurlyjs/signatures
<p>
Returns a signatur... | java | public static String getRecurlySignature(String privateJsKey, Long unixTime, String nonce, List<String> extraParams) {
// Mandatory parameters shared by all signatures (as per spec)
extraParams = (extraParams == null) ? new ArrayList<String>() : extraParams;
extraParams.add(String.format(PARAMET... | [
"public",
"static",
"String",
"getRecurlySignature",
"(",
"String",
"privateJsKey",
",",
"Long",
"unixTime",
",",
"String",
"nonce",
",",
"List",
"<",
"String",
">",
"extraParams",
")",
"{",
"// Mandatory parameters shared by all signatures (as per spec)",
"extraParams",
... | Get Recurly.js Signature with extra parameter strings in the format "[param]=[value]"
See spec here: https://docs.recurly.com/deprecated-api-docs/recurlyjs/signatures
<p>
Returns a signature key for use with recurly.js BuildSubscriptionForm.
@param privateJsKey recurly.js private key
@param unixTime Unix timestamp, i.... | [
"Get",
"Recurly",
".",
"js",
"Signature",
"with",
"extra",
"parameter",
"strings",
"in",
"the",
"format",
"[",
"param",
"]",
"=",
"[",
"value",
"]",
"See",
"spec",
"here",
":",
"https",
":",
"//",
"docs",
".",
"recurly",
".",
"com",
"/",
"deprecated",
... | train | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyJs.java#L83-L91 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/io/watch/WatchMonitor.java | WatchMonitor.createAll | public static WatchMonitor createAll(Path path, Watcher watcher) {
"""
创建并初始化监听,监听所有事件
@param path 路径
@param watcher {@link Watcher}
@return {@link WatchMonitor}
"""
final WatchMonitor watchMonitor = create(path, EVENTS_ALL);
watchMonitor.setWatcher(watcher);
return watchMonitor;
} | java | public static WatchMonitor createAll(Path path, Watcher watcher){
final WatchMonitor watchMonitor = create(path, EVENTS_ALL);
watchMonitor.setWatcher(watcher);
return watchMonitor;
} | [
"public",
"static",
"WatchMonitor",
"createAll",
"(",
"Path",
"path",
",",
"Watcher",
"watcher",
")",
"{",
"final",
"WatchMonitor",
"watchMonitor",
"=",
"create",
"(",
"path",
",",
"EVENTS_ALL",
")",
";",
"watchMonitor",
".",
"setWatcher",
"(",
"watcher",
")",... | 创建并初始化监听,监听所有事件
@param path 路径
@param watcher {@link Watcher}
@return {@link WatchMonitor} | [
"创建并初始化监听,监听所有事件"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/watch/WatchMonitor.java#L238-L242 |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.createRollbackPatch | protected RollbackPatch createRollbackPatch(final String patchId, final Patch.PatchType patchType) {
"""
Create a rollback patch based on the recorded actions.
@param patchId the new patch id, depending on release or one-off
@param patchType the current patch identity
@return the rollback patch
"""
... | java | protected RollbackPatch createRollbackPatch(final String patchId, final Patch.PatchType patchType) {
// Process elements
final List<PatchElement> elements = new ArrayList<PatchElement>();
// Process layers
for (final PatchEntry entry : getLayers()) {
final PatchElement elemen... | [
"protected",
"RollbackPatch",
"createRollbackPatch",
"(",
"final",
"String",
"patchId",
",",
"final",
"Patch",
".",
"PatchType",
"patchType",
")",
"{",
"// Process elements",
"final",
"List",
"<",
"PatchElement",
">",
"elements",
"=",
"new",
"ArrayList",
"<",
"Pat... | Create a rollback patch based on the recorded actions.
@param patchId the new patch id, depending on release or one-off
@param patchType the current patch identity
@return the rollback patch | [
"Create",
"a",
"rollback",
"patch",
"based",
"on",
"the",
"recorded",
"actions",
"."
] | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L608-L634 |
ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java | StructuredDataMessage.asString | public final String asString(final Format format, final StructuredDataId structuredDataId) {
"""
Formats the structured data as described in RFC 5424.
@param format "full" will include the type and message. null will return only the STRUCTURED-DATA as
described in RFC 5424
@param structuredDataId Th... | java | public final String asString(final Format format, final StructuredDataId structuredDataId) {
final StringBuilder sb = new StringBuilder();
asString(format, structuredDataId, sb);
return sb.toString();
} | [
"public",
"final",
"String",
"asString",
"(",
"final",
"Format",
"format",
",",
"final",
"StructuredDataId",
"structuredDataId",
")",
"{",
"final",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"asString",
"(",
"format",
",",
"structuredData... | Formats the structured data as described in RFC 5424.
@param format "full" will include the type and message. null will return only the STRUCTURED-DATA as
described in RFC 5424
@param structuredDataId The SD-ID as described in RFC 5424. If null the value in the StructuredData
will be used.
@return The format... | [
"Formats",
"the",
"structured",
"data",
"as",
"described",
"in",
"RFC",
"5424",
"."
] | train | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java#L304-L308 |
kotcrab/vis-ui | ui/src/main/java/com/kotcrab/vis/ui/util/dialog/Dialogs.java | Dialogs.showOKDialog | public static VisDialog showOKDialog (Stage stage, String title, String text) {
"""
Dialog with given text and single OK button.
@param title dialog title
"""
final VisDialog dialog = new VisDialog(title);
dialog.closeOnEscape();
dialog.text(text);
dialog.button(ButtonType.OK.getText()).padBottom(3);
... | java | public static VisDialog showOKDialog (Stage stage, String title, String text) {
final VisDialog dialog = new VisDialog(title);
dialog.closeOnEscape();
dialog.text(text);
dialog.button(ButtonType.OK.getText()).padBottom(3);
dialog.pack();
dialog.centerWindow();
dialog.addListener(new InputListener() {
@... | [
"public",
"static",
"VisDialog",
"showOKDialog",
"(",
"Stage",
"stage",
",",
"String",
"title",
",",
"String",
"text",
")",
"{",
"final",
"VisDialog",
"dialog",
"=",
"new",
"VisDialog",
"(",
"title",
")",
";",
"dialog",
".",
"closeOnEscape",
"(",
")",
";",... | Dialog with given text and single OK button.
@param title dialog title | [
"Dialog",
"with",
"given",
"text",
"and",
"single",
"OK",
"button",
"."
] | train | https://github.com/kotcrab/vis-ui/blob/3b68f82d94ae32bffa2a3399c63f432e0f4908e0/ui/src/main/java/com/kotcrab/vis/ui/util/dialog/Dialogs.java#L53-L72 |
j-a-w-r/jawr-main-repo | jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/AbstractCSSGenerator.java | AbstractCSSGenerator.generateResourceForDebug | protected Reader generateResourceForDebug(Reader rd, GeneratorContext context) {
"""
Returns the resource in debug mode. Here an extra step is used to rewrite
the URL in debug mode
@param reader
the reader
@param context
the generator context
@return the reader
"""
// Rewrite the image URL
StringW... | java | protected Reader generateResourceForDebug(Reader rd, GeneratorContext context) {
// Rewrite the image URL
StringWriter writer = new StringWriter();
try {
IOUtils.copy(rd, writer);
String content = rewriteUrl(context, writer.toString());
rd = new StringReader(content);
} catch (IOException e) {
thro... | [
"protected",
"Reader",
"generateResourceForDebug",
"(",
"Reader",
"rd",
",",
"GeneratorContext",
"context",
")",
"{",
"// Rewrite the image URL",
"StringWriter",
"writer",
"=",
"new",
"StringWriter",
"(",
")",
";",
"try",
"{",
"IOUtils",
".",
"copy",
"(",
"rd",
... | Returns the resource in debug mode. Here an extra step is used to rewrite
the URL in debug mode
@param reader
the reader
@param context
the generator context
@return the reader | [
"Returns",
"the",
"resource",
"in",
"debug",
"mode",
".",
"Here",
"an",
"extra",
"step",
"is",
"used",
"to",
"rewrite",
"the",
"URL",
"in",
"debug",
"mode"
] | train | https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/AbstractCSSGenerator.java#L76-L89 |
baratine/baratine | framework/src/main/java/com/caucho/v5/vfs/PathImpl.java | PathImpl.sendfile | public void sendfile(OutputStream os, long offset, long length)
throws IOException {
"""
Utility to write the contents of this path to the destination stream.
@param os destination stream.
"""
if (os instanceof OutputStreamWithBuffer) {
writeToStream((OutputStreamWithBuffer) os);
}
els... | java | public void sendfile(OutputStream os, long offset, long length)
throws IOException
{
if (os instanceof OutputStreamWithBuffer) {
writeToStream((OutputStreamWithBuffer) os);
}
else {
writeToStream(os);
}
} | [
"public",
"void",
"sendfile",
"(",
"OutputStream",
"os",
",",
"long",
"offset",
",",
"long",
"length",
")",
"throws",
"IOException",
"{",
"if",
"(",
"os",
"instanceof",
"OutputStreamWithBuffer",
")",
"{",
"writeToStream",
"(",
"(",
"OutputStreamWithBuffer",
")",... | Utility to write the contents of this path to the destination stream.
@param os destination stream. | [
"Utility",
"to",
"write",
"the",
"contents",
"of",
"this",
"path",
"to",
"the",
"destination",
"stream",
"."
] | train | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/PathImpl.java#L1469-L1478 |
iipc/openwayback | wayback-core/src/main/java/org/archive/wayback/util/bdb/BDBMap.java | BDBMap.addTimestampForId | public static void addTimestampForId(String context, String ip, String time) {
"""
associate timestamp time with idenfier ip persistantly
@param context
@param ip
@param time
"""
BDBMap bdbMap = getContextMap(context);
bdbMap.put(ip, time);
} | java | public static void addTimestampForId(String context, String ip, String time) {
BDBMap bdbMap = getContextMap(context);
bdbMap.put(ip, time);
} | [
"public",
"static",
"void",
"addTimestampForId",
"(",
"String",
"context",
",",
"String",
"ip",
",",
"String",
"time",
")",
"{",
"BDBMap",
"bdbMap",
"=",
"getContextMap",
"(",
"context",
")",
";",
"bdbMap",
".",
"put",
"(",
"ip",
",",
"time",
")",
";",
... | associate timestamp time with idenfier ip persistantly
@param context
@param ip
@param time | [
"associate",
"timestamp",
"time",
"with",
"idenfier",
"ip",
"persistantly"
] | train | https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/util/bdb/BDBMap.java#L167-L170 |
RobotiumTech/robotium | robotium-solo/src/main/java/com/robotium/solo/ViewFetcher.java | ViewFetcher.getCurrentViews | public <T extends View> ArrayList<T> getCurrentViews(Class<T> classToFilterBy, boolean includeSubclasses) {
"""
Returns an {@code ArrayList} of {@code View}s of the specified {@code Class} located in the current
{@code Activity}.
@param classToFilterBy return all instances of this class, e.g. {@code Button.cla... | java | public <T extends View> ArrayList<T> getCurrentViews(Class<T> classToFilterBy, boolean includeSubclasses) {
return getCurrentViews(classToFilterBy, includeSubclasses, null);
} | [
"public",
"<",
"T",
"extends",
"View",
">",
"ArrayList",
"<",
"T",
">",
"getCurrentViews",
"(",
"Class",
"<",
"T",
">",
"classToFilterBy",
",",
"boolean",
"includeSubclasses",
")",
"{",
"return",
"getCurrentViews",
"(",
"classToFilterBy",
",",
"includeSubclasses... | Returns an {@code ArrayList} of {@code View}s of the specified {@code Class} located in the current
{@code Activity}.
@param classToFilterBy return all instances of this class, e.g. {@code Button.class} or {@code GridView.class}
@param includeSubclasses include instances of the subclasses in the {@code ArrayList} that... | [
"Returns",
"an",
"{",
"@code",
"ArrayList",
"}",
"of",
"{",
"@code",
"View",
"}",
"s",
"of",
"the",
"specified",
"{",
"@code",
"Class",
"}",
"located",
"in",
"the",
"current",
"{",
"@code",
"Activity",
"}",
"."
] | train | https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/ViewFetcher.java#L335-L337 |
khuxtable/seaglass | src/main/java/com/seaglasslookandfeel/ui/SeaGlassRootPaneUI.java | SeaGlassRootPaneUI.installBorder | public void installBorder(JRootPane root) {
"""
Installs the appropriate <code>Border</code> onto the <code>
JRootPane</code>.
@param root the root pane.
"""
int style = root.getWindowDecorationStyle();
if (style == JRootPane.NONE) {
LookAndFeel.uninstallBorder(root);
}... | java | public void installBorder(JRootPane root) {
int style = root.getWindowDecorationStyle();
if (style == JRootPane.NONE) {
LookAndFeel.uninstallBorder(root);
} else {
root.setBorder(new SeaGlassBorder(this, new Insets(0, 1, 1, 1)));
}
} | [
"public",
"void",
"installBorder",
"(",
"JRootPane",
"root",
")",
"{",
"int",
"style",
"=",
"root",
".",
"getWindowDecorationStyle",
"(",
")",
";",
"if",
"(",
"style",
"==",
"JRootPane",
".",
"NONE",
")",
"{",
"LookAndFeel",
".",
"uninstallBorder",
"(",
"r... | Installs the appropriate <code>Border</code> onto the <code>
JRootPane</code>.
@param root the root pane. | [
"Installs",
"the",
"appropriate",
"<code",
">",
"Border<",
"/",
"code",
">",
"onto",
"the",
"<code",
">",
"JRootPane<",
"/",
"code",
">",
"."
] | train | https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassRootPaneUI.java#L318-L326 |
jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/ReferenceField.java | ReferenceField.getReferenceRecordName | public String getReferenceRecordName() {
"""
Get the record name that this field references.
@return String Name of the record.
"""
if (m_recordReference != null)
return this.getReferenceRecord().getTableNames(false);
else
{ // This code just takes a guess
if ... | java | public String getReferenceRecordName()
{
if (m_recordReference != null)
return this.getReferenceRecord().getTableNames(false);
else
{ // This code just takes a guess
if (this.getClass().getName().indexOf("Field") != -1)
return this.getClass().getName... | [
"public",
"String",
"getReferenceRecordName",
"(",
")",
"{",
"if",
"(",
"m_recordReference",
"!=",
"null",
")",
"return",
"this",
".",
"getReferenceRecord",
"(",
")",
".",
"getTableNames",
"(",
"false",
")",
";",
"else",
"{",
"// This code just takes a guess",
"... | Get the record name that this field references.
@return String Name of the record. | [
"Get",
"the",
"record",
"name",
"that",
"this",
"field",
"references",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/ReferenceField.java#L136-L150 |
lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/application/config/support/DefaultApplicationObjectConfigurer.java | DefaultApplicationObjectConfigurer.configureCommandLabel | protected void configureCommandLabel(CommandLabelConfigurable configurable, String objectName) {
"""
Sets the {@link CommandButtonLabelInfo} of the given object. The label
info is created after loading the encoded label string from this
instance's {@link MessageSource} using a message code in the format
<pre>... | java | protected void configureCommandLabel(CommandLabelConfigurable configurable, String objectName) {
Assert.notNull(configurable, "configurable");
Assert.notNull(objectName, "objectName");
String labelStr = loadMessage(objectName + "." + LABEL_KEY);
if (StringUtils.hasText(labelStr)) {
CommandButtonLabelInfo l... | [
"protected",
"void",
"configureCommandLabel",
"(",
"CommandLabelConfigurable",
"configurable",
",",
"String",
"objectName",
")",
"{",
"Assert",
".",
"notNull",
"(",
"configurable",
",",
"\"configurable\"",
")",
";",
"Assert",
".",
"notNull",
"(",
"objectName",
",",
... | Sets the {@link CommandButtonLabelInfo} of the given object. The label
info is created after loading the encoded label string from this
instance's {@link MessageSource} using a message code in the format
<pre>
<objectName>.label
</pre>
@param configurable The object to be configured. Must not be null.
@param ob... | [
"Sets",
"the",
"{",
"@link",
"CommandButtonLabelInfo",
"}",
"of",
"the",
"given",
"object",
".",
"The",
"label",
"info",
"is",
"created",
"after",
"loading",
"the",
"encoded",
"label",
"string",
"from",
"this",
"instance",
"s",
"{",
"@link",
"MessageSource",
... | train | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/application/config/support/DefaultApplicationObjectConfigurer.java#L427-L437 |
mailin-api/sendinblue-java-mvn | src/main/java/com/sendinblue/Sendinblue.java | Sendinblue.get_webhooks | public String get_webhooks(Map<String, String> data) {
"""
/*
To retrieve details of all webhooks.
@param {Object} data contains json objects as a key value pair from HashMap.
@options data {String} is_plat: Flag to get webhooks. Possible values – 0 & 1. Example: to get Transactional webhooks, use $is_plat=0, t... | java | public String get_webhooks(Map<String, String> data) {
String is_plat = data.get("is_plat");
String url;
if (EMPTY_STRING.equals(is_plat)) {
url = "webhook/";
}
else {
url = "webhook/is_plat/" + is_plat + "/";
}
return get(url, EMPTY_STRING... | [
"public",
"String",
"get_webhooks",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"data",
")",
"{",
"String",
"is_plat",
"=",
"data",
".",
"get",
"(",
"\"is_plat\"",
")",
";",
"String",
"url",
";",
"if",
"(",
"EMPTY_STRING",
".",
"equals",
"(",
"is_pl... | /*
To retrieve details of all webhooks.
@param {Object} data contains json objects as a key value pair from HashMap.
@options data {String} is_plat: Flag to get webhooks. Possible values – 0 & 1. Example: to get Transactional webhooks, use $is_plat=0, to get Marketing webhooks, use $is_plat=1, & to get all webhooks, us... | [
"/",
"*",
"To",
"retrieve",
"details",
"of",
"all",
"webhooks",
"."
] | train | https://github.com/mailin-api/sendinblue-java-mvn/blob/3a186b004003450f18d619aa084adc8d75086183/src/main/java/com/sendinblue/Sendinblue.java#L699-L709 |
Netflix/governator | governator-legacy/src/main/java/com/netflix/governator/guice/ModulesEx.java | ModulesEx.fromClass | public static Module fromClass(final Class<?> cls, final boolean override) {
"""
Create a single module that derived from all bootstrap annotations
on a class, where that class itself is a module.
For example,
<pre>
{@code
public class MainApplicationModule extends AbstractModule {
@Override
public void c... | java | public static Module fromClass(final Class<?> cls, final boolean override) {
List<Module> modules = new ArrayList<>();
// Iterate through all annotations of the main class, create a binding for the annotation
// and add the module to the list of modules to install
for (final Annotation a... | [
"public",
"static",
"Module",
"fromClass",
"(",
"final",
"Class",
"<",
"?",
">",
"cls",
",",
"final",
"boolean",
"override",
")",
"{",
"List",
"<",
"Module",
">",
"modules",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"// Iterate through all annotations of... | Create a single module that derived from all bootstrap annotations
on a class, where that class itself is a module.
For example,
<pre>
{@code
public class MainApplicationModule extends AbstractModule {
@Override
public void configure() {
// Application specific bindings here
}
public static void main(String[] args) {... | [
"Create",
"a",
"single",
"module",
"that",
"derived",
"from",
"all",
"bootstrap",
"annotations",
"on",
"a",
"class",
"where",
"that",
"class",
"itself",
"is",
"a",
"module",
"."
] | train | https://github.com/Netflix/governator/blob/c1f4bb1518e759c61f2e9cad8a896ec6beba0294/governator-legacy/src/main/java/com/netflix/governator/guice/ModulesEx.java#L81-L109 |
netty/netty | buffer/src/main/java/io/netty/buffer/Unpooled.java | Unpooled.wrappedBuffer | public static ByteBuf wrappedBuffer(int maxNumComponents, ByteBuf... buffers) {
"""
Creates a new big-endian composite buffer which wraps the readable bytes of the
specified buffers without copying them. A modification on the content
of the specified buffers will be visible to the returned buffer.
@param maxNu... | java | public static ByteBuf wrappedBuffer(int maxNumComponents, ByteBuf... buffers) {
switch (buffers.length) {
case 0:
break;
case 1:
ByteBuf buffer = buffers[0];
if (buffer.isReadable()) {
return wrappedBuffer(buffer.order(BIG_ENDIAN));
... | [
"public",
"static",
"ByteBuf",
"wrappedBuffer",
"(",
"int",
"maxNumComponents",
",",
"ByteBuf",
"...",
"buffers",
")",
"{",
"switch",
"(",
"buffers",
".",
"length",
")",
"{",
"case",
"0",
":",
"break",
";",
"case",
"1",
":",
"ByteBuf",
"buffer",
"=",
"bu... | Creates a new big-endian composite buffer which wraps the readable bytes of the
specified buffers without copying them. A modification on the content
of the specified buffers will be visible to the returned buffer.
@param maxNumComponents Advisement as to how many independent buffers are allowed to exist before
consol... | [
"Creates",
"a",
"new",
"big",
"-",
"endian",
"composite",
"buffer",
"which",
"wraps",
"the",
"readable",
"bytes",
"of",
"the",
"specified",
"buffers",
"without",
"copying",
"them",
".",
"A",
"modification",
"on",
"the",
"content",
"of",
"the",
"specified",
"... | train | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/Unpooled.java#L306-L329 |
UrielCh/ovh-java-sdk | ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java | ApiOvhDbaaslogs.serviceName_PUT | public OvhOperation serviceName_PUT(String serviceName, String displayName, Boolean isCapped) throws IOException {
"""
Update the service properties
REST: PUT /dbaas/logs/{serviceName}
@param serviceName [required] Service name
@param displayName [required] Service custom name
@param isCapped [required] If s... | java | public OvhOperation serviceName_PUT(String serviceName, String displayName, Boolean isCapped) throws IOException {
String qPath = "/dbaas/logs/{serviceName}";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "displayName", displayName);
addBody(... | [
"public",
"OvhOperation",
"serviceName_PUT",
"(",
"String",
"serviceName",
",",
"String",
"displayName",
",",
"Boolean",
"isCapped",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/dbaas/logs/{serviceName}\"",
";",
"StringBuilder",
"sb",
"=",
"path",
... | Update the service properties
REST: PUT /dbaas/logs/{serviceName}
@param serviceName [required] Service name
@param displayName [required] Service custom name
@param isCapped [required] If set, block indexation when plan's limit is reached | [
"Update",
"the",
"service",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java#L1011-L1019 |
ogaclejapan/SmartTabLayout | utils-v4/src/main/java/com/ogaclejapan/smarttablayout/utils/v4/Bundler.java | Bundler.putString | public Bundler putString(String key, String value) {
"""
Inserts a String value into the mapping of this Bundle, replacing
any existing value for the given key. Either key or value may be null.
@param key a String, or null
@param value a String, or null
@return this
"""
bundle.putString(key, value);... | java | public Bundler putString(String key, String value) {
bundle.putString(key, value);
return this;
} | [
"public",
"Bundler",
"putString",
"(",
"String",
"key",
",",
"String",
"value",
")",
"{",
"bundle",
".",
"putString",
"(",
"key",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Inserts a String value into the mapping of this Bundle, replacing
any existing value for the given key. Either key or value may be null.
@param key a String, or null
@param value a String, or null
@return this | [
"Inserts",
"a",
"String",
"value",
"into",
"the",
"mapping",
"of",
"this",
"Bundle",
"replacing",
"any",
"existing",
"value",
"for",
"the",
"given",
"key",
".",
"Either",
"key",
"or",
"value",
"may",
"be",
"null",
"."
] | train | https://github.com/ogaclejapan/SmartTabLayout/blob/712e81a92f1e12a3c33dcbda03d813e0162e8589/utils-v4/src/main/java/com/ogaclejapan/smarttablayout/utils/v4/Bundler.java#L430-L433 |
lightblueseas/file-worker | src/main/java/de/alpharogroup/file/checksum/ChecksumExtensions.java | ChecksumExtensions.getChecksum | public static String getChecksum(final Byte[] bytes, final String algorithm)
throws NoSuchAlgorithmException {
"""
Gets the checksum from the given byte array with an instance of.
@param bytes
the Byte object array.
@param algorithm
the algorithm to get the checksum. This could be for instance "MD4", "MD5"... | java | public static String getChecksum(final Byte[] bytes, final String algorithm)
throws NoSuchAlgorithmException
{
return getChecksum(ArrayUtils.toPrimitive(bytes), algorithm);
} | [
"public",
"static",
"String",
"getChecksum",
"(",
"final",
"Byte",
"[",
"]",
"bytes",
",",
"final",
"String",
"algorithm",
")",
"throws",
"NoSuchAlgorithmException",
"{",
"return",
"getChecksum",
"(",
"ArrayUtils",
".",
"toPrimitive",
"(",
"bytes",
")",
",",
"... | Gets the checksum from the given byte array with an instance of.
@param bytes
the Byte object array.
@param algorithm
the algorithm to get the checksum. This could be for instance "MD4", "MD5",
"SHA-1", "SHA-256", "SHA-384" or "SHA-512".
@return The checksum from the file as a String object.
@throws NoSuchAlgorithmExc... | [
"Gets",
"the",
"checksum",
"from",
"the",
"given",
"byte",
"array",
"with",
"an",
"instance",
"of",
"."
] | train | https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/checksum/ChecksumExtensions.java#L175-L179 |
yavijava/yavijava | src/main/java/com/vmware/vim25/mo/GuestWindowsRegistryManager.java | GuestWindowsRegistryManager.deleteRegistryValueInGuest | public void deleteRegistryValueInGuest(VirtualMachine vm, GuestAuthentication auth, GuestRegValueNameSpec valueName) throws GuestComponentsOutOfDate, GuestOperationsFault,
GuestOperationsUnavailable, GuestPermissionDenied, GuestRegistryKeyInvalid, GuestRegistryValueNotFound, InvalidGuestLogin, InvalidPowerState... | java | public void deleteRegistryValueInGuest(VirtualMachine vm, GuestAuthentication auth, GuestRegValueNameSpec valueName) throws GuestComponentsOutOfDate, GuestOperationsFault,
GuestOperationsUnavailable, GuestPermissionDenied, GuestRegistryKeyInvalid, GuestRegistryValueNotFound, InvalidGuestLogin, InvalidPowerState... | [
"public",
"void",
"deleteRegistryValueInGuest",
"(",
"VirtualMachine",
"vm",
",",
"GuestAuthentication",
"auth",
",",
"GuestRegValueNameSpec",
"valueName",
")",
"throws",
"GuestComponentsOutOfDate",
",",
"GuestOperationsFault",
",",
"GuestOperationsUnavailable",
",",
"GuestPe... | Delete a registry value.
@param vm Virtual machine to perform the operation on.
@param auth The guest authentication data.
@param valueName The registry value name to be deleted. The Value "name" (specified in {@link com.vmware.vim25.GuestRegValueNameSpec GuestRegValueNameSpec}) can be empty. If "name" is ... | [
"Delete",
"a",
"registry",
"value",
"."
] | train | https://github.com/yavijava/yavijava/blob/27fd2c5826115782d5eeb934f86e3e39240179cd/src/main/java/com/vmware/vim25/mo/GuestWindowsRegistryManager.java#L119-L123 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.