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 |
|---|---|---|---|---|---|---|---|---|---|---|
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableUtils.java | PortableUtils.getPortableArrayCellPosition | static int getPortableArrayCellPosition(BufferObjectDataInput in, int streamPosition, int cellIndex)
throws IOException {
"""
Calculates and reads the position of the Portable object stored in a Portable array under the given index.
@param in data input stream
@param streamPosition stre... | java | static int getPortableArrayCellPosition(BufferObjectDataInput in, int streamPosition, int cellIndex)
throws IOException {
return in.readInt(streamPosition + cellIndex * Bits.INT_SIZE_IN_BYTES);
} | [
"static",
"int",
"getPortableArrayCellPosition",
"(",
"BufferObjectDataInput",
"in",
",",
"int",
"streamPosition",
",",
"int",
"cellIndex",
")",
"throws",
"IOException",
"{",
"return",
"in",
".",
"readInt",
"(",
"streamPosition",
"+",
"cellIndex",
"*",
"Bits",
"."... | Calculates and reads the position of the Portable object stored in a Portable array under the given index.
@param in data input stream
@param streamPosition streamPosition to begin the reading from
@param cellIndex index of the cell
@return the position of the given portable object in the stream
@thro... | [
"Calculates",
"and",
"reads",
"the",
"position",
"of",
"the",
"Portable",
"object",
"stored",
"in",
"a",
"Portable",
"array",
"under",
"the",
"given",
"index",
"."
] | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableUtils.java#L65-L68 |
liferay/com-liferay-commerce | commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommerceTierPriceEntryPersistenceImpl.java | CommerceTierPriceEntryPersistenceImpl.removeByUuid_C | @Override
public void removeByUuid_C(String uuid, long companyId) {
"""
Removes all the commerce tier price entries where uuid = ? and companyId = ? from the database.
@param uuid the uuid
@param companyId the company ID
"""
for (CommerceTierPriceEntry commerceTierPriceEntry : findByUuid_C(
... | java | @Override
public void removeByUuid_C(String uuid, long companyId) {
for (CommerceTierPriceEntry commerceTierPriceEntry : findByUuid_C(
uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
remove(commerceTierPriceEntry);
}
} | [
"@",
"Override",
"public",
"void",
"removeByUuid_C",
"(",
"String",
"uuid",
",",
"long",
"companyId",
")",
"{",
"for",
"(",
"CommerceTierPriceEntry",
"commerceTierPriceEntry",
":",
"findByUuid_C",
"(",
"uuid",
",",
"companyId",
",",
"QueryUtil",
".",
"ALL_POS",
... | Removes all the commerce tier price entries where uuid = ? and companyId = ? from the database.
@param uuid the uuid
@param companyId the company ID | [
"Removes",
"all",
"the",
"commerce",
"tier",
"price",
"entries",
"where",
"uuid",
"=",
"?",
";",
"and",
"companyId",
"=",
"?",
";",
"from",
"the",
"database",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommerceTierPriceEntryPersistenceImpl.java#L1416-L1422 |
Chorus-bdd/Chorus | interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/StepMacro.java | StepMacro.processStep | public boolean processStep(StepToken scenarioStep, List<StepMacro> macros, boolean alreadymatched) {
"""
Process a scenario step, adding child steps if it matches this StepMacro
@param scenarioStep the step to match to this StepMacro's pattern
@param macros the dictionary of macros against which to recursively... | java | public boolean processStep(StepToken scenarioStep, List<StepMacro> macros, boolean alreadymatched) {
boolean stepMacroMatched = doProcessStep(scenarioStep, macros, 0, alreadymatched);
return stepMacroMatched;
} | [
"public",
"boolean",
"processStep",
"(",
"StepToken",
"scenarioStep",
",",
"List",
"<",
"StepMacro",
">",
"macros",
",",
"boolean",
"alreadymatched",
")",
"{",
"boolean",
"stepMacroMatched",
"=",
"doProcessStep",
"(",
"scenarioStep",
",",
"macros",
",",
"0",
","... | Process a scenario step, adding child steps if it matches this StepMacro
@param scenarioStep the step to match to this StepMacro's pattern
@param macros the dictionary of macros against which to recursively match child steps | [
"Process",
"a",
"scenario",
"step",
"adding",
"child",
"steps",
"if",
"it",
"matches",
"this",
"StepMacro"
] | train | https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/StepMacro.java#L128-L131 |
fozziethebeat/S-Space | opt/src/main/java/edu/ucla/sspace/lra/LatentRelationalAnalysis.java | LatentRelationalAnalysis.printMatrix | public static void printMatrix(int rows, int cols, Matrix m) {
"""
prints the {@code Matrix} to standard out.
@param rows an {@code int} containing the number of rows in m
@param cols an {@code int} containing the number of cols in m
@param m the {@code Matrix} to print
@return void
"""
for(int c... | java | public static void printMatrix(int rows, int cols, Matrix m) {
for(int col_num = 0; col_num < cols; col_num++) {
for (int row_num = 0; row_num < rows; row_num++) {
System.out.print(m.get(row_num,col_num) + " ");
}
System.out.print("\n");
}
Syst... | [
"public",
"static",
"void",
"printMatrix",
"(",
"int",
"rows",
",",
"int",
"cols",
",",
"Matrix",
"m",
")",
"{",
"for",
"(",
"int",
"col_num",
"=",
"0",
";",
"col_num",
"<",
"cols",
";",
"col_num",
"++",
")",
"{",
"for",
"(",
"int",
"row_num",
"=",... | prints the {@code Matrix} to standard out.
@param rows an {@code int} containing the number of rows in m
@param cols an {@code int} containing the number of cols in m
@param m the {@code Matrix} to print
@return void | [
"prints",
"the",
"{",
"@code",
"Matrix",
"}",
"to",
"standard",
"out",
"."
] | train | https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/opt/src/main/java/edu/ucla/sspace/lra/LatentRelationalAnalysis.java#L993-L1001 |
IBM/ibm-cos-sdk-java | ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/util/AWSRequestMetricsFullSupport.java | AWSRequestMetricsFullSupport.startEvent | @Override
public void startEvent(String eventName) {
"""
Start an event which will be timed. The startTime and endTime are added
to timingInfo only after endEvent is called. For every startEvent there
should be a corresponding endEvent. If you start the same event without
ending it, this will overwrite the ... | java | @Override
public void startEvent(String eventName) {
/* This will overwrite past events */
eventsBeingProfiled.put // ignoring the wall clock time
(eventName, TimingInfo.startTimingFullSupport(System.nanoTime()));
} | [
"@",
"Override",
"public",
"void",
"startEvent",
"(",
"String",
"eventName",
")",
"{",
"/* This will overwrite past events */",
"eventsBeingProfiled",
".",
"put",
"// ignoring the wall clock time",
"(",
"eventName",
",",
"TimingInfo",
".",
"startTimingFullSupport",
"(",
"... | Start an event which will be timed. The startTime and endTime are added
to timingInfo only after endEvent is called. For every startEvent there
should be a corresponding endEvent. If you start the same event without
ending it, this will overwrite the old event. i.e. There is no support
for recursive events yet. Having ... | [
"Start",
"an",
"event",
"which",
"will",
"be",
"timed",
".",
"The",
"startTime",
"and",
"endTime",
"are",
"added",
"to",
"timingInfo",
"only",
"after",
"endEvent",
"is",
"called",
".",
"For",
"every",
"startEvent",
"there",
"should",
"be",
"a",
"correspondin... | train | https://github.com/IBM/ibm-cos-sdk-java/blob/d0bb2dd754c328a05e7dba8dc42e28b271b6daf2/ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/util/AWSRequestMetricsFullSupport.java#L82-L87 |
lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/edge/GradientToEdgeFeatures.java | GradientToEdgeFeatures.nonMaxSuppression4 | static public GrayF32 nonMaxSuppression4(GrayF32 intensity , GrayS8 direction , GrayF32 output ) {
"""
<p>
Sets edge intensities to zero if the pixel has an intensity which is less than either of
the two adjacent pixels. Pixel adjacency is determined by the gradients discretized direction.
</p>
@param inten... | java | static public GrayF32 nonMaxSuppression4(GrayF32 intensity , GrayS8 direction , GrayF32 output )
{
InputSanityCheck.checkSameShape(intensity,direction);
output = InputSanityCheck.checkDeclare(intensity,output);
if( BoofConcurrency.USE_CONCURRENT ) {
ImplEdgeNonMaxSuppression_MT.inner4(intensity, direction, o... | [
"static",
"public",
"GrayF32",
"nonMaxSuppression4",
"(",
"GrayF32",
"intensity",
",",
"GrayS8",
"direction",
",",
"GrayF32",
"output",
")",
"{",
"InputSanityCheck",
".",
"checkSameShape",
"(",
"intensity",
",",
"direction",
")",
";",
"output",
"=",
"InputSanityCh... | <p>
Sets edge intensities to zero if the pixel has an intensity which is less than either of
the two adjacent pixels. Pixel adjacency is determined by the gradients discretized direction.
</p>
@param intensity Edge intensities. Not modified.
@param direction 4-Discretized direction. See {@link #discretizeDirection4(... | [
"<p",
">",
"Sets",
"edge",
"intensities",
"to",
"zero",
"if",
"the",
"pixel",
"has",
"an",
"intensity",
"which",
"is",
"less",
"than",
"either",
"of",
"the",
"two",
"adjacent",
"pixels",
".",
"Pixel",
"adjacency",
"is",
"determined",
"by",
"the",
"gradient... | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/edge/GradientToEdgeFeatures.java#L467-L481 |
EdwardRaff/JSAT | JSAT/src/jsat/classifiers/trees/TreePruner.java | TreePruner.prune | public static void prune(TreeNodeVisitor root, PruningMethod method, ClassificationDataSet testSet) {
"""
Performs pruning starting from the root node of a tree
@param root the root node of a decision tree
@param method the pruning method to use
@param testSet the test set of data points to use for pruning
... | java | public static void prune(TreeNodeVisitor root, PruningMethod method, ClassificationDataSet testSet)
{
//TODO add vargs for extra arguments that may be used by pruning methods
if(method == PruningMethod.NONE )
return;
else if(method == PruningMethod.REDUCED_ERROR)
prun... | [
"public",
"static",
"void",
"prune",
"(",
"TreeNodeVisitor",
"root",
",",
"PruningMethod",
"method",
",",
"ClassificationDataSet",
"testSet",
")",
"{",
"//TODO add vargs for extra arguments that may be used by pruning methods",
"if",
"(",
"method",
"==",
"PruningMethod",
".... | Performs pruning starting from the root node of a tree
@param root the root node of a decision tree
@param method the pruning method to use
@param testSet the test set of data points to use for pruning | [
"Performs",
"pruning",
"starting",
"from",
"the",
"root",
"node",
"of",
"a",
"tree"
] | train | https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/trees/TreePruner.java#L66-L77 |
Azure/azure-sdk-for-java | sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java | ManagedDatabasesInner.getAsync | public Observable<ManagedDatabaseInner> getAsync(String resourceGroupName, String managedInstanceName, String databaseName) {
"""
Gets a managed database.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the port... | java | public Observable<ManagedDatabaseInner> getAsync(String resourceGroupName, String managedInstanceName, String databaseName) {
return getWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName).map(new Func1<ServiceResponse<ManagedDatabaseInner>, ManagedDatabaseInner>() {
@Overr... | [
"public",
"Observable",
"<",
"ManagedDatabaseInner",
">",
"getAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"managedInstanceName",
",",
"String",
"databaseName",
")",
"{",
"return",
"getWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"managedInstanc... | Gets a managed database.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param managedInstanceName The name of the managed instance.
@param databaseName The name of the database.
@throws IllegalArgumentExc... | [
"Gets",
"a",
"managed",
"database",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java#L448-L455 |
spotbugs/spotbugs | spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/FBFrame.java | FBFrame.setFontSizeHelper | protected void setFontSizeHelper(float size, Component... comps) {
"""
/*
Helps above method, runs through all components recursively.
"""
for (Component comp : comps) {
comp.setFont(comp.getFont().deriveFont(size));
if (comp instanceof Container) {
setFontSizeH... | java | protected void setFontSizeHelper(float size, Component... comps) {
for (Component comp : comps) {
comp.setFont(comp.getFont().deriveFont(size));
if (comp instanceof Container) {
setFontSizeHelper(size, ((Container) comp).getComponents());
}
}
} | [
"protected",
"void",
"setFontSizeHelper",
"(",
"float",
"size",
",",
"Component",
"...",
"comps",
")",
"{",
"for",
"(",
"Component",
"comp",
":",
"comps",
")",
"{",
"comp",
".",
"setFont",
"(",
"comp",
".",
"getFont",
"(",
")",
".",
"deriveFont",
"(",
... | /*
Helps above method, runs through all components recursively. | [
"/",
"*",
"Helps",
"above",
"method",
"runs",
"through",
"all",
"components",
"recursively",
"."
] | train | https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/FBFrame.java#L57-L64 |
teatrove/teatrove | teaapps/src/main/java/org/teatrove/teaapps/contexts/FileSystemContext.java | FileSystemContext.moveFile | public boolean moveFile(String srcPath, String dstPath, boolean overwrite)
throws IOException {
"""
Move the file referenced by the srcPath to the dstPath. If the overwrite
flag is <code>true</code>this will cause the dstPath file to be
overwritten if it already exists. If the srcPath does not exist, th... | java | public boolean moveFile(String srcPath, String dstPath, boolean overwrite)
throws IOException {
boolean result = false;
srcPath = (String) Utils.intern(srcPath);
dstPath = (String) Utils.intern(dstPath);
// synchronized on an interned strings makes has all the
// makings for exclusive write... | [
"public",
"boolean",
"moveFile",
"(",
"String",
"srcPath",
",",
"String",
"dstPath",
",",
"boolean",
"overwrite",
")",
"throws",
"IOException",
"{",
"boolean",
"result",
"=",
"false",
";",
"srcPath",
"=",
"(",
"String",
")",
"Utils",
".",
"intern",
"(",
"s... | Move the file referenced by the srcPath to the dstPath. If the overwrite
flag is <code>true</code>this will cause the dstPath file to be
overwritten if it already exists. If the srcPath does not exist, the
dstPath cannot be written to, the overwrite flag was <code>false</code>
and the dstPath already exists, or an erro... | [
"Move",
"the",
"file",
"referenced",
"by",
"the",
"srcPath",
"to",
"the",
"dstPath",
".",
"If",
"the",
"overwrite",
"flag",
"is",
"<code",
">",
"true<",
"/",
"code",
">",
"this",
"will",
"cause",
"the",
"dstPath",
"file",
"to",
"be",
"overwritten",
"if",... | train | https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/FileSystemContext.java#L136-L180 |
roboconf/roboconf-platform | core/roboconf-target-iaas-occi/src/main/java/net/roboconf/target/occi/internal/OcciVMUtils.java | OcciVMUtils.isVMRunning | public static boolean isVMRunning(String hostIpPort, String id)
throws TargetException {
"""
Checks if VM is running.
@param hostIpPort
@param id
@return
@throws TargetException
"""
boolean result = false;
String ip = OcciVMUtils.getVMIP(hostIpPort, id);
try {
InetAddress inet = InetAddress.getBy... | java | public static boolean isVMRunning(String hostIpPort, String id)
throws TargetException {
boolean result = false;
String ip = OcciVMUtils.getVMIP(hostIpPort, id);
try {
InetAddress inet = InetAddress.getByName(ip);
result = inet.isReachable(5000);
} catch (Exception e) {
result = false;
final Logge... | [
"public",
"static",
"boolean",
"isVMRunning",
"(",
"String",
"hostIpPort",
",",
"String",
"id",
")",
"throws",
"TargetException",
"{",
"boolean",
"result",
"=",
"false",
";",
"String",
"ip",
"=",
"OcciVMUtils",
".",
"getVMIP",
"(",
"hostIpPort",
",",
"id",
"... | Checks if VM is running.
@param hostIpPort
@param id
@return
@throws TargetException | [
"Checks",
"if",
"VM",
"is",
"running",
"."
] | train | https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-iaas-occi/src/main/java/net/roboconf/target/occi/internal/OcciVMUtils.java#L630-L645 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java | DateTimePatternGenerator.replaceFieldTypes | public String replaceFieldTypes(String pattern, String skeleton, int options) {
"""
Adjusts the field types (width and subtype) of a pattern to match what is
in a skeleton. That is, if you supply a pattern like "d-M H:m", and a
skeleton of "MMMMddhhmm", then the input pattern is adjusted to be
"dd-MMMM hh:mm". ... | java | public String replaceFieldTypes(String pattern, String skeleton, int options) {
synchronized (this) { // synchronized since a getter must be thread-safe
PatternWithMatcher patternNoMatcher = new PatternWithMatcher(pattern, null);
return adjustFieldTypes(patternNoMatcher, current.set(skel... | [
"public",
"String",
"replaceFieldTypes",
"(",
"String",
"pattern",
",",
"String",
"skeleton",
",",
"int",
"options",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"// synchronized since a getter must be thread-safe",
"PatternWithMatcher",
"patternNoMatcher",
"=",
"ne... | Adjusts the field types (width and subtype) of a pattern to match what is
in a skeleton. That is, if you supply a pattern like "d-M H:m", and a
skeleton of "MMMMddhhmm", then the input pattern is adjusted to be
"dd-MMMM hh:mm". This is used internally to get the best match for the
input skeleton, but can also be used e... | [
"Adjusts",
"the",
"field",
"types",
"(",
"width",
"and",
"subtype",
")",
"of",
"a",
"pattern",
"to",
"match",
"what",
"is",
"in",
"a",
"skeleton",
".",
"That",
"is",
"if",
"you",
"supply",
"a",
"pattern",
"like",
"d",
"-",
"M",
"H",
":",
"m",
"and"... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java#L842-L847 |
JDBDT/jdbdt | src/main/java/org/jdbdt/JDBDT.java | JDBDT.assertEmpty | public static void assertEmpty(String message, DataSource dataSource) throws DBAssertionError {
"""
Assert that the given data source has no rows (error message variant).
<p>A call to this method is equivalent to
<code>assertState(message, empty(dataSource))</code>.
@param message Assertion error message.
... | java | public static void assertEmpty(String message, DataSource dataSource) throws DBAssertionError {
DBAssert.stateAssertion(CallInfo.create(message), empty(dataSource));
} | [
"public",
"static",
"void",
"assertEmpty",
"(",
"String",
"message",
",",
"DataSource",
"dataSource",
")",
"throws",
"DBAssertionError",
"{",
"DBAssert",
".",
"stateAssertion",
"(",
"CallInfo",
".",
"create",
"(",
"message",
")",
",",
"empty",
"(",
"dataSource",... | Assert that the given data source has no rows (error message variant).
<p>A call to this method is equivalent to
<code>assertState(message, empty(dataSource))</code>.
@param message Assertion error message.
@param dataSource Data source.
@throws DBAssertionError if the assertion fails.
@see #assertState(String,DataSe... | [
"Assert",
"that",
"the",
"given",
"data",
"source",
"has",
"no",
"rows",
"(",
"error",
"message",
"variant",
")",
"."
] | train | https://github.com/JDBDT/jdbdt/blob/7e32845ad41dfbc5d6fd0fd561e3613697186df4/src/main/java/org/jdbdt/JDBDT.java#L672-L674 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PatternsImpl.java | PatternsImpl.batchAddPatterns | public List<PatternRuleInfo> batchAddPatterns(UUID appId, String versionId, List<PatternRuleCreateObject> patterns) {
"""
Adds a batch of patterns to the specified application.
@param appId The application ID.
@param versionId The version ID.
@param patterns A JSON array containing patterns.
@throws IllegalA... | java | public List<PatternRuleInfo> batchAddPatterns(UUID appId, String versionId, List<PatternRuleCreateObject> patterns) {
return batchAddPatternsWithServiceResponseAsync(appId, versionId, patterns).toBlocking().single().body();
} | [
"public",
"List",
"<",
"PatternRuleInfo",
">",
"batchAddPatterns",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"List",
"<",
"PatternRuleCreateObject",
">",
"patterns",
")",
"{",
"return",
"batchAddPatternsWithServiceResponseAsync",
"(",
"appId",
",",
"ver... | Adds a batch of patterns to the specified application.
@param appId The application ID.
@param versionId The version ID.
@param patterns A JSON array containing patterns.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws ErrorResponseException thrown if the request is rejected by server... | [
"Adds",
"a",
"batch",
"of",
"patterns",
"to",
"the",
"specified",
"application",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PatternsImpl.java#L476-L478 |
netscaler/sdx_nitro | src/main/java/com/citrix/sdx/nitro/resource/config/xen/xen_upgrade.java | xen_upgrade.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>
"""
xen_upgrade_responses result = (xen_upgrade_responses) service.get_payl... | java | protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
{
xen_upgrade_responses result = (xen_upgrade_responses) service.get_payload_formatter().string_to_resource(xen_upgrade_responses.class, response);
if(result.errorcode != 0)
{
if (result.errorcode =... | [
"protected",
"base_resource",
"[",
"]",
"get_nitro_bulk_response",
"(",
"nitro_service",
"service",
",",
"String",
"response",
")",
"throws",
"Exception",
"{",
"xen_upgrade_responses",
"result",
"=",
"(",
"xen_upgrade_responses",
")",
"service",
".",
"get_payload_format... | <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/xen/xen_upgrade.java#L241-L258 |
fuinorg/units4j | src/main/java/org/fuin/units4j/Units4JUtils.java | Units4JUtils.classInfo | public static ClassInfo classInfo(final ClassLoader cl, final Class<?> clasz) {
"""
Loads a class and creates a Jandex class information for it.
@param cl
Class loader to use.
@param clasz
Class to load.
@return Jandex class information.
"""
return classInfo(cl, clasz.getName());
} | java | public static ClassInfo classInfo(final ClassLoader cl, final Class<?> clasz) {
return classInfo(cl, clasz.getName());
} | [
"public",
"static",
"ClassInfo",
"classInfo",
"(",
"final",
"ClassLoader",
"cl",
",",
"final",
"Class",
"<",
"?",
">",
"clasz",
")",
"{",
"return",
"classInfo",
"(",
"cl",
",",
"clasz",
".",
"getName",
"(",
")",
")",
";",
"}"
] | Loads a class and creates a Jandex class information for it.
@param cl
Class loader to use.
@param clasz
Class to load.
@return Jandex class information. | [
"Loads",
"a",
"class",
"and",
"creates",
"a",
"Jandex",
"class",
"information",
"for",
"it",
"."
] | train | https://github.com/fuinorg/units4j/blob/29383e30b0f9c246b309e734df9cc63dc5d5499e/src/main/java/org/fuin/units4j/Units4JUtils.java#L423-L425 |
liferay/com-liferay-commerce | commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountRulePersistenceImpl.java | CommerceDiscountRulePersistenceImpl.findByCommerceDiscountId | @Override
public List<CommerceDiscountRule> findByCommerceDiscountId(
long commerceDiscountId, int start, int end) {
"""
Returns a range of all the commerce discount rules where commerceDiscountId = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>sta... | java | @Override
public List<CommerceDiscountRule> findByCommerceDiscountId(
long commerceDiscountId, int start, int end) {
return findByCommerceDiscountId(commerceDiscountId, start, end, null);
} | [
"@",
"Override",
"public",
"List",
"<",
"CommerceDiscountRule",
">",
"findByCommerceDiscountId",
"(",
"long",
"commerceDiscountId",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"return",
"findByCommerceDiscountId",
"(",
"commerceDiscountId",
",",
"start",
",",
... | Returns a range of all the commerce discount rules where commerceDiscountId = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first re... | [
"Returns",
"a",
"range",
"of",
"all",
"the",
"commerce",
"discount",
"rules",
"where",
"commerceDiscountId",
"=",
"?",
";",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountRulePersistenceImpl.java#L144-L148 |
hawkular/hawkular-commons | hawkular-bus/hawkular-bus-common/src/main/java/org/hawkular/bus/common/MessageProcessor.java | MessageProcessor.sendWithBinaryData | public MessageId sendWithBinaryData(ProducerConnectionContext context, BasicMessage basicMessage, File file,
Map<String, String> headers) throws JMSException, FileNotFoundException {
"""
Same as {@link #sendWithBinaryData(ProducerConnectionContext, BasicMessage, InputStream, Map)} with the input
strea... | java | public MessageId sendWithBinaryData(ProducerConnectionContext context, BasicMessage basicMessage, File file,
Map<String, String> headers) throws JMSException, FileNotFoundException {
return sendWithBinaryData(context, basicMessage, new FileInputStream(file), headers);
} | [
"public",
"MessageId",
"sendWithBinaryData",
"(",
"ProducerConnectionContext",
"context",
",",
"BasicMessage",
"basicMessage",
",",
"File",
"file",
",",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"throws",
"JMSException",
",",
"FileNotFoundException",
... | Same as {@link #sendWithBinaryData(ProducerConnectionContext, BasicMessage, InputStream, Map)} with the input
stream being a stream to read the file.
@throws FileNotFoundException if the file does not exist | [
"Same",
"as",
"{",
"@link",
"#sendWithBinaryData",
"(",
"ProducerConnectionContext",
"BasicMessage",
"InputStream",
"Map",
")",
"}",
"with",
"the",
"input",
"stream",
"being",
"a",
"stream",
"to",
"read",
"the",
"file",
"."
] | train | https://github.com/hawkular/hawkular-commons/blob/e4a832862b3446d7f4d629bb05790f2df578e035/hawkular-bus/hawkular-bus-common/src/main/java/org/hawkular/bus/common/MessageProcessor.java#L165-L168 |
svenkubiak/mangooio | mangooio-core/src/main/java/io/mangoo/crypto/totp/TOTPValidator.java | TOTPValidator.isValid | public boolean isValid(byte[] key, long timeStep, int digits, HmacShaAlgorithm hmacShaAlgorithm, String value) {
"""
Returns {@code true} if the specified TOTP {@code value} matches the
value of the TOTP generated at validation, otherwise {@code false}. The
current system time (current time in milliseconds since... | java | public boolean isValid(byte[] key, long timeStep, int digits, HmacShaAlgorithm hmacShaAlgorithm, String value) {
return isValid(key, timeStep, digits, hmacShaAlgorithm, value, System.currentTimeMillis());
} | [
"public",
"boolean",
"isValid",
"(",
"byte",
"[",
"]",
"key",
",",
"long",
"timeStep",
",",
"int",
"digits",
",",
"HmacShaAlgorithm",
"hmacShaAlgorithm",
",",
"String",
"value",
")",
"{",
"return",
"isValid",
"(",
"key",
",",
"timeStep",
",",
"digits",
","... | Returns {@code true} if the specified TOTP {@code value} matches the
value of the TOTP generated at validation, otherwise {@code false}. The
current system time (current time in milliseconds since the UNIX epoch)
is used as the validation reference time.
@param key
the encoded shared secret key
@param timeStep
the tim... | [
"Returns",
"{",
"@code",
"true",
"}",
"if",
"the",
"specified",
"TOTP",
"{",
"@code",
"value",
"}",
"matches",
"the",
"value",
"of",
"the",
"TOTP",
"generated",
"at",
"validation",
"otherwise",
"{",
"@code",
"false",
"}",
".",
"The",
"current",
"system",
... | train | https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/crypto/totp/TOTPValidator.java#L119-L121 |
FDMediagroep/hamcrest-jsoup | src/main/java/nl/fd/hamcrest/jsoup/SelectingFirst.java | SelectingFirst.selectingFirst | @Factory
@SuppressWarnings("unchecked")
public static Matcher<Element> selectingFirst(final String cssExpression, final Matcher<Element> elementMatcher) {
"""
Creates a {@link org.hamcrest.Matcher} for a JSoup {@link org.jsoup.nodes.Element} that has a list of child nodes
matching the specified cssExpress... | java | @Factory
@SuppressWarnings("unchecked")
public static Matcher<Element> selectingFirst(final String cssExpression, final Matcher<Element> elementMatcher) {
return new SelectingFirst(cssExpression, elementMatcher);
} | [
"@",
"Factory",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"Matcher",
"<",
"Element",
">",
"selectingFirst",
"(",
"final",
"String",
"cssExpression",
",",
"final",
"Matcher",
"<",
"Element",
">",
"elementMatcher",
")",
"{",
"return",... | Creates a {@link org.hamcrest.Matcher} for a JSoup {@link org.jsoup.nodes.Element} that has a list of child nodes
matching the specified cssExpression that are matched by the specified elementsMatcher.
@param cssExpression The Jsoup CSS expression used to selected a list of child nodes
@param elementMatcher the matche... | [
"Creates",
"a",
"{",
"@link",
"org",
".",
"hamcrest",
".",
"Matcher",
"}",
"for",
"a",
"JSoup",
"{",
"@link",
"org",
".",
"jsoup",
".",
"nodes",
".",
"Element",
"}",
"that",
"has",
"a",
"list",
"of",
"child",
"nodes",
"matching",
"the",
"specified",
... | train | https://github.com/FDMediagroep/hamcrest-jsoup/blob/b7152dac6f834e40117fb7cfdd3149a268d95f7b/src/main/java/nl/fd/hamcrest/jsoup/SelectingFirst.java#L45-L49 |
synchronoss/cpo-api | cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/jta/JdbcCpoXaAdapter.java | JdbcCpoXaAdapter.persistObjects | @Override
public <T> long persistObjects(String name, Collection<T> coll) throws CpoException {
"""
Persists a collection of Objects into the datasource. The CpoAdapter will check to see if this object exists in the
datasource. If it exists, the object is updated in the datasource If the object does not exist, ... | java | @Override
public <T> long persistObjects(String name, Collection<T> coll) throws CpoException {
return getCurrentResource().persistObjects(name, coll);
} | [
"@",
"Override",
"public",
"<",
"T",
">",
"long",
"persistObjects",
"(",
"String",
"name",
",",
"Collection",
"<",
"T",
">",
"coll",
")",
"throws",
"CpoException",
"{",
"return",
"getCurrentResource",
"(",
")",
".",
"persistObjects",
"(",
"name",
",",
"col... | Persists a collection of Objects into the datasource. The CpoAdapter will check to see if this object exists in the
datasource. If it exists, the object is updated in the datasource If the object does not exist, then it is created
in the datasource. This method stores the object in the datasource. The objects in the co... | [
"Persists",
"a",
"collection",
"of",
"Objects",
"into",
"the",
"datasource",
".",
"The",
"CpoAdapter",
"will",
"check",
"to",
"see",
"if",
"this",
"object",
"exists",
"in",
"the",
"datasource",
".",
"If",
"it",
"exists",
"the",
"object",
"is",
"updated",
"... | train | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/jta/JdbcCpoXaAdapter.java#L1257-L1260 |
spring-projects/spring-social-facebook | spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java | FqlResult.getFloat | public Float getFloat(String fieldName) {
"""
Returns the value of the identified field as a Float.
@param fieldName the name of the field
@return the value of the field as a Float
@throws FqlException if the field cannot be expressed as an Float
"""
try {
return hasValue(fieldName) ? Float.valueOf(Str... | java | public Float getFloat(String fieldName) {
try {
return hasValue(fieldName) ? Float.valueOf(String.valueOf(resultMap.get(fieldName))) : null;
} catch (NumberFormatException e) {
throw new FqlException("Field '" + fieldName +"' is not a number.", e);
}
} | [
"public",
"Float",
"getFloat",
"(",
"String",
"fieldName",
")",
"{",
"try",
"{",
"return",
"hasValue",
"(",
"fieldName",
")",
"?",
"Float",
".",
"valueOf",
"(",
"String",
".",
"valueOf",
"(",
"resultMap",
".",
"get",
"(",
"fieldName",
")",
")",
")",
":... | Returns the value of the identified field as a Float.
@param fieldName the name of the field
@return the value of the field as a Float
@throws FqlException if the field cannot be expressed as an Float | [
"Returns",
"the",
"value",
"of",
"the",
"identified",
"field",
"as",
"a",
"Float",
"."
] | train | https://github.com/spring-projects/spring-social-facebook/blob/ae2234d94367eaa3adbba251ec7790d5ba7ffa41/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java#L83-L89 |
h2oai/h2o-3 | h2o-core/src/main/java/jsr166y/Phaser.java | Phaser.awaitAdvanceInterruptibly | public int awaitAdvanceInterruptibly(int phase,
long timeout, TimeUnit unit)
throws InterruptedException, TimeoutException {
"""
Awaits the phase of this phaser to advance from the given phase
value or the given timeout to elapse, throwing {@code
InterruptedExcept... | java | public int awaitAdvanceInterruptibly(int phase,
long timeout, TimeUnit unit)
throws InterruptedException, TimeoutException {
long nanos = unit.toNanos(timeout);
final Phaser root = this.root;
long s = (root == this) ? state : reconcileState();
... | [
"public",
"int",
"awaitAdvanceInterruptibly",
"(",
"int",
"phase",
",",
"long",
"timeout",
",",
"TimeUnit",
"unit",
")",
"throws",
"InterruptedException",
",",
"TimeoutException",
"{",
"long",
"nanos",
"=",
"unit",
".",
"toNanos",
"(",
"timeout",
")",
";",
"fi... | Awaits the phase of this phaser to advance from the given phase
value or the given timeout to elapse, throwing {@code
InterruptedException} if interrupted while waiting, or
returning immediately if the current phase is not equal to the
given phase value or this phaser is terminated.
@param phase an arrival phase numbe... | [
"Awaits",
"the",
"phase",
"of",
"this",
"phaser",
"to",
"advance",
"from",
"the",
"given",
"phase",
"value",
"or",
"the",
"given",
"timeout",
"to",
"elapse",
"throwing",
"{",
"@code",
"InterruptedException",
"}",
"if",
"interrupted",
"while",
"waiting",
"or",
... | train | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/jsr166y/Phaser.java#L756-L774 |
google/error-prone-javac | src/java.compiler/share/classes/javax/lang/model/util/ElementFilter.java | ElementFilter.constructorsIn | public static Set<ExecutableElement>
constructorsIn(Set<? extends Element> elements) {
"""
Returns a set of constructors in {@code elements}.
@return a set of constructors in {@code elements}
@param elements the elements to filter
"""
return setFilter(elements, CONSTRUCTOR_KIND, Executabl... | java | public static Set<ExecutableElement>
constructorsIn(Set<? extends Element> elements) {
return setFilter(elements, CONSTRUCTOR_KIND, ExecutableElement.class);
} | [
"public",
"static",
"Set",
"<",
"ExecutableElement",
">",
"constructorsIn",
"(",
"Set",
"<",
"?",
"extends",
"Element",
">",
"elements",
")",
"{",
"return",
"setFilter",
"(",
"elements",
",",
"CONSTRUCTOR_KIND",
",",
"ExecutableElement",
".",
"class",
")",
";"... | Returns a set of constructors in {@code elements}.
@return a set of constructors in {@code elements}
@param elements the elements to filter | [
"Returns",
"a",
"set",
"of",
"constructors",
"in",
"{"
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/java.compiler/share/classes/javax/lang/model/util/ElementFilter.java#L122-L125 |
authlete/authlete-java-common | src/main/java/com/authlete/common/dto/BackchannelAuthenticationCompleteRequest.java | BackchannelAuthenticationCompleteRequest.setClaims | public BackchannelAuthenticationCompleteRequest setClaims(Map<String, Object> claims) {
"""
Set additional claims which will be embedded in the ID token.
<p>
The argument is converted into a JSON string and passed to
{@link #setClaims(String)} method.
</p>
@param claims
Additional claims. Keys are claim ... | java | public BackchannelAuthenticationCompleteRequest setClaims(Map<String, Object> claims)
{
if (claims == null || claims.size() == 0)
{
this.claims = null;
}
else
{
setClaims(Utils.toJson(claims));
}
return this;
} | [
"public",
"BackchannelAuthenticationCompleteRequest",
"setClaims",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"claims",
")",
"{",
"if",
"(",
"claims",
"==",
"null",
"||",
"claims",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"this",
".",
"claims",
"=... | Set additional claims which will be embedded in the ID token.
<p>
The argument is converted into a JSON string and passed to
{@link #setClaims(String)} method.
</p>
@param claims
Additional claims. Keys are claim names.
@return
{@code this} object. | [
"Set",
"additional",
"claims",
"which",
"will",
"be",
"embedded",
"in",
"the",
"ID",
"token",
"."
] | train | https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/dto/BackchannelAuthenticationCompleteRequest.java#L573-L585 |
ltearno/hexa.tools | hexa.core/src/main/java/fr/lteconsulting/hexa/client/other/HtmlTableTemplate.java | HtmlTableTemplate.getCell | public static TableCellElement getCell( Element root, int column, int row ) {
"""
Get the TD element
@param root
@param column
@param row
@return
"""
TableSectionElement tbody = getTBodyElement( root );
TableRowElement tr = tbody.getChild( row ).cast();
TableCellElement td = tr.getChild( column ... | java | public static TableCellElement getCell( Element root, int column, int row )
{
TableSectionElement tbody = getTBodyElement( root );
TableRowElement tr = tbody.getChild( row ).cast();
TableCellElement td = tr.getChild( column ).cast();
return td;
} | [
"public",
"static",
"TableCellElement",
"getCell",
"(",
"Element",
"root",
",",
"int",
"column",
",",
"int",
"row",
")",
"{",
"TableSectionElement",
"tbody",
"=",
"getTBodyElement",
"(",
"root",
")",
";",
"TableRowElement",
"tr",
"=",
"tbody",
".",
"getChild",... | Get the TD element
@param root
@param column
@param row
@return | [
"Get",
"the",
"TD",
"element"
] | train | https://github.com/ltearno/hexa.tools/blob/604c804901b1bb13fe10b3823cc4a639f8993363/hexa.core/src/main/java/fr/lteconsulting/hexa/client/other/HtmlTableTemplate.java#L74-L82 |
matthewhorridge/owlapi-gwt | owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDatatypeImpl_CustomFieldSerializer.java | OWLDatatypeImpl_CustomFieldSerializer.serializeInstance | @Override
public void serializeInstance(SerializationStreamWriter streamWriter, OWLDatatypeImpl instance) throws SerializationException {
"""
Serializes the content of the object into the
{@link com.google.gwt.user.client.rpc.SerializationStreamWriter}.
@param streamWriter the {@link com.google.gwt.user.clie... | java | @Override
public void serializeInstance(SerializationStreamWriter streamWriter, OWLDatatypeImpl instance) throws SerializationException {
serialize(streamWriter, instance);
} | [
"@",
"Override",
"public",
"void",
"serializeInstance",
"(",
"SerializationStreamWriter",
"streamWriter",
",",
"OWLDatatypeImpl",
"instance",
")",
"throws",
"SerializationException",
"{",
"serialize",
"(",
"streamWriter",
",",
"instance",
")",
";",
"}"
] | Serializes the content of the object into the
{@link com.google.gwt.user.client.rpc.SerializationStreamWriter}.
@param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the
object's content to
@param instance the object instance to serialize
@throws com.google.gwt.user.client.rp... | [
"Serializes",
"the",
"content",
"of",
"the",
"object",
"into",
"the",
"{"
] | train | https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDatatypeImpl_CustomFieldSerializer.java#L63-L66 |
apereo/cas | support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/UrlResourceMetadataResolver.java | UrlResourceMetadataResolver.getMetadataBackupFile | protected File getMetadataBackupFile(final AbstractResource metadataResource,
final SamlRegisteredService service) throws IOException {
"""
Gets metadata backup file.
@param metadataResource the metadata resource
@param service the service
@return the metadata... | java | protected File getMetadataBackupFile(final AbstractResource metadataResource,
final SamlRegisteredService service) throws IOException {
LOGGER.debug("Metadata backup directory is at [{}]", this.metadataBackupDirectory.getCanonicalPath());
val metadataFileName = ... | [
"protected",
"File",
"getMetadataBackupFile",
"(",
"final",
"AbstractResource",
"metadataResource",
",",
"final",
"SamlRegisteredService",
"service",
")",
"throws",
"IOException",
"{",
"LOGGER",
".",
"debug",
"(",
"\"Metadata backup directory is at [{}]\"",
",",
"this",
"... | Gets metadata backup file.
@param metadataResource the metadata resource
@param service the service
@return the metadata backup file
@throws IOException the io exception | [
"Gets",
"metadata",
"backup",
"file",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/UrlResourceMetadataResolver.java#L186-L198 |
pierre/serialization | thrift/src/main/java/com/ning/metrics/serialization/event/ThriftEnvelopeEvent.java | ThriftEnvelopeEvent.deserializeFromStream | private void deserializeFromStream(final InputStream in) throws IOException {
"""
Given an InputStream, extract the eventDateTime, granularity and thriftEnvelope to build
the ThriftEnvelopeEvent.
This method expects the stream to be open and won't close it for you.
@param in InputStream to read
@throws IOExc... | java | private void deserializeFromStream(final InputStream in) throws IOException
{
final byte[] dateTimeBytes = new byte[8];
in.read(dateTimeBytes, 0, 8);
eventDateTime = new DateTime(ByteBuffer.wrap(dateTimeBytes).getLong(0));
final byte[] sizeGranularityInBytes = new byte[4];
i... | [
"private",
"void",
"deserializeFromStream",
"(",
"final",
"InputStream",
"in",
")",
"throws",
"IOException",
"{",
"final",
"byte",
"[",
"]",
"dateTimeBytes",
"=",
"new",
"byte",
"[",
"8",
"]",
";",
"in",
".",
"read",
"(",
"dateTimeBytes",
",",
"0",
",",
... | Given an InputStream, extract the eventDateTime, granularity and thriftEnvelope to build
the ThriftEnvelopeEvent.
This method expects the stream to be open and won't close it for you.
@param in InputStream to read
@throws IOException generic I/O Exception | [
"Given",
"an",
"InputStream",
"extract",
"the",
"eventDateTime",
"granularity",
"and",
"thriftEnvelope",
"to",
"build",
"the",
"ThriftEnvelopeEvent",
".",
"This",
"method",
"expects",
"the",
"stream",
"to",
"be",
"open",
"and",
"won",
"t",
"close",
"it",
"for",
... | train | https://github.com/pierre/serialization/blob/b15b7c749ba78bfe94dce8fc22f31b30b2e6830b/thrift/src/main/java/com/ning/metrics/serialization/event/ThriftEnvelopeEvent.java#L150-L163 |
bbossgroups/bboss-elasticsearch | bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java | RestClientUtil.sqlObject | public <T> T sqlObject(Class<T> beanType, String entity ) throws ElasticSearchException {
"""
发送es restful sql请求/_xpack/sql,获取返回值,返回值类型由beanType决定
@param beanType
@param entity
@param <T>
@return
@throws ElasticSearchException
"""
SQLRestResponse result = this.client.executeRequest("/_xpack/sql",ent... | java | public <T> T sqlObject(Class<T> beanType, String entity ) throws ElasticSearchException {
SQLRestResponse result = this.client.executeRequest("/_xpack/sql",entity, new SQLRestResponseHandler());
return ResultUtil.buildSQLObject(result,beanType);
} | [
"public",
"<",
"T",
">",
"T",
"sqlObject",
"(",
"Class",
"<",
"T",
">",
"beanType",
",",
"String",
"entity",
")",
"throws",
"ElasticSearchException",
"{",
"SQLRestResponse",
"result",
"=",
"this",
".",
"client",
".",
"executeRequest",
"(",
"\"/_xpack/sql\"",
... | 发送es restful sql请求/_xpack/sql,获取返回值,返回值类型由beanType决定
@param beanType
@param entity
@param <T>
@return
@throws ElasticSearchException | [
"发送es",
"restful",
"sql请求",
"/",
"_xpack",
"/",
"sql,获取返回值,返回值类型由beanType决定",
"@param",
"beanType",
"@param",
"entity"
] | train | https://github.com/bbossgroups/bboss-elasticsearch/blob/31717c8aa2c4c880987be53aeeb8a0cf5183c3a7/bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java#L1398-L1401 |
qiujuer/Genius-Android | caprice/graphics/src/main/java/net/qiujuer/genius/graphics/Blur.java | Blur.onStackBlurClip | public static Bitmap onStackBlurClip(Bitmap original, int radius, int parts) {
"""
StackBlur By Jni Bitmap
in this we will cut the source bitmap to some parts.
We'll deal(blur) with it one by one. This will reduce the memory consumption.
@param original Original Image
@param radius Blur radius
@param part... | java | public static Bitmap onStackBlurClip(Bitmap original, int radius, int parts) {
Bitmap bitmap = checkSource(original, radius);
if (parts < 2 || parts > 12) {
throw new RuntimeException("Blur bitmap parts must >= 2 and <=12.");
}
if (original.getHeight() / parts < radius + rad... | [
"public",
"static",
"Bitmap",
"onStackBlurClip",
"(",
"Bitmap",
"original",
",",
"int",
"radius",
",",
"int",
"parts",
")",
"{",
"Bitmap",
"bitmap",
"=",
"checkSource",
"(",
"original",
",",
"radius",
")",
";",
"if",
"(",
"parts",
"<",
"2",
"||",
"parts"... | StackBlur By Jni Bitmap
in this we will cut the source bitmap to some parts.
We'll deal(blur) with it one by one. This will reduce the memory consumption.
@param original Original Image
@param radius Blur radius
@param parts Blur cut parts count
@return Image Bitmap | [
"StackBlur",
"By",
"Jni",
"Bitmap",
"in",
"this",
"we",
"will",
"cut",
"the",
"source",
"bitmap",
"to",
"some",
"parts",
".",
"We",
"ll",
"deal",
"(",
"blur",
")",
"with",
"it",
"one",
"by",
"one",
".",
"This",
"will",
"reduce",
"the",
"memory",
"con... | train | https://github.com/qiujuer/Genius-Android/blob/babefaf1321f5883a21cada582b6fa5104adc648/caprice/graphics/src/main/java/net/qiujuer/genius/graphics/Blur.java#L116-L130 |
albfernandez/itext2 | src/main/java/com/lowagie/text/pdf/PdfContentByte.java | PdfContentByte.lineTo | public void lineTo(float x, float y) {
"""
Appends a straight line segment from the current point <I>(x, y)</I>. The new current
point is <I>(x, y)</I>.
@param x new x-coordinate
@param y new y-coordinate
"""
content.append(x).append(' ').append(y).append(" ... | java | public void lineTo(float x, float y) {
content.append(x).append(' ').append(y).append(" l").append_i(separator);
} | [
"public",
"void",
"lineTo",
"(",
"float",
"x",
",",
"float",
"y",
")",
"{",
"content",
".",
"append",
"(",
"x",
")",
".",
"append",
"(",
"'",
"'",
")",
".",
"append",
"(",
"y",
")",
".",
"append",
"(",
"\" l\"",
")",
".",
"append_i",
"(",
"sepa... | Appends a straight line segment from the current point <I>(x, y)</I>. The new current
point is <I>(x, y)</I>.
@param x new x-coordinate
@param y new y-coordinate | [
"Appends",
"a",
"straight",
"line",
"segment",
"from",
"the",
"current",
"point",
"<I",
">",
"(",
"x",
"y",
")",
"<",
"/",
"I",
">",
".",
"The",
"new",
"current",
"point",
"is",
"<I",
">",
"(",
"x",
"y",
")",
"<",
"/",
"I",
">",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L714-L716 |
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.beginListEffectiveNetworkSecurityGroups | public EffectiveNetworkSecurityGroupListResultInner beginListEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName) {
"""
Gets all network security groups applied to a network interface.
@param resourceGroupName The name of the resource group.
@param networkInterfaceName The name... | java | public EffectiveNetworkSecurityGroupListResultInner beginListEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName) {
return beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body();
} | [
"public",
"EffectiveNetworkSecurityGroupListResultInner",
"beginListEffectiveNetworkSecurityGroups",
"(",
"String",
"resourceGroupName",
",",
"String",
"networkInterfaceName",
")",
"{",
"return",
"beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync",
"(",
"resourceGroupName",... | Gets all network security groups applied to a network interface.
@param resourceGroupName The name of the resource group.
@param networkInterfaceName The name of the network interface.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected by ... | [
"Gets",
"all",
"network",
"security",
"groups",
"applied",
"to",
"a",
"network",
"interface",
"."
] | 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#L1411-L1413 |
mikepenz/MaterialDrawer | library/src/main/java/com/mikepenz/materialdrawer/Drawer.java | Drawer.setToolbar | public void setToolbar(@NonNull Activity activity, @NonNull Toolbar toolbar, boolean recreateActionBarDrawerToggle) {
"""
Sets the toolbar which should be used in combination with the drawer
This will handle the ActionBarDrawerToggle for you.
Do not set this if you are in a sub activity and want to handle the ba... | java | public void setToolbar(@NonNull Activity activity, @NonNull Toolbar toolbar, boolean recreateActionBarDrawerToggle) {
this.mDrawerBuilder.mToolbar = toolbar;
this.mDrawerBuilder.handleDrawerNavigation(activity, recreateActionBarDrawerToggle);
} | [
"public",
"void",
"setToolbar",
"(",
"@",
"NonNull",
"Activity",
"activity",
",",
"@",
"NonNull",
"Toolbar",
"toolbar",
",",
"boolean",
"recreateActionBarDrawerToggle",
")",
"{",
"this",
".",
"mDrawerBuilder",
".",
"mToolbar",
"=",
"toolbar",
";",
"this",
".",
... | Sets the toolbar which should be used in combination with the drawer
This will handle the ActionBarDrawerToggle for you.
Do not set this if you are in a sub activity and want to handle the back arrow on your own
@param activity
@param toolbar the toolbar which is used in combination with the draw... | [
"Sets",
"the",
"toolbar",
"which",
"should",
"be",
"used",
"in",
"combination",
"with",
"the",
"drawer",
"This",
"will",
"handle",
"the",
"ActionBarDrawerToggle",
"for",
"you",
".",
"Do",
"not",
"set",
"this",
"if",
"you",
"are",
"in",
"a",
"sub",
"activit... | train | https://github.com/mikepenz/MaterialDrawer/blob/f4fb31635767edead0a01cee7b7588942b89d8d9/library/src/main/java/com/mikepenz/materialdrawer/Drawer.java#L113-L116 |
UrielCh/ovh-java-sdk | ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java | ApiOvhOrder.cart_cartId_dedicatedReseller_GET | public ArrayList<OvhGenericProductDefinition> cart_cartId_dedicatedReseller_GET(String cartId, String family, String planCode) throws IOException {
"""
Get informations about a dedicated server for US Reseller
REST: GET /order/cart/{cartId}/dedicatedReseller
@param cartId [required] Cart identifier
@param pla... | java | public ArrayList<OvhGenericProductDefinition> cart_cartId_dedicatedReseller_GET(String cartId, String family, String planCode) throws IOException {
String qPath = "/order/cart/{cartId}/dedicatedReseller";
StringBuilder sb = path(qPath, cartId);
query(sb, "family", family);
query(sb, "planCode", planCode);
Str... | [
"public",
"ArrayList",
"<",
"OvhGenericProductDefinition",
">",
"cart_cartId_dedicatedReseller_GET",
"(",
"String",
"cartId",
",",
"String",
"family",
",",
"String",
"planCode",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/order/cart/{cartId}/dedicatedRe... | Get informations about a dedicated server for US Reseller
REST: GET /order/cart/{cartId}/dedicatedReseller
@param cartId [required] Cart identifier
@param planCode [required] Filter the value of planCode property (=)
@param family [required] Filter the value of family property (=) | [
"Get",
"informations",
"about",
"a",
"dedicated",
"server",
"for",
"US",
"Reseller"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L7639-L7646 |
stratosphere/stratosphere | stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java | CheckedMemorySegment.put | public final CheckedMemorySegment put(int index, byte b) {
"""
Writes the given byte into this buffer at the given position.
@param position The position at which the byte will be written.
@param b The byte value to be written.
@return This view itself.
@throws IndexOutOfBoundsException Thrown, if the inde... | java | public final CheckedMemorySegment put(int index, byte b) {
if (index >= 0 && index < this.size) {
this.memory[this.offset + index] = b;
return this;
} else {
throw new IndexOutOfBoundsException();
}
} | [
"public",
"final",
"CheckedMemorySegment",
"put",
"(",
"int",
"index",
",",
"byte",
"b",
")",
"{",
"if",
"(",
"index",
">=",
"0",
"&&",
"index",
"<",
"this",
".",
"size",
")",
"{",
"this",
".",
"memory",
"[",
"this",
".",
"offset",
"+",
"index",
"]... | Writes the given byte into this buffer at the given position.
@param position The position at which the byte will be written.
@param b The byte value to be written.
@return This view itself.
@throws IndexOutOfBoundsException Thrown, if the index is negative, or larger or equal to the size of
the memory segment. | [
"Writes",
"the",
"given",
"byte",
"into",
"this",
"buffer",
"at",
"the",
"given",
"position",
"."
] | train | https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java#L186-L193 |
Ellzord/JALSE | src/main/java/jalse/tags/Tags.java | Tags.setOriginContainer | public static void setOriginContainer(final Set<Tag> tags, final EntityContainer container) {
"""
Sets the origin container to the provided container (if {@link Identifiable}).
@param tags
Tag set.
@param container
Possible origin container.
"""
final UUID id = Identifiable.getID(container);
if (id != ... | java | public static void setOriginContainer(final Set<Tag> tags, final EntityContainer container) {
final UUID id = Identifiable.getID(container);
if (id != null) {
tags.add(new OriginContainer(id));
}
} | [
"public",
"static",
"void",
"setOriginContainer",
"(",
"final",
"Set",
"<",
"Tag",
">",
"tags",
",",
"final",
"EntityContainer",
"container",
")",
"{",
"final",
"UUID",
"id",
"=",
"Identifiable",
".",
"getID",
"(",
"container",
")",
";",
"if",
"(",
"id",
... | Sets the origin container to the provided container (if {@link Identifiable}).
@param tags
Tag set.
@param container
Possible origin container. | [
"Sets",
"the",
"origin",
"container",
"to",
"the",
"provided",
"container",
"(",
"if",
"{",
"@link",
"Identifiable",
"}",
")",
"."
] | train | https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/tags/Tags.java#L161-L166 |
moparisthebest/beehive | beehive-controls/src/main/java/org/apache/beehive/controls/api/bean/Controls.java | Controls.instantiate | public static ControlBean instantiate( ClassLoader cl,
String beanName,
PropertyMap props,
ControlBeanContext cbc,
String id )
throws ClassN... | java | public static ControlBean instantiate( ClassLoader cl,
String beanName,
PropertyMap props,
ControlBeanContext cbc,
String id )
throws ClassN... | [
"public",
"static",
"ControlBean",
"instantiate",
"(",
"ClassLoader",
"cl",
",",
"String",
"beanName",
",",
"PropertyMap",
"props",
",",
"ControlBeanContext",
"cbc",
",",
"String",
"id",
")",
"throws",
"ClassNotFoundException",
"{",
"Class",
"beanClass",
"=",
"(",... | Factory method for instantiating controls.
@param cl the classloader used to load the ControlBean. If null, the system classloader will be used.
@param beanName the fully qualified name of the ControlBean class.
@param props an optional PropertyMap containing initial property values for the control. May be null.
@pa... | [
"Factory",
"method",
"for",
"instantiating",
"controls",
"."
] | train | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-controls/src/main/java/org/apache/beehive/controls/api/bean/Controls.java#L69-L78 |
VoltDB/voltdb | src/frontend/org/voltdb/utils/CatalogUtil.java | CatalogUtil.setImportInfo | private static void setImportInfo(Catalog catalog, ImportType importType) {
"""
Set deployment time settings for import
@param catalog The catalog to be updated.
@param importType A reference to the <exports> element of the deployment.xml file.
"""
if (importType == null) {
return;
... | java | private static void setImportInfo(Catalog catalog, ImportType importType) {
if (importType == null) {
return;
}
List<String> streamList = new ArrayList<>();
List<ImportConfigurationType> kafkaConfigs = new ArrayList<>();
for (ImportConfigurationType importConfigurati... | [
"private",
"static",
"void",
"setImportInfo",
"(",
"Catalog",
"catalog",
",",
"ImportType",
"importType",
")",
"{",
"if",
"(",
"importType",
"==",
"null",
")",
"{",
"return",
";",
"}",
"List",
"<",
"String",
">",
"streamList",
"=",
"new",
"ArrayList",
"<>"... | Set deployment time settings for import
@param catalog The catalog to be updated.
@param importType A reference to the <exports> element of the deployment.xml file. | [
"Set",
"deployment",
"time",
"settings",
"for",
"import"
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L1848-L1873 |
looly/hutool | hutool-db/src/main/java/cn/hutool/db/sql/SqlExecutor.java | SqlExecutor.query | public static <T> T query(Connection conn, String sql, RsHandler<T> rsh, Map<String, Object> paramMap) throws SQLException {
"""
执行查询语句<br>
此方法不会关闭Connection
@param <T> 处理结果类型
@param conn 数据库连接对象
@param sql 查询语句,使用参数名占位符,例如:name
@param rsh 结果集处理对象
@param paramMap 参数对
@return 结果对象
@throws SQLException SQL... | java | public static <T> T query(Connection conn, String sql, RsHandler<T> rsh, Map<String, Object> paramMap) throws SQLException {
final NamedSql namedSql = new NamedSql(sql, paramMap);
return query(conn, namedSql.getSql(), rsh, namedSql.getParams());
} | [
"public",
"static",
"<",
"T",
">",
"T",
"query",
"(",
"Connection",
"conn",
",",
"String",
"sql",
",",
"RsHandler",
"<",
"T",
">",
"rsh",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"paramMap",
")",
"throws",
"SQLException",
"{",
"final",
"NamedSql"... | 执行查询语句<br>
此方法不会关闭Connection
@param <T> 处理结果类型
@param conn 数据库连接对象
@param sql 查询语句,使用参数名占位符,例如:name
@param rsh 结果集处理对象
@param paramMap 参数对
@return 结果对象
@throws SQLException SQL执行异常
@since 4.0.10 | [
"执行查询语句<br",
">",
"此方法不会关闭Connection"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/sql/SqlExecutor.java#L241-L244 |
Azure/azure-sdk-for-java | servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java | ClientFactory.acceptSessionFromEntityPathAsync | public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, String sessionId, ClientSettings clientSettings, ReceiveMode receiveMode) {
"""
Asynchronously accepts a session from service bus using the client settings. Session Id can be null, if null... | java | public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, String sessionId, ClientSettings clientSettings, ReceiveMode receiveMode) {
Utils.assertNonNull("namespaceEndpointURI", namespaceEndpointURI);
Utils.assertNonNull("entityPath", ... | [
"public",
"static",
"CompletableFuture",
"<",
"IMessageSession",
">",
"acceptSessionFromEntityPathAsync",
"(",
"URI",
"namespaceEndpointURI",
",",
"String",
"entityPath",
",",
"String",
"sessionId",
",",
"ClientSettings",
"clientSettings",
",",
"ReceiveMode",
"receiveMode",... | Asynchronously accepts a session from service bus using the client settings. Session Id can be null, if null, service will return the first available session.
@param namespaceEndpointURI endpoint uri of entity namespace
@param entityPath path of entity
@param sessionId session id, if null, service will return the first... | [
"Asynchronously",
"accepts",
"a",
"session",
"from",
"service",
"bus",
"using",
"the",
"client",
"settings",
".",
"Session",
"Id",
"can",
"be",
"null",
"if",
"null",
"service",
"will",
"return",
"the",
"first",
"available",
"session",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java#L710-L715 |
sirthias/parboiled | parboiled-core/src/main/java/org/parboiled/support/Filters.java | Filters.onlyRules | public static Predicate<Tuple2<Context<?>, Boolean>> onlyRules(final Rule... rules) {
"""
A predicate usable as a filter (element) of a {@link org.parboiled.parserunners.TracingParseRunner}.
Enables printing of rule tracing log messages for all given rules (without their sub rules).
@param rules the rules to g... | java | public static Predicate<Tuple2<Context<?>, Boolean>> onlyRules(final Rule... rules) {
return new Predicate<Tuple2<Context<?>, Boolean>>() {
public boolean apply(Tuple2<Context<?>, Boolean> tuple) {
for (Rule rule : rules) if (tuple.a.getMatcher() == rule) return true;
... | [
"public",
"static",
"Predicate",
"<",
"Tuple2",
"<",
"Context",
"<",
"?",
">",
",",
"Boolean",
">",
">",
"onlyRules",
"(",
"final",
"Rule",
"...",
"rules",
")",
"{",
"return",
"new",
"Predicate",
"<",
"Tuple2",
"<",
"Context",
"<",
"?",
">",
",",
"Bo... | A predicate usable as a filter (element) of a {@link org.parboiled.parserunners.TracingParseRunner}.
Enables printing of rule tracing log messages for all given rules (without their sub rules).
@param rules the rules to generate tracing message for
@return a predicate | [
"A",
"predicate",
"usable",
"as",
"a",
"filter",
"(",
"element",
")",
"of",
"a",
"{",
"@link",
"org",
".",
"parboiled",
".",
"parserunners",
".",
"TracingParseRunner",
"}",
".",
"Enables",
"printing",
"of",
"rule",
"tracing",
"log",
"messages",
"for",
"all... | train | https://github.com/sirthias/parboiled/blob/84f3ed43e3e171b4c6ab5e6ca6297d264a9d686a/parboiled-core/src/main/java/org/parboiled/support/Filters.java#L156-L163 |
JM-Lab/utils-java8 | src/main/java/kr/jm/utils/helper/JMPath.java | JMPath.getSubPathList | public static List<Path> getSubPathList(Path startDirectoryPath,
Predicate<Path> filter) {
"""
Gets sub path list.
@param startDirectoryPath the start directory path
@param filter the filter
@return the sub path list
"""
return getSubPathList(startDirectoryPath, Integer.MAX_VALUE, filter)... | java | public static List<Path> getSubPathList(Path startDirectoryPath,
Predicate<Path> filter) {
return getSubPathList(startDirectoryPath, Integer.MAX_VALUE, filter);
} | [
"public",
"static",
"List",
"<",
"Path",
">",
"getSubPathList",
"(",
"Path",
"startDirectoryPath",
",",
"Predicate",
"<",
"Path",
">",
"filter",
")",
"{",
"return",
"getSubPathList",
"(",
"startDirectoryPath",
",",
"Integer",
".",
"MAX_VALUE",
",",
"filter",
"... | Gets sub path list.
@param startDirectoryPath the start directory path
@param filter the filter
@return the sub path list | [
"Gets",
"sub",
"path",
"list",
"."
] | train | https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/helper/JMPath.java#L496-L499 |
opencb/java-common-libs | commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrManager.java | SolrManager.removeCore | public void removeCore(String coreName) throws SolrException {
"""
Remove a core.
@param coreName Core name
@throws SolrException SolrException
"""
try {
CoreAdminRequest.unloadCore(coreName, true, true, solrClient);
} catch (SolrServerException | IOException e) {
th... | java | public void removeCore(String coreName) throws SolrException {
try {
CoreAdminRequest.unloadCore(coreName, true, true, solrClient);
} catch (SolrServerException | IOException e) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e.getMessage(), e);
}
} | [
"public",
"void",
"removeCore",
"(",
"String",
"coreName",
")",
"throws",
"SolrException",
"{",
"try",
"{",
"CoreAdminRequest",
".",
"unloadCore",
"(",
"coreName",
",",
"true",
",",
"true",
",",
"solrClient",
")",
";",
"}",
"catch",
"(",
"SolrServerException",... | Remove a core.
@param coreName Core name
@throws SolrException SolrException | [
"Remove",
"a",
"core",
"."
] | train | https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrManager.java#L253-L259 |
alkacon/opencms-core | src/org/opencms/ade/contenteditor/CmsContentService.java | CmsContentService.writeContent | private CmsXmlContent writeContent(CmsObject cms, CmsFile file, CmsXmlContent content, String encoding)
throws CmsException {
"""
Writes the xml content to the vfs and re-initializes the member variables.<p>
@param cms the cms context
@param file the file to write to
@param content the content
@param enc... | java | private CmsXmlContent writeContent(CmsObject cms, CmsFile file, CmsXmlContent content, String encoding)
throws CmsException {
String decodedContent = content.toString();
try {
file.setContents(decodedContent.getBytes(encoding));
} catch (UnsupportedEncodingException e) {
... | [
"private",
"CmsXmlContent",
"writeContent",
"(",
"CmsObject",
"cms",
",",
"CmsFile",
"file",
",",
"CmsXmlContent",
"content",
",",
"String",
"encoding",
")",
"throws",
"CmsException",
"{",
"String",
"decodedContent",
"=",
"content",
".",
"toString",
"(",
")",
";... | Writes the xml content to the vfs and re-initializes the member variables.<p>
@param cms the cms context
@param file the file to write to
@param content the content
@param encoding the file encoding
@return the content
@throws CmsException if writing the file fails | [
"Writes",
"the",
"xml",
"content",
"to",
"the",
"vfs",
"and",
"re",
"-",
"initializes",
"the",
"member",
"variables",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/contenteditor/CmsContentService.java#L2703-L2724 |
bazaarvoice/jersey-hmac-auth | common/src/main/java/com/bazaarvoice/auth/hmac/server/AbstractAuthenticator.java | AbstractAuthenticator.createSignature | private String createSignature(Credentials credentials, String secretKey) {
"""
Create a signature given the set of request credentials and a secret key.
@param credentials the credentials specified on the request
@param secretKey the secret key that will be used to generate the signature
@return the signatur... | java | private String createSignature(Credentials credentials, String secretKey) {
return new SignatureGenerator().generate(
secretKey,
credentials.getMethod(),
credentials.getTimestamp(),
credentials.getPath(),
credentials.getContent());
... | [
"private",
"String",
"createSignature",
"(",
"Credentials",
"credentials",
",",
"String",
"secretKey",
")",
"{",
"return",
"new",
"SignatureGenerator",
"(",
")",
".",
"generate",
"(",
"secretKey",
",",
"credentials",
".",
"getMethod",
"(",
")",
",",
"credentials... | Create a signature given the set of request credentials and a secret key.
@param credentials the credentials specified on the request
@param secretKey the secret key that will be used to generate the signature
@return the signature | [
"Create",
"a",
"signature",
"given",
"the",
"set",
"of",
"request",
"credentials",
"and",
"a",
"secret",
"key",
"."
] | train | https://github.com/bazaarvoice/jersey-hmac-auth/blob/17e2a40a4b7b783de4d77ad97f8a623af6baf688/common/src/main/java/com/bazaarvoice/auth/hmac/server/AbstractAuthenticator.java#L130-L137 |
apptentive/apptentive-android | apptentive/src/main/java/com/apptentive/android/sdk/Apptentive.java | Apptentive.sendAttachmentFile | public static void sendAttachmentFile(final InputStream is, final String mimeType) {
"""
Sends a file to the server. This file will be visible in the conversation view on the server, but will not be shown
in the client's Message Center. A local copy of this file will be made until the message is transmitted, at w... | java | public static void sendAttachmentFile(final InputStream is, final String mimeType) {
dispatchConversationTask(new ConversationDispatchTask() {
@Override
protected boolean execute(Conversation conversation) {
if (is == null) {
return false; // TODO: add error message
}
CompoundMessage message = ... | [
"public",
"static",
"void",
"sendAttachmentFile",
"(",
"final",
"InputStream",
"is",
",",
"final",
"String",
"mimeType",
")",
"{",
"dispatchConversationTask",
"(",
"new",
"ConversationDispatchTask",
"(",
")",
"{",
"@",
"Override",
"protected",
"boolean",
"execute",
... | Sends a file to the server. This file will be visible in the conversation view on the server, but will not be shown
in the client's Message Center. A local copy of this file will be made until the message is transmitted, at which
point the temporary file will be deleted.
@param is An InputStream from the desired... | [
"Sends",
"a",
"file",
"to",
"the",
"server",
".",
"This",
"file",
"will",
"be",
"visible",
"in",
"the",
"conversation",
"view",
"on",
"the",
"server",
"but",
"will",
"not",
"be",
"shown",
"in",
"the",
"client",
"s",
"Message",
"Center",
".",
"A",
"loca... | train | https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/Apptentive.java#L1146-L1180 |
jnr/jnr-x86asm | src/main/java/jnr/x86asm/Asm.java | Asm.xmmword_ptr_abs | public static final Mem xmmword_ptr_abs(long target, long disp, SEGMENT segmentPrefix) {
"""
Create xmmword (16 bytes) pointer operand
!
! @note This constructor is provided only for convenience for sse programming.
"""
return _ptr_build_abs(target, disp, segmentPrefix, SIZE_DQWORD);
} | java | public static final Mem xmmword_ptr_abs(long target, long disp, SEGMENT segmentPrefix) {
return _ptr_build_abs(target, disp, segmentPrefix, SIZE_DQWORD);
} | [
"public",
"static",
"final",
"Mem",
"xmmword_ptr_abs",
"(",
"long",
"target",
",",
"long",
"disp",
",",
"SEGMENT",
"segmentPrefix",
")",
"{",
"return",
"_ptr_build_abs",
"(",
"target",
",",
"disp",
",",
"segmentPrefix",
",",
"SIZE_DQWORD",
")",
";",
"}"
] | Create xmmword (16 bytes) pointer operand
!
! @note This constructor is provided only for convenience for sse programming. | [
"Create",
"xmmword",
"(",
"16",
"bytes",
")",
"pointer",
"operand",
"!",
"!"
] | train | https://github.com/jnr/jnr-x86asm/blob/fdcf68fb3dae49e607a49e33399e3dad1ada5536/src/main/java/jnr/x86asm/Asm.java#L440-L442 |
kaazing/gateway | mina.core/core/src/main/java/org/apache/mina/core/session/AbstractIoSession.java | AbstractIoSession.notifyIdleSession | public static void notifyIdleSession(IoSession session, long currentTime) {
"""
Fires a {@link IoEventType#SESSION_IDLE} event if applicable for the
specified {@code session}.
@param currentTime the current time (i.e. {@link System#currentTimeMillis()})
"""
notifyIdleSession0(
sessi... | java | public static void notifyIdleSession(IoSession session, long currentTime) {
notifyIdleSession0(
session, currentTime,
session.getConfig().getIdleTimeInMillis(IdleStatus.BOTH_IDLE),
IdleStatus.BOTH_IDLE, Math.max(
session.getLastIoTime(),
... | [
"public",
"static",
"void",
"notifyIdleSession",
"(",
"IoSession",
"session",
",",
"long",
"currentTime",
")",
"{",
"notifyIdleSession0",
"(",
"session",
",",
"currentTime",
",",
"session",
".",
"getConfig",
"(",
")",
".",
"getIdleTimeInMillis",
"(",
"IdleStatus",... | Fires a {@link IoEventType#SESSION_IDLE} event if applicable for the
specified {@code session}.
@param currentTime the current time (i.e. {@link System#currentTimeMillis()}) | [
"Fires",
"a",
"{",
"@link",
"IoEventType#SESSION_IDLE",
"}",
"event",
"if",
"applicable",
"for",
"the",
"specified",
"{",
"@code",
"session",
"}",
"."
] | train | https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/core/session/AbstractIoSession.java#L1213-L1236 |
Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java | KeyVaultClientBaseImpl.setSecretAsync | public ServiceFuture<SecretBundle> setSecretAsync(String vaultBaseUrl, String secretName, String value, Map<String, String> tags, String contentType, SecretAttributes secretAttributes, final ServiceCallback<SecretBundle> serviceCallback) {
"""
Sets a secret in a specified key vault.
The SET operation adds a secre... | java | public ServiceFuture<SecretBundle> setSecretAsync(String vaultBaseUrl, String secretName, String value, Map<String, String> tags, String contentType, SecretAttributes secretAttributes, final ServiceCallback<SecretBundle> serviceCallback) {
return ServiceFuture.fromResponse(setSecretWithServiceResponseAsync(vaul... | [
"public",
"ServiceFuture",
"<",
"SecretBundle",
">",
"setSecretAsync",
"(",
"String",
"vaultBaseUrl",
",",
"String",
"secretName",
",",
"String",
"value",
",",
"Map",
"<",
"String",
",",
"String",
">",
"tags",
",",
"String",
"contentType",
",",
"SecretAttributes... | Sets a secret in a specified key vault.
The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret. This operation requires the secrets/set permission.
@param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
... | [
"Sets",
"a",
"secret",
"in",
"a",
"specified",
"key",
"vault",
".",
"The",
"SET",
"operation",
"adds",
"a",
"secret",
"to",
"the",
"Azure",
"Key",
"Vault",
".",
"If",
"the",
"named",
"secret",
"already",
"exists",
"Azure",
"Key",
"Vault",
"creates",
"a",... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L3439-L3441 |
lessthanoptimal/ejml | main/ejml-simple/src/org/ejml/equation/Operation.java | Operation.extractSimpleExtents | private static boolean extractSimpleExtents(Variable var, Extents e, boolean row, int length) {
"""
See if a simple sequence can be used to extract the array. A simple extent is a continuous block from
a min to max index
@return true if it is a simple range or false if not
"""
int lower;
i... | java | private static boolean extractSimpleExtents(Variable var, Extents e, boolean row, int length) {
int lower;
int upper;
if( var.getType() == VariableType.INTEGER_SEQUENCE ) {
IntegerSequence sequence = ((VariableIntegerSequence)var).sequence;
if( sequence.getType() == Integ... | [
"private",
"static",
"boolean",
"extractSimpleExtents",
"(",
"Variable",
"var",
",",
"Extents",
"e",
",",
"boolean",
"row",
",",
"int",
"length",
")",
"{",
"int",
"lower",
";",
"int",
"upper",
";",
"if",
"(",
"var",
".",
"getType",
"(",
")",
"==",
"Var... | See if a simple sequence can be used to extract the array. A simple extent is a continuous block from
a min to max index
@return true if it is a simple range or false if not | [
"See",
"if",
"a",
"simple",
"sequence",
"can",
"be",
"used",
"to",
"extract",
"the",
"array",
".",
"A",
"simple",
"extent",
"is",
"a",
"continuous",
"block",
"from",
"a",
"min",
"to",
"max",
"index"
] | train | https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Operation.java#L1686-L1716 |
twilio/twilio-java | src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberReader.java | PhoneNumberReader.previousPage | @Override
public Page<PhoneNumber> previousPage(final Page<PhoneNumber> page,
final TwilioRestClient client) {
"""
Retrieve the previous page from the Twilio API.
@param page current page
@param client TwilioRestClient with which to make the request
@return Previ... | java | @Override
public Page<PhoneNumber> previousPage(final Page<PhoneNumber> page,
final TwilioRestClient client) {
Request request = new Request(
HttpMethod.GET,
page.getPreviousPageUrl(
Domains.TRUNKING.toString(),
... | [
"@",
"Override",
"public",
"Page",
"<",
"PhoneNumber",
">",
"previousPage",
"(",
"final",
"Page",
"<",
"PhoneNumber",
">",
"page",
",",
"final",
"TwilioRestClient",
"client",
")",
"{",
"Request",
"request",
"=",
"new",
"Request",
"(",
"HttpMethod",
".",
"GET... | Retrieve the previous page from the Twilio API.
@param page current page
@param client TwilioRestClient with which to make the request
@return Previous Page | [
"Retrieve",
"the",
"previous",
"page",
"from",
"the",
"Twilio",
"API",
"."
] | train | https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberReader.java#L111-L122 |
haraldk/TwelveMonkeys | sandbox/sandbox-common/src/main/java/com/twelvemonkeys/sql/Log.java | Log.logDebug | public void logDebug(String message, Exception exception) {
"""
Prints debug info to the current debugLog
@param message The message to log
@param exception An Exception
"""
if (!(logDebug || globalLog.logDebug))
return;
if (debugLog != null)
log(debugLog, "DEB... | java | public void logDebug(String message, Exception exception) {
if (!(logDebug || globalLog.logDebug))
return;
if (debugLog != null)
log(debugLog, "DEBUG", owner, message, exception);
else
log(globalLog.debugLog, "DEBUG", owner, message, exception);
... | [
"public",
"void",
"logDebug",
"(",
"String",
"message",
",",
"Exception",
"exception",
")",
"{",
"if",
"(",
"!",
"(",
"logDebug",
"||",
"globalLog",
".",
"logDebug",
")",
")",
"return",
";",
"if",
"(",
"debugLog",
"!=",
"null",
")",
"log",
"(",
"debugL... | Prints debug info to the current debugLog
@param message The message to log
@param exception An Exception | [
"Prints",
"debug",
"info",
"to",
"the",
"current",
"debugLog"
] | train | https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/sql/Log.java#L281-L289 |
btrplace/scheduler | json/src/main/java/org/btrplace/json/model/view/network/NetworkConverter.java | NetworkConverter.linksFromJSON | public void linksFromJSON(Model mo, Network net, JSONArray a) throws JSONConverterException {
"""
Convert a JSON array of links to a Java List of links.
@param net the network to populate
@param a the json array
"""
for (Object o : a) {
linkFromJSON(mo, net, (JSONObject) o);
}
... | java | public void linksFromJSON(Model mo, Network net, JSONArray a) throws JSONConverterException {
for (Object o : a) {
linkFromJSON(mo, net, (JSONObject) o);
}
} | [
"public",
"void",
"linksFromJSON",
"(",
"Model",
"mo",
",",
"Network",
"net",
",",
"JSONArray",
"a",
")",
"throws",
"JSONConverterException",
"{",
"for",
"(",
"Object",
"o",
":",
"a",
")",
"{",
"linkFromJSON",
"(",
"mo",
",",
"net",
",",
"(",
"JSONObject... | Convert a JSON array of links to a Java List of links.
@param net the network to populate
@param a the json array | [
"Convert",
"a",
"JSON",
"array",
"of",
"links",
"to",
"a",
"Java",
"List",
"of",
"links",
"."
] | train | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/model/view/network/NetworkConverter.java#L302-L306 |
mcxiaoke/Android-Next | core/src/main/java/com/mcxiaoke/next/utils/IOUtils.java | IOUtils.readStringFromAssets | public static String readStringFromAssets(Context context, String fileName) throws IOException {
"""
get an asset using ACCESS_STREAMING mode. This provides access to files that have been bundled with an
application as assets -- that is, files placed in to the "assets" directory.
@param context
@param fileNam... | java | public static String readStringFromAssets(Context context, String fileName) throws IOException {
if (context == null || StringUtils.isEmpty(fileName)) {
return null;
}
StringBuilder s = new StringBuilder("");
InputStreamReader in = new InputStreamReader(context.getReso... | [
"public",
"static",
"String",
"readStringFromAssets",
"(",
"Context",
"context",
",",
"String",
"fileName",
")",
"throws",
"IOException",
"{",
"if",
"(",
"context",
"==",
"null",
"||",
"StringUtils",
".",
"isEmpty",
"(",
"fileName",
")",
")",
"{",
"return",
... | get an asset using ACCESS_STREAMING mode. This provides access to files that have been bundled with an
application as assets -- that is, files placed in to the "assets" directory.
@param context
@param fileName The name of the asset to open. This name can be hierarchical.
@return | [
"get",
"an",
"asset",
"using",
"ACCESS_STREAMING",
"mode",
".",
"This",
"provides",
"access",
"to",
"files",
"that",
"have",
"been",
"bundled",
"with",
"an",
"application",
"as",
"assets",
"--",
"that",
"is",
"files",
"placed",
"in",
"to",
"the",
"assets",
... | train | https://github.com/mcxiaoke/Android-Next/blob/1bfdf99d0b81a849aa0fa6697c53ed673151ca39/core/src/main/java/com/mcxiaoke/next/utils/IOUtils.java#L1062-L1075 |
pmwmedia/tinylog | tinylog-impl/src/main/java/org/tinylog/pattern/FormatPatternParser.java | FormatPatternParser.createThreadContextToken | private static Token createThreadContextToken(final String configuration) {
"""
Creates a new {@link ThreadContextToken}.
@param configuration
Key and optional placeholder for empty values
@return New instance of {@link ThreadContextToken} or {@code null} if key is missing
"""
if (configuration == null)... | java | private static Token createThreadContextToken(final String configuration) {
if (configuration == null) {
InternalLogger.log(Level.ERROR, "\"{context}\" requires a key");
return new PlainTextToken("");
} else {
int splitIndex = configuration.indexOf(',');
String key = splitIndex == -1 ? configuration.tri... | [
"private",
"static",
"Token",
"createThreadContextToken",
"(",
"final",
"String",
"configuration",
")",
"{",
"if",
"(",
"configuration",
"==",
"null",
")",
"{",
"InternalLogger",
".",
"log",
"(",
"Level",
".",
"ERROR",
",",
"\"\\\"{context}\\\" requires a key\"",
... | Creates a new {@link ThreadContextToken}.
@param configuration
Key and optional placeholder for empty values
@return New instance of {@link ThreadContextToken} or {@code null} if key is missing | [
"Creates",
"a",
"new",
"{",
"@link",
"ThreadContextToken",
"}",
"."
] | train | https://github.com/pmwmedia/tinylog/blob/d03d4ef84a1310155037e08ca8822a91697d1086/tinylog-impl/src/main/java/org/tinylog/pattern/FormatPatternParser.java#L191-L206 |
lz4/lz4-java | src/java/net/jpountz/xxhash/StreamingXXHash32.java | StreamingXXHash32.asChecksum | public final Checksum asChecksum() {
"""
Returns a {@link Checksum} view of this instance. Modifications to the view
will modify this instance too and vice-versa.
@return the {@link Checksum} object representing this instance
"""
return new Checksum() {
@Override
public long getValue() {
... | java | public final Checksum asChecksum() {
return new Checksum() {
@Override
public long getValue() {
return StreamingXXHash32.this.getValue() & 0xFFFFFFFL;
}
@Override
public void reset() {
StreamingXXHash32.this.reset();
}
@Override
public void update(i... | [
"public",
"final",
"Checksum",
"asChecksum",
"(",
")",
"{",
"return",
"new",
"Checksum",
"(",
")",
"{",
"@",
"Override",
"public",
"long",
"getValue",
"(",
")",
"{",
"return",
"StreamingXXHash32",
".",
"this",
".",
"getValue",
"(",
")",
"&",
"0xFFFFFFF",
... | Returns a {@link Checksum} view of this instance. Modifications to the view
will modify this instance too and vice-versa.
@return the {@link Checksum} object representing this instance | [
"Returns",
"a",
"{",
"@link",
"Checksum",
"}",
"view",
"of",
"this",
"instance",
".",
"Modifications",
"to",
"the",
"view",
"will",
"modify",
"this",
"instance",
"too",
"and",
"vice",
"-",
"versa",
"."
] | train | https://github.com/lz4/lz4-java/blob/c5ae694a3aa8b33ef87fd0486727a7d1e8f71367/src/java/net/jpountz/xxhash/StreamingXXHash32.java#L88-L117 |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/vod/VodClient.java | VodClient.publishMediaResource | public PublishMediaResourceResponse publishMediaResource(PublishMediaResourceRequest request) {
"""
Publish the specific media resource managed by VOD service, so that it can be access and played.
<p>
The caller <i>must</i> authenticate with a valid BCE Access Key / Private Key pair.
@param request The reques... | java | public PublishMediaResourceResponse publishMediaResource(PublishMediaResourceRequest request) {
checkStringNotEmpty(request.getMediaId(), "Media ID should not be null or empty!");
InternalRequest internalRequest =
createRequest(HttpMethodName.PUT, request, PATH_MEDIA, request.getMediaId(... | [
"public",
"PublishMediaResourceResponse",
"publishMediaResource",
"(",
"PublishMediaResourceRequest",
"request",
")",
"{",
"checkStringNotEmpty",
"(",
"request",
".",
"getMediaId",
"(",
")",
",",
"\"Media ID should not be null or empty!\"",
")",
";",
"InternalRequest",
"inter... | Publish the specific media resource managed by VOD service, so that it can be access and played.
<p>
The caller <i>must</i> authenticate with a valid BCE Access Key / Private Key pair.
@param request The request object containing all the options on how to
@return empty response will be returned | [
"Publish",
"the",
"specific",
"media",
"resource",
"managed",
"by",
"VOD",
"service",
"so",
"that",
"it",
"can",
"be",
"access",
"and",
"played",
".",
"<p",
">",
"The",
"caller",
"<i",
">",
"must<",
"/",
"i",
">",
"authenticate",
"with",
"a",
"valid",
... | train | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/vod/VodClient.java#L710-L717 |
UrielCh/ovh-java-sdk | ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java | ApiOvhTelephony.billingAccount_service_serviceName_offerTask_taskId_GET | public OvhOfferTask billingAccount_service_serviceName_offerTask_taskId_GET(String billingAccount, String serviceName, Long taskId) throws IOException {
"""
Get this object properties
REST: GET /telephony/{billingAccount}/service/{serviceName}/offerTask/{taskId}
@param billingAccount [required] The name of you... | java | public OvhOfferTask billingAccount_service_serviceName_offerTask_taskId_GET(String billingAccount, String serviceName, Long taskId) throws IOException {
String qPath = "/telephony/{billingAccount}/service/{serviceName}/offerTask/{taskId}";
StringBuilder sb = path(qPath, billingAccount, serviceName, taskId);
Strin... | [
"public",
"OvhOfferTask",
"billingAccount_service_serviceName_offerTask_taskId_GET",
"(",
"String",
"billingAccount",
",",
"String",
"serviceName",
",",
"Long",
"taskId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/telephony/{billingAccount}/service/{serviceN... | Get this object properties
REST: GET /telephony/{billingAccount}/service/{serviceName}/offerTask/{taskId}
@param billingAccount [required] The name of your billingAccount
@param serviceName [required]
@param taskId [required] | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L3911-L3916 |
liferay/com-liferay-commerce | commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListAccountRelPersistenceImpl.java | CommercePriceListAccountRelPersistenceImpl.findByCommercePriceListId | @Override
public List<CommercePriceListAccountRel> findByCommercePriceListId(
long commercePriceListId, int start, int end) {
"""
Returns a range of all the commerce price list account rels where commercePriceListId = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> i... | java | @Override
public List<CommercePriceListAccountRel> findByCommercePriceListId(
long commercePriceListId, int start, int end) {
return findByCommercePriceListId(commercePriceListId, start, end, null);
} | [
"@",
"Override",
"public",
"List",
"<",
"CommercePriceListAccountRel",
">",
"findByCommercePriceListId",
"(",
"long",
"commercePriceListId",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"return",
"findByCommercePriceListId",
"(",
"commercePriceListId",
",",
"star... | Returns a range of all the commerce price list account rels where commercePriceListId = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to th... | [
"Returns",
"a",
"range",
"of",
"all",
"the",
"commerce",
"price",
"list",
"account",
"rels",
"where",
"commercePriceListId",
"=",
"?",
";",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListAccountRelPersistenceImpl.java#L1560-L1564 |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/outbound/HttpOSCBodyReadCallback.java | HttpOSCBodyReadCallback.complete | public void complete(VirtualConnection vc, TCPReadRequestContext rsc) {
"""
Called by the channel below us when a read has finished.
@param vc
@param rsc
"""
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "complete() called: vc=" + vc);
}
... | java | public void complete(VirtualConnection vc, TCPReadRequestContext rsc) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "complete() called: vc=" + vc);
}
HttpOutboundServiceContextImpl mySC = (HttpOutboundServiceContextImpl) vc.getStateMap().get(Callb... | [
"public",
"void",
"complete",
"(",
"VirtualConnection",
"vc",
",",
"TCPReadRequestContext",
"rsc",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"Tr",
".",
"debug",
"(",
... | Called by the channel below us when a read has finished.
@param vc
@param rsc | [
"Called",
"by",
"the",
"channel",
"below",
"us",
"when",
"a",
"read",
"has",
"finished",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/outbound/HttpOSCBodyReadCallback.java#L55-L62 |
infinispan/infinispan | server/hotrod/src/main/java/org/infinispan/server/hotrod/transport/ExtendedByteBuf.java | ExtendedByteBuf.readMaybeVLong | public static Optional<Long> readMaybeVLong(ByteBuf bf) {
"""
Reads a variable long if possible. If not present the reader index is reset to the last mark.
@param bf
@return
"""
if (bf.readableBytes() >= 1) {
byte b = bf.readByte();
return read(bf, b, 7, (long) b & 0x7F, 1);
... | java | public static Optional<Long> readMaybeVLong(ByteBuf bf) {
if (bf.readableBytes() >= 1) {
byte b = bf.readByte();
return read(bf, b, 7, (long) b & 0x7F, 1);
} else {
bf.resetReaderIndex();
return Optional.empty();
}
} | [
"public",
"static",
"Optional",
"<",
"Long",
">",
"readMaybeVLong",
"(",
"ByteBuf",
"bf",
")",
"{",
"if",
"(",
"bf",
".",
"readableBytes",
"(",
")",
">=",
"1",
")",
"{",
"byte",
"b",
"=",
"bf",
".",
"readByte",
"(",
")",
";",
"return",
"read",
"(",... | Reads a variable long if possible. If not present the reader index is reset to the last mark.
@param bf
@return | [
"Reads",
"a",
"variable",
"long",
"if",
"possible",
".",
"If",
"not",
"present",
"the",
"reader",
"index",
"is",
"reset",
"to",
"the",
"last",
"mark",
"."
] | train | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/hotrod/src/main/java/org/infinispan/server/hotrod/transport/ExtendedByteBuf.java#L111-L120 |
lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/alg/feature/dense/DescribeDenseSiftAlg.java | DescribeDenseSiftAlg.computeDescriptor | public void computeDescriptor( int cx , int cy , TupleDesc_F64 desc ) {
"""
Computes the descriptor centered at the specified coordinate
@param cx center of region x-axis
@param cy center of region y-axis
@param desc The descriptor
"""
desc.fill(0);
int widthPixels = widthSubregion*widthGrid;
int r... | java | public void computeDescriptor( int cx , int cy , TupleDesc_F64 desc ) {
desc.fill(0);
int widthPixels = widthSubregion*widthGrid;
int radius = widthPixels/2;
for (int i = 0; i < widthPixels; i++) {
int angleIndex = (cy-radius+i)*savedAngle.width + (cx-radius);
float subY = i/(float)widthSubregion;
... | [
"public",
"void",
"computeDescriptor",
"(",
"int",
"cx",
",",
"int",
"cy",
",",
"TupleDesc_F64",
"desc",
")",
"{",
"desc",
".",
"fill",
"(",
"0",
")",
";",
"int",
"widthPixels",
"=",
"widthSubregion",
"*",
"widthGrid",
";",
"int",
"radius",
"=",
"widthPi... | Computes the descriptor centered at the specified coordinate
@param cx center of region x-axis
@param cy center of region y-axis
@param desc The descriptor | [
"Computes",
"the",
"descriptor",
"centered",
"at",
"the",
"specified",
"coordinate"
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/dense/DescribeDenseSiftAlg.java#L172-L198 |
apereo/cas | support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java | OAuth20Utils.getRegisteredOAuthServiceByRedirectUri | public static OAuthRegisteredService getRegisteredOAuthServiceByRedirectUri(final ServicesManager servicesManager, final String redirectUri) {
"""
Gets registered oauth service by redirect uri.
@param servicesManager the services manager
@param redirectUri the redirect uri
@return the registered OAuth ser... | java | public static OAuthRegisteredService getRegisteredOAuthServiceByRedirectUri(final ServicesManager servicesManager, final String redirectUri) {
return getRegisteredOAuthServiceByPredicate(servicesManager, s -> s.matches(redirectUri));
} | [
"public",
"static",
"OAuthRegisteredService",
"getRegisteredOAuthServiceByRedirectUri",
"(",
"final",
"ServicesManager",
"servicesManager",
",",
"final",
"String",
"redirectUri",
")",
"{",
"return",
"getRegisteredOAuthServiceByPredicate",
"(",
"servicesManager",
",",
"s",
"->... | Gets registered oauth service by redirect uri.
@param servicesManager the services manager
@param redirectUri the redirect uri
@return the registered OAuth service by redirect uri | [
"Gets",
"registered",
"oauth",
"service",
"by",
"redirect",
"uri",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L87-L89 |
google/error-prone-javac | src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java | HtmlSerialMethodWriter.getSerializableMethods | public Content getSerializableMethods(String heading, Content serializableMethodContent) {
"""
Add serializable methods.
@param heading the heading for the section
@param serializableMethodContent the tree to be added to the serializable methods
content tree
@return a content tree for the serializable method... | java | public Content getSerializableMethods(String heading, Content serializableMethodContent) {
Content headingContent = new StringContent(heading);
Content serialHeading = HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING,
headingContent);
Content li = HtmlTree.LI(HtmlStyle.bl... | [
"public",
"Content",
"getSerializableMethods",
"(",
"String",
"heading",
",",
"Content",
"serializableMethodContent",
")",
"{",
"Content",
"headingContent",
"=",
"new",
"StringContent",
"(",
"heading",
")",
";",
"Content",
"serialHeading",
"=",
"HtmlTree",
".",
"HEA... | Add serializable methods.
@param heading the heading for the section
@param serializableMethodContent the tree to be added to the serializable methods
content tree
@return a content tree for the serializable methods content | [
"Add",
"serializable",
"methods",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java#L96-L103 |
khuxtable/seaglass | src/main/java/com/seaglasslookandfeel/painter/TitlePaneIconifyButtonPainter.java | TitlePaneIconifyButtonPainter.paintRestorePressed | private void paintRestorePressed(Graphics2D g, JComponent c, int width, int height) {
"""
Paint the foreground restore button pressed state.
@param g the Graphics2D context to paint with.
@param c the component.
@param width the width of the component.
@param height the height of the component.
... | java | private void paintRestorePressed(Graphics2D g, JComponent c, int width, int height) {
restorePainter.paintPressed(g, c, width, height);
} | [
"private",
"void",
"paintRestorePressed",
"(",
"Graphics2D",
"g",
",",
"JComponent",
"c",
",",
"int",
"width",
",",
"int",
"height",
")",
"{",
"restorePainter",
".",
"paintPressed",
"(",
"g",
",",
"c",
",",
"width",
",",
"height",
")",
";",
"}"
] | Paint the foreground restore button pressed state.
@param g the Graphics2D context to paint with.
@param c the component.
@param width the width of the component.
@param height the height of the component. | [
"Paint",
"the",
"foreground",
"restore",
"button",
"pressed",
"state",
"."
] | train | https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TitlePaneIconifyButtonPainter.java#L231-L233 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/GlobalizationPreferences.java | GlobalizationPreferences.getCollator | public Collator getCollator() {
"""
Get a copy of the collator according to the settings.
@return collator explicit or implicit.
@hide draft / provisional / internal are hidden on Android
"""
if (collator == null) {
return guessCollator();
}
try {
return (Col... | java | public Collator getCollator() {
if (collator == null) {
return guessCollator();
}
try {
return (Collator) collator.clone(); // clone for safety
} catch (CloneNotSupportedException e) {
throw new ICUCloneNotSupportedException("Error in cloning collator... | [
"public",
"Collator",
"getCollator",
"(",
")",
"{",
"if",
"(",
"collator",
"==",
"null",
")",
"{",
"return",
"guessCollator",
"(",
")",
";",
"}",
"try",
"{",
"return",
"(",
"Collator",
")",
"collator",
".",
"clone",
"(",
")",
";",
"// clone for safety",
... | Get a copy of the collator according to the settings.
@return collator explicit or implicit.
@hide draft / provisional / internal are hidden on Android | [
"Get",
"a",
"copy",
"of",
"the",
"collator",
"according",
"to",
"the",
"settings",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/GlobalizationPreferences.java#L459-L468 |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/chart/builder/DJScatterChartBuilder.java | DJScatterChartBuilder.addSerie | public DJScatterChartBuilder addSerie(AbstractColumn column, StringExpression labelExpression) {
"""
Adds the specified serie column to the dataset with custom label.
@param column the serie column
"""
getDataset().addSerie(column, labelExpression);
return this;
} | java | public DJScatterChartBuilder addSerie(AbstractColumn column, StringExpression labelExpression) {
getDataset().addSerie(column, labelExpression);
return this;
} | [
"public",
"DJScatterChartBuilder",
"addSerie",
"(",
"AbstractColumn",
"column",
",",
"StringExpression",
"labelExpression",
")",
"{",
"getDataset",
"(",
")",
".",
"addSerie",
"(",
"column",
",",
"labelExpression",
")",
";",
"return",
"this",
";",
"}"
] | Adds the specified serie column to the dataset with custom label.
@param column the serie column | [
"Adds",
"the",
"specified",
"serie",
"column",
"to",
"the",
"dataset",
"with",
"custom",
"label",
"."
] | train | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/chart/builder/DJScatterChartBuilder.java#L384-L387 |
alkacon/opencms-core | src-gwt/org/opencms/gwt/client/property/CmsVfsModePropertyEditor.java | CmsVfsModePropertyEditor.moveToTop | private void moveToTop(List<String> keys, String propertyName) {
"""
Moves the given property name to the top of the keys if present.<p>
@param keys the list of keys
@param propertyName the property name to move
"""
if (keys.contains(propertyName)) {
keys.remove(propertyName);
... | java | private void moveToTop(List<String> keys, String propertyName) {
if (keys.contains(propertyName)) {
keys.remove(propertyName);
keys.add(0, propertyName);
}
} | [
"private",
"void",
"moveToTop",
"(",
"List",
"<",
"String",
">",
"keys",
",",
"String",
"propertyName",
")",
"{",
"if",
"(",
"keys",
".",
"contains",
"(",
"propertyName",
")",
")",
"{",
"keys",
".",
"remove",
"(",
"propertyName",
")",
";",
"keys",
".",... | Moves the given property name to the top of the keys if present.<p>
@param keys the list of keys
@param propertyName the property name to move | [
"Moves",
"the",
"given",
"property",
"name",
"to",
"the",
"top",
"of",
"the",
"keys",
"if",
"present",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/property/CmsVfsModePropertyEditor.java#L591-L597 |
jbundle/jcalendarbutton | src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java | JCalendarPopup.createCalendarPopup | public static JCalendarPopup createCalendarPopup(String strDateParam, Date dateTarget, Component button, String strLanguage) {
"""
Create this calendar in a popup menu and synchronize the text field on change.
@param strDateParam The name of the date property (defaults to "date").
@param dateTarget The initial d... | java | public static JCalendarPopup createCalendarPopup(String strDateParam, Date dateTarget, Component button, String strLanguage)
{
JPopupMenu popup = new JPopupMenu();
JComponent c = (JComponent)popup; //?.getContentPane();
c.setLayout(new BorderLayout());
JCalendarPopup calendar = new J... | [
"public",
"static",
"JCalendarPopup",
"createCalendarPopup",
"(",
"String",
"strDateParam",
",",
"Date",
"dateTarget",
",",
"Component",
"button",
",",
"String",
"strLanguage",
")",
"{",
"JPopupMenu",
"popup",
"=",
"new",
"JPopupMenu",
"(",
")",
";",
"JComponent",... | Create this calendar in a popup menu and synchronize the text field on change.
@param strDateParam The name of the date property (defaults to "date").
@param dateTarget The initial date for this button.
@param strLanguage The language to use.
@param button The calling button. | [
"Create",
"this",
"calendar",
"in",
"a",
"popup",
"menu",
"and",
"synchronize",
"the",
"text",
"field",
"on",
"change",
"."
] | train | https://github.com/jbundle/jcalendarbutton/blob/2944e6a0b634b83768d5c0b7b4a2898176421403/src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java#L593-L602 |
querydsl/querydsl | querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java | AbstractMySQLQuery.noCache | @WithBridgeMethods(value = MySQLQuery.class, castRequired = true)
public C noCache() {
"""
With SQL_NO_CACHE, the server does not use the query cache. It neither checks the query cache
to see whether the result is already cached, nor does it cache the query result.
@return the current object
"""
... | java | @WithBridgeMethods(value = MySQLQuery.class, castRequired = true)
public C noCache() {
return addFlag(Position.AFTER_SELECT, SQL_NO_CACHE);
} | [
"@",
"WithBridgeMethods",
"(",
"value",
"=",
"MySQLQuery",
".",
"class",
",",
"castRequired",
"=",
"true",
")",
"public",
"C",
"noCache",
"(",
")",
"{",
"return",
"addFlag",
"(",
"Position",
".",
"AFTER_SELECT",
",",
"SQL_NO_CACHE",
")",
";",
"}"
] | With SQL_NO_CACHE, the server does not use the query cache. It neither checks the query cache
to see whether the result is already cached, nor does it cache the query result.
@return the current object | [
"With",
"SQL_NO_CACHE",
"the",
"server",
"does",
"not",
"use",
"the",
"query",
"cache",
".",
"It",
"neither",
"checks",
"the",
"query",
"cache",
"to",
"see",
"whether",
"the",
"result",
"is",
"already",
"cached",
"nor",
"does",
"it",
"cache",
"the",
"query... | train | https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java#L178-L181 |
steveash/jopenfst | src/main/java/com/github/steveash/jopenfst/io/Convert.java | Convert.exportSymbols | private static void exportSymbols(SymbolTable syms, String filename) {
"""
Exports a symbols' map to the openfst text format
@param syms the symbols' map
@param filename the the openfst's symbols filename
"""
if (syms == null) {
return;
}
try (PrintWriter out = new PrintWriter(new Fi... | java | private static void exportSymbols(SymbolTable syms, String filename) {
if (syms == null) {
return;
}
try (PrintWriter out = new PrintWriter(new FileWriter(filename))) {
for (ObjectIntCursor<String> sym : syms) {
out.println(sym.key + "\t" + sym.value);
}
} catch (IOException e... | [
"private",
"static",
"void",
"exportSymbols",
"(",
"SymbolTable",
"syms",
",",
"String",
"filename",
")",
"{",
"if",
"(",
"syms",
"==",
"null",
")",
"{",
"return",
";",
"}",
"try",
"(",
"PrintWriter",
"out",
"=",
"new",
"PrintWriter",
"(",
"new",
"FileWr... | Exports a symbols' map to the openfst text format
@param syms the symbols' map
@param filename the the openfst's symbols filename | [
"Exports",
"a",
"symbols",
"map",
"to",
"the",
"openfst",
"text",
"format"
] | train | https://github.com/steveash/jopenfst/blob/4c675203015c1cfad2072556cb532b6edc73261d/src/main/java/com/github/steveash/jopenfst/io/Convert.java#L215-L227 |
UrielCh/ovh-java-sdk | ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java | ApiOvhMe.refund_refundId_details_refundDetailId_GET | public OvhRefundDetail refund_refundId_details_refundDetailId_GET(String refundId, String refundDetailId) throws IOException {
"""
Get this object properties
REST: GET /me/refund/{refundId}/details/{refundDetailId}
@param refundId [required]
@param refundDetailId [required]
"""
String qPath = "/me/refun... | java | public OvhRefundDetail refund_refundId_details_refundDetailId_GET(String refundId, String refundDetailId) throws IOException {
String qPath = "/me/refund/{refundId}/details/{refundDetailId}";
StringBuilder sb = path(qPath, refundId, refundDetailId);
String resp = exec(qPath, "GET", sb.toString(), null);
return ... | [
"public",
"OvhRefundDetail",
"refund_refundId_details_refundDetailId_GET",
"(",
"String",
"refundId",
",",
"String",
"refundDetailId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/me/refund/{refundId}/details/{refundDetailId}\"",
";",
"StringBuilder",
"sb",
... | Get this object properties
REST: GET /me/refund/{refundId}/details/{refundDetailId}
@param refundId [required]
@param refundDetailId [required] | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L1397-L1402 |
deeplearning4j/deeplearning4j | datavec/datavec-local/src/main/java/org/datavec/local/transforms/AnalyzeLocal.java | AnalyzeLocal.analyzeQualitySequence | public static DataQualityAnalysis analyzeQualitySequence(Schema schema, SequenceRecordReader data) {
"""
Analyze the data quality of sequence data - provides a report on missing values, values that don't comply with schema, etc
@param schema Schema for data
@param data Data to analyze
@return DataQualityAnaly... | java | public static DataQualityAnalysis analyzeQualitySequence(Schema schema, SequenceRecordReader data) {
int nColumns = schema.numColumns();
List<QualityAnalysisState> states = new ArrayList<>();
QualityAnalysisAddFunction addFn = new QualityAnalysisAddFunction(schema);
while(data.hasNext())... | [
"public",
"static",
"DataQualityAnalysis",
"analyzeQualitySequence",
"(",
"Schema",
"schema",
",",
"SequenceRecordReader",
"data",
")",
"{",
"int",
"nColumns",
"=",
"schema",
".",
"numColumns",
"(",
")",
";",
"List",
"<",
"QualityAnalysisState",
">",
"states",
"="... | Analyze the data quality of sequence data - provides a report on missing values, values that don't comply with schema, etc
@param schema Schema for data
@param data Data to analyze
@return DataQualityAnalysis object | [
"Analyze",
"the",
"data",
"quality",
"of",
"sequence",
"data",
"-",
"provides",
"a",
"report",
"on",
"missing",
"values",
"values",
"that",
"don",
"t",
"comply",
"with",
"schema",
"etc"
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-local/src/main/java/org/datavec/local/transforms/AnalyzeLocal.java#L95-L112 |
fcrepo3/fcrepo | fcrepo-installer/src/main/java/org/fcrepo/utilities/install/container/Tomcat.java | Tomcat.installFedoraContext | protected void installFedoraContext() throws InstallationFailedException {
"""
Creates a Tomcat context for Fedora in
$CATALINA_HOME/conf/Catalina/localhost which sets the fedora.home system
property to the installer-provided value.
"""
File contextDir =
new File(getConf().getPath() + Fil... | java | protected void installFedoraContext() throws InstallationFailedException {
File contextDir =
new File(getConf().getPath() + File.separator + "Catalina"
+ File.separator + "localhost");
contextDir.mkdirs();
try {
String content =
IO... | [
"protected",
"void",
"installFedoraContext",
"(",
")",
"throws",
"InstallationFailedException",
"{",
"File",
"contextDir",
"=",
"new",
"File",
"(",
"getConf",
"(",
")",
".",
"getPath",
"(",
")",
"+",
"File",
".",
"separator",
"+",
"\"Catalina\"",
"+",
"File",
... | Creates a Tomcat context for Fedora in
$CATALINA_HOME/conf/Catalina/localhost which sets the fedora.home system
property to the installer-provided value. | [
"Creates",
"a",
"Tomcat",
"context",
"for",
"Fedora",
"in",
"$CATALINA_HOME",
"/",
"conf",
"/",
"Catalina",
"/",
"localhost",
"which",
"sets",
"the",
"fedora",
".",
"home",
"system",
"property",
"to",
"the",
"installer",
"-",
"provided",
"value",
"."
] | train | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-installer/src/main/java/org/fcrepo/utilities/install/container/Tomcat.java#L69-L96 |
google/error-prone-javac | src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java | SimpleDocTreeVisitor.visitDocComment | @Override
public R visitDocComment(DocCommentTree node, P p) {
"""
{@inheritDoc} This implementation calls {@code defaultAction}.
@param node {@inheritDoc}
@param p {@inheritDoc}
@return the result of {@code defaultAction}
"""
return defaultAction(node, p);
} | java | @Override
public R visitDocComment(DocCommentTree node, P p) {
return defaultAction(node, p);
} | [
"@",
"Override",
"public",
"R",
"visitDocComment",
"(",
"DocCommentTree",
"node",
",",
"P",
"p",
")",
"{",
"return",
"defaultAction",
"(",
"node",
",",
"p",
")",
";",
"}"
] | {@inheritDoc} This implementation calls {@code defaultAction}.
@param node {@inheritDoc}
@param p {@inheritDoc}
@return the result of {@code defaultAction} | [
"{",
"@inheritDoc",
"}",
"This",
"implementation",
"calls",
"{",
"@code",
"defaultAction",
"}",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java#L153-L156 |
JavaMoney/jsr354-api | src/main/java/javax/money/AbstractContext.java | AbstractContext.get | public <T> T get(String key, Class<T> type) {
"""
Access an attribute.
@param type the attribute's type, not {@code null}
@param key the attribute's key, not {@code null}
@return the attribute value, or {@code null}.
"""
Object value = this.data.get(key);
if (value != null && type.isAssig... | java | public <T> T get(String key, Class<T> type) {
Object value = this.data.get(key);
if (value != null && type.isAssignableFrom(value.getClass())) {
return (T) value;
}
return null;
} | [
"public",
"<",
"T",
">",
"T",
"get",
"(",
"String",
"key",
",",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"Object",
"value",
"=",
"this",
".",
"data",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"value",
"!=",
"null",
"&&",
"type",
".",
"isA... | Access an attribute.
@param type the attribute's type, not {@code null}
@param key the attribute's key, not {@code null}
@return the attribute value, or {@code null}. | [
"Access",
"an",
"attribute",
"."
] | train | https://github.com/JavaMoney/jsr354-api/blob/49a7ae436eaf45cac1040879185531ef22de5525/src/main/java/javax/money/AbstractContext.java#L87-L93 |
knowm/Sundial | src/main/java/org/knowm/sundial/SundialJobScheduler.java | SundialJobScheduler.getAllJobNames | public static List<String> getAllJobNames() throws SundialSchedulerException {
"""
Generates an alphabetically sorted List of all Job names in the DEFAULT job group
@return
"""
List<String> allJobNames = new ArrayList<String>();
try {
Set<String> allJobKeys = getScheduler().getJobKeys();
... | java | public static List<String> getAllJobNames() throws SundialSchedulerException {
List<String> allJobNames = new ArrayList<String>();
try {
Set<String> allJobKeys = getScheduler().getJobKeys();
for (String jobKey : allJobKeys) {
allJobNames.add(jobKey);
}
} catch (SchedulerEx... | [
"public",
"static",
"List",
"<",
"String",
">",
"getAllJobNames",
"(",
")",
"throws",
"SundialSchedulerException",
"{",
"List",
"<",
"String",
">",
"allJobNames",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"try",
"{",
"Set",
"<",
"String",... | Generates an alphabetically sorted List of all Job names in the DEFAULT job group
@return | [
"Generates",
"an",
"alphabetically",
"sorted",
"List",
"of",
"all",
"Job",
"names",
"in",
"the",
"DEFAULT",
"job",
"group"
] | train | https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/knowm/sundial/SundialJobScheduler.java#L504-L518 |
kotcrab/vis-ui | ui/src/main/java/com/kotcrab/vis/ui/widget/PopupMenu.java | PopupMenu.showMenu | public void showMenu (Stage stage, float x, float y) {
"""
Shows menu as given stage coordinates
@param stage stage instance that this menu is being added to
@param x stage x position
@param y stage y position
"""
setPosition(x, y - getHeight());
if (stage.getHeight() - getY() > stage.getHeight()) setY(... | java | public void showMenu (Stage stage, float x, float y) {
setPosition(x, y - getHeight());
if (stage.getHeight() - getY() > stage.getHeight()) setY(getY() + getHeight());
ActorUtils.keepWithinStage(stage, this);
stage.addActor(this);
} | [
"public",
"void",
"showMenu",
"(",
"Stage",
"stage",
",",
"float",
"x",
",",
"float",
"y",
")",
"{",
"setPosition",
"(",
"x",
",",
"y",
"-",
"getHeight",
"(",
")",
")",
";",
"if",
"(",
"stage",
".",
"getHeight",
"(",
")",
"-",
"getY",
"(",
")",
... | Shows menu as given stage coordinates
@param stage stage instance that this menu is being added to
@param x stage x position
@param y stage y position | [
"Shows",
"menu",
"as",
"given",
"stage",
"coordinates"
] | train | https://github.com/kotcrab/vis-ui/blob/3b68f82d94ae32bffa2a3399c63f432e0f4908e0/ui/src/main/java/com/kotcrab/vis/ui/widget/PopupMenu.java#L289-L294 |
marklogic/java-client-api | marklogic-client-api/src/main/java/com/marklogic/client/util/RequestParameters.java | RequestParameters.put | public void put(String name, String... values) {
"""
Sets a parameter to a list of values.
@param name the parameter
@param values the list of values
"""
getMap().put(name, Arrays.asList(values));
} | java | public void put(String name, String... values) {
getMap().put(name, Arrays.asList(values));
} | [
"public",
"void",
"put",
"(",
"String",
"name",
",",
"String",
"...",
"values",
")",
"{",
"getMap",
"(",
")",
".",
"put",
"(",
"name",
",",
"Arrays",
".",
"asList",
"(",
"values",
")",
")",
";",
"}"
] | Sets a parameter to a list of values.
@param name the parameter
@param values the list of values | [
"Sets",
"a",
"parameter",
"to",
"a",
"list",
"of",
"values",
"."
] | train | https://github.com/marklogic/java-client-api/blob/acf60229a928abd4a8cc4b21b641d56957467da7/marklogic-client-api/src/main/java/com/marklogic/client/util/RequestParameters.java#L58-L60 |
Red5/red5-io | src/main/java/org/red5/io/mp4/impl/MP4Reader.java | MP4Reader.processVideoBox | private void processVideoBox(SampleTableBox stbl, long scale) {
"""
Process the video information contained in the atoms.
@param stbl
@param scale
timescale
"""
AvcConfigurationBox avcC = (AvcConfigurationBox) Path.getPath(isoFile, "/moov/trak/mdia/minf/stbl/stsd/drmi/avcC");
if (avcC != n... | java | private void processVideoBox(SampleTableBox stbl, long scale) {
AvcConfigurationBox avcC = (AvcConfigurationBox) Path.getPath(isoFile, "/moov/trak/mdia/minf/stbl/stsd/drmi/avcC");
if (avcC != null) {
long videoConfigContentSize = avcC.getContentSize();
log.debug("AVCC size: {}", ... | [
"private",
"void",
"processVideoBox",
"(",
"SampleTableBox",
"stbl",
",",
"long",
"scale",
")",
"{",
"AvcConfigurationBox",
"avcC",
"=",
"(",
"AvcConfigurationBox",
")",
"Path",
".",
"getPath",
"(",
"isoFile",
",",
"\"/moov/trak/mdia/minf/stbl/stsd/drmi/avcC\"",
")",
... | Process the video information contained in the atoms.
@param stbl
@param scale
timescale | [
"Process",
"the",
"video",
"information",
"contained",
"in",
"the",
"atoms",
"."
] | train | https://github.com/Red5/red5-io/blob/9bbbc506423c5a8f18169d46d400df56c0072a33/src/main/java/org/red5/io/mp4/impl/MP4Reader.java#L601-L615 |
datacleaner/AnalyzerBeans | core/src/main/java/org/eobjects/analyzer/result/AnnotatedRowsResult.java | AnnotatedRowsResult.toDistinctValuesTableModel | public TableModel toDistinctValuesTableModel(InputColumn<?> inputColumnOfInterest) {
"""
Creates a table model containing only distinct values from a particular
input column, and the counts of those distinct values. Note that the
counts may only be the count from the data that is available in the
annotation row... | java | public TableModel toDistinctValuesTableModel(InputColumn<?> inputColumnOfInterest) {
final Map<Object, Integer> valueCounts;
final RowAnnotationFactory annotationFactory = _annotationFactoryRef.get();
if (annotationFactory == null) {
valueCounts = Collections.emptyMap();
} el... | [
"public",
"TableModel",
"toDistinctValuesTableModel",
"(",
"InputColumn",
"<",
"?",
">",
"inputColumnOfInterest",
")",
"{",
"final",
"Map",
"<",
"Object",
",",
"Integer",
">",
"valueCounts",
";",
"final",
"RowAnnotationFactory",
"annotationFactory",
"=",
"_annotationF... | Creates a table model containing only distinct values from a particular
input column, and the counts of those distinct values. Note that the
counts may only be the count from the data that is available in the
annotation row storage, which may just be a preview/subset of the actual
data.
@param inputColumnOfInterest
@r... | [
"Creates",
"a",
"table",
"model",
"containing",
"only",
"distinct",
"values",
"from",
"a",
"particular",
"input",
"column",
"and",
"the",
"counts",
"of",
"those",
"distinct",
"values",
".",
"Note",
"that",
"the",
"counts",
"may",
"only",
"be",
"the",
"count"... | train | https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/result/AnnotatedRowsResult.java#L106-L139 |
ngageoint/geopackage-core-java | src/main/java/mil/nga/geopackage/db/GeoPackageCoreConnection.java | GeoPackageCoreConnection.querySingleResult | public Object querySingleResult(String sql, String[] args, int column) {
"""
Query the SQL for a single result object
@param sql
sql statement
@param args
arguments
@param column
column index
@return result, null if no result
@since 3.1.0
"""
return querySingleResult(sql, args, column, null);
} | java | public Object querySingleResult(String sql, String[] args, int column) {
return querySingleResult(sql, args, column, null);
} | [
"public",
"Object",
"querySingleResult",
"(",
"String",
"sql",
",",
"String",
"[",
"]",
"args",
",",
"int",
"column",
")",
"{",
"return",
"querySingleResult",
"(",
"sql",
",",
"args",
",",
"column",
",",
"null",
")",
";",
"}"
] | Query the SQL for a single result object
@param sql
sql statement
@param args
arguments
@param column
column index
@return result, null if no result
@since 3.1.0 | [
"Query",
"the",
"SQL",
"for",
"a",
"single",
"result",
"object"
] | train | https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/db/GeoPackageCoreConnection.java#L248-L250 |
rey5137/material | material/src/main/java/com/rey/material/widget/EditText.java | EditText.performFiltering | protected void performFiltering(CharSequence text, int start, int end, int keyCode) {
"""
<p>Starts filtering the content of the drop down list. The filtering
pattern is the specified range of text from the edit box. Subclasses may
override this method to filter with a different pattern, for
instance a smaller ... | java | protected void performFiltering(CharSequence text, int start, int end, int keyCode) {
if(mAutoCompleteMode == AUTOCOMPLETE_MODE_MULTI)
((InternalMultiAutoCompleteTextView)mInputView).superPerformFiltering(text, start, end, keyCode);
} | [
"protected",
"void",
"performFiltering",
"(",
"CharSequence",
"text",
",",
"int",
"start",
",",
"int",
"end",
",",
"int",
"keyCode",
")",
"{",
"if",
"(",
"mAutoCompleteMode",
"==",
"AUTOCOMPLETE_MODE_MULTI",
")",
"(",
"(",
"InternalMultiAutoCompleteTextView",
")",... | <p>Starts filtering the content of the drop down list. The filtering
pattern is the specified range of text from the edit box. Subclasses may
override this method to filter with a different pattern, for
instance a smaller substring of <code>text</code>.</p> | [
"<p",
">",
"Starts",
"filtering",
"the",
"content",
"of",
"the",
"drop",
"down",
"list",
".",
"The",
"filtering",
"pattern",
"is",
"the",
"specified",
"range",
"of",
"text",
"from",
"the",
"edit",
"box",
".",
"Subclasses",
"may",
"override",
"this",
"metho... | train | https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/widget/EditText.java#L790-L793 |
google/error-prone-javac | src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocPath.java | DocPath.forName | public static DocPath forName(Utils utils, TypeElement typeElement) {
"""
Return the path for the simple name of the class.
For example, if the class is java.lang.Object,
the path is Object.html.
"""
return (typeElement == null) ? empty : new DocPath(utils.getSimpleName(typeElement) + ".html");
} | java | public static DocPath forName(Utils utils, TypeElement typeElement) {
return (typeElement == null) ? empty : new DocPath(utils.getSimpleName(typeElement) + ".html");
} | [
"public",
"static",
"DocPath",
"forName",
"(",
"Utils",
"utils",
",",
"TypeElement",
"typeElement",
")",
"{",
"return",
"(",
"typeElement",
"==",
"null",
")",
"?",
"empty",
":",
"new",
"DocPath",
"(",
"utils",
".",
"getSimpleName",
"(",
"typeElement",
")",
... | Return the path for the simple name of the class.
For example, if the class is java.lang.Object,
the path is Object.html. | [
"Return",
"the",
"path",
"for",
"the",
"simple",
"name",
"of",
"the",
"class",
".",
"For",
"example",
"if",
"the",
"class",
"is",
"java",
".",
"lang",
".",
"Object",
"the",
"path",
"is",
"Object",
".",
"html",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocPath.java#L72-L74 |
cdk/cdk | misc/extra/src/main/java/org/openscience/cdk/geometry/AtomTools.java | AtomTools.calculate3DCoordinates0 | public static Point3d[] calculate3DCoordinates0(Point3d aPoint, int nwanted, double length) {
"""
Calculates substituent points.
Calculate substituent points for
(0) zero ligands of aPoint. The resultant points are randomly oriented:
(i) 1 points required; +x,0,0
(ii) 2 points: use +x,0,0 and -x,0,0
(iii) 3 ... | java | public static Point3d[] calculate3DCoordinates0(Point3d aPoint, int nwanted, double length) {
Point3d[] points;
if (nwanted == 1) {
points = new Point3d[1];
points[0] = new Point3d(aPoint);
points[0].add(new Vector3d(length, 0.0, 0.0));
} else if (nwanted == 2... | [
"public",
"static",
"Point3d",
"[",
"]",
"calculate3DCoordinates0",
"(",
"Point3d",
"aPoint",
",",
"int",
"nwanted",
",",
"double",
"length",
")",
"{",
"Point3d",
"[",
"]",
"points",
";",
"if",
"(",
"nwanted",
"==",
"1",
")",
"{",
"points",
"=",
"new",
... | Calculates substituent points.
Calculate substituent points for
(0) zero ligands of aPoint. The resultant points are randomly oriented:
(i) 1 points required; +x,0,0
(ii) 2 points: use +x,0,0 and -x,0,0
(iii) 3 points: equilateral triangle in xy plane
(iv) 4 points x,x,x, x,-x,-x, -x,x,-x, -x,-x,x where 3x**2 = bond l... | [
"Calculates",
"substituent",
"points",
".",
"Calculate",
"substituent",
"points",
"for",
"(",
"0",
")",
"zero",
"ligands",
"of",
"aPoint",
".",
"The",
"resultant",
"points",
"are",
"randomly",
"oriented",
":",
"(",
"i",
")",
"1",
"points",
"required",
";",
... | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/geometry/AtomTools.java#L244-L278 |
deeplearning4j/deeplearning4j | nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/BaseNDArrayFactory.java | BaseNDArrayFactory.randn | @Override
public INDArray randn(long rows, long columns, org.nd4j.linalg.api.rng.Random r) {
"""
Random normal using the given rng
@param rows the number of rows in the matrix
@param columns the number of columns in the matrix
@param r the random generator to use
@return
"""
return r... | java | @Override
public INDArray randn(long rows, long columns, org.nd4j.linalg.api.rng.Random r) {
return randn(new long[] {rows, columns}, r);
} | [
"@",
"Override",
"public",
"INDArray",
"randn",
"(",
"long",
"rows",
",",
"long",
"columns",
",",
"org",
".",
"nd4j",
".",
"linalg",
".",
"api",
".",
"rng",
".",
"Random",
"r",
")",
"{",
"return",
"randn",
"(",
"new",
"long",
"[",
"]",
"{",
"rows",... | Random normal using the given rng
@param rows the number of rows in the matrix
@param columns the number of columns in the matrix
@param r the random generator to use
@return | [
"Random",
"normal",
"using",
"the",
"given",
"rng"
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/BaseNDArrayFactory.java#L498-L501 |
GerdHolz/TOVAL | src/de/invation/code/toval/os/WindowsRegistry.java | WindowsRegistry.writeValue | public static void writeValue(String keyName, String valueName, String value) throws RegistryException {
"""
Writes a string value with a given key and value name.
@param keyName Name of the key to write the value in.
@param valueName Name of the value.
@param value Content of the value.
@throws RegistryExce... | java | public static void writeValue(String keyName, String valueName, String value) throws RegistryException {
try (Key key = Key.open(keyName, KEY_WRITE)) {
checkError(invoke(Methods.REG_SET_VALUE_EX.get(), key.id, toByteArray(valueName), toByteArray(value)));
}
} | [
"public",
"static",
"void",
"writeValue",
"(",
"String",
"keyName",
",",
"String",
"valueName",
",",
"String",
"value",
")",
"throws",
"RegistryException",
"{",
"try",
"(",
"Key",
"key",
"=",
"Key",
".",
"open",
"(",
"keyName",
",",
"KEY_WRITE",
")",
")",
... | Writes a string value with a given key and value name.
@param keyName Name of the key to write the value in.
@param valueName Name of the value.
@param value Content of the value.
@throws RegistryException | [
"Writes",
"a",
"string",
"value",
"with",
"a",
"given",
"key",
"and",
"value",
"name",
"."
] | train | https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/os/WindowsRegistry.java#L299-L303 |
konvergeio/cofoja | src/main/java/com/google/java/contract/core/agent/SpecificationMethodAdapter.java | SpecificationMethodAdapter.injectContractMethod | @Requires("handle != null")
@Ensures("result != null")
protected MethodNode injectContractMethod(ContractHandle handle) {
"""
Injects the specified contract method code into the current
class, and returns a new Method object representing the injected
method. This is done by bypassing the SpecificationClassAd... | java | @Requires("handle != null")
@Ensures("result != null")
protected MethodNode injectContractMethod(ContractHandle handle) {
MethodNode methodNode = handle.getContractMethod();
if (!handle.isInjected()) {
DebugUtils.info("instrument", "contract method "
+ className + "." + methodNo... | [
"@",
"Requires",
"(",
"\"handle != null\"",
")",
"@",
"Ensures",
"(",
"\"result != null\"",
")",
"protected",
"MethodNode",
"injectContractMethod",
"(",
"ContractHandle",
"handle",
")",
"{",
"MethodNode",
"methodNode",
"=",
"handle",
".",
"getContractMethod",
"(",
"... | Injects the specified contract method code into the current
class, and returns a new Method object representing the injected
method. This is done by bypassing the SpecificationClassAdapter
and talking directly to its parent (usually, a class writer).
@param handle the handle from the code pool that holds code and
meta... | [
"Injects",
"the",
"specified",
"contract",
"method",
"code",
"into",
"the",
"current",
"class",
"and",
"returns",
"a",
"new",
"Method",
"object",
"representing",
"the",
"injected",
"method",
".",
"This",
"is",
"done",
"by",
"bypassing",
"the",
"SpecificationClas... | train | https://github.com/konvergeio/cofoja/blob/6ded58fa05eb5bf85f16353c8dd4c70bee59121a/src/main/java/com/google/java/contract/core/agent/SpecificationMethodAdapter.java#L520-L539 |
googleads/googleads-java-lib | examples/admanager_axis/src/main/java/admanager/axis/v201808/contentmetadatakeyhierarchyservice/GetAllContentMetadataKeyHierarchies.java | GetAllContentMetadataKeyHierarchies.runExample | public static void runExample(AdManagerServices adManagerServices, AdManagerSession session)
throws RemoteException {
"""
Runs the example.
@param adManagerServices the services factory.
@param session the session.
@throws ApiException if the API request failed with one or more service errors.
@throws ... | java | public static void runExample(AdManagerServices adManagerServices, AdManagerSession session)
throws RemoteException {
// Get the ContentMetadataKeyHierarchy service.
ContentMetadataKeyHierarchyServiceInterface contentMetadataKeyHierarchyService =
adManagerServices.get(session, ContentMetadataKeyHi... | [
"public",
"static",
"void",
"runExample",
"(",
"AdManagerServices",
"adManagerServices",
",",
"AdManagerSession",
"session",
")",
"throws",
"RemoteException",
"{",
"// Get the ContentMetadataKeyHierarchy service.",
"ContentMetadataKeyHierarchyServiceInterface",
"contentMetadataKeyHie... | Runs the example.
@param adManagerServices the services factory.
@param session the session.
@throws ApiException if the API request failed with one or more service errors.
@throws RemoteException if the API request failed due to other errors. | [
"Runs",
"the",
"example",
"."
] | train | https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/admanager_axis/src/main/java/admanager/axis/v201808/contentmetadatakeyhierarchyservice/GetAllContentMetadataKeyHierarchies.java#L52-L84 |
rpau/javalang-compiler | src/main/java/org/walkmod/javalang/compiler/symbols/SymbolType.java | SymbolType.typeVariableOf | public static SymbolType typeVariableOf(final String typeVariable, final Class<Object> clazz) {
"""
Builds a symbol for a type variable from a Java class.
@param typeVariable the name of the variable
@param clazz the (upper bound) type of the variable
@return a SymbolType that represents a variable (for generic... | java | public static SymbolType typeVariableOf(final String typeVariable, final Class<Object> clazz) {
return new SymbolType(clazz, typeVariable);
} | [
"public",
"static",
"SymbolType",
"typeVariableOf",
"(",
"final",
"String",
"typeVariable",
",",
"final",
"Class",
"<",
"Object",
">",
"clazz",
")",
"{",
"return",
"new",
"SymbolType",
"(",
"clazz",
",",
"typeVariable",
")",
";",
"}"
] | Builds a symbol for a type variable from a Java class.
@param typeVariable the name of the variable
@param clazz the (upper bound) type of the variable
@return a SymbolType that represents a variable (for generics) | [
"Builds",
"a",
"symbol",
"for",
"a",
"type",
"variable",
"from",
"a",
"Java",
"class",
"."
] | train | https://github.com/rpau/javalang-compiler/blob/d7da81359161feef2bc7ff186c4e1b73c6a5a8ef/src/main/java/org/walkmod/javalang/compiler/symbols/SymbolType.java#L794-L796 |
drallgood/jpasskit | jpasskit/src/main/java/de/brendamour/jpasskit/util/CertUtils.java | CertUtils.toKeyStore | public static KeyStore toKeyStore(InputStream keyStoreInputStream, char [] keyStorePassword) throws CertificateException {
"""
Load a keystore from an already opened {@link InputStream}.
The caller is responsible for closing the stream after this method completes successfully or fails.
@param keyStoreInputStre... | java | public static KeyStore toKeyStore(InputStream keyStoreInputStream, char [] keyStorePassword) throws CertificateException {
Assert.notNull(keyStoreInputStream, "InputStream of key store is mandatory");
Assert.notNull(keyStorePassword, "Password for key store is mandatory");
try {
KeyS... | [
"public",
"static",
"KeyStore",
"toKeyStore",
"(",
"InputStream",
"keyStoreInputStream",
",",
"char",
"[",
"]",
"keyStorePassword",
")",
"throws",
"CertificateException",
"{",
"Assert",
".",
"notNull",
"(",
"keyStoreInputStream",
",",
"\"InputStream of key store is mandat... | Load a keystore from an already opened {@link InputStream}.
The caller is responsible for closing the stream after this method completes successfully or fails.
@param keyStoreInputStream {@link InputStream} containing the signing key store.
@param keyStorePassword password to access the key store.
@return {@link KeySt... | [
"Load",
"a",
"keystore",
"from",
"an",
"already",
"opened",
"{",
"@link",
"InputStream",
"}",
".",
"The",
"caller",
"is",
"responsible",
"for",
"closing",
"the",
"stream",
"after",
"this",
"method",
"completes",
"successfully",
"or",
"fails",
"."
] | train | https://github.com/drallgood/jpasskit/blob/63bfa8abbdb85c2d7596c60eed41ed8e374cbd01/jpasskit/src/main/java/de/brendamour/jpasskit/util/CertUtils.java#L94-L104 |
TheHortonMachine/hortonmachine | gears/src/main/java/org/hortonmachine/gears/io/grasslegacy/io/GrassRasterReader.java | GrassRasterReader.readCompressedFPRowByNumber | private void readCompressedFPRowByNumber( ByteBuffer rowdata, int rn, long[] adrows, RandomAccessFile thefile, int typeBytes )
throws DataFormatException, IOException {
"""
read a row of data from a compressed floating point map
@param rn
@param adrows
@param outFile
@param typeBytes
@return the... | java | private void readCompressedFPRowByNumber( ByteBuffer rowdata, int rn, long[] adrows, RandomAccessFile thefile, int typeBytes )
throws DataFormatException, IOException {
int offset = (int) (adrows[rn + 1] - adrows[rn]);
/*
* The fact that the file is compressed does not mean that the... | [
"private",
"void",
"readCompressedFPRowByNumber",
"(",
"ByteBuffer",
"rowdata",
",",
"int",
"rn",
",",
"long",
"[",
"]",
"adrows",
",",
"RandomAccessFile",
"thefile",
",",
"int",
"typeBytes",
")",
"throws",
"DataFormatException",
",",
"IOException",
"{",
"int",
... | read a row of data from a compressed floating point map
@param rn
@param adrows
@param outFile
@param typeBytes
@return the ByteBuffer containing the data
@throws IOException
@throws DataFormatException | [
"read",
"a",
"row",
"of",
"data",
"from",
"a",
"compressed",
"floating",
"point",
"map"
] | train | https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/grasslegacy/io/GrassRasterReader.java#L1064-L1092 |
Impetus/Kundera | src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/EntityManagerSession.java | EntityManagerSession.lookup | @SuppressWarnings("unchecked")
protected <T> T lookup(Class<T> entityClass, Object id) {
"""
Find in cache.
@param <T>
the generic type
@param entityClass
the entity class
@param id
the id
@return the t
"""
String key = cacheKey(entityClass, id);
LOG.debug("Reading from L1 >> " ... | java | @SuppressWarnings("unchecked")
protected <T> T lookup(Class<T> entityClass, Object id)
{
String key = cacheKey(entityClass, id);
LOG.debug("Reading from L1 >> " + key);
T o = (T) sessionCache.get(key);
// go to second-level cache
if (o == null)
{
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"<",
"T",
">",
"T",
"lookup",
"(",
"Class",
"<",
"T",
">",
"entityClass",
",",
"Object",
"id",
")",
"{",
"String",
"key",
"=",
"cacheKey",
"(",
"entityClass",
",",
"id",
")",
";",
"LOG",
... | Find in cache.
@param <T>
the generic type
@param entityClass
the entity class
@param id
the id
@return the t | [
"Find",
"in",
"cache",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/EntityManagerSession.java#L64-L86 |
prestodb/presto | presto-main/src/main/java/com/facebook/presto/sql/planner/ExpressionDomainTranslator.java | ExpressionDomainTranslator.fromPredicate | public static ExtractionResult fromPredicate(
Metadata metadata,
Session session,
Expression predicate,
TypeProvider types) {
"""
Convert an Expression predicate into an ExtractionResult consisting of:
1) A successfully extracted TupleDomain
2) An Expression fragme... | java | public static ExtractionResult fromPredicate(
Metadata metadata,
Session session,
Expression predicate,
TypeProvider types)
{
return new Visitor(metadata, session, types).process(predicate, false);
} | [
"public",
"static",
"ExtractionResult",
"fromPredicate",
"(",
"Metadata",
"metadata",
",",
"Session",
"session",
",",
"Expression",
"predicate",
",",
"TypeProvider",
"types",
")",
"{",
"return",
"new",
"Visitor",
"(",
"metadata",
",",
"session",
",",
"types",
")... | Convert an Expression predicate into an ExtractionResult consisting of:
1) A successfully extracted TupleDomain
2) An Expression fragment which represents the part of the original Expression that will need to be re-evaluated
after filtering with the TupleDomain. | [
"Convert",
"an",
"Expression",
"predicate",
"into",
"an",
"ExtractionResult",
"consisting",
"of",
":",
"1",
")",
"A",
"successfully",
"extracted",
"TupleDomain",
"2",
")",
"An",
"Expression",
"fragment",
"which",
"represents",
"the",
"part",
"of",
"the",
"origin... | train | https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-main/src/main/java/com/facebook/presto/sql/planner/ExpressionDomainTranslator.java#L277-L284 |
UrielCh/ovh-java-sdk | ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java | ApiOvhDedicatedserver.serviceName_secondaryDnsNameDomainToken_GET | public OvhSecondaryDNSCheckField serviceName_secondaryDnsNameDomainToken_GET(String serviceName, String domain) throws IOException {
"""
DNS field to temporarily add to your zone so that we can verify you are the owner of this domain
REST: GET /dedicated/server/{serviceName}/secondaryDnsNameDomainToken
@param ... | java | public OvhSecondaryDNSCheckField serviceName_secondaryDnsNameDomainToken_GET(String serviceName, String domain) throws IOException {
String qPath = "/dedicated/server/{serviceName}/secondaryDnsNameDomainToken";
StringBuilder sb = path(qPath, serviceName);
query(sb, "domain", domain);
String resp = exec(qPath, "... | [
"public",
"OvhSecondaryDNSCheckField",
"serviceName_secondaryDnsNameDomainToken_GET",
"(",
"String",
"serviceName",
",",
"String",
"domain",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/dedicated/server/{serviceName}/secondaryDnsNameDomainToken\"",
";",
"StringB... | DNS field to temporarily add to your zone so that we can verify you are the owner of this domain
REST: GET /dedicated/server/{serviceName}/secondaryDnsNameDomainToken
@param domain [required] The domain to check
@param serviceName [required] The internal name of your dedicated server | [
"DNS",
"field",
"to",
"temporarily",
"add",
"to",
"your",
"zone",
"so",
"that",
"we",
"can",
"verify",
"you",
"are",
"the",
"owner",
"of",
"this",
"domain"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L1843-L1849 |
khuxtable/seaglass | src/main/java/com/seaglasslookandfeel/painter/FrameAndRootPainter.java | FrameAndRootPainter.getFrameInteriorPaint | public Paint getFrameInteriorPaint(Shape s, int titleHeight, int topToolBarHeight, int bottomToolBarHeight) {
"""
Get the paint for the frame interior.
@param s the frame interior shape.
@param titleHeight the height of the title portion.
@param topToolBarHeight the height of t... | java | public Paint getFrameInteriorPaint(Shape s, int titleHeight, int topToolBarHeight, int bottomToolBarHeight) {
return createFrameGradient(s, titleHeight, topToolBarHeight, bottomToolBarHeight, getFrameInteriorColors());
} | [
"public",
"Paint",
"getFrameInteriorPaint",
"(",
"Shape",
"s",
",",
"int",
"titleHeight",
",",
"int",
"topToolBarHeight",
",",
"int",
"bottomToolBarHeight",
")",
"{",
"return",
"createFrameGradient",
"(",
"s",
",",
"titleHeight",
",",
"topToolBarHeight",
",",
"bot... | Get the paint for the frame interior.
@param s the frame interior shape.
@param titleHeight the height of the title portion.
@param topToolBarHeight the height of the top toolbar, or 0 if none.
@param bottomToolBarHeight the height of the bottom toolbar, or 0 if
none.
@return the pain... | [
"Get",
"the",
"paint",
"for",
"the",
"frame",
"interior",
"."
] | train | https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/FrameAndRootPainter.java#L234-L236 |
artikcloud/artikcloud-java | src/main/java/cloud/artik/api/DeviceTypesApi.java | DeviceTypesApi.getDeviceTypesAsync | public com.squareup.okhttp.Call getDeviceTypesAsync(String name, Integer offset, Integer count, String tags, final ApiCallback<DeviceTypesEnvelope> callback) throws ApiException {
"""
Get Device Types (asynchronously)
Retrieves Device Types
@param name Device Type name (required)
@param offset Offset for pagina... | java | public com.squareup.okhttp.Call getDeviceTypesAsync(String name, Integer offset, Integer count, String tags, final ApiCallback<DeviceTypesEnvelope> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestL... | [
"public",
"com",
".",
"squareup",
".",
"okhttp",
".",
"Call",
"getDeviceTypesAsync",
"(",
"String",
"name",
",",
"Integer",
"offset",
",",
"Integer",
"count",
",",
"String",
"tags",
",",
"final",
"ApiCallback",
"<",
"DeviceTypesEnvelope",
">",
"callback",
")",... | Get Device Types (asynchronously)
Retrieves Device Types
@param name Device Type name (required)
@param offset Offset for pagination. (optional)
@param count Desired count of items in the result set (optional)
@param tags Elements tagged with the list of tags. (comma separated) (optional)
@param callback The callback t... | [
"Get",
"Device",
"Types",
"(",
"asynchronously",
")",
"Retrieves",
"Device",
"Types"
] | train | https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DeviceTypesApi.java#L407-L432 |
Omertron/api-themoviedb | src/main/java/com/omertron/themoviedbapi/methods/TmdbSearch.java | TmdbSearch.searchTV | public ResultList<TVBasic> searchTV(String query, Integer page, String language, Integer firstAirDateYear, SearchType searchType) throws MovieDbException {
"""
Search for TV shows by title.
@param query
@param page
@param language
@param firstAirDateYear
@param searchType
@return
@throws com.omertron.them... | java | public ResultList<TVBasic> searchTV(String query, Integer page, String language, Integer firstAirDateYear, SearchType searchType) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.QUERY, query);
parameters.add(Param.PAGE, page);
parameters.a... | [
"public",
"ResultList",
"<",
"TVBasic",
">",
"searchTV",
"(",
"String",
"query",
",",
"Integer",
"page",
",",
"String",
"language",
",",
"Integer",
"firstAirDateYear",
",",
"SearchType",
"searchType",
")",
"throws",
"MovieDbException",
"{",
"TmdbParameters",
"para... | Search for TV shows by title.
@param query
@param page
@param language
@param firstAirDateYear
@param searchType
@return
@throws com.omertron.themoviedbapi.MovieDbException | [
"Search",
"for",
"TV",
"shows",
"by",
"title",
"."
] | train | https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbSearch.java#L230-L242 |
cdk/cdk | legacy/src/main/java/org/openscience/cdk/iupac/parser/MoleculeBuilder.java | MoleculeBuilder.addAtom | private void addAtom(String newAtomType, IAtom otherConnectingAtom, Order bondOrder, int hydrogenCount) {
"""
Adds an atom to the current molecule.
@param newAtomType The atomic symbol for the atom.
@param otherConnectingAtom An atom already in the molecule which
the new one should connect to.
@param bondOrd... | java | private void addAtom(String newAtomType, IAtom otherConnectingAtom, Order bondOrder, int hydrogenCount) {
//Create the new atom and bond.
IAtom newAtom = currentMolecule.getBuilder().newInstance(IAtom.class, newAtomType);
newAtom.setImplicitHydrogenCount(hydrogenCount);
IBond newBond = c... | [
"private",
"void",
"addAtom",
"(",
"String",
"newAtomType",
",",
"IAtom",
"otherConnectingAtom",
",",
"Order",
"bondOrder",
",",
"int",
"hydrogenCount",
")",
"{",
"//Create the new atom and bond.",
"IAtom",
"newAtom",
"=",
"currentMolecule",
".",
"getBuilder",
"(",
... | Adds an atom to the current molecule.
@param newAtomType The atomic symbol for the atom.
@param otherConnectingAtom An atom already in the molecule which
the new one should connect to.
@param bondOrder The order of the bond to use to join the two atoms.
@param hydrogenCount The number of hydrogen atoms connected to th... | [
"Adds",
"an",
"atom",
"to",
"the",
"current",
"molecule",
"."
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/iupac/parser/MoleculeBuilder.java#L378-L387 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.