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 |
|---|---|---|---|---|---|---|---|---|---|---|
Alluxio/alluxio | core/common/src/main/java/alluxio/grpc/GrpcSerializationUtils.java | GrpcSerializationUtils.addBuffersToStream | public static boolean addBuffersToStream(ByteBuf[] buffers, OutputStream stream) {
"""
Add the given buffers directly to the gRPC output stream.
@param buffers the buffers to be added
@param stream the output stream
@return whether the buffers are added successfully
"""
if (!sZeroCopySendSupported || ... | java | public static boolean addBuffersToStream(ByteBuf[] buffers, OutputStream stream) {
if (!sZeroCopySendSupported || !stream.getClass().equals(sBufferList.getDeclaringClass())) {
return false;
}
try {
if (sCurrent.get(stream) != null) {
return false;
}
for (ByteBuf buffer : buff... | [
"public",
"static",
"boolean",
"addBuffersToStream",
"(",
"ByteBuf",
"[",
"]",
"buffers",
",",
"OutputStream",
"stream",
")",
"{",
"if",
"(",
"!",
"sZeroCopySendSupported",
"||",
"!",
"stream",
".",
"getClass",
"(",
")",
".",
"equals",
"(",
"sBufferList",
".... | Add the given buffers directly to the gRPC output stream.
@param buffers the buffers to be added
@param stream the output stream
@return whether the buffers are added successfully | [
"Add",
"the",
"given",
"buffers",
"directly",
"to",
"the",
"gRPC",
"output",
"stream",
"."
] | train | https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/grpc/GrpcSerializationUtils.java#L180-L200 |
JDBDT/jdbdt | src/main/java/org/jdbdt/Log.java | Log.create | static Log create(File outputFile) {
"""
Creator method (file variant).
@param outputFile Output file.
@return A new log instance.
"""
try {
return new Log(
new PrintStream(
outputFile.getName().endsWith(".gz") ?
new GZIPOutputStream(new FileOutputS... | java | static Log create(File outputFile) {
try {
return new Log(
new PrintStream(
outputFile.getName().endsWith(".gz") ?
new GZIPOutputStream(new FileOutputStream(outputFile))
: new FileOutputStream(outputFile)),
false);
}
c... | [
"static",
"Log",
"create",
"(",
"File",
"outputFile",
")",
"{",
"try",
"{",
"return",
"new",
"Log",
"(",
"new",
"PrintStream",
"(",
"outputFile",
".",
"getName",
"(",
")",
".",
"endsWith",
"(",
"\".gz\"",
")",
"?",
"new",
"GZIPOutputStream",
"(",
"new",
... | Creator method (file variant).
@param outputFile Output file.
@return A new log instance. | [
"Creator",
"method",
"(",
"file",
"variant",
")",
"."
] | train | https://github.com/JDBDT/jdbdt/blob/7e32845ad41dfbc5d6fd0fd561e3613697186df4/src/main/java/org/jdbdt/Log.java#L84-L96 |
jmchilton/galaxy-bootstrap | src/main/java/com/github/jmchilton/galaxybootstrap/BootStrapper.java | BootStrapper.buildLogPath | private String buildLogPath(File bootstrapLogDir, String logFileName) {
"""
Constructs a path of a file under the bootstrap log directory.
@param bootstrapLogDir The File defining the log directory.
@param logFileName The name of the log file.
@return The full path to the log file.
"""
return new Fil... | java | private String buildLogPath(File bootstrapLogDir, String logFileName) {
return new File(bootstrapLogDir, logFileName).getAbsolutePath();
} | [
"private",
"String",
"buildLogPath",
"(",
"File",
"bootstrapLogDir",
",",
"String",
"logFileName",
")",
"{",
"return",
"new",
"File",
"(",
"bootstrapLogDir",
",",
"logFileName",
")",
".",
"getAbsolutePath",
"(",
")",
";",
"}"
] | Constructs a path of a file under the bootstrap log directory.
@param bootstrapLogDir The File defining the log directory.
@param logFileName The name of the log file.
@return The full path to the log file. | [
"Constructs",
"a",
"path",
"of",
"a",
"file",
"under",
"the",
"bootstrap",
"log",
"directory",
"."
] | train | https://github.com/jmchilton/galaxy-bootstrap/blob/4a899f5e6ec0c9f6f4b9b21d5a0320e5925ec649/src/main/java/com/github/jmchilton/galaxybootstrap/BootStrapper.java#L71-L73 |
aws/aws-sdk-java | aws-java-sdk-iot1clickprojects/src/main/java/com/amazonaws/services/iot1clickprojects/model/UpdatePlacementRequest.java | UpdatePlacementRequest.withAttributes | public UpdatePlacementRequest withAttributes(java.util.Map<String, String> attributes) {
"""
<p>
The user-defined object of attributes used to update the placement. The maximum number of key/value pairs is 50.
</p>
@param attributes
The user-defined object of attributes used to update the placement. The maxi... | java | public UpdatePlacementRequest withAttributes(java.util.Map<String, String> attributes) {
setAttributes(attributes);
return this;
} | [
"public",
"UpdatePlacementRequest",
"withAttributes",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"attributes",
")",
"{",
"setAttributes",
"(",
"attributes",
")",
";",
"return",
"this",
";",
"}"
] | <p>
The user-defined object of attributes used to update the placement. The maximum number of key/value pairs is 50.
</p>
@param attributes
The user-defined object of attributes used to update the placement. The maximum number of key/value pairs
is 50.
@return Returns a reference to this object so that method calls ca... | [
"<p",
">",
"The",
"user",
"-",
"defined",
"object",
"of",
"attributes",
"used",
"to",
"update",
"the",
"placement",
".",
"The",
"maximum",
"number",
"of",
"key",
"/",
"value",
"pairs",
"is",
"50",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iot1clickprojects/src/main/java/com/amazonaws/services/iot1clickprojects/model/UpdatePlacementRequest.java#L165-L168 |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/LabelsApi.java | LabelsApi.updateLabelName | public Label updateLabelName(Object projectIdOrPath, String name, String newName, String description, Integer priority) throws GitLabApiException {
"""
Update the specified label
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param name the name for the lab... | java | public Label updateLabelName(Object projectIdOrPath, String name, String newName, String description, Integer priority) throws GitLabApiException {
return (updateLabel(projectIdOrPath, name, newName, null, description, priority));
} | [
"public",
"Label",
"updateLabelName",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"name",
",",
"String",
"newName",
",",
"String",
"description",
",",
"Integer",
"priority",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"updateLabel",
"(",
"project... | Update the specified label
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param name the name for the label
@param newName the new name for the label
@param description the description for the label
@param priority the priority for the label
@return the modified La... | [
"Update",
"the",
"specified",
"label"
] | train | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/LabelsApi.java#L142-L144 |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/util/Maps.java | Maps.putIntoValueCollection | public static <K, V, C extends Collection<V>> void putIntoValueCollection(Map<K, C> map, K key, V value, CollectionFactory<V> cf) {
"""
Adds the value to the collection given by map.get(key). A new collection is created using the supplied CollectionFactory.
"""
C c = map.get(key);
if (c == null) {
... | java | public static <K, V, C extends Collection<V>> void putIntoValueCollection(Map<K, C> map, K key, V value, CollectionFactory<V> cf) {
C c = map.get(key);
if (c == null) {
c = ErasureUtils.<C>uncheckedCast(cf.newCollection());
map.put(key, c);
}
c.add(value);
} | [
"public",
"static",
"<",
"K",
",",
"V",
",",
"C",
"extends",
"Collection",
"<",
"V",
">",
">",
"void",
"putIntoValueCollection",
"(",
"Map",
"<",
"K",
",",
"C",
">",
"map",
",",
"K",
"key",
",",
"V",
"value",
",",
"CollectionFactory",
"<",
"V",
">"... | Adds the value to the collection given by map.get(key). A new collection is created using the supplied CollectionFactory. | [
"Adds",
"the",
"value",
"to",
"the",
"collection",
"given",
"by",
"map",
".",
"get",
"(",
"key",
")",
".",
"A",
"new",
"collection",
"is",
"created",
"using",
"the",
"supplied",
"CollectionFactory",
"."
] | train | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Maps.java#L43-L50 |
podio/podio-java | src/main/java/com/podio/status/StatusAPI.java | StatusAPI.createStatus | public int createStatus(int spaceId, StatusCreate status) {
"""
Creates a new status message for a user on a specific space. A status
update is simply a short text message that the user wishes to share with
the rest of the space.
@param status
The data for the new status message
@return The id of the newly ... | java | public int createStatus(int spaceId, StatusCreate status) {
return getResourceFactory()
.getApiResource("/status/space/" + spaceId + "/")
.entity(status, MediaType.APPLICATION_JSON_TYPE)
.post(StatusCreateResponse.class).getId();
} | [
"public",
"int",
"createStatus",
"(",
"int",
"spaceId",
",",
"StatusCreate",
"status",
")",
"{",
"return",
"getResourceFactory",
"(",
")",
".",
"getApiResource",
"(",
"\"/status/space/\"",
"+",
"spaceId",
"+",
"\"/\"",
")",
".",
"entity",
"(",
"status",
",",
... | Creates a new status message for a user on a specific space. A status
update is simply a short text message that the user wishes to share with
the rest of the space.
@param status
The data for the new status message
@return The id of the newly created status message | [
"Creates",
"a",
"new",
"status",
"message",
"for",
"a",
"user",
"on",
"a",
"specific",
"space",
".",
"A",
"status",
"update",
"is",
"simply",
"a",
"short",
"text",
"message",
"that",
"the",
"user",
"wishes",
"to",
"share",
"with",
"the",
"rest",
"of",
... | train | https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/status/StatusAPI.java#L32-L37 |
cdk/cdk | tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java | IdentityTemplateLibrary.encodeEntry | static String encodeEntry(Entry<String, Point2d[]> entry) {
"""
Encodes an entry in a compact string representation. The encoded entry is a SMILES string
with the coordinates suffixed in binary.
@param entry the entry to encode
@return encoded entry
"""
StringBuilder sb = new StringBuilder();
... | java | static String encodeEntry(Entry<String, Point2d[]> entry) {
StringBuilder sb = new StringBuilder();
sb.append(entry.getKey());
sb.append(' ');
sb.append(encodeCoordinates(entry.getValue()));
return sb.toString();
} | [
"static",
"String",
"encodeEntry",
"(",
"Entry",
"<",
"String",
",",
"Point2d",
"[",
"]",
">",
"entry",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"sb",
".",
"append",
"(",
"entry",
".",
"getKey",
"(",
")",
")",
";",... | Encodes an entry in a compact string representation. The encoded entry is a SMILES string
with the coordinates suffixed in binary.
@param entry the entry to encode
@return encoded entry | [
"Encodes",
"an",
"entry",
"in",
"a",
"compact",
"string",
"representation",
".",
"The",
"encoded",
"entry",
"is",
"a",
"SMILES",
"string",
"with",
"the",
"coordinates",
"suffixed",
"in",
"binary",
"."
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java#L281-L287 |
tvesalainen/lpg | src/main/java/org/vesalainen/regex/Regex.java | Regex.replace | public void replace(PushbackReader in, int bufferSize, Writer out, String format) throws IOException {
"""
Writes in to out replacing every match with a string
@param in
@param bufferSize
@param out
@param format
@throws java.io.IOException
@see String.format
"""
InputReader reader = Input.getIn... | java | public void replace(PushbackReader in, int bufferSize, Writer out, String format) throws IOException
{
InputReader reader = Input.getInstance(in, bufferSize);
ObsoleteSimpleReplacer fsp = new ObsoleteSimpleReplacer(format);
replace(reader, out, fsp);
} | [
"public",
"void",
"replace",
"(",
"PushbackReader",
"in",
",",
"int",
"bufferSize",
",",
"Writer",
"out",
",",
"String",
"format",
")",
"throws",
"IOException",
"{",
"InputReader",
"reader",
"=",
"Input",
".",
"getInstance",
"(",
"in",
",",
"bufferSize",
")"... | Writes in to out replacing every match with a string
@param in
@param bufferSize
@param out
@param format
@throws java.io.IOException
@see String.format | [
"Writes",
"in",
"to",
"out",
"replacing",
"every",
"match",
"with",
"a",
"string"
] | train | https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/regex/Regex.java#L782-L787 |
BotMill/fb-botmill | src/main/java/co/aurasphere/botmill/fb/model/outcoming/factory/AirlineFlightUpdateTemplateBuilder.java | AirlineFlightUpdateTemplateBuilder.addQuickReply | public AirlineFlightUpdateTemplateBuilder addQuickReply(String title,
String payload) {
"""
Adds a {@link QuickReply} to the current object.
@param title
the quick reply button label. It can't be empty.
@param payload
the payload sent back when the button is pressed. It can't be
empty.
@return this buil... | java | public AirlineFlightUpdateTemplateBuilder addQuickReply(String title,
String payload) {
this.messageBuilder.addQuickReply(title, payload);
return this;
} | [
"public",
"AirlineFlightUpdateTemplateBuilder",
"addQuickReply",
"(",
"String",
"title",
",",
"String",
"payload",
")",
"{",
"this",
".",
"messageBuilder",
".",
"addQuickReply",
"(",
"title",
",",
"payload",
")",
";",
"return",
"this",
";",
"}"
] | Adds a {@link QuickReply} to the current object.
@param title
the quick reply button label. It can't be empty.
@param payload
the payload sent back when the button is pressed. It can't be
empty.
@return this builder.
@see <a href=
"https://developers.facebook.com/docs/messenger-platform/send-api-reference/quick-replie... | [
"Adds",
"a",
"{",
"@link",
"QuickReply",
"}",
"to",
"the",
"current",
"object",
"."
] | train | https://github.com/BotMill/fb-botmill/blob/d94da3615a7339822c137ef75c92a03d791ee969/src/main/java/co/aurasphere/botmill/fb/model/outcoming/factory/AirlineFlightUpdateTemplateBuilder.java#L141-L145 |
apiman/apiman | manager/api/beans/src/main/java/io/apiman/manager/api/beans/audit/data/EntityUpdatedData.java | EntityUpdatedData.addChange | public void addChange(String name, String before, String after) {
"""
Adds a single change.
@param name the name
@param before the before state
@param after the after state
"""
addChange(new EntityFieldChange(name, before, after));
} | java | public void addChange(String name, String before, String after) {
addChange(new EntityFieldChange(name, before, after));
} | [
"public",
"void",
"addChange",
"(",
"String",
"name",
",",
"String",
"before",
",",
"String",
"after",
")",
"{",
"addChange",
"(",
"new",
"EntityFieldChange",
"(",
"name",
",",
"before",
",",
"after",
")",
")",
";",
"}"
] | Adds a single change.
@param name the name
@param before the before state
@param after the after state | [
"Adds",
"a",
"single",
"change",
"."
] | train | https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/beans/src/main/java/io/apiman/manager/api/beans/audit/data/EntityUpdatedData.java#L46-L48 |
operasoftware/operaprestodriver | src/com/opera/core/systems/OperaExtensions.java | OperaExtensions.createOEXDirectory | private void createOEXDirectory(String wuid) throws IOException {
"""
Create the minimal directory structure and prefs.dat for an Opera extension.
@param wuid ID of extension as known in widgets.dat
"""
File oexDirectory = new File(directory, wuid);
if (!oexDirectory.exists() && !oexDirectory.mkdirs... | java | private void createOEXDirectory(String wuid) throws IOException {
File oexDirectory = new File(directory, wuid);
if (!oexDirectory.exists() && !oexDirectory.mkdirs()) {
throw new WebDriverException("Unable to create directory path: " + directory.getPath());
}
File prefsDatPath = new File(oexDirect... | [
"private",
"void",
"createOEXDirectory",
"(",
"String",
"wuid",
")",
"throws",
"IOException",
"{",
"File",
"oexDirectory",
"=",
"new",
"File",
"(",
"directory",
",",
"wuid",
")",
";",
"if",
"(",
"!",
"oexDirectory",
".",
"exists",
"(",
")",
"&&",
"!",
"o... | Create the minimal directory structure and prefs.dat for an Opera extension.
@param wuid ID of extension as known in widgets.dat | [
"Create",
"the",
"minimal",
"directory",
"structure",
"and",
"prefs",
".",
"dat",
"for",
"an",
"Opera",
"extension",
"."
] | train | https://github.com/operasoftware/operaprestodriver/blob/1ccceda80f1c1a0489171d17dcaa6e7b18fb4c01/src/com/opera/core/systems/OperaExtensions.java#L186-L194 |
sahan/RoboZombie | robozombie/src/main/java/com/lonepulse/robozombie/util/Entities.java | Entities.resolve | public static final Class<?> resolve(Class<?> genericType) {
"""
<p>Discovers the {@link HttpEntity} which is suitable for wrapping an instance of the given {@link Class}.
This discovery proceeds in the following order by checking the provided generic type:</p>
<ol>
<li>org.apache.http.{@link HttpEntity} --&g... | java | public static final Class<?> resolve(Class<?> genericType) {
assertNotNull(genericType);
try {
Class<?> entityType = HttpEntity.class.isAssignableFrom(genericType)? HttpEntity.class :
(byte[].class.isAssignableFrom(genericType)
|| Byte[].class.isAssignableFrom(genericType... | [
"public",
"static",
"final",
"Class",
"<",
"?",
">",
"resolve",
"(",
"Class",
"<",
"?",
">",
"genericType",
")",
"{",
"assertNotNull",
"(",
"genericType",
")",
";",
"try",
"{",
"Class",
"<",
"?",
">",
"entityType",
"=",
"HttpEntity",
".",
"class",
".",... | <p>Discovers the {@link HttpEntity} which is suitable for wrapping an instance of the given {@link Class}.
This discovery proceeds in the following order by checking the provided generic type:</p>
<ol>
<li>org.apache.http.{@link HttpEntity} --> returned as-is.</li>
<li>{@code byte[]}, {@link Byte}[] --> {@link B... | [
"<p",
">",
"Discovers",
"the",
"{",
"@link",
"HttpEntity",
"}",
"which",
"is",
"suitable",
"for",
"wrapping",
"an",
"instance",
"of",
"the",
"given",
"{",
"@link",
"Class",
"}",
".",
"This",
"discovery",
"proceeds",
"in",
"the",
"following",
"order",
"by",... | train | https://github.com/sahan/RoboZombie/blob/2e02f0d41647612e9d89360c5c48811ea86b33c8/robozombie/src/main/java/com/lonepulse/robozombie/util/Entities.java#L161-L187 |
OpenLiberty/open-liberty | dev/com.ibm.ws.microprofile.faulttolerance.2.0/src/com/ibm/ws/microprofile/faulttolerance20/state/FaultToleranceStateFactory.java | FaultToleranceStateFactory.createTimeoutState | public TimeoutState createTimeoutState(ScheduledExecutorService executorService, TimeoutPolicy policy, MetricRecorder metricRecorder) {
"""
Create an object implementing Timeout
@param executorService the executor to use to schedule the timeout callback
@param policy the TimeoutPolicy, may be {@code n... | java | public TimeoutState createTimeoutState(ScheduledExecutorService executorService, TimeoutPolicy policy, MetricRecorder metricRecorder) {
if (policy == null) {
return new TimeoutStateNullImpl();
} else {
return new TimeoutStateImpl(executorService, policy, metricRecorder);
... | [
"public",
"TimeoutState",
"createTimeoutState",
"(",
"ScheduledExecutorService",
"executorService",
",",
"TimeoutPolicy",
"policy",
",",
"MetricRecorder",
"metricRecorder",
")",
"{",
"if",
"(",
"policy",
"==",
"null",
")",
"{",
"return",
"new",
"TimeoutStateNullImpl",
... | Create an object implementing Timeout
@param executorService the executor to use to schedule the timeout callback
@param policy the TimeoutPolicy, may be {@code null}
@return a new TimeoutState | [
"Create",
"an",
"object",
"implementing",
"Timeout"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.faulttolerance.2.0/src/com/ibm/ws/microprofile/faulttolerance20/state/FaultToleranceStateFactory.java#L82-L88 |
cdk/cdk | tool/charges/src/main/java/org/openscience/cdk/charges/PiElectronegativity.java | PiElectronegativity.calculatePiElectronegativity | public double calculatePiElectronegativity(IAtomContainer ac, IAtom atom) {
"""
calculate the electronegativity of orbitals pi.
@param ac IAtomContainer
@param atom atom for which effective atom electronegativity should be calculated
@return piElectronegativity
"""
... | java | public double calculatePiElectronegativity(IAtomContainer ac, IAtom atom) {
return calculatePiElectronegativity(ac, atom, maxI, maxRS);
} | [
"public",
"double",
"calculatePiElectronegativity",
"(",
"IAtomContainer",
"ac",
",",
"IAtom",
"atom",
")",
"{",
"return",
"calculatePiElectronegativity",
"(",
"ac",
",",
"atom",
",",
"maxI",
",",
"maxRS",
")",
";",
"}"
] | calculate the electronegativity of orbitals pi.
@param ac IAtomContainer
@param atom atom for which effective atom electronegativity should be calculated
@return piElectronegativity | [
"calculate",
"the",
"electronegativity",
"of",
"orbitals",
"pi",
"."
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/charges/src/main/java/org/openscience/cdk/charges/PiElectronegativity.java#L82-L85 |
baratine/baratine | framework/src/main/java/com/caucho/v5/bartender/pod/PodsManagerConfigImpl.java | PodsManagerConfigImpl.parseConfigFile | private void parseConfigFile(PodsConfig podsConfig, String path) {
"""
/*
Parse the /config/pods/foo.cf configuration file. The configuration
is merged with the running PodsConfig.
"""
String configDir = "/config/pods";
PathImpl configPath = VfsOld.lookup("bfs://" + configDir + "/" + path);
... | java | private void parseConfigFile(PodsConfig podsConfig, String path)
{
String configDir = "/config/pods";
PathImpl configPath = VfsOld.lookup("bfs://" + configDir + "/" + path);
/*
ConfigContext config = new ConfigContext();
try {
podsConfig.setCurrentDepend(new Depend(configPath));
... | [
"private",
"void",
"parseConfigFile",
"(",
"PodsConfig",
"podsConfig",
",",
"String",
"path",
")",
"{",
"String",
"configDir",
"=",
"\"/config/pods\"",
";",
"PathImpl",
"configPath",
"=",
"VfsOld",
".",
"lookup",
"(",
"\"bfs://\"",
"+",
"configDir",
"+",
"\"/\""... | /*
Parse the /config/pods/foo.cf configuration file. The configuration
is merged with the running PodsConfig. | [
"/",
"*",
"Parse",
"the",
"/",
"config",
"/",
"pods",
"/",
"foo",
".",
"cf",
"configuration",
"file",
".",
"The",
"configuration",
"is",
"merged",
"with",
"the",
"running",
"PodsConfig",
"."
] | train | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/bartender/pod/PodsManagerConfigImpl.java#L345-L365 |
alkacon/opencms-core | src-gwt/org/opencms/ade/galleries/client/CmsGalleryControllerHandler.java | CmsGalleryControllerHandler.onUpdateCategoriesTree | public void onUpdateCategoriesTree(List<CmsCategoryTreeEntry> categoryTreeEntry, List<String> selectedCategories) {
"""
Will be triggered when the tree is selected.<p>
@param categoryTreeEntry the category root entry
@param selectedCategories the selected categories
"""
m_galleryDialog.getCategori... | java | public void onUpdateCategoriesTree(List<CmsCategoryTreeEntry> categoryTreeEntry, List<String> selectedCategories) {
m_galleryDialog.getCategoriesTab().updateContentTree(categoryTreeEntry, selectedCategories);
} | [
"public",
"void",
"onUpdateCategoriesTree",
"(",
"List",
"<",
"CmsCategoryTreeEntry",
">",
"categoryTreeEntry",
",",
"List",
"<",
"String",
">",
"selectedCategories",
")",
"{",
"m_galleryDialog",
".",
"getCategoriesTab",
"(",
")",
".",
"updateContentTree",
"(",
"cat... | Will be triggered when the tree is selected.<p>
@param categoryTreeEntry the category root entry
@param selectedCategories the selected categories | [
"Will",
"be",
"triggered",
"when",
"the",
"tree",
"is",
"selected",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/CmsGalleryControllerHandler.java#L374-L377 |
ngageoint/geopackage-core-java | src/main/java/mil/nga/geopackage/extension/RTreeIndexCoreExtension.java | RTreeIndexCoreExtension.dropRTreeIndex | public void dropRTreeIndex(String tableName, String geometryColumnName) {
"""
Drop the RTree Index Virtual Table
@param tableName
table name
@param geometryColumnName
geometry column name
"""
String sqlName = GeoPackageProperties.getProperty(SQL_PROPERTY,
DROP_PROPERTY);
try {
executeSQL(sqlN... | java | public void dropRTreeIndex(String tableName, String geometryColumnName) {
String sqlName = GeoPackageProperties.getProperty(SQL_PROPERTY,
DROP_PROPERTY);
try {
executeSQL(sqlName, tableName, geometryColumnName);
} catch (Exception e) {
// If no rtree module, try to delete manually
if (e.getMessage()... | [
"public",
"void",
"dropRTreeIndex",
"(",
"String",
"tableName",
",",
"String",
"geometryColumnName",
")",
"{",
"String",
"sqlName",
"=",
"GeoPackageProperties",
".",
"getProperty",
"(",
"SQL_PROPERTY",
",",
"DROP_PROPERTY",
")",
";",
"try",
"{",
"executeSQL",
"(",... | Drop the RTree Index Virtual Table
@param tableName
table name
@param geometryColumnName
geometry column name | [
"Drop",
"the",
"RTree",
"Index",
"Virtual",
"Table"
] | train | https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/RTreeIndexCoreExtension.java#L808-L825 |
SonarSource/sonarqube | server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDeliveryDao.java | WebhookDeliveryDao.selectOrderedByComponentUuid | public List<WebhookDeliveryLiteDto> selectOrderedByComponentUuid(DbSession dbSession, String componentUuid, int offset, int limit) {
"""
All the deliveries for the specified component. Results are ordered by descending date.
"""
return mapper(dbSession).selectOrderedByComponentUuid(componentUuid, new RowBo... | java | public List<WebhookDeliveryLiteDto> selectOrderedByComponentUuid(DbSession dbSession, String componentUuid, int offset, int limit) {
return mapper(dbSession).selectOrderedByComponentUuid(componentUuid, new RowBounds(offset, limit));
} | [
"public",
"List",
"<",
"WebhookDeliveryLiteDto",
">",
"selectOrderedByComponentUuid",
"(",
"DbSession",
"dbSession",
",",
"String",
"componentUuid",
",",
"int",
"offset",
",",
"int",
"limit",
")",
"{",
"return",
"mapper",
"(",
"dbSession",
")",
".",
"selectOrdered... | All the deliveries for the specified component. Results are ordered by descending date. | [
"All",
"the",
"deliveries",
"for",
"the",
"specified",
"component",
".",
"Results",
"are",
"ordered",
"by",
"descending",
"date",
"."
] | train | https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDeliveryDao.java#L56-L58 |
moparisthebest/beehive | beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/internal/InternalUtils.java | InternalUtils.addBindingUpdateError | public static void addBindingUpdateError( ServletRequest request, String expression, String message, Throwable cause ) {
"""
Add a BindingUpdateError to the request.
@param request the current ServletRequest.
@param expression the expression associated with this error.
@param message the error message.
@para... | java | public static void addBindingUpdateError( ServletRequest request, String expression, String message, Throwable cause )
{
Map errors = ( Map ) request.getAttribute( BINDING_UPDATE_ERRORS_ATTR );
if ( errors == null )
{
errors = new LinkedHashMap();
request.setAttribut... | [
"public",
"static",
"void",
"addBindingUpdateError",
"(",
"ServletRequest",
"request",
",",
"String",
"expression",
",",
"String",
"message",
",",
"Throwable",
"cause",
")",
"{",
"Map",
"errors",
"=",
"(",
"Map",
")",
"request",
".",
"getAttribute",
"(",
"BIND... | Add a BindingUpdateError to the request.
@param request the current ServletRequest.
@param expression the expression associated with this error.
@param message the error message.
@param cause the Throwable that caused the error. | [
"Add",
"a",
"BindingUpdateError",
"to",
"the",
"request",
"."
] | train | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/internal/InternalUtils.java#L560-L571 |
couchbase/couchbase-lite-java-core | src/main/java/com/couchbase/lite/Manager.java | Manager.openDatabase | @InterfaceAudience.Public
public Database openDatabase(String name, DatabaseOptions options)
throws CouchbaseLiteException {
"""
Returns the database with the given name. If the database is not yet open, the options given
will be applied; if it's already open, the options are ignored.
Multiple ca... | java | @InterfaceAudience.Public
public Database openDatabase(String name, DatabaseOptions options)
throws CouchbaseLiteException {
if (options == null)
options = getDefaultOptions(name);
Database db = getDatabase(name, !options.isCreate());
if (db != null && !db.isOpen()) {... | [
"@",
"InterfaceAudience",
".",
"Public",
"public",
"Database",
"openDatabase",
"(",
"String",
"name",
",",
"DatabaseOptions",
"options",
")",
"throws",
"CouchbaseLiteException",
"{",
"if",
"(",
"options",
"==",
"null",
")",
"options",
"=",
"getDefaultOptions",
"("... | Returns the database with the given name. If the database is not yet open, the options given
will be applied; if it's already open, the options are ignored.
Multiple calls with the same name will return the same {@link Database} instance.
@param name The name of the database. May NOT contain capital letters!
@param opt... | [
"Returns",
"the",
"database",
"with",
"the",
"given",
"name",
".",
"If",
"the",
"database",
"is",
"not",
"yet",
"open",
"the",
"options",
"given",
"will",
"be",
"applied",
";",
"if",
"it",
"s",
"already",
"open",
"the",
"options",
"are",
"ignored",
".",
... | train | https://github.com/couchbase/couchbase-lite-java-core/blob/3b275642e2d2f231fd155ad9def9c5e9eff3118e/src/main/java/com/couchbase/lite/Manager.java#L334-L345 |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java | ValueFileIOHelper.writeOutput | protected long writeOutput(OutputStream out, ValueData value) throws IOException {
"""
Stream value data to the output.
@param out
OutputStream
@param value
ValueData
@throws IOException
if error occurs
"""
if (value.isByteArray())
{
byte[] buff = value.getAsByteArray();
... | java | protected long writeOutput(OutputStream out, ValueData value) throws IOException
{
if (value.isByteArray())
{
byte[] buff = value.getAsByteArray();
out.write(buff);
return buff.length;
}
else
{
InputStream in;
if (value instanceo... | [
"protected",
"long",
"writeOutput",
"(",
"OutputStream",
"out",
",",
"ValueData",
"value",
")",
"throws",
"IOException",
"{",
"if",
"(",
"value",
".",
"isByteArray",
"(",
")",
")",
"{",
"byte",
"[",
"]",
"buff",
"=",
"value",
".",
"getAsByteArray",
"(",
... | Stream value data to the output.
@param out
OutputStream
@param value
ValueData
@throws IOException
if error occurs | [
"Stream",
"value",
"data",
"to",
"the",
"output",
"."
] | train | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java#L188-L232 |
google/closure-templates | java/src/com/google/template/soy/msgs/internal/SoyMsgIdComputer.java | SoyMsgIdComputer.computeMsgIdUsingBracedPhs | static long computeMsgIdUsingBracedPhs(
ImmutableList<SoyMsgPart> msgParts, @Nullable String meaning, @Nullable String contentType) {
"""
Computes an alternate unique message id for a message, given the message parts, the meaning
string (if any), and the content type (if any). These are the only elements in... | java | static long computeMsgIdUsingBracedPhs(
ImmutableList<SoyMsgPart> msgParts, @Nullable String meaning, @Nullable String contentType) {
return computeMsgIdHelper(msgParts, true, meaning, contentType);
} | [
"static",
"long",
"computeMsgIdUsingBracedPhs",
"(",
"ImmutableList",
"<",
"SoyMsgPart",
">",
"msgParts",
",",
"@",
"Nullable",
"String",
"meaning",
",",
"@",
"Nullable",
"String",
"contentType",
")",
"{",
"return",
"computeMsgIdHelper",
"(",
"msgParts",
",",
"tru... | Computes an alternate unique message id for a message, given the message parts, the meaning
string (if any), and the content type (if any). These are the only elements incorporated into
the message id.
<p>In particular, note that the id of a message does not change when its desc changes.
<p>Important: This is an alte... | [
"Computes",
"an",
"alternate",
"unique",
"message",
"id",
"for",
"a",
"message",
"given",
"the",
"message",
"parts",
"the",
"meaning",
"string",
"(",
"if",
"any",
")",
"and",
"the",
"content",
"type",
"(",
"if",
"any",
")",
".",
"These",
"are",
"the",
... | train | https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/msgs/internal/SoyMsgIdComputer.java#L70-L73 |
OpenLiberty/open-liberty | dev/com.ibm.ws.repository.resolver/src/com/ibm/ws/repository/resolver/internal/kernel/KernelResolverRepository.java | KernelResolverRepository.setPreferredVersion | public void setPreferredVersion(String featureName, String version) {
"""
Set the preferred version of the given feature
<p>
This is for when a user requests that a specific version should be installed.
<p>
If the feature is not in the repository or the version does not parse, this method does nothing.
<p>
W... | java | public void setPreferredVersion(String featureName, String version) {
if (!symbolicNameToFeature.containsKey(featureName)) {
featureName = publicNameToSymbolicName.get(featureName);
}
if (featureName != null) {
try {
Version v = Version.parseVersion(versi... | [
"public",
"void",
"setPreferredVersion",
"(",
"String",
"featureName",
",",
"String",
"version",
")",
"{",
"if",
"(",
"!",
"symbolicNameToFeature",
".",
"containsKey",
"(",
"featureName",
")",
")",
"{",
"featureName",
"=",
"publicNameToSymbolicName",
".",
"get",
... | Set the preferred version of the given feature
<p>
This is for when a user requests that a specific version should be installed.
<p>
If the feature is not in the repository or the version does not parse, this method does nothing.
<p>
When a preferred version is set, {@link #getFeature(String)} will return the preferred... | [
"Set",
"the",
"preferred",
"version",
"of",
"the",
"given",
"feature",
"<p",
">",
"This",
"is",
"for",
"when",
"a",
"user",
"requests",
"that",
"a",
"specific",
"version",
"should",
"be",
"installed",
".",
"<p",
">",
"If",
"the",
"feature",
"is",
"not",
... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository.resolver/src/com/ibm/ws/repository/resolver/internal/kernel/KernelResolverRepository.java#L319-L331 |
raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/implementation/MethodDelegation.java | MethodDelegation.toField | public static MethodDelegation toField(String name, FieldLocator.Factory fieldLocatorFactory, MethodGraph.Compiler methodGraphCompiler) {
"""
Delegates any intercepted method to invoke a non-{@code static} method on the instance of the supplied field. To be
considered a valid delegation target, a method must be v... | java | public static MethodDelegation toField(String name, FieldLocator.Factory fieldLocatorFactory, MethodGraph.Compiler methodGraphCompiler) {
return withDefaultConfiguration().toField(name, fieldLocatorFactory, methodGraphCompiler);
} | [
"public",
"static",
"MethodDelegation",
"toField",
"(",
"String",
"name",
",",
"FieldLocator",
".",
"Factory",
"fieldLocatorFactory",
",",
"MethodGraph",
".",
"Compiler",
"methodGraphCompiler",
")",
"{",
"return",
"withDefaultConfiguration",
"(",
")",
".",
"toField",
... | Delegates any intercepted method to invoke a non-{@code static} method on the instance of the supplied field. To be
considered a valid delegation target, a method must be visible and accessible to the instrumented type. This is the
case if the method's declaring type is either public or in the same package as the instr... | [
"Delegates",
"any",
"intercepted",
"method",
"to",
"invoke",
"a",
"non",
"-",
"{",
"@code",
"static",
"}",
"method",
"on",
"the",
"instance",
"of",
"the",
"supplied",
"field",
".",
"To",
"be",
"considered",
"a",
"valid",
"delegation",
"target",
"a",
"metho... | train | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/MethodDelegation.java#L496-L498 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/StreamTokenizer.java | StreamTokenizer.whitespaceChars | public void whitespaceChars(int low, int hi) {
"""
Specifies that the characters in the range from {@code low} to {@code hi}
shall be treated as whitespace characters by this tokenizer.
@param low
the first character in the range of whitespace characters.
@param hi
the last character in the range of whitesp... | java | public void whitespaceChars(int low, int hi) {
if (low < 0) {
low = 0;
}
if (hi > tokenTypes.length) {
hi = tokenTypes.length - 1;
}
for (int i = low; i <= hi; i++) {
tokenTypes[i] = TOKEN_WHITE;
}
} | [
"public",
"void",
"whitespaceChars",
"(",
"int",
"low",
",",
"int",
"hi",
")",
"{",
"if",
"(",
"low",
"<",
"0",
")",
"{",
"low",
"=",
"0",
";",
"}",
"if",
"(",
"hi",
">",
"tokenTypes",
".",
"length",
")",
"{",
"hi",
"=",
"tokenTypes",
".",
"len... | Specifies that the characters in the range from {@code low} to {@code hi}
shall be treated as whitespace characters by this tokenizer.
@param low
the first character in the range of whitespace characters.
@param hi
the last character in the range of whitespace characters. | [
"Specifies",
"that",
"the",
"characters",
"in",
"the",
"range",
"from",
"{",
"@code",
"low",
"}",
"to",
"{",
"@code",
"hi",
"}",
"shall",
"be",
"treated",
"as",
"whitespace",
"characters",
"by",
"this",
"tokenizer",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/StreamTokenizer.java#L642-L652 |
sarl/sarl | docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java | Utils.isDefaultValuedParameter | public static boolean isDefaultValuedParameter(Parameter param, SarlConfiguration configuration) {
"""
Replies the default value of the given parameter.
@param param the parameter.
@param configuration the configuration.
@return the default value or {@code null}.
"""
final AnnotationDesc annotation = Ut... | java | public static boolean isDefaultValuedParameter(Parameter param, SarlConfiguration configuration) {
final AnnotationDesc annotation = Utils.findFirst(param.annotations(), it ->
qualifiedNameEquals(it.annotationType().qualifiedTypeName(), getKeywords().getDefaultValueAnnnotationName()));
return annotation != null... | [
"public",
"static",
"boolean",
"isDefaultValuedParameter",
"(",
"Parameter",
"param",
",",
"SarlConfiguration",
"configuration",
")",
"{",
"final",
"AnnotationDesc",
"annotation",
"=",
"Utils",
".",
"findFirst",
"(",
"param",
".",
"annotations",
"(",
")",
",",
"it... | Replies the default value of the given parameter.
@param param the parameter.
@param configuration the configuration.
@return the default value or {@code null}. | [
"Replies",
"the",
"default",
"value",
"of",
"the",
"given",
"parameter",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java#L253-L257 |
Squarespace/cldr | core/src/main/java/com/squarespace/cldr/units/UnitFactorMap.java | UnitFactorMap.getPath | protected List<UnitFactor> getPath(Unit from, Unit to) {
"""
Find the shortest conversion path between the from and to units. Currently
we just look for path with the lowest precision, falling back to the
shortest path (fewest number of conversions to get from A to B).
"""
if (from == to) {
return ... | java | protected List<UnitFactor> getPath(Unit from, Unit to) {
if (from == to) {
return list(new UnitFactor(Rational.ONE, to));
}
// Find all paths between the two units.
List<List<UnitFactor>> paths = getPaths(from, to, new HashSet<>());
if (paths.isEmpty()) {
return Collections.emptyList();... | [
"protected",
"List",
"<",
"UnitFactor",
">",
"getPath",
"(",
"Unit",
"from",
",",
"Unit",
"to",
")",
"{",
"if",
"(",
"from",
"==",
"to",
")",
"{",
"return",
"list",
"(",
"new",
"UnitFactor",
"(",
"Rational",
".",
"ONE",
",",
"to",
")",
")",
";",
... | Find the shortest conversion path between the from and to units. Currently
we just look for path with the lowest precision, falling back to the
shortest path (fewest number of conversions to get from A to B). | [
"Find",
"the",
"shortest",
"conversion",
"path",
"between",
"the",
"from",
"and",
"to",
"units",
".",
"Currently",
"we",
"just",
"look",
"for",
"path",
"with",
"the",
"lowest",
"precision",
"falling",
"back",
"to",
"the",
"shortest",
"path",
"(",
"fewest",
... | train | https://github.com/Squarespace/cldr/blob/54b752d4ec2457df56e98461618f9c0eec41e1e1/core/src/main/java/com/squarespace/cldr/units/UnitFactorMap.java#L223-L244 |
apache/incubator-gobblin | gobblin-api/src/main/java/org/apache/gobblin/configuration/WorkUnitState.java | WorkUnitState.getActualHighWatermark | public <T extends Watermark> T getActualHighWatermark(Class<T> watermarkClass) {
"""
Get the actual high {@link Watermark}. If the {@code WorkUnitState} does not contain the actual high watermark
(which may be caused by task failures), the low watermark in the corresponding {@link WorkUnit} will be returned.
<... | java | public <T extends Watermark> T getActualHighWatermark(Class<T> watermarkClass) {
return getActualHighWatermark(watermarkClass, GSON);
} | [
"public",
"<",
"T",
"extends",
"Watermark",
">",
"T",
"getActualHighWatermark",
"(",
"Class",
"<",
"T",
">",
"watermarkClass",
")",
"{",
"return",
"getActualHighWatermark",
"(",
"watermarkClass",
",",
"GSON",
")",
";",
"}"
] | Get the actual high {@link Watermark}. If the {@code WorkUnitState} does not contain the actual high watermark
(which may be caused by task failures), the low watermark in the corresponding {@link WorkUnit} will be returned.
<p>A default {@link Gson} object will be used to deserialize the watermark.</p>
@param waterm... | [
"Get",
"the",
"actual",
"high",
"{",
"@link",
"Watermark",
"}",
".",
"If",
"the",
"{",
"@code",
"WorkUnitState",
"}",
"does",
"not",
"contain",
"the",
"actual",
"high",
"watermark",
"(",
"which",
"may",
"be",
"caused",
"by",
"task",
"failures",
")",
"the... | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-api/src/main/java/org/apache/gobblin/configuration/WorkUnitState.java#L240-L242 |
aNNiMON/Lightweight-Stream-API | stream/src/main/java/com/annimon/stream/Stream.java | Stream.reduceIndexed | @Nullable
public <R> R reduceIndexed(@Nullable R identity,
@NotNull IndexedBiFunction<? super R, ? super T, ? extends R> accumulator) {
"""
Reduces the elements using provided identity value and
the associative accumulation indexed function.
<p>This is a terminal operation.
... | java | @Nullable
public <R> R reduceIndexed(@Nullable R identity,
@NotNull IndexedBiFunction<? super R, ? super T, ? extends R> accumulator) {
return reduceIndexed(0, 1, identity, accumulator);
} | [
"@",
"Nullable",
"public",
"<",
"R",
">",
"R",
"reduceIndexed",
"(",
"@",
"Nullable",
"R",
"identity",
",",
"@",
"NotNull",
"IndexedBiFunction",
"<",
"?",
"super",
"R",
",",
"?",
"super",
"T",
",",
"?",
"extends",
"R",
">",
"accumulator",
")",
"{",
"... | Reduces the elements using provided identity value and
the associative accumulation indexed function.
<p>This is a terminal operation.
<p>Example:
<pre>
identity: 10
accumulator: (index, a, b) -> index + a + b
stream: [1, 2, 3, 4, 5]
index: [0, 1, 2, 3, 4]
result: 10 + 1 + 3 + 5 + 7 + 9 = 35
</pre>
@param <R> th... | [
"Reduces",
"the",
"elements",
"using",
"provided",
"identity",
"value",
"and",
"the",
"associative",
"accumulation",
"indexed",
"function",
"."
] | train | https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/Stream.java#L1664-L1668 |
facebook/fresco | drawee/src/main/java/com/facebook/drawee/generic/RoundingParams.java | RoundingParams.setBorder | public RoundingParams setBorder(@ColorInt int color, float width) {
"""
Sets the border around the rounded drawable
@param color of the border
@param width of the width
"""
Preconditions.checkArgument(width >= 0, "the border width cannot be < 0");
mBorderWidth = width;
mBorderColor = color;
r... | java | public RoundingParams setBorder(@ColorInt int color, float width) {
Preconditions.checkArgument(width >= 0, "the border width cannot be < 0");
mBorderWidth = width;
mBorderColor = color;
return this;
} | [
"public",
"RoundingParams",
"setBorder",
"(",
"@",
"ColorInt",
"int",
"color",
",",
"float",
"width",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"width",
">=",
"0",
",",
"\"the border width cannot be < 0\"",
")",
";",
"mBorderWidth",
"=",
"width",
";"... | Sets the border around the rounded drawable
@param color of the border
@param width of the width | [
"Sets",
"the",
"border",
"around",
"the",
"rounded",
"drawable"
] | train | https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/drawee/src/main/java/com/facebook/drawee/generic/RoundingParams.java#L227-L232 |
ludovicianul/selenium-on-steroids | src/main/java/com/insidecoding/sos/xml/XMLUtils.java | XMLUtils.getTagText | public String getTagText(final String xmlString, final String tagName)
throws ParserConfigurationException, SAXException, IOException {
"""
You must pass the xml string and the tag name. This should be called for
situations where you want to get the value of a simple tag:
<age>18</age>.
In this... | java | public String getTagText(final String xmlString, final String tagName)
throws ParserConfigurationException, SAXException, IOException {
NodeList nodes = this.getNodeList(xmlString, tagName);
LOG.info("Elements returned = " + nodes.getLength());
Element element = (Element) nodes.item(0);
LOG.info("element... | [
"public",
"String",
"getTagText",
"(",
"final",
"String",
"xmlString",
",",
"final",
"String",
"tagName",
")",
"throws",
"ParserConfigurationException",
",",
"SAXException",
",",
"IOException",
"{",
"NodeList",
"nodes",
"=",
"this",
".",
"getNodeList",
"(",
"xmlSt... | You must pass the xml string and the tag name. This should be called for
situations where you want to get the value of a simple tag:
<age>18</age>.
In this case, in order to get the 18 value we call the method like this:
getTagText(xml, "age"); and this will return 18
The method will return the first tag ... | [
"You",
"must",
"pass",
"the",
"xml",
"string",
"and",
"the",
"tag",
"name",
".",
"This",
"should",
"be",
"called",
"for",
"situations",
"where",
"you",
"want",
"to",
"get",
"the",
"value",
"of",
"a",
"simple",
"tag",
":",
"<",
";",
"age>",
";",
"... | train | https://github.com/ludovicianul/selenium-on-steroids/blob/f89d91c59f686114f94624bfc55712f278005bfa/src/main/java/com/insidecoding/sos/xml/XMLUtils.java#L81-L94 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/NetworkInterfacesInner.java | NetworkInterfacesInner.getVirtualMachineScaleSetIpConfigurationAsync | public Observable<NetworkInterfaceIPConfigurationInner> getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) {
"""
Get the specified network interface ip configuration in a vir... | java | public Observable<NetworkInterfaceIPConfigurationInner> getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) {
return getVirtualMachineScaleSetIpConfigurationWithServiceResp... | [
"public",
"Observable",
"<",
"NetworkInterfaceIPConfigurationInner",
">",
"getVirtualMachineScaleSetIpConfigurationAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"virtualMachineScaleSetName",
",",
"String",
"virtualmachineIndex",
",",
"String",
"networkInterfaceName",
... | Get the specified network interface ip configuration in a virtual machine scale set.
@param resourceGroupName The name of the resource group.
@param virtualMachineScaleSetName The name of the virtual machine scale set.
@param virtualmachineIndex The virtual machine index.
@param networkInterfaceName The name of the ne... | [
"Get",
"the",
"specified",
"network",
"interface",
"ip",
"configuration",
"in",
"a",
"virtual",
"machine",
"scale",
"set",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/NetworkInterfacesInner.java#L2247-L2254 |
UrielCh/ovh-java-sdk | ovh-java-sdk-support/src/main/java/net/minidev/ovh/api/ApiOvhSupport.java | ApiOvhSupport.tickets_ticketId_canBeScored_GET | public Boolean tickets_ticketId_canBeScored_GET(Long ticketId) throws IOException {
"""
Checks whether ticket can be scored
REST: GET /support/tickets/{ticketId}/canBeScored
@param ticketId [required] internal ticket identifier
"""
String qPath = "/support/tickets/{ticketId}/canBeScored";
StringBuilder... | java | public Boolean tickets_ticketId_canBeScored_GET(Long ticketId) throws IOException {
String qPath = "/support/tickets/{ticketId}/canBeScored";
StringBuilder sb = path(qPath, ticketId);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, Boolean.class);
} | [
"public",
"Boolean",
"tickets_ticketId_canBeScored_GET",
"(",
"Long",
"ticketId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/support/tickets/{ticketId}/canBeScored\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qPath",
",",
"ticketId",
")",
";"... | Checks whether ticket can be scored
REST: GET /support/tickets/{ticketId}/canBeScored
@param ticketId [required] internal ticket identifier | [
"Checks",
"whether",
"ticket",
"can",
"be",
"scored"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-support/src/main/java/net/minidev/ovh/api/ApiOvhSupport.java#L50-L55 |
goldmansachs/reladomo | reladomo/src/main/java/com/gs/fw/common/mithra/transaction/TransactionLocalMap.java | TransactionLocalMap.getEntryAfterMiss | private Object getEntryAfterMiss(TransactionLocal key, int i, Entry e) {
"""
Version of getEntry method for use when key is not found in
its direct hash slot.
@param key the thread local object
@param i the table index for key's hash code
@param e the entry at table[i]
@return the entry associated with ... | java | private Object getEntryAfterMiss(TransactionLocal key, int i, Entry e)
{
Entry[] tab = table;
int len = tab.length;
while (e != null)
{
if (e.key == key)
return e.value;
i = nextIndex(i, len);
e = tab[i];
}
... | [
"private",
"Object",
"getEntryAfterMiss",
"(",
"TransactionLocal",
"key",
",",
"int",
"i",
",",
"Entry",
"e",
")",
"{",
"Entry",
"[",
"]",
"tab",
"=",
"table",
";",
"int",
"len",
"=",
"tab",
".",
"length",
";",
"while",
"(",
"e",
"!=",
"null",
")",
... | Version of getEntry method for use when key is not found in
its direct hash slot.
@param key the thread local object
@param i the table index for key's hash code
@param e the entry at table[i]
@return the entry associated with key, or null if no such | [
"Version",
"of",
"getEntry",
"method",
"for",
"use",
"when",
"key",
"is",
"not",
"found",
"in",
"its",
"direct",
"hash",
"slot",
"."
] | train | https://github.com/goldmansachs/reladomo/blob/e9a069452eece7a6ef9551caf81a69d3d9a3d990/reladomo/src/main/java/com/gs/fw/common/mithra/transaction/TransactionLocalMap.java#L121-L134 |
ReactiveX/RxJavaAsyncUtil | src/main/java/rx/util/async/Async.java | Async.asyncFunc | public static <R> FuncN<Observable<R>> asyncFunc(final FuncN<? extends R> func, final Scheduler scheduler) {
"""
Convert a synchronous function call into an asynchronous function call through an Observable.
<p>
<img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/asyncFunc.s.png... | java | public static <R> FuncN<Observable<R>> asyncFunc(final FuncN<? extends R> func, final Scheduler scheduler) {
return toAsync(func, scheduler);
} | [
"public",
"static",
"<",
"R",
">",
"FuncN",
"<",
"Observable",
"<",
"R",
">",
">",
"asyncFunc",
"(",
"final",
"FuncN",
"<",
"?",
"extends",
"R",
">",
"func",
",",
"final",
"Scheduler",
"scheduler",
")",
"{",
"return",
"toAsync",
"(",
"func",
",",
"sc... | Convert a synchronous function call into an asynchronous function call through an Observable.
<p>
<img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/asyncFunc.s.png" alt="">
<p>
Alias for {@code toAsync(FuncN, Scheduler)} intended for dynamic languages.
@param <R> the result type
@p... | [
"Convert",
"a",
"synchronous",
"function",
"call",
"into",
"an",
"asynchronous",
"function",
"call",
"through",
"an",
"Observable",
".",
"<p",
">",
"<img",
"width",
"=",
"640",
"src",
"=",
"https",
":",
"//",
"raw",
".",
"github",
".",
"com",
"/",
"wiki"... | train | https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L1748-L1750 |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.addLeaf | private void addLeaf(Segment10 segment,
int pid,
int nextPid,
int address,
int length) {
"""
Adds a new leaf entry to the page list.
Because pages are added in order, each new page overrides the older one.
"""
P... | java | private void addLeaf(Segment10 segment,
int pid,
int nextPid,
int address,
int length)
{
Page10 page = _pageMap.get(pid);
if (page != null && page.sequence() < segment.sequence()) {
return;
}
p... | [
"private",
"void",
"addLeaf",
"(",
"Segment10",
"segment",
",",
"int",
"pid",
",",
"int",
"nextPid",
",",
"int",
"address",
",",
"int",
"length",
")",
"{",
"Page10",
"page",
"=",
"_pageMap",
".",
"get",
"(",
"pid",
")",
";",
"if",
"(",
"page",
"!=",
... | Adds a new leaf entry to the page list.
Because pages are added in order, each new page overrides the older one. | [
"Adds",
"a",
"new",
"leaf",
"entry",
"to",
"the",
"page",
"list",
"."
] | train | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L481-L496 |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java | FileUtils.loadStringMultimap | @Deprecated
public static ImmutableMultimap<String, String> loadStringMultimap(File multimapFile)
throws IOException {
"""
Deprecated in favor of version with {@link com.google.common.io.CharSource} argument.
@deprecated
"""
return loadStringMultimap(Files.asCharSource(multimapFile, Charsets.UTF... | java | @Deprecated
public static ImmutableMultimap<String, String> loadStringMultimap(File multimapFile)
throws IOException {
return loadStringMultimap(Files.asCharSource(multimapFile, Charsets.UTF_8));
} | [
"@",
"Deprecated",
"public",
"static",
"ImmutableMultimap",
"<",
"String",
",",
"String",
">",
"loadStringMultimap",
"(",
"File",
"multimapFile",
")",
"throws",
"IOException",
"{",
"return",
"loadStringMultimap",
"(",
"Files",
".",
"asCharSource",
"(",
"multimapFile... | Deprecated in favor of version with {@link com.google.common.io.CharSource} argument.
@deprecated | [
"Deprecated",
"in",
"favor",
"of",
"version",
"with",
"{",
"@link",
"com",
".",
"google",
".",
"common",
".",
"io",
".",
"CharSource",
"}",
"argument",
"."
] | train | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java#L1157-L1161 |
alkacon/opencms-core | src/org/opencms/i18n/tools/CmsContainerPageCopier.java | CmsContainerPageCopier.run | public void run(CmsResource source, CmsResource target) throws CmsException, NoCustomReplacementException {
"""
Starts the page copying process.<p>
@param source the source (can be either a container page, or a folder whose default file is a container page)
@param target the target folder
@throws CmsExcepti... | java | public void run(CmsResource source, CmsResource target) throws CmsException, NoCustomReplacementException {
run(source, target, null);
} | [
"public",
"void",
"run",
"(",
"CmsResource",
"source",
",",
"CmsResource",
"target",
")",
"throws",
"CmsException",
",",
"NoCustomReplacementException",
"{",
"run",
"(",
"source",
",",
"target",
",",
"null",
")",
";",
"}"
] | Starts the page copying process.<p>
@param source the source (can be either a container page, or a folder whose default file is a container page)
@param target the target folder
@throws CmsException if soemthing goes wrong
@throws NoCustomReplacementException if a custom replacement element was not found | [
"Starts",
"the",
"page",
"copying",
"process",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/i18n/tools/CmsContainerPageCopier.java#L454-L457 |
alkacon/opencms-core | src/org/opencms/db/CmsSecurityManager.java | CmsSecurityManager.readAncestor | public CmsFolder readAncestor(CmsRequestContext context, CmsResource resource, CmsResourceFilter filter)
throws CmsException {
"""
Returns the first ancestor folder matching the filter criteria.<p>
If no folder matching the filter criteria is found, null is returned.<p>
@param context the context of the ... | java | public CmsFolder readAncestor(CmsRequestContext context, CmsResource resource, CmsResourceFilter filter)
throws CmsException {
// get the full folder path of the resource to start from
String path = CmsResource.getFolderPath(resource.getRootPath());
do {
// check if the current ... | [
"public",
"CmsFolder",
"readAncestor",
"(",
"CmsRequestContext",
"context",
",",
"CmsResource",
"resource",
",",
"CmsResourceFilter",
"filter",
")",
"throws",
"CmsException",
"{",
"// get the full folder path of the resource to start from",
"String",
"path",
"=",
"CmsResource... | Returns the first ancestor folder matching the filter criteria.<p>
If no folder matching the filter criteria is found, null is returned.<p>
@param context the context of the current request
@param resource the resource to start
@param filter the resource filter to match while reading the ancestors
@return the first ... | [
"Returns",
"the",
"first",
"ancestor",
"folder",
"matching",
"the",
"filter",
"criteria",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L4059-L4079 |
Nexmo/nexmo-java | src/main/java/com/nexmo/client/numbers/NumbersClient.java | NumbersClient.cancelNumber | public void cancelNumber(String country, String msisdn) throws IOException, NexmoClientException {
"""
Stop renting a Nexmo Virtual Number.
@param country A String containing a 2-character ISO country code.
@param msisdn The phone number to be cancelled.
@throws IOException if an error occurs contac... | java | public void cancelNumber(String country, String msisdn) throws IOException, NexmoClientException {
this.cancelNumber.execute(new CancelNumberRequest(country, msisdn));
} | [
"public",
"void",
"cancelNumber",
"(",
"String",
"country",
",",
"String",
"msisdn",
")",
"throws",
"IOException",
",",
"NexmoClientException",
"{",
"this",
".",
"cancelNumber",
".",
"execute",
"(",
"new",
"CancelNumberRequest",
"(",
"country",
",",
"msisdn",
")... | Stop renting a Nexmo Virtual Number.
@param country A String containing a 2-character ISO country code.
@param msisdn The phone number to be cancelled.
@throws IOException if an error occurs contacting the Nexmo API
@throws NexmoClientException if an error is returned by the server. | [
"Stop",
"renting",
"a",
"Nexmo",
"Virtual",
"Number",
"."
] | train | https://github.com/Nexmo/nexmo-java/blob/7427eff6d6baa5a5bd9197fa096bcf2564191cf5/src/main/java/com/nexmo/client/numbers/NumbersClient.java#L112-L114 |
micronaut-projects/micronaut-core | inject/src/main/java/io/micronaut/context/AbstractBeanDefinition.java | AbstractBeanDefinition.getBeanProviderForConstructorArgument | @SuppressWarnings("WeakerAccess")
@Internal
protected final Provider getBeanProviderForConstructorArgument(BeanResolutionContext resolutionContext, BeanContext context, @SuppressWarnings("unused") ConstructorInjectionPoint constructorInjectionPoint, Argument argument) {
"""
Obtains a bean provider for a co... | java | @SuppressWarnings("WeakerAccess")
@Internal
protected final Provider getBeanProviderForConstructorArgument(BeanResolutionContext resolutionContext, BeanContext context, @SuppressWarnings("unused") ConstructorInjectionPoint constructorInjectionPoint, Argument argument) {
return resolveBeanWithGenericsFro... | [
"@",
"SuppressWarnings",
"(",
"\"WeakerAccess\"",
")",
"@",
"Internal",
"protected",
"final",
"Provider",
"getBeanProviderForConstructorArgument",
"(",
"BeanResolutionContext",
"resolutionContext",
",",
"BeanContext",
"context",
",",
"@",
"SuppressWarnings",
"(",
"\"unused\... | Obtains a bean provider for a constructor at the given index
<p>
Warning: this method is used by internal generated code and should not be called by user code.
@param resolutionContext The resolution context
@param context The context
@param constructorInjectionPoint The constructor injection... | [
"Obtains",
"a",
"bean",
"provider",
"for",
"a",
"constructor",
"at",
"the",
"given",
"index",
"<p",
">",
"Warning",
":",
"this",
"method",
"is",
"used",
"by",
"internal",
"generated",
"code",
"and",
"should",
"not",
"be",
"called",
"by",
"user",
"code",
... | train | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/context/AbstractBeanDefinition.java#L1061-L1067 |
alkacon/opencms-core | src/org/opencms/ui/login/CmsLoginHelper.java | CmsLoginHelper.getPreDefOuFqn | private static String getPreDefOuFqn(CmsObject cms, HttpServletRequest request, boolean logout) {
"""
Returns the pre defined ou fqn.<p>
@param cms the cms context
@param request the request
@param logout in case of a logout
@return the ou fqn
"""
if (logout && (request.getAttribute(PARAM_PRED... | java | private static String getPreDefOuFqn(CmsObject cms, HttpServletRequest request, boolean logout) {
if (logout && (request.getAttribute(PARAM_PREDEF_OUFQN) == null)) {
String oufqn = cms.getRequestContext().getOuFqn();
if (!oufqn.startsWith(CmsOrganizationalUnit.SEPARATOR)) {
... | [
"private",
"static",
"String",
"getPreDefOuFqn",
"(",
"CmsObject",
"cms",
",",
"HttpServletRequest",
"request",
",",
"boolean",
"logout",
")",
"{",
"if",
"(",
"logout",
"&&",
"(",
"request",
".",
"getAttribute",
"(",
"PARAM_PREDEF_OUFQN",
")",
"==",
"null",
")... | Returns the pre defined ou fqn.<p>
@param cms the cms context
@param request the request
@param logout in case of a logout
@return the ou fqn | [
"Returns",
"the",
"pre",
"defined",
"ou",
"fqn",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/login/CmsLoginHelper.java#L704-L714 |
alkacon/opencms-core | src/org/opencms/db/CmsDriverManager.java | CmsDriverManager.deleteAllStaticExportPublishedResources | public void deleteAllStaticExportPublishedResources(CmsDbContext dbc, int linkType) throws CmsException {
"""
Deletes all entries in the published resource table.<p>
@param dbc the current database context
@param linkType the type of resource deleted (0= non-paramter, 1=parameter)
@throws CmsException if so... | java | public void deleteAllStaticExportPublishedResources(CmsDbContext dbc, int linkType) throws CmsException {
getProjectDriver(dbc).deleteAllStaticExportPublishedResources(dbc, linkType);
} | [
"public",
"void",
"deleteAllStaticExportPublishedResources",
"(",
"CmsDbContext",
"dbc",
",",
"int",
"linkType",
")",
"throws",
"CmsException",
"{",
"getProjectDriver",
"(",
"dbc",
")",
".",
"deleteAllStaticExportPublishedResources",
"(",
"dbc",
",",
"linkType",
")",
... | Deletes all entries in the published resource table.<p>
@param dbc the current database context
@param linkType the type of resource deleted (0= non-paramter, 1=parameter)
@throws CmsException if something goes wrong | [
"Deletes",
"all",
"entries",
"in",
"the",
"published",
"resource",
"table",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L2308-L2311 |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/properties/JSONHelpers.java | JSONHelpers.optPoint | public static <P extends Enum<P>> Point optPoint(final JSONObject json, P e) {
"""
Return the value mapped by enum if it exists and is a {@link JSONObject} by mapping "x" and
"y" members into a {@link Point}.
@param json {@code JSONObject} to get data from
@param e {@link Enum} labeling the data to get
@r... | java | public static <P extends Enum<P>> Point optPoint(final JSONObject json, P e) {
return optPoint(json, e, null);
} | [
"public",
"static",
"<",
"P",
"extends",
"Enum",
"<",
"P",
">",
">",
"Point",
"optPoint",
"(",
"final",
"JSONObject",
"json",
",",
"P",
"e",
")",
"{",
"return",
"optPoint",
"(",
"json",
",",
"e",
",",
"null",
")",
";",
"}"
] | Return the value mapped by enum if it exists and is a {@link JSONObject} by mapping "x" and
"y" members into a {@link Point}.
@param json {@code JSONObject} to get data from
@param e {@link Enum} labeling the data to get
@return An instance of {@code Point} or {@null} if there is no object mapping for {@code e}. | [
"Return",
"the",
"value",
"mapped",
"by",
"enum",
"if",
"it",
"exists",
"and",
"is",
"a",
"{",
"@link",
"JSONObject",
"}",
"by",
"mapping",
"x",
"and",
"y",
"members",
"into",
"a",
"{",
"@link",
"Point",
"}",
"."
] | train | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/properties/JSONHelpers.java#L490-L492 |
blackfizz/EazeGraph | EazeGraphLibrary/src/main/java/org/eazegraph/lib/utils/Utils.java | Utils.intersectsPointWithRectF | public static boolean intersectsPointWithRectF(RectF _Rect, float _X, float _Y) {
"""
Checks if a point is in the given rectangle.
@param _Rect rectangle which is checked
@param _X x-coordinate of the point
@param _Y y-coordinate of the point
@return True if the points intersects with the rectangle.
... | java | public static boolean intersectsPointWithRectF(RectF _Rect, float _X, float _Y) {
return _X > _Rect.left && _X < _Rect.right && _Y > _Rect.top && _Y < _Rect.bottom;
} | [
"public",
"static",
"boolean",
"intersectsPointWithRectF",
"(",
"RectF",
"_Rect",
",",
"float",
"_X",
",",
"float",
"_Y",
")",
"{",
"return",
"_X",
">",
"_Rect",
".",
"left",
"&&",
"_X",
"<",
"_Rect",
".",
"right",
"&&",
"_Y",
">",
"_Rect",
".",
"top",... | Checks if a point is in the given rectangle.
@param _Rect rectangle which is checked
@param _X x-coordinate of the point
@param _Y y-coordinate of the point
@return True if the points intersects with the rectangle. | [
"Checks",
"if",
"a",
"point",
"is",
"in",
"the",
"given",
"rectangle",
"."
] | train | https://github.com/blackfizz/EazeGraph/blob/ce5e68ecc70e154f83bbb2fcce1a970db125c1e6/EazeGraphLibrary/src/main/java/org/eazegraph/lib/utils/Utils.java#L180-L182 |
NordicSemiconductor/Android-DFU-Library | dfu/src/main/java/no/nordicsemi/android/dfu/DfuBaseService.java | DfuBaseService.openInputStream | private InputStream openInputStream(final int resId, final String mimeType, final int mbrSize, final int types)
throws IOException {
"""
Opens the binary input stream that returns the firmware image content.
A resource id in the res/raw is given.
@param resId the if of the resource file.
@param mimeType th... | java | private InputStream openInputStream(final int resId, final String mimeType, final int mbrSize, final int types)
throws IOException {
final InputStream is = getResources().openRawResource(resId);
if (MIME_TYPE_ZIP.equals(mimeType))
return new ArchiveInputStream(is, mbrSize, types);
is.mark(2);
int firstByt... | [
"private",
"InputStream",
"openInputStream",
"(",
"final",
"int",
"resId",
",",
"final",
"String",
"mimeType",
",",
"final",
"int",
"mbrSize",
",",
"final",
"int",
"types",
")",
"throws",
"IOException",
"{",
"final",
"InputStream",
"is",
"=",
"getResources",
"... | Opens the binary input stream that returns the firmware image content.
A resource id in the res/raw is given.
@param resId the if of the resource file.
@param mimeType the file type.
@param mbrSize the size of MBR, by default 0x1000.
@param types the content files types in ZIP.
@return The input stream with binary... | [
"Opens",
"the",
"binary",
"input",
"stream",
"that",
"returns",
"the",
"firmware",
"image",
"content",
".",
"A",
"resource",
"id",
"in",
"the",
"res",
"/",
"raw",
"is",
"given",
"."
] | train | https://github.com/NordicSemiconductor/Android-DFU-Library/blob/ec14c8c522bebe801a9a4c3dfbbeb1f53262c03f/dfu/src/main/java/no/nordicsemi/android/dfu/DfuBaseService.java#L1466-L1477 |
ttddyy/datasource-proxy | src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java | ProxyDataSourceBuilder.logQueryBySlf4j | public ProxyDataSourceBuilder logQueryBySlf4j(SLF4JLogLevel logLevel, String slf4jLoggerName) {
"""
Register {@link SLF4JQueryLoggingListener}.
@param logLevel log level for slf4j
@param slf4jLoggerName slf4j logger name
@return builder
@since 1.3.1
"""
this.createSlf4jQueryListener = true... | java | public ProxyDataSourceBuilder logQueryBySlf4j(SLF4JLogLevel logLevel, String slf4jLoggerName) {
this.createSlf4jQueryListener = true;
this.slf4jLogLevel = logLevel;
this.slf4jLoggerName = slf4jLoggerName;
return this;
} | [
"public",
"ProxyDataSourceBuilder",
"logQueryBySlf4j",
"(",
"SLF4JLogLevel",
"logLevel",
",",
"String",
"slf4jLoggerName",
")",
"{",
"this",
".",
"createSlf4jQueryListener",
"=",
"true",
";",
"this",
".",
"slf4jLogLevel",
"=",
"logLevel",
";",
"this",
".",
"slf4jLog... | Register {@link SLF4JQueryLoggingListener}.
@param logLevel log level for slf4j
@param slf4jLoggerName slf4j logger name
@return builder
@since 1.3.1 | [
"Register",
"{",
"@link",
"SLF4JQueryLoggingListener",
"}",
"."
] | train | https://github.com/ttddyy/datasource-proxy/blob/62163ccf9a569a99aa3ad9f9151a32567447a62e/src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java#L320-L325 |
sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/codemining/SARLCodeMiningProvider.java | SARLCodeMiningProvider.createImplicitVariableType | private void createImplicitVariableType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) {
"""
Add an annotation when the variable's type is implicit and inferred by the SARL compiler.
@param resource the resource to parse.
@param acceptor the code mining acceptor.
"""
createImplicitVarVa... | java | private void createImplicitVariableType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) {
createImplicitVarValType(resource, acceptor, XtendVariableDeclaration.class,
it -> it.getType(),
it -> {
LightweightTypeReference type = getLightweightType(it.getRight());
if (type.isAny()) {
... | [
"private",
"void",
"createImplicitVariableType",
"(",
"XtextResource",
"resource",
",",
"IAcceptor",
"<",
"?",
"super",
"ICodeMining",
">",
"acceptor",
")",
"{",
"createImplicitVarValType",
"(",
"resource",
",",
"acceptor",
",",
"XtendVariableDeclaration",
".",
"class... | Add an annotation when the variable's type is implicit and inferred by the SARL compiler.
@param resource the resource to parse.
@param acceptor the code mining acceptor. | [
"Add",
"an",
"annotation",
"when",
"the",
"variable",
"s",
"type",
"is",
"implicit",
"and",
"inferred",
"by",
"the",
"SARL",
"compiler",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/codemining/SARLCodeMiningProvider.java#L214-L226 |
alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java | Postcard.withIntegerArrayList | public Postcard withIntegerArrayList(@Nullable String key, @Nullable ArrayList<Integer> value) {
"""
Inserts an ArrayList 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 an ArrayList object, or... | java | public Postcard withIntegerArrayList(@Nullable String key, @Nullable ArrayList<Integer> value) {
mBundle.putIntegerArrayList(key, value);
return this;
} | [
"public",
"Postcard",
"withIntegerArrayList",
"(",
"@",
"Nullable",
"String",
"key",
",",
"@",
"Nullable",
"ArrayList",
"<",
"Integer",
">",
"value",
")",
"{",
"mBundle",
".",
"putIntegerArrayList",
"(",
"key",
",",
"value",
")",
";",
"return",
"this",
";",
... | Inserts an ArrayList 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 an ArrayList object, or null
@return current | [
"Inserts",
"an",
"ArrayList",
"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/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java#L429-L432 |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/img/ImageExtensions.java | ImageExtensions.weaveInto | public static BufferedImage weaveInto(final BufferedImage bufferedImage, final String message) {
"""
Weave the given secret message into the given {@link BufferedImage}.
@param bufferedImage
the buffered image
@param message
the secret message
@return the buffered image with the secret message weaved in.
... | java | public static BufferedImage weaveInto(final BufferedImage bufferedImage, final String message)
{
final int width = bufferedImage.getWidth();
final int height = bufferedImage.getHeight();
if (message.length() > 255)
{
throw new IllegalArgumentException("Given message is to large(max 255 characters)");
}
... | [
"public",
"static",
"BufferedImage",
"weaveInto",
"(",
"final",
"BufferedImage",
"bufferedImage",
",",
"final",
"String",
"message",
")",
"{",
"final",
"int",
"width",
"=",
"bufferedImage",
".",
"getWidth",
"(",
")",
";",
"final",
"int",
"height",
"=",
"buffer... | Weave the given secret message into the given {@link BufferedImage}.
@param bufferedImage
the buffered image
@param message
the secret message
@return the buffered image with the secret message weaved in. | [
"Weave",
"the",
"given",
"secret",
"message",
"into",
"the",
"given",
"{",
"@link",
"BufferedImage",
"}",
"."
] | train | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/img/ImageExtensions.java#L432-L489 |
hellosign/hellosign-java-sdk | src/main/java/com/hellosign/sdk/resource/TemplateSignatureRequest.java | TemplateSignatureRequest.setSigner | public void setSigner(String role, String email, String name) throws HelloSignException {
"""
Adds the signer to the list of signers for this request.
@param role String
@param email String
@param name String
@throws HelloSignException thrown if there is a problem setting the
signer.
"""
signers... | java | public void setSigner(String role, String email, String name) throws HelloSignException {
signers.put(role, new Signer(email, name));
} | [
"public",
"void",
"setSigner",
"(",
"String",
"role",
",",
"String",
"email",
",",
"String",
"name",
")",
"throws",
"HelloSignException",
"{",
"signers",
".",
"put",
"(",
"role",
",",
"new",
"Signer",
"(",
"email",
",",
"name",
")",
")",
";",
"}"
] | Adds the signer to the list of signers for this request.
@param role String
@param email String
@param name String
@throws HelloSignException thrown if there is a problem setting the
signer. | [
"Adds",
"the",
"signer",
"to",
"the",
"list",
"of",
"signers",
"for",
"this",
"request",
"."
] | train | https://github.com/hellosign/hellosign-java-sdk/blob/08fa7aeb3b0c68ddb6c7ea797d114d55d36d36b1/src/main/java/com/hellosign/sdk/resource/TemplateSignatureRequest.java#L140-L142 |
apache/reef | lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/evaluator/task/TaskClientCodeException.java | TaskClientCodeException.getTaskId | public static String getTaskId(final Configuration config) {
"""
Extracts a task id from the given configuration.
@param config
@return the task id in the given configuration.
@throws RuntimeException if the configuration can't be parsed.
"""
try {
return Tang.Factory.getTang().newInjector(confi... | java | public static String getTaskId(final Configuration config) {
try {
return Tang.Factory.getTang().newInjector(config).getNamedInstance(TaskConfigurationOptions.Identifier.class);
} catch (final InjectionException ex) {
throw new RuntimeException("Unable to determine task identifier. Giving up.", ex);... | [
"public",
"static",
"String",
"getTaskId",
"(",
"final",
"Configuration",
"config",
")",
"{",
"try",
"{",
"return",
"Tang",
".",
"Factory",
".",
"getTang",
"(",
")",
".",
"newInjector",
"(",
"config",
")",
".",
"getNamedInstance",
"(",
"TaskConfigurationOption... | Extracts a task id from the given configuration.
@param config
@return the task id in the given configuration.
@throws RuntimeException if the configuration can't be parsed. | [
"Extracts",
"a",
"task",
"id",
"from",
"the",
"given",
"configuration",
"."
] | train | https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/evaluator/task/TaskClientCodeException.java#L56-L62 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/query/Criteria.java | Criteria.addNotBetween | public void addNotBetween(Object attribute, Object value1, Object value2) {
"""
Adds NOT BETWEEN criteria,
customer_id not between 1 and 10
@param attribute The field name to be used
@param value1 The lower boundary
@param value2 The upper boundary
"""
// PAW
// addSelectionCriteria(... | java | public void addNotBetween(Object attribute, Object value1, Object value2)
{
// PAW
// addSelectionCriteria(ValueCriteria.buildNotBeweenCriteria(attribute, value1, value2, getAlias()));
addSelectionCriteria(ValueCriteria.buildNotBeweenCriteria(attribute, value1, value2, getUserAlias(attribute)));
... | [
"public",
"void",
"addNotBetween",
"(",
"Object",
"attribute",
",",
"Object",
"value1",
",",
"Object",
"value2",
")",
"{",
"// PAW\r",
"// addSelectionCriteria(ValueCriteria.buildNotBeweenCriteria(attribute, value1, value2, getAlias()));\r",
"addSelectionCriteria",
"(",
"ValueCri... | Adds NOT BETWEEN criteria,
customer_id not between 1 and 10
@param attribute The field name to be used
@param value1 The lower boundary
@param value2 The upper boundary | [
"Adds",
"NOT",
"BETWEEN",
"criteria",
"customer_id",
"not",
"between",
"1",
"and",
"10"
] | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/Criteria.java#L750-L755 |
Azure/azure-sdk-for-java | automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/VariablesInner.java | VariablesInner.updateAsync | public Observable<VariableInner> updateAsync(String resourceGroupName, String automationAccountName, String variableName, VariableUpdateParameters parameters) {
"""
Update a variable.
@param resourceGroupName Name of an Azure Resource group.
@param automationAccountName The name of the automation account.
@pa... | java | public Observable<VariableInner> updateAsync(String resourceGroupName, String automationAccountName, String variableName, VariableUpdateParameters parameters) {
return updateWithServiceResponseAsync(resourceGroupName, automationAccountName, variableName, parameters).map(new Func1<ServiceResponse<VariableInner>,... | [
"public",
"Observable",
"<",
"VariableInner",
">",
"updateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"automationAccountName",
",",
"String",
"variableName",
",",
"VariableUpdateParameters",
"parameters",
")",
"{",
"return",
"updateWithServiceResponseAsync",
... | Update a variable.
@param resourceGroupName Name of an Azure Resource group.
@param automationAccountName The name of the automation account.
@param variableName The variable name.
@param parameters The parameters supplied to the update variable operation.
@throws IllegalArgumentException thrown if parameters fail the... | [
"Update",
"a",
"variable",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/VariablesInner.java#L234-L241 |
eurekaclinical/javautil | src/main/java/org/arp/javautil/sql/DatabaseMetaDataWrapper.java | DatabaseMetaDataWrapper.isDatabaseCompatible | public boolean isDatabaseCompatible(String databaseProductNameRegex, DatabaseVersion minVersion, DatabaseVersion maxVersion) throws SQLException {
"""
Compares database product name and version information to that reported
by the database.
@param databaseProductNameRegex a regular expression that the actual
d... | java | public boolean isDatabaseCompatible(String databaseProductNameRegex, DatabaseVersion minVersion, DatabaseVersion maxVersion) throws SQLException {
readMetaDataIfNeeded();
if (!this.databaseProductName.matches(databaseProductNameRegex)) {
return false;
}
return new VersionRan... | [
"public",
"boolean",
"isDatabaseCompatible",
"(",
"String",
"databaseProductNameRegex",
",",
"DatabaseVersion",
"minVersion",
",",
"DatabaseVersion",
"maxVersion",
")",
"throws",
"SQLException",
"{",
"readMetaDataIfNeeded",
"(",
")",
";",
"if",
"(",
"!",
"this",
".",
... | Compares database product name and version information to that reported
by the database.
@param databaseProductNameRegex a regular expression that the actual
database product name will match. Use a regular expression that is
unlikely to overlap with the product names of other database systems.
@param minVersion the ex... | [
"Compares",
"database",
"product",
"name",
"and",
"version",
"information",
"to",
"that",
"reported",
"by",
"the",
"database",
"."
] | train | https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/sql/DatabaseMetaDataWrapper.java#L72-L79 |
google/closure-compiler | src/com/google/javascript/jscomp/TypeInference.java | TypeInference.evaluateTypeTransformations | private Map<TemplateType, JSType> evaluateTypeTransformations(
ImmutableList<TemplateType> templateTypes,
Map<TemplateType, JSType> inferredTypes,
FlowScope scope) {
"""
This function will evaluate the type transformations associated to the template types
"""
Map<String, JSType> typeVars... | java | private Map<TemplateType, JSType> evaluateTypeTransformations(
ImmutableList<TemplateType> templateTypes,
Map<TemplateType, JSType> inferredTypes,
FlowScope scope) {
Map<String, JSType> typeVars = null;
Map<TemplateType, JSType> result = null;
TypeTransformation ttlObj = null;
for (T... | [
"private",
"Map",
"<",
"TemplateType",
",",
"JSType",
">",
"evaluateTypeTransformations",
"(",
"ImmutableList",
"<",
"TemplateType",
">",
"templateTypes",
",",
"Map",
"<",
"TemplateType",
",",
"JSType",
">",
"inferredTypes",
",",
"FlowScope",
"scope",
")",
"{",
... | This function will evaluate the type transformations associated to the template types | [
"This",
"function",
"will",
"evaluate",
"the",
"type",
"transformations",
"associated",
"to",
"the",
"template",
"types"
] | train | https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeInference.java#L2005-L2033 |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutStatusCache.java | RolloutStatusCache.putRolloutGroupStatus | public void putRolloutGroupStatus(final Map<Long, List<TotalTargetCountActionStatus>> put) {
"""
Put {@link TotalTargetCountActionStatus} for multiple
{@link RolloutGroup}s into cache.
@param put
map of cached entries
"""
final Cache cache = cacheManager.getCache(CACHE_GR_NAME);
putIntoCac... | java | public void putRolloutGroupStatus(final Map<Long, List<TotalTargetCountActionStatus>> put) {
final Cache cache = cacheManager.getCache(CACHE_GR_NAME);
putIntoCache(put, cache);
} | [
"public",
"void",
"putRolloutGroupStatus",
"(",
"final",
"Map",
"<",
"Long",
",",
"List",
"<",
"TotalTargetCountActionStatus",
">",
">",
"put",
")",
"{",
"final",
"Cache",
"cache",
"=",
"cacheManager",
".",
"getCache",
"(",
"CACHE_GR_NAME",
")",
";",
"putIntoC... | Put {@link TotalTargetCountActionStatus} for multiple
{@link RolloutGroup}s into cache.
@param put
map of cached entries | [
"Put",
"{",
"@link",
"TotalTargetCountActionStatus",
"}",
"for",
"multiple",
"{",
"@link",
"RolloutGroup",
"}",
"s",
"into",
"cache",
"."
] | train | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutStatusCache.java#L157-L160 |
jhg023/SimpleNet | src/main/java/simplenet/packet/Packet.java | Packet.putString | public Packet putString(String s, Charset charset) {
"""
Writes a single {@link String} encoded with the specified {@link Charset} and {@link ByteOrder#BIG_ENDIAN}
order to this {@link Packet}'s payload.
<br><br>
A {@code short} is used to store the length of the {@link String} in the payload header, which impo... | java | public Packet putString(String s, Charset charset) {
return putString(s, charset, ByteOrder.BIG_ENDIAN);
} | [
"public",
"Packet",
"putString",
"(",
"String",
"s",
",",
"Charset",
"charset",
")",
"{",
"return",
"putString",
"(",
"s",
",",
"charset",
",",
"ByteOrder",
".",
"BIG_ENDIAN",
")",
";",
"}"
] | Writes a single {@link String} encoded with the specified {@link Charset} and {@link ByteOrder#BIG_ENDIAN}
order to this {@link Packet}'s payload.
<br><br>
A {@code short} is used to store the length of the {@link String} in the payload header, which imposes a
maximum {@link String} length of {@code 65,535} with a {@li... | [
"Writes",
"a",
"single",
"{",
"@link",
"String",
"}",
"encoded",
"with",
"the",
"specified",
"{",
"@link",
"Charset",
"}",
"and",
"{",
"@link",
"ByteOrder#BIG_ENDIAN",
"}",
"order",
"to",
"this",
"{",
"@link",
"Packet",
"}",
"s",
"payload",
".",
"<br",
"... | train | https://github.com/jhg023/SimpleNet/blob/a5b55cbfe1768c6a28874f12adac3c748f2b509a/src/main/java/simplenet/packet/Packet.java#L327-L329 |
Azure/azure-sdk-for-java | network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkPeeringsInner.java | VirtualNetworkPeeringsInner.beginCreateOrUpdateAsync | public Observable<VirtualNetworkPeeringInner> beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) {
"""
Creates or updates a peering in the specified virtual network.
@param resourceGroupName ... | java | public Observable<VirtualNetworkPeeringInner> beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, vi... | [
"public",
"Observable",
"<",
"VirtualNetworkPeeringInner",
">",
"beginCreateOrUpdateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"virtualNetworkName",
",",
"String",
"virtualNetworkPeeringName",
",",
"VirtualNetworkPeeringInner",
"virtualNetworkPeeringParameters",
"... | Creates or updates a peering in the specified virtual network.
@param resourceGroupName The name of the resource group.
@param virtualNetworkName The name of the virtual network.
@param virtualNetworkPeeringName The name of the peering.
@param virtualNetworkPeeringParameters Parameters supplied to the create or update... | [
"Creates",
"or",
"updates",
"a",
"peering",
"in",
"the",
"specified",
"virtual",
"network",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkPeeringsInner.java#L473-L480 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CertImpl.java | X509CertImpl.readRFC1421Cert | private DerValue readRFC1421Cert(InputStream in) throws IOException {
"""
read input stream as HEX-encoded DER-encoded bytes
@param in InputStream to read
@returns DerValue corresponding to decoded HEX-encoded bytes
@throws IOException if stream can not be interpreted as RFC1421
encoded bytes
"""
... | java | private DerValue readRFC1421Cert(InputStream in) throws IOException {
DerValue der = null;
String line = null;
BufferedReader certBufferedReader =
new BufferedReader(new InputStreamReader(in, "ASCII"));
try {
line = certBufferedReader.readLine();
} catch (... | [
"private",
"DerValue",
"readRFC1421Cert",
"(",
"InputStream",
"in",
")",
"throws",
"IOException",
"{",
"DerValue",
"der",
"=",
"null",
";",
"String",
"line",
"=",
"null",
";",
"BufferedReader",
"certBufferedReader",
"=",
"new",
"BufferedReader",
"(",
"new",
"Inp... | read input stream as HEX-encoded DER-encoded bytes
@param in InputStream to read
@returns DerValue corresponding to decoded HEX-encoded bytes
@throws IOException if stream can not be interpreted as RFC1421
encoded bytes | [
"read",
"input",
"stream",
"as",
"HEX",
"-",
"encoded",
"DER",
"-",
"encoded",
"bytes"
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CertImpl.java#L254-L287 |
phax/ph-commons | ph-commons/src/main/java/com/helger/commons/io/stream/ByteBufferOutputStream.java | ByteBufferOutputStream.writeTo | public void writeTo (@Nonnull final byte [] aBuf, @Nonnegative final int nOfs, @Nonnegative final int nLen) {
"""
Write current content to the passed byte array. The copied elements are
removed from this streams buffer.
@param aBuf
Byte array to write to. May not be <code>null</code>.
@param nOfs
Offset to ... | java | public void writeTo (@Nonnull final byte [] aBuf, @Nonnegative final int nOfs, @Nonnegative final int nLen)
{
writeTo (aBuf, nOfs, nLen, true);
} | [
"public",
"void",
"writeTo",
"(",
"@",
"Nonnull",
"final",
"byte",
"[",
"]",
"aBuf",
",",
"@",
"Nonnegative",
"final",
"int",
"nOfs",
",",
"@",
"Nonnegative",
"final",
"int",
"nLen",
")",
"{",
"writeTo",
"(",
"aBuf",
",",
"nOfs",
",",
"nLen",
",",
"t... | Write current content to the passed byte array. The copied elements are
removed from this streams buffer.
@param aBuf
Byte array to write to. May not be <code>null</code>.
@param nOfs
Offset to start writing. Must be ≥ 0.
@param nLen
Number of bytes to copy. Must be ≥ 0. | [
"Write",
"current",
"content",
"to",
"the",
"passed",
"byte",
"array",
".",
"The",
"copied",
"elements",
"are",
"removed",
"from",
"this",
"streams",
"buffer",
"."
] | train | https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/stream/ByteBufferOutputStream.java#L281-L284 |
Waikato/moa | moa/src/main/java/moa/classifiers/oneclass/HSTrees.java | HSTrees.buildForest | private void buildForest(Instance inst) {
"""
Build the forest of Streaming Half-Space Trees
@param inst an example instance
"""
this.dimensions = inst.numAttributes();
double[]max = new double[dimensions];
double[]min = new double[dimensions];
double sq;
for (int i = 0 ; i < this.numTrees ; i+... | java | private void buildForest(Instance inst)
{
this.dimensions = inst.numAttributes();
double[]max = new double[dimensions];
double[]min = new double[dimensions];
double sq;
for (int i = 0 ; i < this.numTrees ; i++)
{
for(int j = 0 ; j < this.dimensions ; j++)
{
sq = this.classifierRandom.nextDoubl... | [
"private",
"void",
"buildForest",
"(",
"Instance",
"inst",
")",
"{",
"this",
".",
"dimensions",
"=",
"inst",
".",
"numAttributes",
"(",
")",
";",
"double",
"[",
"]",
"max",
"=",
"new",
"double",
"[",
"dimensions",
"]",
";",
"double",
"[",
"]",
"min",
... | Build the forest of Streaming Half-Space Trees
@param inst an example instance | [
"Build",
"the",
"forest",
"of",
"Streaming",
"Half",
"-",
"Space",
"Trees"
] | train | https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/classifiers/oneclass/HSTrees.java#L166-L184 |
JOML-CI/JOML | src/org/joml/Matrix4x3f.java | Matrix4x3f.rotateTowards | public Matrix4x3f rotateTowards(float dirX, float dirY, float dirZ, float upX, float upY, float upZ) {
"""
Apply a model transformation to this matrix for a right-handed coordinate system,
that aligns the local <code>+Z</code> axis with <code>(dirX, dirY, dirZ)</code>.
<p>
If <code>M</code> is <code>this</code>... | java | public Matrix4x3f rotateTowards(float dirX, float dirY, float dirZ, float upX, float upY, float upZ) {
return rotateTowards(dirX, dirY, dirZ, upX, upY, upZ, this);
} | [
"public",
"Matrix4x3f",
"rotateTowards",
"(",
"float",
"dirX",
",",
"float",
"dirY",
",",
"float",
"dirZ",
",",
"float",
"upX",
",",
"float",
"upY",
",",
"float",
"upZ",
")",
"{",
"return",
"rotateTowards",
"(",
"dirX",
",",
"dirY",
",",
"dirZ",
",",
"... | Apply a model transformation to this matrix for a right-handed coordinate system,
that aligns the local <code>+Z</code> axis with <code>(dirX, dirY, dirZ)</code>.
<p>
If <code>M</code> is <code>this</code> matrix and <code>L</code> the lookat matrix,
then the new matrix will be <code>M * L</code>. So when transforming ... | [
"Apply",
"a",
"model",
"transformation",
"to",
"this",
"matrix",
"for",
"a",
"right",
"-",
"handed",
"coordinate",
"system",
"that",
"aligns",
"the",
"local",
"<code",
">",
"+",
"Z<",
"/",
"code",
">",
"axis",
"with",
"<code",
">",
"(",
"dirX",
"dirY",
... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3f.java#L8679-L8681 |
census-instrumentation/opencensus-java | api/src/main/java/io/opencensus/internal/Provider.java | Provider.createInstance | public static <T> T createInstance(Class<?> rawClass, Class<T> superclass) {
"""
Tries to create an instance of the given rawClass as a subclass of the given superclass.
@param rawClass The class that is initialized.
@param superclass The initialized class must be a subclass of this.
@return an instance of th... | java | public static <T> T createInstance(Class<?> rawClass, Class<T> superclass) {
try {
return rawClass.asSubclass(superclass).getConstructor().newInstance();
} catch (Exception e) {
throw new ServiceConfigurationError(
"Provider " + rawClass.getName() + " could not be instantiated.", e);
}... | [
"public",
"static",
"<",
"T",
">",
"T",
"createInstance",
"(",
"Class",
"<",
"?",
">",
"rawClass",
",",
"Class",
"<",
"T",
">",
"superclass",
")",
"{",
"try",
"{",
"return",
"rawClass",
".",
"asSubclass",
"(",
"superclass",
")",
".",
"getConstructor",
... | Tries to create an instance of the given rawClass as a subclass of the given superclass.
@param rawClass The class that is initialized.
@param superclass The initialized class must be a subclass of this.
@return an instance of the class given rawClass which is a subclass of the given superclass.
@throws ServiceConfigu... | [
"Tries",
"to",
"create",
"an",
"instance",
"of",
"the",
"given",
"rawClass",
"as",
"a",
"subclass",
"of",
"the",
"given",
"superclass",
"."
] | train | https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/internal/Provider.java#L41-L48 |
wildfly/wildfly-build-tools | provisioning/src/main/java/org/wildfly/build/provisioning/model/ServerProvisioningFeaturePack.java | ServerProvisioningFeaturePack.createConfigFiles | private static List<ConfigFile> createConfigFiles(File featurePackFile, List<org.wildfly.build.common.model.ConfigFile> configFiles, ConfigOverride configOverride, Map<String, ConfigFileOverride> configFileOverrides) {
"""
Creates a provisioning config file for each {@link org.wildfly.build.common.model.ConfigFile... | java | private static List<ConfigFile> createConfigFiles(File featurePackFile, List<org.wildfly.build.common.model.ConfigFile> configFiles, ConfigOverride configOverride, Map<String, ConfigFileOverride> configFileOverrides) {
final List<ConfigFile> result = new ArrayList<>();
if (configOverride != null) {
... | [
"private",
"static",
"List",
"<",
"ConfigFile",
">",
"createConfigFiles",
"(",
"File",
"featurePackFile",
",",
"List",
"<",
"org",
".",
"wildfly",
".",
"build",
".",
"common",
".",
"model",
".",
"ConfigFile",
">",
"configFiles",
",",
"ConfigOverride",
"configO... | Creates a provisioning config file for each {@link org.wildfly.build.common.model.ConfigFile} provided.
@param featurePackFile
@param configFiles
@param configOverride
@param configFileOverrides
@return | [
"Creates",
"a",
"provisioning",
"config",
"file",
"for",
"each",
"{"
] | train | https://github.com/wildfly/wildfly-build-tools/blob/520a5f2e58e6a24097d63fd65c51a8fc29847a61/provisioning/src/main/java/org/wildfly/build/provisioning/model/ServerProvisioningFeaturePack.java#L322-L339 |
ngageoint/geopackage-android-map | geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java | StyleUtils.setFeatureStyle | public static boolean setFeatureStyle(MarkerOptions markerOptions, GeoPackage geoPackage, FeatureRow featureRow, float density) {
"""
Set the feature row style (icon or style) into the marker options
@param markerOptions marker options
@param geoPackage GeoPackage
@param featureRow feature row
@param d... | java | public static boolean setFeatureStyle(MarkerOptions markerOptions, GeoPackage geoPackage, FeatureRow featureRow, float density) {
return setFeatureStyle(markerOptions, geoPackage, featureRow, density, null);
} | [
"public",
"static",
"boolean",
"setFeatureStyle",
"(",
"MarkerOptions",
"markerOptions",
",",
"GeoPackage",
"geoPackage",
",",
"FeatureRow",
"featureRow",
",",
"float",
"density",
")",
"{",
"return",
"setFeatureStyle",
"(",
"markerOptions",
",",
"geoPackage",
",",
"... | Set the feature row style (icon or style) into the marker options
@param markerOptions marker options
@param geoPackage GeoPackage
@param featureRow feature row
@param density display density: {@link android.util.DisplayMetrics#density}
@return true if icon or style was set into the marker options | [
"Set",
"the",
"feature",
"row",
"style",
"(",
"icon",
"or",
"style",
")",
"into",
"the",
"marker",
"options"
] | train | https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java#L65-L67 |
hankcs/HanLP | src/main/java/com/hankcs/hanlp/seg/Segment.java | Segment.combineWords | private static void combineWords(Vertex[] wordNet, int start, int end, CoreDictionary.Attribute value) {
"""
将连续的词语合并为一个
@param wordNet 词图
@param start 起始下标(包含)
@param end 结束下标(不包含)
@param value 新的属性
"""
if (start + 1 == end) // 小优化,如果只有一个词,那就不需要合并,直接应用新属性
{
wordNet[start].att... | java | private static void combineWords(Vertex[] wordNet, int start, int end, CoreDictionary.Attribute value)
{
if (start + 1 == end) // 小优化,如果只有一个词,那就不需要合并,直接应用新属性
{
wordNet[start].attribute = value;
}
else
{
StringBuilder sbTerm = new StringBuilder();
... | [
"private",
"static",
"void",
"combineWords",
"(",
"Vertex",
"[",
"]",
"wordNet",
",",
"int",
"start",
",",
"int",
"end",
",",
"CoreDictionary",
".",
"Attribute",
"value",
")",
"{",
"if",
"(",
"start",
"+",
"1",
"==",
"end",
")",
"// 小优化,如果只有一个词,那就不需要合并,直接应... | 将连续的词语合并为一个
@param wordNet 词图
@param start 起始下标(包含)
@param end 结束下标(不包含)
@param value 新的属性 | [
"将连续的词语合并为一个"
] | train | https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/Segment.java#L331-L349 |
BlueBrain/bluima | modules/bluima_abbreviations/src/main/java/com/wcohen/ss/lookup/SoftDictionary.java | SoftDictionary.load | public void load(File file,boolean ids) throws IOException,FileNotFoundException {
"""
Insert all lines in a file as items mapping to themselves. If
'ids' is true, then make the line number of an item its id.
<p>This is mostly for testing the id feature.
"""
LineNumberReader in = new LineNumberReader(new... | java | public void load(File file,boolean ids) throws IOException,FileNotFoundException
{
LineNumberReader in = new LineNumberReader(new FileReader(file));
String line;
while ((line = in.readLine())!=null) {
if (ids) put(Integer.toString(in.getLineNumber()), line, line);
else put(line,line);
}
in.close();
... | [
"public",
"void",
"load",
"(",
"File",
"file",
",",
"boolean",
"ids",
")",
"throws",
"IOException",
",",
"FileNotFoundException",
"{",
"LineNumberReader",
"in",
"=",
"new",
"LineNumberReader",
"(",
"new",
"FileReader",
"(",
"file",
")",
")",
";",
"String",
"... | Insert all lines in a file as items mapping to themselves. If
'ids' is true, then make the line number of an item its id.
<p>This is mostly for testing the id feature. | [
"Insert",
"all",
"lines",
"in",
"a",
"file",
"as",
"items",
"mapping",
"to",
"themselves",
".",
"If",
"ids",
"is",
"true",
"then",
"make",
"the",
"line",
"number",
"of",
"an",
"item",
"its",
"id",
"."
] | train | https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/lookup/SoftDictionary.java#L108-L117 |
aws/aws-sdk-java | aws-java-sdk-sts/src/main/java/com/amazonaws/auth/RefreshableTask.java | RefreshableTask.handleInterruptedException | private void handleInterruptedException(String message, InterruptedException cause) {
"""
If we are interrupted while waiting for a lock we just restore the interrupt status and throw
an AmazonClientException back to the caller.
"""
Thread.currentThread().interrupt();
throw new AbortedExceptio... | java | private void handleInterruptedException(String message, InterruptedException cause) {
Thread.currentThread().interrupt();
throw new AbortedException(message, cause);
} | [
"private",
"void",
"handleInterruptedException",
"(",
"String",
"message",
",",
"InterruptedException",
"cause",
")",
"{",
"Thread",
".",
"currentThread",
"(",
")",
".",
"interrupt",
"(",
")",
";",
"throw",
"new",
"AbortedException",
"(",
"message",
",",
"cause"... | If we are interrupted while waiting for a lock we just restore the interrupt status and throw
an AmazonClientException back to the caller. | [
"If",
"we",
"are",
"interrupted",
"while",
"waiting",
"for",
"a",
"lock",
"we",
"just",
"restore",
"the",
"interrupt",
"status",
"and",
"throw",
"an",
"AmazonClientException",
"back",
"to",
"the",
"caller",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sts/src/main/java/com/amazonaws/auth/RefreshableTask.java#L273-L276 |
lucee/Lucee | core/src/main/java/lucee/commons/lang/ParserString.java | ParserString.subCFMLString | public ParserString subCFMLString(int start, int count) {
"""
Gibt eine Untermenge des CFMLString als CFMLString zurueck, ausgehend von start mit einer
maximalen Laenge count.
@param start Von wo aus die Untermenge ausgegeben werden soll.
@param count Wie lange die zurueckgegebene Zeichenkette maximal sein da... | java | public ParserString subCFMLString(int start, int count) {
return new ParserString(String.valueOf(text, start, count));
/*
* NICE die untermenge direkter ermiiteln, das problem hierbei sind die lines
*
* int endPos=start+count; int LineFrom=-1; int LineTo=-1; for(int i=0;i<lines.length;i++) { if() }
*
* re... | [
"public",
"ParserString",
"subCFMLString",
"(",
"int",
"start",
",",
"int",
"count",
")",
"{",
"return",
"new",
"ParserString",
"(",
"String",
".",
"valueOf",
"(",
"text",
",",
"start",
",",
"count",
")",
")",
";",
"/*\n\t * NICE die untermenge direkter ermiitel... | Gibt eine Untermenge des CFMLString als CFMLString zurueck, ausgehend von start mit einer
maximalen Laenge count.
@param start Von wo aus die Untermenge ausgegeben werden soll.
@param count Wie lange die zurueckgegebene Zeichenkette maximal sein darf.
@return Untermenge als CFMLString | [
"Gibt",
"eine",
"Untermenge",
"des",
"CFMLString",
"als",
"CFMLString",
"zurueck",
"ausgehend",
"von",
"start",
"mit",
"einer",
"maximalen",
"Laenge",
"count",
"."
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/ParserString.java#L765-L775 |
jglobus/JGlobus | ssl-proxies/src/main/java/org/globus/common/CoGProperties.java | CoGProperties.getHostName | public String getHostName() {
"""
Returns the user specified hostname. This is used
for DHCP machines where java is unable to determine the
right hostname/IP address.
It first checks the 'GLOBUS_HOSTNAME' system property. If the property
is not set, it checks the 'host' system property next. If the 'host'
pro... | java | public String getHostName() {
String value = System.getProperty("GLOBUS_HOSTNAME");
if (value != null) {
return value;
}
return getProperty("hostname", null);
} | [
"public",
"String",
"getHostName",
"(",
")",
"{",
"String",
"value",
"=",
"System",
".",
"getProperty",
"(",
"\"GLOBUS_HOSTNAME\"",
")",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"return",
"value",
";",
"}",
"return",
"getProperty",
"(",
"\"hostname... | Returns the user specified hostname. This is used
for DHCP machines where java is unable to determine the
right hostname/IP address.
It first checks the 'GLOBUS_HOSTNAME' system property. If the property
is not set, it checks the 'host' system property next. If the 'host'
property is not set in the current configuratio... | [
"Returns",
"the",
"user",
"specified",
"hostname",
".",
"This",
"is",
"used",
"for",
"DHCP",
"machines",
"where",
"java",
"is",
"unable",
"to",
"determine",
"the",
"right",
"hostname",
"/",
"IP",
"address",
".",
"It",
"first",
"checks",
"the",
"GLOBUS_HOSTNA... | train | https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/common/CoGProperties.java#L266-L272 |
apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/replication/ConfigBasedDatasetsFinder.java | ConfigBasedDatasetsFinder.findDatasets | @Override
public List<Dataset> findDatasets() throws IOException {
"""
Based on the {@link #whitelistTag}, find all URI which imports the tag. Then filter out
1. disabled dataset URI
2. None leaf dataset URI
Then created {@link ConfigBasedDataset} based on the {@link Config} of the URIs
"""
Set<UR... | java | @Override
public List<Dataset> findDatasets() throws IOException {
Set<URI> leafDatasets = getValidDatasetURIs(this.commonRoot);
if (leafDatasets.isEmpty()) {
return ImmutableList.of();
}
// Parallel execution for copyDataset for performance consideration.
final List<Dataset> result = new C... | [
"@",
"Override",
"public",
"List",
"<",
"Dataset",
">",
"findDatasets",
"(",
")",
"throws",
"IOException",
"{",
"Set",
"<",
"URI",
">",
"leafDatasets",
"=",
"getValidDatasetURIs",
"(",
"this",
".",
"commonRoot",
")",
";",
"if",
"(",
"leafDatasets",
".",
"i... | Based on the {@link #whitelistTag}, find all URI which imports the tag. Then filter out
1. disabled dataset URI
2. None leaf dataset URI
Then created {@link ConfigBasedDataset} based on the {@link Config} of the URIs | [
"Based",
"on",
"the",
"{",
"@link",
"#whitelistTag",
"}",
"find",
"all",
"URI",
"which",
"imports",
"the",
"tag",
".",
"Then",
"filter",
"out"
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/replication/ConfigBasedDatasetsFinder.java#L262-L282 |
jhalterman/failsafe | src/main/java/net/jodah/failsafe/internal/util/CircularBitSet.java | CircularBitSet.copyBits | static void copyBits(CircularBitSet left, CircularBitSet right) {
"""
Copies the most recent bits from the {@code left} BitSet to the {@code right} BitSet in order from oldest to
newest.
"""
int bitsToCopy = Math.min(left.occupiedBits, right.size);
int index = left.nextIndex - bitsToCopy;
if (inde... | java | static void copyBits(CircularBitSet left, CircularBitSet right) {
int bitsToCopy = Math.min(left.occupiedBits, right.size);
int index = left.nextIndex - bitsToCopy;
if (index < 0)
index += left.occupiedBits;
for (int i = 0; i < bitsToCopy; i++, index = left.indexAfter(index))
right.setNext(l... | [
"static",
"void",
"copyBits",
"(",
"CircularBitSet",
"left",
",",
"CircularBitSet",
"right",
")",
"{",
"int",
"bitsToCopy",
"=",
"Math",
".",
"min",
"(",
"left",
".",
"occupiedBits",
",",
"right",
".",
"size",
")",
";",
"int",
"index",
"=",
"left",
".",
... | Copies the most recent bits from the {@code left} BitSet to the {@code right} BitSet in order from oldest to
newest. | [
"Copies",
"the",
"most",
"recent",
"bits",
"from",
"the",
"{"
] | train | https://github.com/jhalterman/failsafe/blob/65fcd3a82f7b232d2ff59bc525a59d693dd8e223/src/main/java/net/jodah/failsafe/internal/util/CircularBitSet.java#L52-L59 |
DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/impl/JdbcTemplateJdbcHelper.java | JdbcTemplateJdbcHelper.namedParameterJdbcTemplate | protected NamedParameterJdbcTemplate namedParameterJdbcTemplate(Connection conn) {
"""
Get {@link NamedParameterJdbcTemplate} instance for a given
{@link Connection}.
Note: the returned {@link JdbcTemplate} will not automatically close the
{@link Connection}.
@param conn
@return
@since 0.8.0
"""
... | java | protected NamedParameterJdbcTemplate namedParameterJdbcTemplate(Connection conn) {
DataSource ds = new SingleConnectionDataSource(conn, true);
return new NamedParameterJdbcTemplate(ds);
} | [
"protected",
"NamedParameterJdbcTemplate",
"namedParameterJdbcTemplate",
"(",
"Connection",
"conn",
")",
"{",
"DataSource",
"ds",
"=",
"new",
"SingleConnectionDataSource",
"(",
"conn",
",",
"true",
")",
";",
"return",
"new",
"NamedParameterJdbcTemplate",
"(",
"ds",
")... | Get {@link NamedParameterJdbcTemplate} instance for a given
{@link Connection}.
Note: the returned {@link JdbcTemplate} will not automatically close the
{@link Connection}.
@param conn
@return
@since 0.8.0 | [
"Get",
"{",
"@link",
"NamedParameterJdbcTemplate",
"}",
"instance",
"for",
"a",
"given",
"{",
"@link",
"Connection",
"}",
"."
] | train | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/impl/JdbcTemplateJdbcHelper.java#L59-L62 |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/JmsManagedQueueConnectionFactoryImpl.java | JmsManagedQueueConnectionFactoryImpl.instantiateConnection | JmsConnectionImpl instantiateConnection(JmsJcaConnection jcaConnection, Map _passThruProps) throws JMSException {
"""
This overrides a superclass method, so that the superclass's
createConnection() method can be inherited, but still return an object of
this class's type.
"""
if (TraceComponent.isAnyTraci... | java | JmsConnectionImpl instantiateConnection(JmsJcaConnection jcaConnection, Map _passThruProps) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "instantiateConnection", jcaConnection);
JmsQueueConnectionImpl jmsQueueConnection = new JmsQueueConnectionImpl... | [
"JmsConnectionImpl",
"instantiateConnection",
"(",
"JmsJcaConnection",
"jcaConnection",
",",
"Map",
"_passThruProps",
")",
"throws",
"JMSException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
... | This overrides a superclass method, so that the superclass's
createConnection() method can be inherited, but still return an object of
this class's type. | [
"This",
"overrides",
"a",
"superclass",
"method",
"so",
"that",
"the",
"superclass",
"s",
"createConnection",
"()",
"method",
"can",
"be",
"inherited",
"but",
"still",
"return",
"an",
"object",
"of",
"this",
"class",
"s",
"type",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/JmsManagedQueueConnectionFactoryImpl.java#L76-L81 |
camunda/camunda-bpm-camel | camunda-bpm-camel-common/src/main/java/org/camunda/bpm/camel/component/externaltasks/BatchConsumer.java | BatchConsumer.removeExcessiveInProgressTasks | protected void removeExcessiveInProgressTasks(Queue<Exchange> exchanges, int limit) {
"""
Drain any in progress files as we are done with this batch
@param exchanges
the exchanges
@param limit
the limit
"""
while (exchanges.size() > limit) {
// must remove last
Exchange e... | java | protected void removeExcessiveInProgressTasks(Queue<Exchange> exchanges, int limit) {
while (exchanges.size() > limit) {
// must remove last
Exchange exchange = exchanges.poll();
releaseTask(exchange);
}
} | [
"protected",
"void",
"removeExcessiveInProgressTasks",
"(",
"Queue",
"<",
"Exchange",
">",
"exchanges",
",",
"int",
"limit",
")",
"{",
"while",
"(",
"exchanges",
".",
"size",
"(",
")",
">",
"limit",
")",
"{",
"// must remove last",
"Exchange",
"exchange",
"=",... | Drain any in progress files as we are done with this batch
@param exchanges
the exchanges
@param limit
the limit | [
"Drain",
"any",
"in",
"progress",
"files",
"as",
"we",
"are",
"done",
"with",
"this",
"batch"
] | train | https://github.com/camunda/camunda-bpm-camel/blob/224cd7563430f8792287022923ee27491f5a4b60/camunda-bpm-camel-common/src/main/java/org/camunda/bpm/camel/component/externaltasks/BatchConsumer.java#L177-L185 |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/Transform3D.java | Transform3D.makeTranslationMatrix | public final void makeTranslationMatrix(double dx, double dy, double dz) {
"""
Sets the value of this matrix to the given translation, without rotation.
<p>
This function changes all the elements of
the matrix including the scaling and the shearing.
<p>
After a call to this function, the matrix will
contains... | java | public final void makeTranslationMatrix(double dx, double dy, double dz) {
this.m00 = 1f;
this.m01 = 0f;
this.m02 = 0f;
this.m03 = dx;
this.m10 = 0f;
this.m11 = 1f;
this.m12 = 0f;
this.m13 = dy;
this.m20 = 0f;
this.m21 = 0f;
this.m22 = 1f;
this.m23 = dz;
this.m30 = 0f;
this.m31 = 0f;
th... | [
"public",
"final",
"void",
"makeTranslationMatrix",
"(",
"double",
"dx",
",",
"double",
"dy",
",",
"double",
"dz",
")",
"{",
"this",
".",
"m00",
"=",
"1f",
";",
"this",
".",
"m01",
"=",
"0f",
";",
"this",
".",
"m02",
"=",
"0f",
";",
"this",
".",
... | Sets the value of this matrix to the given translation, without rotation.
<p>
This function changes all the elements of
the matrix including the scaling and the shearing.
<p>
After a call to this function, the matrix will
contains (? means any value):
<pre>
[ 1 0 0 dx ]
[ 0 1 0 dy ]
[ 0 0... | [
"Sets",
"the",
"value",
"of",
"this",
"matrix",
"to",
"the",
"given",
"translation",
"without",
"rotation",
".",
"<p",
">",
"This",
"function",
"changes",
"all",
"the",
"elements",
"of",
"the",
"matrix",
"including",
"the",
"scaling",
"and",
"the",
"shearing... | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/Transform3D.java#L369-L389 |
adyliu/jafka | src/main/java/io/jafka/log/LogManager.java | LogManager.deleteLogs | public int deleteLogs(String topic, String password) {
"""
delete topic who is never used
<p>
This will delete all log files and remove node data from zookeeper
</p>
@param topic topic name
@param password auth password
@return number of deleted partitions or -1 if authentication failed
"""
if ... | java | public int deleteLogs(String topic, String password) {
if (!config.getAuthentication().auth(password)) {
return -1;
}
int value = 0;
synchronized (logCreationLock) {
Pool<Integer, Log> parts = logs.remove(topic);
if (parts != null) {
Li... | [
"public",
"int",
"deleteLogs",
"(",
"String",
"topic",
",",
"String",
"password",
")",
"{",
"if",
"(",
"!",
"config",
".",
"getAuthentication",
"(",
")",
".",
"auth",
"(",
"password",
")",
")",
"{",
"return",
"-",
"1",
";",
"}",
"int",
"value",
"=",
... | delete topic who is never used
<p>
This will delete all log files and remove node data from zookeeper
</p>
@param topic topic name
@param password auth password
@return number of deleted partitions or -1 if authentication failed | [
"delete",
"topic",
"who",
"is",
"never",
"used",
"<p",
">",
"This",
"will",
"delete",
"all",
"log",
"files",
"and",
"remove",
"node",
"data",
"from",
"zookeeper",
"<",
"/",
"p",
">"
] | train | https://github.com/adyliu/jafka/blob/cc14d2ed60c039b12d7b106bb5269ef21d0add7e/src/main/java/io/jafka/log/LogManager.java#L537-L556 |
QSFT/Doradus | doradus-client/src/main/java/com/dell/doradus/client/RESTClient.java | RESTClient.sendRequest | public RESTResponse sendRequest(HttpMethod method, String uri,
ContentType contentType, byte[] body)
throws IOException {
"""
Send a REST command with the given method, URI, content-type, and body to the
server and return the response in a {@link RESTResponse} obj... | java | public RESTResponse sendRequest(HttpMethod method, String uri,
ContentType contentType, byte[] body)
throws IOException {
Map<String, String> headers = new HashMap<>();
if (contentType != null) {
headers.put(HttpDefs.CONTENT_TYPE, contentT... | [
"public",
"RESTResponse",
"sendRequest",
"(",
"HttpMethod",
"method",
",",
"String",
"uri",
",",
"ContentType",
"contentType",
",",
"byte",
"[",
"]",
"body",
")",
"throws",
"IOException",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
"=",
"new",
... | Send a REST command with the given method, URI, content-type, and body to the
server and return the response in a {@link RESTResponse} object.
@param method HTTP method such as "GET" or "POST".
@param uri URI such as "/foo/bar?baz"
@param contentType Content-Type of body such as "application/json".
... | [
"Send",
"a",
"REST",
"command",
"with",
"the",
"given",
"method",
"URI",
"content",
"-",
"type",
"and",
"body",
"to",
"the",
"server",
"and",
"return",
"the",
"response",
"in",
"a",
"{",
"@link",
"RESTResponse",
"}",
"object",
"."
] | train | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/RESTClient.java#L260-L268 |
ttddyy/datasource-proxy | src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java | ProxyDataSourceBuilder.beforeQuery | public ProxyDataSourceBuilder beforeQuery(final SingleQueryExecution callback) {
"""
Add {@link QueryExecutionListener} that performs given lambda on {@link QueryExecutionListener#beforeQuery(ExecutionInfo, List)}.
@param callback a lambda function executed on {@link QueryExecutionListener#beforeQuery(Execution... | java | public ProxyDataSourceBuilder beforeQuery(final SingleQueryExecution callback) {
QueryExecutionListener listener = new NoOpQueryExecutionListener() {
@Override
public void beforeQuery(ExecutionInfo execInfo, List<QueryInfo> queryInfoList) {
callback.execute(execInfo, quer... | [
"public",
"ProxyDataSourceBuilder",
"beforeQuery",
"(",
"final",
"SingleQueryExecution",
"callback",
")",
"{",
"QueryExecutionListener",
"listener",
"=",
"new",
"NoOpQueryExecutionListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"beforeQuery",
"(",
"Executio... | Add {@link QueryExecutionListener} that performs given lambda on {@link QueryExecutionListener#beforeQuery(ExecutionInfo, List)}.
@param callback a lambda function executed on {@link QueryExecutionListener#beforeQuery(ExecutionInfo, List)}
@return builder
@since 1.4.3 | [
"Add",
"{",
"@link",
"QueryExecutionListener",
"}",
"that",
"performs",
"given",
"lambda",
"on",
"{",
"@link",
"QueryExecutionListener#beforeQuery",
"(",
"ExecutionInfo",
"List",
")",
"}",
"."
] | train | https://github.com/ttddyy/datasource-proxy/blob/62163ccf9a569a99aa3ad9f9151a32567447a62e/src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java#L567-L576 |
rundeck/rundeck | core/src/main/java/com/dtolabs/rundeck/core/utils/FileUtils.java | FileUtils.relativePath | public static String relativePath(File parent, File child) {
"""
Return the relative path between a parent directory and some child path
@param parent
@param child
@return the relative path for the child
@throws IllegalArgumentException if child is not a subpath
"""
Path superPath = parent.to... | java | public static String relativePath(File parent, File child) {
Path superPath = parent.toPath();
Path subPath = child.toPath();
if (!subPath.startsWith(superPath)) {
throw new IllegalArgumentException("Not a subpath: " + child);
}
return superPath.relativize(subPath).to... | [
"public",
"static",
"String",
"relativePath",
"(",
"File",
"parent",
",",
"File",
"child",
")",
"{",
"Path",
"superPath",
"=",
"parent",
".",
"toPath",
"(",
")",
";",
"Path",
"subPath",
"=",
"child",
".",
"toPath",
"(",
")",
";",
"if",
"(",
"!",
"sub... | Return the relative path between a parent directory and some child path
@param parent
@param child
@return the relative path for the child
@throws IllegalArgumentException if child is not a subpath | [
"Return",
"the",
"relative",
"path",
"between",
"a",
"parent",
"directory",
"and",
"some",
"child",
"path"
] | train | https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/FileUtils.java#L212-L219 |
salesforce/Argus | ArgusCore/src/main/java/com/salesforce/dva/argus/entity/Notification.java | Notification.getCooldownExpirationByTriggerAndMetric | public long getCooldownExpirationByTriggerAndMetric(Trigger trigger, Metric metric) {
"""
Returns the cool down expiration time of the notification given a metric,trigger combination.
@param trigger The trigger
@param metric The metric
@return cool down expiration time in milliseconds
"""
Strin... | java | public long getCooldownExpirationByTriggerAndMetric(Trigger trigger, Metric metric) {
String key = _hashTriggerAndMetric(trigger, metric);
return this.cooldownExpirationByTriggerAndMetric.containsKey(key) ? this.cooldownExpirationByTriggerAndMetric.get(key) : 0;
} | [
"public",
"long",
"getCooldownExpirationByTriggerAndMetric",
"(",
"Trigger",
"trigger",
",",
"Metric",
"metric",
")",
"{",
"String",
"key",
"=",
"_hashTriggerAndMetric",
"(",
"trigger",
",",
"metric",
")",
";",
"return",
"this",
".",
"cooldownExpirationByTriggerAndMet... | Returns the cool down expiration time of the notification given a metric,trigger combination.
@param trigger The trigger
@param metric The metric
@return cool down expiration time in milliseconds | [
"Returns",
"the",
"cool",
"down",
"expiration",
"time",
"of",
"the",
"notification",
"given",
"a",
"metric",
"trigger",
"combination",
"."
] | train | https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/entity/Notification.java#L498-L501 |
fernandospr/javapns-jdk16 | src/main/java/javapns/communication/KeystoreManager.java | KeystoreManager.loadKeystore | static KeyStore loadKeystore(AppleServer server, Object keystore) throws KeystoreException {
"""
Loads a keystore.
@param server the server the keystore is intended for
@param keystore a keystore containing your private key and the certificate signed by Apple (File, InputStream, byte[], KeyStore or String for ... | java | static KeyStore loadKeystore(AppleServer server, Object keystore) throws KeystoreException {
return loadKeystore(server, keystore, false);
} | [
"static",
"KeyStore",
"loadKeystore",
"(",
"AppleServer",
"server",
",",
"Object",
"keystore",
")",
"throws",
"KeystoreException",
"{",
"return",
"loadKeystore",
"(",
"server",
",",
"keystore",
",",
"false",
")",
";",
"}"
] | Loads a keystore.
@param server the server the keystore is intended for
@param keystore a keystore containing your private key and the certificate signed by Apple (File, InputStream, byte[], KeyStore or String for a file path)
@return a loaded keystore
@throws KeystoreException | [
"Loads",
"a",
"keystore",
"."
] | train | https://github.com/fernandospr/javapns-jdk16/blob/84de6d9328ab01af92f77cc60c4554de02420909/src/main/java/javapns/communication/KeystoreManager.java#L41-L43 |
bramp/ffmpeg-cli-wrapper | src/main/java/net/bramp/ffmpeg/io/ProcessUtils.java | ProcessUtils.waitForWithTimeout | public static int waitForWithTimeout(final Process p, long timeout, TimeUnit unit)
throws TimeoutException {
"""
Waits until a process finishes or a timeout occurs
@param p process
@param timeout timeout in given unit
@param unit time unit
@return the process exit value
@throws TimeoutException if a t... | java | public static int waitForWithTimeout(final Process p, long timeout, TimeUnit unit)
throws TimeoutException {
ProcessThread t = new ProcessThread(p);
t.start();
try {
unit.timedJoin(t, timeout);
} catch (InterruptedException e) {
t.interrupt();
Thread.currentThread().interrupt()... | [
"public",
"static",
"int",
"waitForWithTimeout",
"(",
"final",
"Process",
"p",
",",
"long",
"timeout",
",",
"TimeUnit",
"unit",
")",
"throws",
"TimeoutException",
"{",
"ProcessThread",
"t",
"=",
"new",
"ProcessThread",
"(",
"p",
")",
";",
"t",
".",
"start",
... | Waits until a process finishes or a timeout occurs
@param p process
@param timeout timeout in given unit
@param unit time unit
@return the process exit value
@throws TimeoutException if a timeout occurs | [
"Waits",
"until",
"a",
"process",
"finishes",
"or",
"a",
"timeout",
"occurs"
] | train | https://github.com/bramp/ffmpeg-cli-wrapper/blob/3819b155edf9132acc75bb6af66dcef1b98c64b2/src/main/java/net/bramp/ffmpeg/io/ProcessUtils.java#L50-L68 |
Metatavu/edelphi | edelphi/src/main/java/fi/metatavu/edelphi/utils/GoogleDriveUtils.java | GoogleDriveUtils.downloadFile | public static DownloadResponse downloadFile(Drive drive, String fileId) throws IOException {
"""
Downloads file from Google Drive
@param drive drive client
@param fileId file id for file to be downloaded
@return file content
@throws IOException an IOException
"""
Get request = drive.files().get(fileId... | java | public static DownloadResponse downloadFile(Drive drive, String fileId) throws IOException {
Get request = drive.files().get(fileId).setAlt("media");
String contentType = request.executeUsingHead().getContentType();
if (StringUtils.isNotBlank(contentType)) {
try (InputStream inputStream = request.executeA... | [
"public",
"static",
"DownloadResponse",
"downloadFile",
"(",
"Drive",
"drive",
",",
"String",
"fileId",
")",
"throws",
"IOException",
"{",
"Get",
"request",
"=",
"drive",
".",
"files",
"(",
")",
".",
"get",
"(",
"fileId",
")",
".",
"setAlt",
"(",
"\"media\... | Downloads file from Google Drive
@param drive drive client
@param fileId file id for file to be downloaded
@return file content
@throws IOException an IOException | [
"Downloads",
"file",
"from",
"Google",
"Drive"
] | train | https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi/src/main/java/fi/metatavu/edelphi/utils/GoogleDriveUtils.java#L331-L341 |
FaritorKang/unmz-common-util | src/main/java/net/unmz/java/util/security/RSAUtils.java | RSAUtils.verify | public static boolean verify(byte[] data, String publicKey, String sign) throws Exception {
"""
<p>
校验数字签名
</p>
@param data 已加密数据
@param publicKey 公钥(BASE64编码)
@param sign 数字签名
@return
@throws Exception
"""
String keyBytes = Base64Utils.encode(publicKey);
X509EncodedKeySpec keySpec =... | java | public static boolean verify(byte[] data, String publicKey, String sign) throws Exception {
String keyBytes = Base64Utils.encode(publicKey);
X509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes.getBytes());
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
PublicKey ... | [
"public",
"static",
"boolean",
"verify",
"(",
"byte",
"[",
"]",
"data",
",",
"String",
"publicKey",
",",
"String",
"sign",
")",
"throws",
"Exception",
"{",
"String",
"keyBytes",
"=",
"Base64Utils",
".",
"encode",
"(",
"publicKey",
")",
";",
"X509EncodedKeySp... | <p>
校验数字签名
</p>
@param data 已加密数据
@param publicKey 公钥(BASE64编码)
@param sign 数字签名
@return
@throws Exception | [
"<p",
">",
"校验数字签名",
"<",
"/",
"p",
">"
] | train | https://github.com/FaritorKang/unmz-common-util/blob/2912b8889b85ed910d536f85b24b6fa68035814a/src/main/java/net/unmz/java/util/security/RSAUtils.java#L111-L120 |
knowm/XChart | xchart/src/main/java/org/knowm/xchart/internal/style/SeriesColorMarkerLineStyleCycler.java | SeriesColorMarkerLineStyleCycler.getNextSeriesColorMarkerLineStyle | public SeriesColorMarkerLineStyle getNextSeriesColorMarkerLineStyle() {
"""
Get the next ColorMarkerLineStyle
@return the next ColorMarkerLineStyle
"""
// 1. Color - cycle through colors one by one
if (colorCounter >= seriesColorList.length) {
colorCounter = 0;
strokeCounter++;
}
... | java | public SeriesColorMarkerLineStyle getNextSeriesColorMarkerLineStyle() {
// 1. Color - cycle through colors one by one
if (colorCounter >= seriesColorList.length) {
colorCounter = 0;
strokeCounter++;
}
Color seriesColor = seriesColorList[colorCounter++];
// 2. Stroke - cycle through str... | [
"public",
"SeriesColorMarkerLineStyle",
"getNextSeriesColorMarkerLineStyle",
"(",
")",
"{",
"// 1. Color - cycle through colors one by one",
"if",
"(",
"colorCounter",
">=",
"seriesColorList",
".",
"length",
")",
"{",
"colorCounter",
"=",
"0",
";",
"strokeCounter",
"++",
... | Get the next ColorMarkerLineStyle
@return the next ColorMarkerLineStyle | [
"Get",
"the",
"next",
"ColorMarkerLineStyle"
] | train | https://github.com/knowm/XChart/blob/677a105753a855edf24782fab1bf1f5aec3e642b/xchart/src/main/java/org/knowm/xchart/internal/style/SeriesColorMarkerLineStyleCycler.java#L44-L66 |
netscaler/sdx_nitro | src/main/java/com/citrix/sdx/nitro/resource/config/mps/version_matrix_status.java | version_matrix_status.get_nitro_bulk_response | protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception {
"""
<pre>
Converts API response of bulk operation into object and returns the object array in case of get request.
</pre>
"""
version_matrix_status_responses result = (version_matrix_status_respons... | java | protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
{
version_matrix_status_responses result = (version_matrix_status_responses) service.get_payload_formatter().string_to_resource(version_matrix_status_responses.class, response);
if(result.errorcode != 0)
... | [
"protected",
"base_resource",
"[",
"]",
"get_nitro_bulk_response",
"(",
"nitro_service",
"service",
",",
"String",
"response",
")",
"throws",
"Exception",
"{",
"version_matrix_status_responses",
"result",
"=",
"(",
"version_matrix_status_responses",
")",
"service",
".",
... | <pre>
Converts API response of bulk operation into object and returns the object array in case of get request.
</pre> | [
"<pre",
">",
"Converts",
"API",
"response",
"of",
"bulk",
"operation",
"into",
"object",
"and",
"returns",
"the",
"object",
"array",
"in",
"case",
"of",
"get",
"request",
".",
"<",
"/",
"pre",
">"
] | train | https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/version_matrix_status.java#L269-L286 |
mojohaus/jaxb2-maven-plugin | src/main/java/org/codehaus/mojo/jaxb2/shared/filters/pattern/PatternFileFilter.java | PatternFileFilter.createExcludeFilterList | public static List<Filter<File>> createExcludeFilterList(final Log log,
final String... patterns) {
"""
Creates a new List containing an exclude-mode PatternFileFilter using the supplied patternStrings which
are interpreted as file suffixes. (I.e. prepended with {@code PATTERN_LETTER_DIGIT_PUNCT} and ... | java | public static List<Filter<File>> createExcludeFilterList(final Log log,
final String... patterns) {
return createFilterList(log, false, patterns);
} | [
"public",
"static",
"List",
"<",
"Filter",
"<",
"File",
">",
">",
"createExcludeFilterList",
"(",
"final",
"Log",
"log",
",",
"final",
"String",
"...",
"patterns",
")",
"{",
"return",
"createFilterList",
"(",
"log",
",",
"false",
",",
"patterns",
")",
";",... | Creates a new List containing an exclude-mode PatternFileFilter using the supplied patternStrings which
are interpreted as file suffixes. (I.e. prepended with {@code PATTERN_LETTER_DIGIT_PUNCT} and compiled to
Patterns). The {@code FILE_PATH_CONVERTER} is used to convert Files to strings.
@param patterns A List of suf... | [
"Creates",
"a",
"new",
"List",
"containing",
"an",
"exclude",
"-",
"mode",
"PatternFileFilter",
"using",
"the",
"supplied",
"patternStrings",
"which",
"are",
"interpreted",
"as",
"file",
"suffixes",
".",
"(",
"I",
".",
"e",
".",
"prepended",
"with",
"{",
"@c... | train | https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/filters/pattern/PatternFileFilter.java#L152-L155 |
erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java | OtpNode.ping | public boolean ping(final String anode, final long timeout) {
"""
/*
internal info about the message formats...
the request: -> REG_SEND {6,#Pid<bingo@aule.1.0>,'',net_kernel}
{'$gen_call',{#Pid<bingo@aule.1.0>,#Ref<bingo@aule.2>},{is_auth,bingo@aule}}
the reply: <- SEND {2,'',#Pid<bingo@aule.1.0>} {#Ref<b... | java | public boolean ping(final String anode, final long timeout) {
if (anode.equals(node)) {
return true;
} else if (anode.indexOf('@', 0) < 0
&& anode.equals(node.substring(0, node.indexOf('@', 0)))) {
return true;
}
// other node
OtpMbox mbox... | [
"public",
"boolean",
"ping",
"(",
"final",
"String",
"anode",
",",
"final",
"long",
"timeout",
")",
"{",
"if",
"(",
"anode",
".",
"equals",
"(",
"node",
")",
")",
"{",
"return",
"true",
";",
"}",
"else",
"if",
"(",
"anode",
".",
"indexOf",
"(",
"'"... | /*
internal info about the message formats...
the request: -> REG_SEND {6,#Pid<bingo@aule.1.0>,'',net_kernel}
{'$gen_call',{#Pid<bingo@aule.1.0>,#Ref<bingo@aule.2>},{is_auth,bingo@aule}}
the reply: <- SEND {2,'',#Pid<bingo@aule.1.0>} {#Ref<bingo@aule.2>,yes} | [
"/",
"*",
"internal",
"info",
"about",
"the",
"message",
"formats",
"..."
] | train | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java#L446-L469 |
google/error-prone | check_api/src/main/java/com/google/errorprone/matchers/Matchers.java | Matchers.isVariable | public static Matcher<ExpressionTree> isVariable() {
"""
Matches an AST node that represents a local variable or parameter.
"""
return new Matcher<ExpressionTree>() {
@Override
public boolean matches(ExpressionTree expressionTree, VisitorState state) {
Symbol symbol = ASTHelpers.getSymb... | java | public static Matcher<ExpressionTree> isVariable() {
return new Matcher<ExpressionTree>() {
@Override
public boolean matches(ExpressionTree expressionTree, VisitorState state) {
Symbol symbol = ASTHelpers.getSymbol(expressionTree);
if (symbol == null) {
return false;
}
... | [
"public",
"static",
"Matcher",
"<",
"ExpressionTree",
">",
"isVariable",
"(",
")",
"{",
"return",
"new",
"Matcher",
"<",
"ExpressionTree",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"boolean",
"matches",
"(",
"ExpressionTree",
"expressionTree",
",",
"Visit... | Matches an AST node that represents a local variable or parameter. | [
"Matches",
"an",
"AST",
"node",
"that",
"represents",
"a",
"local",
"variable",
"or",
"parameter",
"."
] | train | https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/matchers/Matchers.java#L232-L244 |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/adapter/ObjectAdapterActivity.java | ObjectAdapterActivity.directInvoke | public Response directInvoke(ActivityRuntimeContext runtimeContext, Object request)
throws AdapterException, ConnectionException {
"""
This method is used for directly invoke the adapter activity
from code, rather than as part of process execution flow.
If logging is desired, extenders should overrid... | java | public Response directInvoke(ActivityRuntimeContext runtimeContext, Object request)
throws AdapterException, ConnectionException {
prepare(runtimeContext);
if (isStubMode()) {
logger.info("Adapter is running in StubMode. AdapterName:" + this.getClass().getName());
r... | [
"public",
"Response",
"directInvoke",
"(",
"ActivityRuntimeContext",
"runtimeContext",
",",
"Object",
"request",
")",
"throws",
"AdapterException",
",",
"ConnectionException",
"{",
"prepare",
"(",
"runtimeContext",
")",
";",
"if",
"(",
"isStubMode",
"(",
")",
")",
... | This method is used for directly invoke the adapter activity
from code, rather than as part of process execution flow.
If logging is desired, extenders should override logMessage().
@param request request message
@return response message
@throws AdapterException
@throws ConnectionException | [
"This",
"method",
"is",
"used",
"for",
"directly",
"invoke",
"the",
"adapter",
"activity",
"from",
"code",
"rather",
"than",
"as",
"part",
"of",
"process",
"execution",
"flow",
".",
"If",
"logging",
"is",
"desired",
"extenders",
"should",
"override",
"logMessa... | train | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/ObjectAdapterActivity.java#L609-L642 |
javalite/activeweb | javalite-async/src/main/java/org/javalite/async/Async.java | Async.sendTextMessage | public void sendTextMessage(String queueName, String text) {
"""
Sends a non-expiring {@link TextMessage} with average priority.
@param queueName name of queue
@param text body of message
"""
sendTextMessage(queueName, text, DeliveryMode.NON_PERSISTENT, 4, 0);
} | java | public void sendTextMessage(String queueName, String text){
sendTextMessage(queueName, text, DeliveryMode.NON_PERSISTENT, 4, 0);
} | [
"public",
"void",
"sendTextMessage",
"(",
"String",
"queueName",
",",
"String",
"text",
")",
"{",
"sendTextMessage",
"(",
"queueName",
",",
"text",
",",
"DeliveryMode",
".",
"NON_PERSISTENT",
",",
"4",
",",
"0",
")",
";",
"}"
] | Sends a non-expiring {@link TextMessage} with average priority.
@param queueName name of queue
@param text body of message | [
"Sends",
"a",
"non",
"-",
"expiring",
"{",
"@link",
"TextMessage",
"}",
"with",
"average",
"priority",
"."
] | train | https://github.com/javalite/activeweb/blob/f25f589da94852b6f5625182360732e0861794a6/javalite-async/src/main/java/org/javalite/async/Async.java#L483-L485 |
mozilla/rhino | src/org/mozilla/javascript/EmbeddedSlotMap.java | EmbeddedSlotMap.addKnownAbsentSlot | private void addKnownAbsentSlot(ScriptableObject.Slot[] addSlots, ScriptableObject.Slot slot) {
"""
Add slot with keys that are known to absent from the table.
This is an optimization to use when inserting into empty table,
after table growth or during deserialization.
"""
final int insertPos = getSl... | java | private void addKnownAbsentSlot(ScriptableObject.Slot[] addSlots, ScriptableObject.Slot slot)
{
final int insertPos = getSlotIndex(addSlots.length, slot.indexOrHash);
ScriptableObject.Slot old = addSlots[insertPos];
addSlots[insertPos] = slot;
slot.next = old;
} | [
"private",
"void",
"addKnownAbsentSlot",
"(",
"ScriptableObject",
".",
"Slot",
"[",
"]",
"addSlots",
",",
"ScriptableObject",
".",
"Slot",
"slot",
")",
"{",
"final",
"int",
"insertPos",
"=",
"getSlotIndex",
"(",
"addSlots",
".",
"length",
",",
"slot",
".",
"... | Add slot with keys that are known to absent from the table.
This is an optimization to use when inserting into empty table,
after table growth or during deserialization. | [
"Add",
"slot",
"with",
"keys",
"that",
"are",
"known",
"to",
"absent",
"from",
"the",
"table",
".",
"This",
"is",
"an",
"optimization",
"to",
"use",
"when",
"inserting",
"into",
"empty",
"table",
"after",
"table",
"growth",
"or",
"during",
"deserialization",... | train | https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/EmbeddedSlotMap.java#L343-L349 |
joniles/mpxj | src/main/java/net/sf/mpxj/Resource.java | Resource.setEnterpriseDuration | public void setEnterpriseDuration(int index, Duration value) {
"""
Set an enterprise field value.
@param index field index
@param value field value
"""
set(selectField(ResourceFieldLists.ENTERPRISE_DURATION, index), value);
} | java | public void setEnterpriseDuration(int index, Duration value)
{
set(selectField(ResourceFieldLists.ENTERPRISE_DURATION, index), value);
} | [
"public",
"void",
"setEnterpriseDuration",
"(",
"int",
"index",
",",
"Duration",
"value",
")",
"{",
"set",
"(",
"selectField",
"(",
"ResourceFieldLists",
".",
"ENTERPRISE_DURATION",
",",
"index",
")",
",",
"value",
")",
";",
"}"
] | Set an enterprise field value.
@param index field index
@param value field value | [
"Set",
"an",
"enterprise",
"field",
"value",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Resource.java#L2095-L2098 |
matthewhorridge/owlapi-gwt | owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectExactCardinalityImpl_CustomFieldSerializer.java | OWLObjectExactCardinalityImpl_CustomFieldSerializer.deserializeInstance | @Override
public void deserializeInstance(SerializationStreamReader streamReader, OWLObjectExactCardinalityImpl instance) throws SerializationException {
"""
Deserializes the content of the object from the
{@link com.google.gwt.user.client.rpc.SerializationStreamReader}.
@param streamReader the {@link com.... | java | @Override
public void deserializeInstance(SerializationStreamReader streamReader, OWLObjectExactCardinalityImpl instance) throws SerializationException {
deserialize(streamReader, instance);
} | [
"@",
"Override",
"public",
"void",
"deserializeInstance",
"(",
"SerializationStreamReader",
"streamReader",
",",
"OWLObjectExactCardinalityImpl",
"instance",
")",
"throws",
"SerializationException",
"{",
"deserialize",
"(",
"streamReader",
",",
"instance",
")",
";",
"}"
] | Deserializes the content of the object from the
{@link com.google.gwt.user.client.rpc.SerializationStreamReader}.
@param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the
object's content from
@param instance the object instance to deserialize
@throws com.google.gwt.user... | [
"Deserializes",
"the",
"content",
"of",
"the",
"object",
"from",
"the",
"{",
"@link",
"com",
".",
"google",
".",
"gwt",
".",
"user",
".",
"client",
".",
"rpc",
".",
"SerializationStreamReader",
"}",
"."
] | train | https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectExactCardinalityImpl_CustomFieldSerializer.java#L95-L98 |
Azure/azure-sdk-for-java | batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java | PoolOperations.listPoolUsageMetrics | public PagedList<PoolUsageMetrics> listPoolUsageMetrics(DateTime startTime, DateTime endTime)
throws BatchErrorException, IOException {
"""
Lists pool usage metrics.
@param startTime
The start time of the aggregation interval covered by this entry.
@param endTime
The end time of the aggregation i... | java | public PagedList<PoolUsageMetrics> listPoolUsageMetrics(DateTime startTime, DateTime endTime)
throws BatchErrorException, IOException {
return listPoolUsageMetrics(startTime, endTime, null, null);
} | [
"public",
"PagedList",
"<",
"PoolUsageMetrics",
">",
"listPoolUsageMetrics",
"(",
"DateTime",
"startTime",
",",
"DateTime",
"endTime",
")",
"throws",
"BatchErrorException",
",",
"IOException",
"{",
"return",
"listPoolUsageMetrics",
"(",
"startTime",
",",
"endTime",
",... | Lists pool usage metrics.
@param startTime
The start time of the aggregation interval covered by this entry.
@param endTime
The end time of the aggregation interval for this entry.
@return A list of {@link PoolUsageMetrics} objects.
@throws BatchErrorException
Exception thrown when an error response is received from t... | [
"Lists",
"pool",
"usage",
"metrics",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java#L1262-L1265 |
jcuda/jcufft | JCufftJava/src/main/java/jcuda/jcufft/JCufft.java | JCufft.cufftExecC2C | public static int cufftExecC2C(cufftHandle plan, Pointer cIdata, Pointer cOdata, int direction) {
"""
<pre>
Executes a CUFFT complex-to-complex transform plan.
cufftResult cufftExecC2C( cufftHandle plan, cufftComplex *idata, cufftComplex *odata, int direction );
CUFFT uses as input data the GPU memory point... | java | public static int cufftExecC2C(cufftHandle plan, Pointer cIdata, Pointer cOdata, int direction)
{
return checkResult(cufftExecC2CNative(plan, cIdata, cOdata, direction));
} | [
"public",
"static",
"int",
"cufftExecC2C",
"(",
"cufftHandle",
"plan",
",",
"Pointer",
"cIdata",
",",
"Pointer",
"cOdata",
",",
"int",
"direction",
")",
"{",
"return",
"checkResult",
"(",
"cufftExecC2CNative",
"(",
"plan",
",",
"cIdata",
",",
"cOdata",
",",
... | <pre>
Executes a CUFFT complex-to-complex transform plan.
cufftResult cufftExecC2C( cufftHandle plan, cufftComplex *idata, cufftComplex *odata, int direction );
CUFFT uses as input data the GPU memory pointed to by the idata parameter. This
function stores the Fourier coefficients in the odata array. If idata and
oda... | [
"<pre",
">",
"Executes",
"a",
"CUFFT",
"complex",
"-",
"to",
"-",
"complex",
"transform",
"plan",
"."
] | train | https://github.com/jcuda/jcufft/blob/833c87ffb0864f7ee7270fddef8af57f48939b3a/JCufftJava/src/main/java/jcuda/jcufft/JCufft.java#L774-L777 |
UrielCh/ovh-java-sdk | ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java | ApiOvhTelephony.billingAccount_ovhPabx_serviceName_hunting_queue_queueId_agent_agentId_PUT | public void billingAccount_ovhPabx_serviceName_hunting_queue_queueId_agent_agentId_PUT(String billingAccount, String serviceName, Long queueId, Long agentId, OvhOvhPabxHuntingAgentQueue body) throws IOException {
"""
Alter this object properties
REST: PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/huntin... | java | public void billingAccount_ovhPabx_serviceName_hunting_queue_queueId_agent_agentId_PUT(String billingAccount, String serviceName, Long queueId, Long agentId, OvhOvhPabxHuntingAgentQueue body) throws IOException {
String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}... | [
"public",
"void",
"billingAccount_ovhPabx_serviceName_hunting_queue_queueId_agent_agentId_PUT",
"(",
"String",
"billingAccount",
",",
"String",
"serviceName",
",",
"Long",
"queueId",
",",
"Long",
"agentId",
",",
"OvhOvhPabxHuntingAgentQueue",
"body",
")",
"throws",
"IOExcepti... | Alter this object properties
REST: PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}/agent/{agentId}
@param body [required] New object properties
@param billingAccount [required] The name of your billingAccount
@param serviceName [required]
@param queueId [required]
@param agentId [required... | [
"Alter",
"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#L6672-L6676 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.