repository_name stringlengths 7 58 | func_path_in_repository stringlengths 18 188 | func_name stringlengths 7 127 | whole_func_string stringlengths 77 3.91k | language stringclasses 1
value | func_code_string stringlengths 77 3.91k | func_code_tokens listlengths 20 745 | func_documentation_string stringlengths 61 1.98k | func_documentation_tokens listlengths 1 477 | split_name stringclasses 1
value | func_code_url stringlengths 111 288 |
|---|---|---|---|---|---|---|---|---|---|---|
google/closure-compiler | src/com/google/javascript/refactoring/ApplySuggestedFixes.java | ApplySuggestedFixes.applyCodeReplacements | public static String applyCodeReplacements(Iterable<CodeReplacement> replacements, String code) {
List<CodeReplacement> sortedReplacements = ORDER_CODE_REPLACEMENTS.sortedCopy(replacements);
validateNoOverlaps(sortedReplacements);
StringBuilder sb = new StringBuilder();
int lastIndex = 0;
for (Code... | java | public static String applyCodeReplacements(Iterable<CodeReplacement> replacements, String code) {
List<CodeReplacement> sortedReplacements = ORDER_CODE_REPLACEMENTS.sortedCopy(replacements);
validateNoOverlaps(sortedReplacements);
StringBuilder sb = new StringBuilder();
int lastIndex = 0;
for (Code... | [
"public",
"static",
"String",
"applyCodeReplacements",
"(",
"Iterable",
"<",
"CodeReplacement",
">",
"replacements",
",",
"String",
"code",
")",
"{",
"List",
"<",
"CodeReplacement",
">",
"sortedReplacements",
"=",
"ORDER_CODE_REPLACEMENTS",
".",
"sortedCopy",
"(",
"... | Applies the provided set of code replacements to the code and returns the transformed code.
The code replacements may not have any overlap. | [
"Applies",
"the",
"provided",
"set",
"of",
"code",
"replacements",
"to",
"the",
"code",
"and",
"returns",
"the",
"transformed",
"code",
".",
"The",
"code",
"replacements",
"may",
"not",
"have",
"any",
"overlap",
"."
] | train | https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/refactoring/ApplySuggestedFixes.java#L146-L161 |
DataSketches/sketches-core | src/main/java/com/yahoo/sketches/ByteArrayUtil.java | ByteArrayUtil.putLongBE | public static void putLongBE(final byte[] array, final int offset, final long value) {
array[offset + 7] = (byte) (value );
array[offset + 6] = (byte) (value >>> 8);
array[offset + 5] = (byte) (value >>> 16);
array[offset + 4] = (byte) (value >>> 24);
array[offset + 3] = (byte) (value >>> 32)... | java | public static void putLongBE(final byte[] array, final int offset, final long value) {
array[offset + 7] = (byte) (value );
array[offset + 6] = (byte) (value >>> 8);
array[offset + 5] = (byte) (value >>> 16);
array[offset + 4] = (byte) (value >>> 24);
array[offset + 3] = (byte) (value >>> 32)... | [
"public",
"static",
"void",
"putLongBE",
"(",
"final",
"byte",
"[",
"]",
"array",
",",
"final",
"int",
"offset",
",",
"final",
"long",
"value",
")",
"{",
"array",
"[",
"offset",
"+",
"7",
"]",
"=",
"(",
"byte",
")",
"(",
"value",
")",
";",
"array",... | Put the source <i>long</i> into the destination byte array starting at the given offset
in big endian order.
There is no bounds checking.
@param array destination byte array
@param offset destination starting point
@param value source <i>long</i> | [
"Put",
"the",
"source",
"<i",
">",
"long<",
"/",
"i",
">",
"into",
"the",
"destination",
"byte",
"array",
"starting",
"at",
"the",
"given",
"offset",
"in",
"big",
"endian",
"order",
".",
"There",
"is",
"no",
"bounds",
"checking",
"."
] | train | https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/ByteArrayUtil.java#L182-L191 |
OpenLiberty/open-liberty | dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLAlpnNegotiator.java | SSLAlpnNegotiator.tryToRegisterAlpnNegotiator | protected ThirdPartyAlpnNegotiator tryToRegisterAlpnNegotiator(SSLEngine engine, SSLConnectionLink link, boolean useAlpn) {
if (isNativeAlpnActive()) {
if (useAlpn) {
registerNativeAlpn(engine);
}
} else if (isIbmAlpnActive()) {
registerIbmAlpn(engine,... | java | protected ThirdPartyAlpnNegotiator tryToRegisterAlpnNegotiator(SSLEngine engine, SSLConnectionLink link, boolean useAlpn) {
if (isNativeAlpnActive()) {
if (useAlpn) {
registerNativeAlpn(engine);
}
} else if (isIbmAlpnActive()) {
registerIbmAlpn(engine,... | [
"protected",
"ThirdPartyAlpnNegotiator",
"tryToRegisterAlpnNegotiator",
"(",
"SSLEngine",
"engine",
",",
"SSLConnectionLink",
"link",
",",
"boolean",
"useAlpn",
")",
"{",
"if",
"(",
"isNativeAlpnActive",
"(",
")",
")",
"{",
"if",
"(",
"useAlpn",
")",
"{",
"registe... | Check for the Java 9 ALPN API, IBM's ALPNJSSEExt, jetty-alpn, and grizzly-npn; if any are present, set up the connection for ALPN.
Order of preference is Java 9 ALPN API, IBM's ALPNJSSEExt, jetty-alpn, then grizzly-npn.
@param SSLEngine
@param SSLConnectionLink
@param useAlpn true if alpn should be used
@return ThirdP... | [
"Check",
"for",
"the",
"Java",
"9",
"ALPN",
"API",
"IBM",
"s",
"ALPNJSSEExt",
"jetty",
"-",
"alpn",
"and",
"grizzly",
"-",
"npn",
";",
"if",
"any",
"are",
"present",
"set",
"up",
"the",
"connection",
"for",
"ALPN",
".",
"Order",
"of",
"preference",
"is... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLAlpnNegotiator.java#L202-L215 |
datastax/java-driver | core/src/main/java/com/datastax/oss/driver/internal/core/channel/DriverChannel.java | DriverChannel.setKeyspace | public Future<Void> setKeyspace(CqlIdentifier newKeyspace) {
Promise<Void> promise = channel.eventLoop().newPromise();
channel.pipeline().fireUserEventTriggered(new SetKeyspaceEvent(newKeyspace, promise));
return promise;
} | java | public Future<Void> setKeyspace(CqlIdentifier newKeyspace) {
Promise<Void> promise = channel.eventLoop().newPromise();
channel.pipeline().fireUserEventTriggered(new SetKeyspaceEvent(newKeyspace, promise));
return promise;
} | [
"public",
"Future",
"<",
"Void",
">",
"setKeyspace",
"(",
"CqlIdentifier",
"newKeyspace",
")",
"{",
"Promise",
"<",
"Void",
">",
"promise",
"=",
"channel",
".",
"eventLoop",
"(",
")",
".",
"newPromise",
"(",
")",
";",
"channel",
".",
"pipeline",
"(",
")"... | Switches the underlying Cassandra connection to a new keyspace (as if a {@code USE ...}
statement was issued).
<p>The future will complete once the change is effective. Only one change may run at a given
time, concurrent attempts will fail.
<p>Changing the keyspace is inherently thread-unsafe: if other queries are ru... | [
"Switches",
"the",
"underlying",
"Cassandra",
"connection",
"to",
"a",
"new",
"keyspace",
"(",
"as",
"if",
"a",
"{",
"@code",
"USE",
"...",
"}",
"statement",
"was",
"issued",
")",
"."
] | train | https://github.com/datastax/java-driver/blob/612a63f2525618e2020e86c9ad75ab37adba6132/core/src/main/java/com/datastax/oss/driver/internal/core/channel/DriverChannel.java#L109-L113 |
xcesco/kripton | kripton-core/src/main/java/com/abubusoft/kripton/common/DynamicByteBufferHelper.java | DynamicByteBufferHelper.insertDoubleInto | public static byte[] insertDoubleInto(byte[] array, int index, double value) {
byte[] holder = new byte[4];
doubleTo(holder, 0, value);
return insert(array, index, holder);
} | java | public static byte[] insertDoubleInto(byte[] array, int index, double value) {
byte[] holder = new byte[4];
doubleTo(holder, 0, value);
return insert(array, index, holder);
} | [
"public",
"static",
"byte",
"[",
"]",
"insertDoubleInto",
"(",
"byte",
"[",
"]",
"array",
",",
"int",
"index",
",",
"double",
"value",
")",
"{",
"byte",
"[",
"]",
"holder",
"=",
"new",
"byte",
"[",
"4",
"]",
";",
"doubleTo",
"(",
"holder",
",",
"0"... | Insert double into.
@param array the array
@param index the index
@param value the value
@return the byte[] | [
"Insert",
"double",
"into",
"."
] | train | https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/DynamicByteBufferHelper.java#L927-L932 |
jcuda/jcuda | JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java | JCudaDriver.cuGraphicsResourceGetMappedPointer | public static int cuGraphicsResourceGetMappedPointer( CUdeviceptr pDevPtr, long pSize[], CUgraphicsResource resource )
{
return checkResult(cuGraphicsResourceGetMappedPointerNative(pDevPtr, pSize, resource));
} | java | public static int cuGraphicsResourceGetMappedPointer( CUdeviceptr pDevPtr, long pSize[], CUgraphicsResource resource )
{
return checkResult(cuGraphicsResourceGetMappedPointerNative(pDevPtr, pSize, resource));
} | [
"public",
"static",
"int",
"cuGraphicsResourceGetMappedPointer",
"(",
"CUdeviceptr",
"pDevPtr",
",",
"long",
"pSize",
"[",
"]",
",",
"CUgraphicsResource",
"resource",
")",
"{",
"return",
"checkResult",
"(",
"cuGraphicsResourceGetMappedPointerNative",
"(",
"pDevPtr",
","... | Get a device pointer through which to access a mapped graphics resource.
<pre>
CUresult cuGraphicsResourceGetMappedPointer (
CUdeviceptr* pDevPtr,
size_t* pSize,
CUgraphicsResource resource )
</pre>
<div>
<p>Get a device pointer through which to
access a mapped graphics resource. Returns in <tt>*pDevPtr</tt> a
pointe... | [
"Get",
"a",
"device",
"pointer",
"through",
"which",
"to",
"access",
"a",
"mapped",
"graphics",
"resource",
"."
] | train | https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L15961-L15964 |
aws/aws-sdk-java | aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/StreamRecord.java | StreamRecord.withNewImage | public StreamRecord withNewImage(java.util.Map<String, AttributeValue> newImage) {
setNewImage(newImage);
return this;
} | java | public StreamRecord withNewImage(java.util.Map<String, AttributeValue> newImage) {
setNewImage(newImage);
return this;
} | [
"public",
"StreamRecord",
"withNewImage",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"AttributeValue",
">",
"newImage",
")",
"{",
"setNewImage",
"(",
"newImage",
")",
";",
"return",
"this",
";",
"}"
] | <p>
The item in the DynamoDB table as it appeared after it was modified.
</p>
@param newImage
The item in the DynamoDB table as it appeared after it was modified.
@return Returns a reference to this object so that method calls can be chained together. | [
"<p",
">",
"The",
"item",
"in",
"the",
"DynamoDB",
"table",
"as",
"it",
"appeared",
"after",
"it",
"was",
"modified",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/StreamRecord.java#L239-L242 |
b3log/latke | latke-core/src/main/java/org/b3log/latke/plugin/PluginManager.java | PluginManager.setPluginProps | private static void setPluginProps(final String pluginDirName, final AbstractPlugin plugin, final Properties props) throws Exception {
final String author = props.getProperty(Plugin.PLUGIN_AUTHOR);
final String name = props.getProperty(Plugin.PLUGIN_NAME);
final String version = props.getPropert... | java | private static void setPluginProps(final String pluginDirName, final AbstractPlugin plugin, final Properties props) throws Exception {
final String author = props.getProperty(Plugin.PLUGIN_AUTHOR);
final String name = props.getProperty(Plugin.PLUGIN_NAME);
final String version = props.getPropert... | [
"private",
"static",
"void",
"setPluginProps",
"(",
"final",
"String",
"pluginDirName",
",",
"final",
"AbstractPlugin",
"plugin",
",",
"final",
"Properties",
"props",
")",
"throws",
"Exception",
"{",
"final",
"String",
"author",
"=",
"props",
".",
"getProperty",
... | Sets the specified plugin's properties from the specified properties file under the specified plugin directory.
@param pluginDirName the specified plugin directory
@param plugin the specified plugin
@param props the specified properties file
@throws Exception exception | [
"Sets",
"the",
"specified",
"plugin",
"s",
"properties",
"from",
"the",
"specified",
"properties",
"file",
"under",
"the",
"specified",
"plugin",
"directory",
"."
] | train | https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/b3log/latke/plugin/PluginManager.java#L250-L282 |
google/error-prone | check_api/src/main/java/com/google/errorprone/matchers/Matchers.java | Matchers.isSame | public static <T extends Tree> Matcher<T> isSame(final Tree t) {
return new Matcher<T>() {
@Override
public boolean matches(T tree, VisitorState state) {
return tree == t;
}
};
} | java | public static <T extends Tree> Matcher<T> isSame(final Tree t) {
return new Matcher<T>() {
@Override
public boolean matches(T tree, VisitorState state) {
return tree == t;
}
};
} | [
"public",
"static",
"<",
"T",
"extends",
"Tree",
">",
"Matcher",
"<",
"T",
">",
"isSame",
"(",
"final",
"Tree",
"t",
")",
"{",
"return",
"new",
"Matcher",
"<",
"T",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"boolean",
"matches",
"(",
"T",
"tre... | Matches an AST node which is the same object reference as the given node. | [
"Matches",
"an",
"AST",
"node",
"which",
"is",
"the",
"same",
"object",
"reference",
"as",
"the",
"given",
"node",
"."
] | train | https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/matchers/Matchers.java#L191-L198 |
RogerParkinson/madura-objects-parent | madura-objects/src/main/java/nz/co/senanque/validationengine/ValidationSession.java | ValidationSession.addListener | public void addListener(ValidationObject object, String name, SetterListener listener) {
m_validationEngine.addListener(object, name, this, listener);
} | java | public void addListener(ValidationObject object, String name, SetterListener listener) {
m_validationEngine.addListener(object, name, this, listener);
} | [
"public",
"void",
"addListener",
"(",
"ValidationObject",
"object",
",",
"String",
"name",
",",
"SetterListener",
"listener",
")",
"{",
"m_validationEngine",
".",
"addListener",
"(",
"object",
",",
"name",
",",
"this",
",",
"listener",
")",
";",
"}"
] | Add a setter listener to a field.
@param object
@param name
@param listener | [
"Add",
"a",
"setter",
"listener",
"to",
"a",
"field",
"."
] | train | https://github.com/RogerParkinson/madura-objects-parent/blob/9b5385dd0437611f0ce8506f63646e018d06fb8e/madura-objects/src/main/java/nz/co/senanque/validationengine/ValidationSession.java#L115-L117 |
lotaris/rox-client-java | rox-client-java/src/main/java/com/lotaris/rox/common/config/Configuration.java | Configuration.getUid | public String getUid(String category, String projectName, String projectVersion, boolean force) {
String uid = null;
if (!force) {
uid = readUid(new File(uidDirectory, "latest"));
}
// Check if the UID was already used for the ROX client and projec/version
if (uid != null && uidAlreadyUsed(category,... | java | public String getUid(String category, String projectName, String projectVersion, boolean force) {
String uid = null;
if (!force) {
uid = readUid(new File(uidDirectory, "latest"));
}
// Check if the UID was already used for the ROX client and projec/version
if (uid != null && uidAlreadyUsed(category,... | [
"public",
"String",
"getUid",
"(",
"String",
"category",
",",
"String",
"projectName",
",",
"String",
"projectVersion",
",",
"boolean",
"force",
")",
"{",
"String",
"uid",
"=",
"null",
";",
"if",
"(",
"!",
"force",
")",
"{",
"uid",
"=",
"readUid",
"(",
... | Generate a UID or retrieve the latest if it is valid depending the context given
by the category, project name and project version
@param category The category
@param projectName The project name
@param projectVersion The project version
@param force Force the generation of a new UID
@return The valid UID | [
"Generate",
"a",
"UID",
"or",
"retrieve",
"the",
"latest",
"if",
"it",
"is",
"valid",
"depending",
"the",
"context",
"given",
"by",
"the",
"category",
"project",
"name",
"and",
"project",
"version"
] | train | https://github.com/lotaris/rox-client-java/blob/1b33f7560347c382c59a40c4037d175ab8127fde/rox-client-java/src/main/java/com/lotaris/rox/common/config/Configuration.java#L422-L443 |
moparisthebest/beehive | beehive-netui-core/src/main/java/org/apache/beehive/netui/script/el/tokens/ExpressionToken.java | ExpressionToken.listUpdate | protected final void listUpdate(List list, int index, Object value) {
Object converted = value;
if(list.size() > index) {
Object o = list.get(index);
// can only convert types when there is an item in the currently requested place
if(o != null) {
Clas... | java | protected final void listUpdate(List list, int index, Object value) {
Object converted = value;
if(list.size() > index) {
Object o = list.get(index);
// can only convert types when there is an item in the currently requested place
if(o != null) {
Clas... | [
"protected",
"final",
"void",
"listUpdate",
"(",
"List",
"list",
",",
"int",
"index",
",",
"Object",
"value",
")",
"{",
"Object",
"converted",
"=",
"value",
";",
"if",
"(",
"list",
".",
"size",
"(",
")",
">",
"index",
")",
"{",
"Object",
"o",
"=",
... | Update a {@link List} with the Object <code>value</code> at <code>index</code>.
@param list the List
@param index the index
@param value the new value | [
"Update",
"a",
"{"
] | train | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/script/el/tokens/ExpressionToken.java#L134-L176 |
biojava/biojava | biojava-structure/src/main/java/org/biojava/nbio/structure/contact/StructureInterfaceList.java | StructureInterfaceList.addNcsEquivalent | public void addNcsEquivalent(StructureInterface interfaceNew, StructureInterface interfaceRef) {
this.add(interfaceNew);
if (clustersNcs == null) {
clustersNcs = new ArrayList<>();
}
if (interfaceRef == null) {
StructureInterfaceCluster newCluster = new StructureInterfaceCluster();
newCluster.addMemb... | java | public void addNcsEquivalent(StructureInterface interfaceNew, StructureInterface interfaceRef) {
this.add(interfaceNew);
if (clustersNcs == null) {
clustersNcs = new ArrayList<>();
}
if (interfaceRef == null) {
StructureInterfaceCluster newCluster = new StructureInterfaceCluster();
newCluster.addMemb... | [
"public",
"void",
"addNcsEquivalent",
"(",
"StructureInterface",
"interfaceNew",
",",
"StructureInterface",
"interfaceRef",
")",
"{",
"this",
".",
"add",
"(",
"interfaceNew",
")",
";",
"if",
"(",
"clustersNcs",
"==",
"null",
")",
"{",
"clustersNcs",
"=",
"new",
... | Add an interface to the list, possibly defining it as NCS-equivalent to an interface already in the list.
Used to build up the NCS clustering.
@param interfaceNew
an interface to be added to the list.
@param interfaceRef
interfaceNew will be added to the cluster which contains interfaceRef.
If interfaceRef is null, new... | [
"Add",
"an",
"interface",
"to",
"the",
"list",
"possibly",
"defining",
"it",
"as",
"NCS",
"-",
"equivalent",
"to",
"an",
"interface",
"already",
"in",
"the",
"list",
".",
"Used",
"to",
"build",
"up",
"the",
"NCS",
"clustering",
"."
] | train | https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/contact/StructureInterfaceList.java#L279-L311 |
basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/UserMetadata/RiakUserMetadata.java | RiakUserMetadata.put | public void put(String key, String value, Charset charset)
{
BinaryValue wrappedKey = BinaryValue.unsafeCreate(key.getBytes(charset));
BinaryValue wrappedValue = BinaryValue.unsafeCreate(value.getBytes(charset));
meta.put(wrappedKey, wrappedValue);
} | java | public void put(String key, String value, Charset charset)
{
BinaryValue wrappedKey = BinaryValue.unsafeCreate(key.getBytes(charset));
BinaryValue wrappedValue = BinaryValue.unsafeCreate(value.getBytes(charset));
meta.put(wrappedKey, wrappedValue);
} | [
"public",
"void",
"put",
"(",
"String",
"key",
",",
"String",
"value",
",",
"Charset",
"charset",
")",
"{",
"BinaryValue",
"wrappedKey",
"=",
"BinaryValue",
".",
"unsafeCreate",
"(",
"key",
".",
"getBytes",
"(",
"charset",
")",
")",
";",
"BinaryValue",
"wr... | Set a user metadata entry.
<p>
This method and its {@link RiakUserMetadata#get(java.lang.String, java.nio.charset.Charset) }
counterpart use the supplied {@code Charset} to convert the {@code String}s.
</p>
@param key the key for the user metadata entry as a {@code String} encoded using the supplied {@code Charset}... | [
"Set",
"a",
"user",
"metadata",
"entry",
".",
"<p",
">",
"This",
"method",
"and",
"its",
"{",
"@link",
"RiakUserMetadata#get",
"(",
"java",
".",
"lang",
".",
"String",
"java",
".",
"nio",
".",
"charset",
".",
"Charset",
")",
"}",
"counterpart",
"use",
... | train | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/UserMetadata/RiakUserMetadata.java#L180-L185 |
Azure/azure-sdk-for-java | hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ConfigurationsInner.java | ConfigurationsInner.updateAsync | public Observable<Void> updateAsync(String resourceGroupName, String clusterName, String configurationName, Map<String, String> parameters) {
return updateWithServiceResponseAsync(resourceGroupName, clusterName, configurationName, parameters).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
... | java | public Observable<Void> updateAsync(String resourceGroupName, String clusterName, String configurationName, Map<String, String> parameters) {
return updateWithServiceResponseAsync(resourceGroupName, clusterName, configurationName, parameters).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
... | [
"public",
"Observable",
"<",
"Void",
">",
"updateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"clusterName",
",",
"String",
"configurationName",
",",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
")",
"{",
"return",
"updateWithServiceRespon... | Configures the HTTP settings on the specified cluster. This API is deprecated, please use UpdateGatewaySettings in cluster endpoint instead.
@param resourceGroupName The name of the resource group.
@param clusterName The name of the cluster.
@param configurationName The name of the cluster configuration.
@param parame... | [
"Configures",
"the",
"HTTP",
"settings",
"on",
"the",
"specified",
"cluster",
".",
"This",
"API",
"is",
"deprecated",
"please",
"use",
"UpdateGatewaySettings",
"in",
"cluster",
"endpoint",
"instead",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ConfigurationsInner.java#L202-L209 |
aws/aws-sdk-java | aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutIntegrationResponseResult.java | PutIntegrationResponseResult.withResponseParameters | public PutIntegrationResponseResult withResponseParameters(java.util.Map<String, String> responseParameters) {
setResponseParameters(responseParameters);
return this;
} | java | public PutIntegrationResponseResult withResponseParameters(java.util.Map<String, String> responseParameters) {
setResponseParameters(responseParameters);
return this;
} | [
"public",
"PutIntegrationResponseResult",
"withResponseParameters",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"responseParameters",
")",
"{",
"setResponseParameters",
"(",
"responseParameters",
")",
";",
"return",
"this",
";",
"}"
] | <p>
A key-value map specifying response parameters that are passed to the method response from the back end. The key
is a method response header parameter name and the mapped value is an integration response header value, a static
value enclosed within a pair of single quotes, or a JSON expression from the integration ... | [
"<p",
">",
"A",
"key",
"-",
"value",
"map",
"specifying",
"response",
"parameters",
"that",
"are",
"passed",
"to",
"the",
"method",
"response",
"from",
"the",
"back",
"end",
".",
"The",
"key",
"is",
"a",
"method",
"response",
"header",
"parameter",
"name",... | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutIntegrationResponseResult.java#L284-L287 |
hivemq/hivemq-spi | src/main/java/com/hivemq/spi/util/DefaultSslEngineUtil.java | DefaultSslEngineUtil.getSupportedCipherSuites | @ReadOnly
public List<String> getSupportedCipherSuites() throws SslException {
try {
final SSLEngine engine = getDefaultSslEngine();
return ImmutableList.copyOf(engine.getSupportedCipherSuites());
} catch (NoSuchAlgorithmException | KeyManagementException e) {
... | java | @ReadOnly
public List<String> getSupportedCipherSuites() throws SslException {
try {
final SSLEngine engine = getDefaultSslEngine();
return ImmutableList.copyOf(engine.getSupportedCipherSuites());
} catch (NoSuchAlgorithmException | KeyManagementException e) {
... | [
"@",
"ReadOnly",
"public",
"List",
"<",
"String",
">",
"getSupportedCipherSuites",
"(",
")",
"throws",
"SslException",
"{",
"try",
"{",
"final",
"SSLEngine",
"engine",
"=",
"getDefaultSslEngine",
"(",
")",
";",
"return",
"ImmutableList",
".",
"copyOf",
"(",
"e... | Returns a list of all supported Cipher Suites of the JVM.
@return a list of all supported cipher suites of the JVM
@throws SslException | [
"Returns",
"a",
"list",
"of",
"all",
"supported",
"Cipher",
"Suites",
"of",
"the",
"JVM",
"."
] | train | https://github.com/hivemq/hivemq-spi/blob/55fa89ccb081ad5b6d46eaca02179272148e64ed/src/main/java/com/hivemq/spi/util/DefaultSslEngineUtil.java#L43-L54 |
spotbugs/spotbugs | spotbugs/src/main/java/edu/umd/cs/findbugs/ba/generic/GenericSignatureParser.java | GenericSignatureParser.compareSignatures | public static boolean compareSignatures(String plainSignature, String genericSignature) {
GenericSignatureParser plainParser = new GenericSignatureParser(plainSignature);
GenericSignatureParser genericParser = new GenericSignatureParser(genericSignature);
return plainParser.getNumParameters() =... | java | public static boolean compareSignatures(String plainSignature, String genericSignature) {
GenericSignatureParser plainParser = new GenericSignatureParser(plainSignature);
GenericSignatureParser genericParser = new GenericSignatureParser(genericSignature);
return plainParser.getNumParameters() =... | [
"public",
"static",
"boolean",
"compareSignatures",
"(",
"String",
"plainSignature",
",",
"String",
"genericSignature",
")",
"{",
"GenericSignatureParser",
"plainParser",
"=",
"new",
"GenericSignatureParser",
"(",
"plainSignature",
")",
";",
"GenericSignatureParser",
"gen... | Compare a plain method signature to the a generic method Signature and
return true if they match | [
"Compare",
"a",
"plain",
"method",
"signature",
"to",
"the",
"a",
"generic",
"method",
"Signature",
"and",
"return",
"true",
"if",
"they",
"match"
] | train | https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/generic/GenericSignatureParser.java#L245-L250 |
opsbears/owc-dic | src/main/java/com/opsbears/webcomponents/dic/InjectionConfiguration.java | InjectionConfiguration.define | public <T> void define(Class<T> classDefinition, Map<String, Object> namedParameterValues) {
injectorConfiguration = injectorConfiguration.withDefined(classDefinition);
namedParameterValues.forEach((key, value) -> {
injectorConfiguration = injectorConfiguration.withNamedParameterValue(classD... | java | public <T> void define(Class<T> classDefinition, Map<String, Object> namedParameterValues) {
injectorConfiguration = injectorConfiguration.withDefined(classDefinition);
namedParameterValues.forEach((key, value) -> {
injectorConfiguration = injectorConfiguration.withNamedParameterValue(classD... | [
"public",
"<",
"T",
">",
"void",
"define",
"(",
"Class",
"<",
"T",
">",
"classDefinition",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"namedParameterValues",
")",
"{",
"injectorConfiguration",
"=",
"injectorConfiguration",
".",
"withDefined",
"(",
"classDe... | Allows the dependency injector to use the specified class and specifies values for some or all parameters. (Only
works if the class in question is compiled with `-parameters`.)
@param classDefinition The class to use.
@param namedParameterValues Values for the specified parameters. | [
"Allows",
"the",
"dependency",
"injector",
"to",
"use",
"the",
"specified",
"class",
"and",
"specifies",
"values",
"for",
"some",
"or",
"all",
"parameters",
".",
"(",
"Only",
"works",
"if",
"the",
"class",
"in",
"question",
"is",
"compiled",
"with",
"-",
"... | train | https://github.com/opsbears/owc-dic/blob/eb254ca993b26c299292a01598b358a31f323566/src/main/java/com/opsbears/webcomponents/dic/InjectionConfiguration.java#L60-L66 |
grpc/grpc-java | netty/src/main/java/io/grpc/netty/NettyServerBuilder.java | NettyServerBuilder.maxConnectionIdle | public NettyServerBuilder maxConnectionIdle(long maxConnectionIdle, TimeUnit timeUnit) {
checkArgument(maxConnectionIdle > 0L, "max connection idle must be positive");
maxConnectionIdleInNanos = timeUnit.toNanos(maxConnectionIdle);
if (maxConnectionIdleInNanos >= AS_LARGE_AS_INFINITE) {
maxConnectionI... | java | public NettyServerBuilder maxConnectionIdle(long maxConnectionIdle, TimeUnit timeUnit) {
checkArgument(maxConnectionIdle > 0L, "max connection idle must be positive");
maxConnectionIdleInNanos = timeUnit.toNanos(maxConnectionIdle);
if (maxConnectionIdleInNanos >= AS_LARGE_AS_INFINITE) {
maxConnectionI... | [
"public",
"NettyServerBuilder",
"maxConnectionIdle",
"(",
"long",
"maxConnectionIdle",
",",
"TimeUnit",
"timeUnit",
")",
"{",
"checkArgument",
"(",
"maxConnectionIdle",
">",
"0L",
",",
"\"max connection idle must be positive\"",
")",
";",
"maxConnectionIdleInNanos",
"=",
... | Sets a custom max connection idle time, connection being idle for longer than which will be
gracefully terminated. Idleness duration is defined since the most recent time the number of
outstanding RPCs became zero or the connection establishment. An unreasonably small value might
be increased. {@code Long.MAX_VALUE} na... | [
"Sets",
"a",
"custom",
"max",
"connection",
"idle",
"time",
"connection",
"being",
"idle",
"for",
"longer",
"than",
"which",
"will",
"be",
"gracefully",
"terminated",
".",
"Idleness",
"duration",
"is",
"defined",
"since",
"the",
"most",
"recent",
"time",
"the"... | train | https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/netty/src/main/java/io/grpc/netty/NettyServerBuilder.java#L413-L423 |
Whiley/WhileyCompiler | src/main/java/wyil/check/FlowTypeCheck.java | FlowTypeCheck.checkIfElse | private Environment checkIfElse(Stmt.IfElse stmt, Environment environment, EnclosingScope scope) {
// Check condition and apply variable retypings.
Environment trueEnvironment = checkCondition(stmt.getCondition(), true, environment);
Environment falseEnvironment = checkCondition(stmt.getCondition(), false, enviro... | java | private Environment checkIfElse(Stmt.IfElse stmt, Environment environment, EnclosingScope scope) {
// Check condition and apply variable retypings.
Environment trueEnvironment = checkCondition(stmt.getCondition(), true, environment);
Environment falseEnvironment = checkCondition(stmt.getCondition(), false, enviro... | [
"private",
"Environment",
"checkIfElse",
"(",
"Stmt",
".",
"IfElse",
"stmt",
",",
"Environment",
"environment",
",",
"EnclosingScope",
"scope",
")",
"{",
"// Check condition and apply variable retypings.",
"Environment",
"trueEnvironment",
"=",
"checkCondition",
"(",
"stm... | Type check an if-statement. To do this, we check the environment through both
sides of condition expression. Each can produce a different environment in
the case that runtime type tests are used. These potentially updated
environments are then passed through the true and false blocks which, in
turn, produce updated env... | [
"Type",
"check",
"an",
"if",
"-",
"statement",
".",
"To",
"do",
"this",
"we",
"check",
"the",
"environment",
"through",
"both",
"sides",
"of",
"condition",
"expression",
".",
"Each",
"can",
"produce",
"a",
"different",
"environment",
"in",
"the",
"case",
"... | train | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/check/FlowTypeCheck.java#L574-L587 |
petergeneric/stdlib | service-manager/service-manager/src/main/java/com/peterphi/servicemanager/service/rest/resource/impl/ServiceManagerResourceRestServiceImpl.java | ServiceManagerResourceRestServiceImpl.provision | @Override
public ResourceInstanceDTO provision(final String templateName, final ProvisionResourceParametersDTO parameters)
{
final Map<String, String> metadata = ResourceKVP.toMap(parameters.metadata);
ResourceInstanceEntity entity = service.newInstance(templateName, metadata);
return getInstanceById(entity.g... | java | @Override
public ResourceInstanceDTO provision(final String templateName, final ProvisionResourceParametersDTO parameters)
{
final Map<String, String> metadata = ResourceKVP.toMap(parameters.metadata);
ResourceInstanceEntity entity = service.newInstance(templateName, metadata);
return getInstanceById(entity.g... | [
"@",
"Override",
"public",
"ResourceInstanceDTO",
"provision",
"(",
"final",
"String",
"templateName",
",",
"final",
"ProvisionResourceParametersDTO",
"parameters",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"metadata",
"=",
"ResourceKVP",
".",
"... | N.B. no {@link Transactional} annotation because the inner service does transaction management
@param templateName
@param parameters
@return | [
"N",
".",
"B",
".",
"no",
"{",
"@link",
"Transactional",
"}",
"annotation",
"because",
"the",
"inner",
"service",
"does",
"transaction",
"management"
] | train | https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/service-manager/service-manager/src/main/java/com/peterphi/servicemanager/service/rest/resource/impl/ServiceManagerResourceRestServiceImpl.java#L77-L85 |
cdapio/tephra | tephra-core/src/main/java/co/cask/tephra/persist/TransactionEdit.java | TransactionEdit.createCheckpoint | public static TransactionEdit createCheckpoint(long writePointer, long parentWritePointer) {
return new TransactionEdit(writePointer, 0L, State.CHECKPOINT, 0L, null, 0L, false, null, null, 0L,
parentWritePointer, null);
} | java | public static TransactionEdit createCheckpoint(long writePointer, long parentWritePointer) {
return new TransactionEdit(writePointer, 0L, State.CHECKPOINT, 0L, null, 0L, false, null, null, 0L,
parentWritePointer, null);
} | [
"public",
"static",
"TransactionEdit",
"createCheckpoint",
"(",
"long",
"writePointer",
",",
"long",
"parentWritePointer",
")",
"{",
"return",
"new",
"TransactionEdit",
"(",
"writePointer",
",",
"0L",
",",
"State",
".",
"CHECKPOINT",
",",
"0L",
",",
"null",
",",... | Creates a new instance in the {@link State#CHECKPOINT} state. | [
"Creates",
"a",
"new",
"instance",
"in",
"the",
"{"
] | train | https://github.com/cdapio/tephra/blob/082c56c15c6ece15002631ff6f89206a00d8915c/tephra-core/src/main/java/co/cask/tephra/persist/TransactionEdit.java#L294-L297 |
puniverse/galaxy | src/main/java/co/paralleluniverse/galaxy/Grid.java | Grid.getInstance | public static Grid getInstance(String configFile, Properties properties) throws InterruptedException {
return getInstance(configFile == null ? null : new FileSystemResource(configFile), (Object) properties);
} | java | public static Grid getInstance(String configFile, Properties properties) throws InterruptedException {
return getInstance(configFile == null ? null : new FileSystemResource(configFile), (Object) properties);
} | [
"public",
"static",
"Grid",
"getInstance",
"(",
"String",
"configFile",
",",
"Properties",
"properties",
")",
"throws",
"InterruptedException",
"{",
"return",
"getInstance",
"(",
"configFile",
"==",
"null",
"?",
"null",
":",
"new",
"FileSystemResource",
"(",
"conf... | Retrieves the grid instance, as defined in the given configuration file.
@param configFile The name of the configuration file containing the grid definition.
@param properties A {@link Properties Properties} object containing the grid's properties to be injected into placeholders
in the configuration file.
This parame... | [
"Retrieves",
"the",
"grid",
"instance",
"as",
"defined",
"in",
"the",
"given",
"configuration",
"file",
"."
] | train | https://github.com/puniverse/galaxy/blob/1d077532c4a5bcd6c52ff670770c31e98420ff63/src/main/java/co/paralleluniverse/galaxy/Grid.java#L73-L75 |
OpenLiberty/open-liberty | dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/view/facelets/tag/ui/DebugPhaseListener.java | DebugPhaseListener.createFieldDebugInfo | public static void createFieldDebugInfo(FacesContext facesContext,
final String field, Object oldValue,
Object newValue, String clientId)
{
if ((oldValue == null && newValue == null)
|| (oldValue != null && oldValue.equals(newValue)))
{
// nothing... | java | public static void createFieldDebugInfo(FacesContext facesContext,
final String field, Object oldValue,
Object newValue, String clientId)
{
if ((oldValue == null && newValue == null)
|| (oldValue != null && oldValue.equals(newValue)))
{
// nothing... | [
"public",
"static",
"void",
"createFieldDebugInfo",
"(",
"FacesContext",
"facesContext",
",",
"final",
"String",
"field",
",",
"Object",
"oldValue",
",",
"Object",
"newValue",
",",
"String",
"clientId",
")",
"{",
"if",
"(",
"(",
"oldValue",
"==",
"null",
"&&",... | Creates the field debug-info for the given field, which changed
from oldValue to newValue in the given component.
ATTENTION: this method is duplicate in UIInput.
@param facesContext
@param field
@param oldValue
@param newValue
@param clientId | [
"Creates",
"the",
"field",
"debug",
"-",
"info",
"for",
"the",
"given",
"field",
"which",
"changed",
"from",
"oldValue",
"to",
"newValue",
"in",
"the",
"given",
"component",
".",
"ATTENTION",
":",
"this",
"method",
"is",
"duplicate",
"in",
"UIInput",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/view/facelets/tag/ui/DebugPhaseListener.java#L112-L154 |
apache/spark | sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeMapData.java | UnsafeMapData.pointTo | public void pointTo(Object baseObject, long baseOffset, int sizeInBytes) {
// Read the numBytes of key array from the first 8 bytes.
final long keyArraySize = Platform.getLong(baseObject, baseOffset);
assert keyArraySize >= 0 : "keyArraySize (" + keyArraySize + ") should >= 0";
assert keyArraySize <= In... | java | public void pointTo(Object baseObject, long baseOffset, int sizeInBytes) {
// Read the numBytes of key array from the first 8 bytes.
final long keyArraySize = Platform.getLong(baseObject, baseOffset);
assert keyArraySize >= 0 : "keyArraySize (" + keyArraySize + ") should >= 0";
assert keyArraySize <= In... | [
"public",
"void",
"pointTo",
"(",
"Object",
"baseObject",
",",
"long",
"baseOffset",
",",
"int",
"sizeInBytes",
")",
"{",
"// Read the numBytes of key array from the first 8 bytes.",
"final",
"long",
"keyArraySize",
"=",
"Platform",
".",
"getLong",
"(",
"baseObject",
... | Update this UnsafeMapData to point to different backing data.
@param baseObject the base object
@param baseOffset the offset within the base object
@param sizeInBytes the size of this map's backing data, in bytes | [
"Update",
"this",
"UnsafeMapData",
"to",
"point",
"to",
"different",
"backing",
"data",
"."
] | train | https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeMapData.java#L81-L98 |
grails/grails-core | grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java | GrailsASTUtils.hasProperty | public static boolean hasProperty(ClassNode classNode, String propertyName) {
if (classNode == null || !StringUtils.hasText(propertyName)) {
return false;
}
final MethodNode method = classNode.getMethod(GrailsNameUtils.getGetterName(propertyName), Parameter.EMPTY_ARRAY);
if ... | java | public static boolean hasProperty(ClassNode classNode, String propertyName) {
if (classNode == null || !StringUtils.hasText(propertyName)) {
return false;
}
final MethodNode method = classNode.getMethod(GrailsNameUtils.getGetterName(propertyName), Parameter.EMPTY_ARRAY);
if ... | [
"public",
"static",
"boolean",
"hasProperty",
"(",
"ClassNode",
"classNode",
",",
"String",
"propertyName",
")",
"{",
"if",
"(",
"classNode",
"==",
"null",
"||",
"!",
"StringUtils",
".",
"hasText",
"(",
"propertyName",
")",
")",
"{",
"return",
"false",
";",
... | Returns whether a classNode has the specified property or not
@param classNode The ClassNode
@param propertyName The name of the property
@return true if the property exists in the ClassNode | [
"Returns",
"whether",
"a",
"classNode",
"has",
"the",
"specified",
"property",
"or",
"not"
] | train | https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java#L118-L138 |
FedericoPecora/meta-csp-framework | src/main/java/org/metacsp/multi/spatial/DE9IM/DE9IMRelation.java | DE9IMRelation.getRCC8Relations | public static Type[] getRCC8Relations(GeometricShapeVariable gv1, GeometricShapeVariable gv2) {
return getRelations(gv1, gv2, true);
} | java | public static Type[] getRCC8Relations(GeometricShapeVariable gv1, GeometricShapeVariable gv2) {
return getRelations(gv1, gv2, true);
} | [
"public",
"static",
"Type",
"[",
"]",
"getRCC8Relations",
"(",
"GeometricShapeVariable",
"gv1",
",",
"GeometricShapeVariable",
"gv2",
")",
"{",
"return",
"getRelations",
"(",
"gv1",
",",
"gv2",
",",
"true",
")",
";",
"}"
] | Get the RCC8 relation(s) existing between two {@link GeometricShapeVariable}s.
@param gv1 The first {@link GeometricShapeVariable} (the source of the directed edge).
@param gv2 The second {@link GeometricShapeVariable} (the destination of the directed edge).
@return The RCC8 relation(s) existing between the two given {... | [
"Get",
"the",
"RCC8",
"relation",
"(",
"s",
")",
"existing",
"between",
"two",
"{"
] | train | https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/multi/spatial/DE9IM/DE9IMRelation.java#L67-L69 |
ibm-bluemix-mobile-services/bms-clientsdk-android-core | lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationProcessManager.java | AuthorizationProcessManager.createRegistrationParams | private HashMap<String, String> createRegistrationParams() {
registrationKeyPair = KeyPairUtility.generateRandomKeyPair();
JSONObject csrJSON = new JSONObject();
HashMap<String, String> params;
try {
DeviceIdentity deviceData = new BaseDeviceIdentity(preferences.deviceIdent... | java | private HashMap<String, String> createRegistrationParams() {
registrationKeyPair = KeyPairUtility.generateRandomKeyPair();
JSONObject csrJSON = new JSONObject();
HashMap<String, String> params;
try {
DeviceIdentity deviceData = new BaseDeviceIdentity(preferences.deviceIdent... | [
"private",
"HashMap",
"<",
"String",
",",
"String",
">",
"createRegistrationParams",
"(",
")",
"{",
"registrationKeyPair",
"=",
"KeyPairUtility",
".",
"generateRandomKeyPair",
"(",
")",
";",
"JSONObject",
"csrJSON",
"=",
"new",
"JSONObject",
"(",
")",
";",
"Hash... | Generate the params that will be used during the registration phase
@return Map with all the parameters | [
"Generate",
"the",
"params",
"that",
"will",
"be",
"used",
"during",
"the",
"registration",
"phase"
] | train | https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-android-core/blob/8db4f00d0d564792397bfc0e5bd57d52a238b858/lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationProcessManager.java#L163-L189 |
UrielCh/ovh-java-sdk | ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java | ApiOvhEmailexchange.organizationName_service_exchangeService_mailingList_mailingListAddress_member_account_GET | public ArrayList<Long> organizationName_service_exchangeService_mailingList_mailingListAddress_member_account_GET(String organizationName, String exchangeService, String mailingListAddress) throws IOException {
String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/mailingList/{mailingListAddres... | java | public ArrayList<Long> organizationName_service_exchangeService_mailingList_mailingListAddress_member_account_GET(String organizationName, String exchangeService, String mailingListAddress) throws IOException {
String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/mailingList/{mailingListAddres... | [
"public",
"ArrayList",
"<",
"Long",
">",
"organizationName_service_exchangeService_mailingList_mailingListAddress_member_account_GET",
"(",
"String",
"organizationName",
",",
"String",
"exchangeService",
",",
"String",
"mailingListAddress",
")",
"throws",
"IOException",
"{",
"S... | Mailing list account member
REST: GET /email/exchange/{organizationName}/service/{exchangeService}/mailingList/{mailingListAddress}/member/account
@param organizationName [required] The internal name of your exchange organization
@param exchangeService [required] The internal name of your exchange service
@param maili... | [
"Mailing",
"list",
"account",
"member"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L1060-L1065 |
cloudfoundry/uaa | server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/idp/IdpMetadataGenerator.java | IdpMetadataGenerator.getServerURL | private String getServerURL(String entityBaseURL, String entityAlias, String processingURL) {
return getServerURL(entityBaseURL, entityAlias, processingURL, null);
} | java | private String getServerURL(String entityBaseURL, String entityAlias, String processingURL) {
return getServerURL(entityBaseURL, entityAlias, processingURL, null);
} | [
"private",
"String",
"getServerURL",
"(",
"String",
"entityBaseURL",
",",
"String",
"entityAlias",
",",
"String",
"processingURL",
")",
"{",
"return",
"getServerURL",
"(",
"entityBaseURL",
",",
"entityAlias",
",",
"processingURL",
",",
"null",
")",
";",
"}"
] | Creates URL at which the local server is capable of accepting incoming SAML messages.
@param entityBaseURL
entity ID
@param processingURL
local context at which processing filter is waiting
@return URL of local server | [
"Creates",
"URL",
"at",
"which",
"the",
"local",
"server",
"is",
"capable",
"of",
"accepting",
"incoming",
"SAML",
"messages",
"."
] | train | https://github.com/cloudfoundry/uaa/blob/e8df3d7060580c92d33461106399f9e4f36e3cd2/server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/idp/IdpMetadataGenerator.java#L499-L503 |
meertensinstituut/mtas | src/main/java/mtas/solr/handler/util/MtasSolrStatus.java | MtasSolrStatus.getBoolean | private final Boolean getBoolean(NamedList<Object> response, String... args) {
Object objectItem = response.findRecursive(args);
Boolean result = null;
if (objectItem != null && objectItem instanceof Boolean) {
result = (Boolean) objectItem;
}
return result;
} | java | private final Boolean getBoolean(NamedList<Object> response, String... args) {
Object objectItem = response.findRecursive(args);
Boolean result = null;
if (objectItem != null && objectItem instanceof Boolean) {
result = (Boolean) objectItem;
}
return result;
} | [
"private",
"final",
"Boolean",
"getBoolean",
"(",
"NamedList",
"<",
"Object",
">",
"response",
",",
"String",
"...",
"args",
")",
"{",
"Object",
"objectItem",
"=",
"response",
".",
"findRecursive",
"(",
"args",
")",
";",
"Boolean",
"result",
"=",
"null",
"... | Gets the boolean.
@param response
the response
@param args
the args
@return the boolean | [
"Gets",
"the",
"boolean",
"."
] | train | https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/util/MtasSolrStatus.java#L642-L649 |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java | OrderItemUrl.updateItemDutyUrl | public static MozuUrl updateItemDutyUrl(Double dutyAmount, String orderId, String orderItemId, String responseFields, String updateMode, String version)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/items/{orderItemId}/dutyAmount/{dutyAmount}?updatemode={updateMode}&version={version}&... | java | public static MozuUrl updateItemDutyUrl(Double dutyAmount, String orderId, String orderItemId, String responseFields, String updateMode, String version)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/items/{orderItemId}/dutyAmount/{dutyAmount}?updatemode={updateMode}&version={version}&... | [
"public",
"static",
"MozuUrl",
"updateItemDutyUrl",
"(",
"Double",
"dutyAmount",
",",
"String",
"orderId",
",",
"String",
"orderItemId",
",",
"String",
"responseFields",
",",
"String",
"updateMode",
",",
"String",
"version",
")",
"{",
"UrlFormatter",
"formatter",
... | Get Resource Url for UpdateItemDuty
@param dutyAmount The amount added to the order item for duty fees.
@param orderId Unique identifier of the order.
@param orderItemId Unique identifier of the item to remove from the order.
@param responseFields Filtering syntax appended to an API call to increase or decrease the am... | [
"Get",
"Resource",
"Url",
"for",
"UpdateItemDuty",
"@param",
"dutyAmount",
"The",
"amount",
"added",
"to",
"the",
"order",
"item",
"for",
"duty",
"fees",
"."
] | train | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java#L121-L131 |
javagl/ND | nd-iteration/src/main/java/de/javagl/nd/iteration/tuples/j/LongTupleNeighborhoodIterables.java | LongTupleNeighborhoodIterables.mooreNeighborhoodIterable | public static Iterable<MutableLongTuple> mooreNeighborhoodIterable(
LongTuple center, int radius, Order order)
{
return mooreNeighborhoodIterable(center, radius, null, null, order);
} | java | public static Iterable<MutableLongTuple> mooreNeighborhoodIterable(
LongTuple center, int radius, Order order)
{
return mooreNeighborhoodIterable(center, radius, null, null, order);
} | [
"public",
"static",
"Iterable",
"<",
"MutableLongTuple",
">",
"mooreNeighborhoodIterable",
"(",
"LongTuple",
"center",
",",
"int",
"radius",
",",
"Order",
"order",
")",
"{",
"return",
"mooreNeighborhoodIterable",
"(",
"center",
",",
"radius",
",",
"null",
",",
"... | Creates an iterable that provides iterators for iterating over the
Moore neighborhood of the given center and the given radius.<br>
<br>
Also see <a href="../../package-summary.html#Neighborhoods">
Neighborhoods</a>
@param center The center of the Moore neighborhood
A copy of this tuple will be stored internally.
@par... | [
"Creates",
"an",
"iterable",
"that",
"provides",
"iterators",
"for",
"iterating",
"over",
"the",
"Moore",
"neighborhood",
"of",
"the",
"given",
"center",
"and",
"the",
"given",
"radius",
".",
"<br",
">",
"<br",
">",
"Also",
"see",
"<a",
"href",
"=",
"..",
... | train | https://github.com/javagl/ND/blob/bcb655aaf5fc88af6194f73a27cca079186ff559/nd-iteration/src/main/java/de/javagl/nd/iteration/tuples/j/LongTupleNeighborhoodIterables.java#L60-L64 |
hal/core | gui/src/main/java/org/jboss/as/console/client/shared/subsys/jca/ResourceAdapterPresenter.java | ResourceAdapterPresenter.onCreateProperty | public void onCreateProperty(AddressTemplate address, ModelNode entity, String... names) {
List<String> args = new LinkedList<>();
args.add(0, selectedAdapter);
for (String name : names) {
args.add(name);
}
ResourceAddress fqAddress = address.resolve(statementContext... | java | public void onCreateProperty(AddressTemplate address, ModelNode entity, String... names) {
List<String> args = new LinkedList<>();
args.add(0, selectedAdapter);
for (String name : names) {
args.add(name);
}
ResourceAddress fqAddress = address.resolve(statementContext... | [
"public",
"void",
"onCreateProperty",
"(",
"AddressTemplate",
"address",
",",
"ModelNode",
"entity",
",",
"String",
"...",
"names",
")",
"{",
"List",
"<",
"String",
">",
"args",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"args",
".",
"add",
"(",
"0",... | /*public void onCreate(AddressTemplate address, String name, ModelNode entity) {
ResourceAddress fqAddress = address.resolve(statementContext, name);
entity.get(OP).set(ADD);
entity.get(ADDRESS).set(fqAddress);
dispatcher.execute(new DMRAction(entity), new SimpleCallback<DMRResponse>() {
@Override
public void onSuc... | [
"/",
"*",
"public",
"void",
"onCreate",
"(",
"AddressTemplate",
"address",
"String",
"name",
"ModelNode",
"entity",
")",
"{"
] | train | https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/client/shared/subsys/jca/ResourceAdapterPresenter.java#L175-L203 |
threerings/nenya | core/src/main/java/com/threerings/util/DirectionUtil.java | DirectionUtil.getFineDirection | public static int getFineDirection (Point a, Point b)
{
return getFineDirection(a.x, a.y, b.x, b.y);
} | java | public static int getFineDirection (Point a, Point b)
{
return getFineDirection(a.x, a.y, b.x, b.y);
} | [
"public",
"static",
"int",
"getFineDirection",
"(",
"Point",
"a",
",",
"Point",
"b",
")",
"{",
"return",
"getFineDirection",
"(",
"a",
".",
"x",
",",
"a",
".",
"y",
",",
"b",
".",
"x",
",",
"b",
".",
"y",
")",
";",
"}"
] | Returns which of the sixteen compass directions that point <code>b</code> lies in from
point <code>a</code> as one of the {@link DirectionCodes} direction constants.
<em>Note:</em> that the coordinates supplied are assumed to be logical (screen) rather than
cartesian coordinates and <code>NORTH</code> is considered to ... | [
"Returns",
"which",
"of",
"the",
"sixteen",
"compass",
"directions",
"that",
"point",
"<code",
">",
"b<",
"/",
"code",
">",
"lies",
"in",
"from",
"point",
"<code",
">",
"a<",
"/",
"code",
">",
"as",
"one",
"of",
"the",
"{"
] | train | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/util/DirectionUtil.java#L230-L233 |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/embeddings/KerasEmbedding.java | KerasEmbedding.getInputLengthFromConfig | private int getInputLengthFromConfig(Map<String, Object> layerConfig) throws InvalidKerasConfigurationException {
Map<String, Object> innerConfig = KerasLayerUtils.getInnerLayerConfigFromConfig(layerConfig, conf);
if (!innerConfig.containsKey(conf.getLAYER_FIELD_INPUT_LENGTH()))
throw new In... | java | private int getInputLengthFromConfig(Map<String, Object> layerConfig) throws InvalidKerasConfigurationException {
Map<String, Object> innerConfig = KerasLayerUtils.getInnerLayerConfigFromConfig(layerConfig, conf);
if (!innerConfig.containsKey(conf.getLAYER_FIELD_INPUT_LENGTH()))
throw new In... | [
"private",
"int",
"getInputLengthFromConfig",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"layerConfig",
")",
"throws",
"InvalidKerasConfigurationException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"innerConfig",
"=",
"KerasLayerUtils",
".",
"getInnerLayer... | Get Keras input length from Keras layer configuration. In Keras input_length, if present, denotes
the number of indices to embed per mini-batch, i.e. input will be of shape (mb, input_length)
and (mb, 1) else.
@param layerConfig dictionary containing Keras layer configuration
@return input length as int | [
"Get",
"Keras",
"input",
"length",
"from",
"Keras",
"layer",
"configuration",
".",
"In",
"Keras",
"input_length",
"if",
"present",
"denotes",
"the",
"number",
"of",
"indices",
"to",
"embed",
"per",
"mini",
"-",
"batch",
"i",
".",
"e",
".",
"input",
"will",... | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/embeddings/KerasEmbedding.java#L211-L221 |
Azure/azure-sdk-for-java | batchai/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/batchai/v2018_03_01/implementation/FileServersInner.java | FileServersInner.beginCreate | public FileServerInner beginCreate(String resourceGroupName, String fileServerName, FileServerCreateParameters parameters) {
return beginCreateWithServiceResponseAsync(resourceGroupName, fileServerName, parameters).toBlocking().single().body();
} | java | public FileServerInner beginCreate(String resourceGroupName, String fileServerName, FileServerCreateParameters parameters) {
return beginCreateWithServiceResponseAsync(resourceGroupName, fileServerName, parameters).toBlocking().single().body();
} | [
"public",
"FileServerInner",
"beginCreate",
"(",
"String",
"resourceGroupName",
",",
"String",
"fileServerName",
",",
"FileServerCreateParameters",
"parameters",
")",
"{",
"return",
"beginCreateWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"fileServerName",
",",
... | Creates a file server.
@param resourceGroupName Name of the resource group to which the resource belongs.
@param fileServerName The name of the file server within the specified resource group. File server names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name m... | [
"Creates",
"a",
"file",
"server",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batchai/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/batchai/v2018_03_01/implementation/FileServersInner.java#L196-L198 |
haifengl/smile | core/src/main/java/smile/regression/NeuralNetwork.java | NeuralNetwork.backpropagate | private void backpropagate(Layer upper, Layer lower) {
for (int i = 0; i <= lower.units; i++) {
double out = lower.output[i];
double err = 0;
for (int j = 0; j < upper.units; j++) {
err += upper.weight[j][i] * upper.error[j];
}
if (acti... | java | private void backpropagate(Layer upper, Layer lower) {
for (int i = 0; i <= lower.units; i++) {
double out = lower.output[i];
double err = 0;
for (int j = 0; j < upper.units; j++) {
err += upper.weight[j][i] * upper.error[j];
}
if (acti... | [
"private",
"void",
"backpropagate",
"(",
"Layer",
"upper",
",",
"Layer",
"lower",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<=",
"lower",
".",
"units",
";",
"i",
"++",
")",
"{",
"double",
"out",
"=",
"lower",
".",
"output",
"[",
"i",... | Propagates the errors back from a upper layer to the next lower layer.
@param upper the lower layer where errors are from.
@param lower the upper layer where errors are propagated back to. | [
"Propagates",
"the",
"errors",
"back",
"from",
"a",
"upper",
"layer",
"to",
"the",
"next",
"lower",
"layer",
"."
] | train | https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/core/src/main/java/smile/regression/NeuralNetwork.java#L496-L510 |
GenesysPureEngage/authentication-client-java | src/main/java/com/genesys/internal/authentication/api/AuthenticationApi.java | AuthenticationApi.signIn | public void signIn(String username, String password, Boolean saml) throws ApiException {
signInWithHttpInfo(username, password, saml);
} | java | public void signIn(String username, String password, Boolean saml) throws ApiException {
signInWithHttpInfo(username, password, saml);
} | [
"public",
"void",
"signIn",
"(",
"String",
"username",
",",
"String",
"password",
",",
"Boolean",
"saml",
")",
"throws",
"ApiException",
"{",
"signInWithHttpInfo",
"(",
"username",
",",
"password",
",",
"saml",
")",
";",
"}"
] | Perform form-based authentication.
Perform form-based authentication by submitting an agent's username and password.
@param username The agent's username, formatted as 'tenant\\username'. (required)
@param password The agent's password. (required)
@param saml Specifies whether to login using [Securi... | [
"Perform",
"form",
"-",
"based",
"authentication",
".",
"Perform",
"form",
"-",
"based",
"authentication",
"by",
"submitting",
"an",
"agent'",
";",
"s",
"username",
"and",
"password",
"."
] | train | https://github.com/GenesysPureEngage/authentication-client-java/blob/eb0d58343ee42ebd3c037163c1137f611dfcbb3a/src/main/java/com/genesys/internal/authentication/api/AuthenticationApi.java#L1199-L1201 |
bitcoinj/bitcoinj | core/src/main/java/org/bitcoinj/core/PeerGroup.java | PeerGroup.broadcastTransaction | public TransactionBroadcast broadcastTransaction(final Transaction tx, final int minConnections) {
// If we don't have a record of where this tx came from already, set it to be ourselves so Peer doesn't end up
// redownloading it from the network redundantly.
if (tx.getConfidence().getSource().e... | java | public TransactionBroadcast broadcastTransaction(final Transaction tx, final int minConnections) {
// If we don't have a record of where this tx came from already, set it to be ourselves so Peer doesn't end up
// redownloading it from the network redundantly.
if (tx.getConfidence().getSource().e... | [
"public",
"TransactionBroadcast",
"broadcastTransaction",
"(",
"final",
"Transaction",
"tx",
",",
"final",
"int",
"minConnections",
")",
"{",
"// If we don't have a record of where this tx came from already, set it to be ourselves so Peer doesn't end up",
"// redownloading it from the ne... | <p>Given a transaction, sends it un-announced to one peer and then waits for it to be received back from other
peers. Once all connected peers have announced the transaction, the future available via the
{@link TransactionBroadcast#future()} method will be completed. If anything goes
wrong the exception will be thrown ... | [
"<p",
">",
"Given",
"a",
"transaction",
"sends",
"it",
"un",
"-",
"announced",
"to",
"one",
"peer",
"and",
"then",
"waits",
"for",
"it",
"to",
"be",
"received",
"back",
"from",
"other",
"peers",
".",
"Once",
"all",
"connected",
"peers",
"have",
"announce... | train | https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/PeerGroup.java#L2042-L2086 |
mabe02/lanterna | src/main/java/com/googlecode/lanterna/terminal/swing/TerminalEmulatorPalette.java | TerminalEmulatorPalette.get | public Color get(TextColor.ANSI color, boolean isForeground, boolean useBrightTones) {
if(useBrightTones) {
switch(color) {
case BLACK:
return brightBlack;
case BLUE:
return brightBlue;
case CYAN:
... | java | public Color get(TextColor.ANSI color, boolean isForeground, boolean useBrightTones) {
if(useBrightTones) {
switch(color) {
case BLACK:
return brightBlack;
case BLUE:
return brightBlue;
case CYAN:
... | [
"public",
"Color",
"get",
"(",
"TextColor",
".",
"ANSI",
"color",
",",
"boolean",
"isForeground",
",",
"boolean",
"useBrightTones",
")",
"{",
"if",
"(",
"useBrightTones",
")",
"{",
"switch",
"(",
"color",
")",
"{",
"case",
"BLACK",
":",
"return",
"brightBl... | Returns the AWT color from this palette given an ANSI color and two hints for if we are looking for a background
color and if we want to use the bright version.
@param color Which ANSI color we want to extract
@param isForeground Is this color we extract going to be used as a background color?
@param useBrightTones If ... | [
"Returns",
"the",
"AWT",
"color",
"from",
"this",
"palette",
"given",
"an",
"ANSI",
"color",
"and",
"two",
"hints",
"for",
"if",
"we",
"are",
"looking",
"for",
"a",
"background",
"color",
"and",
"if",
"we",
"want",
"to",
"use",
"the",
"bright",
"version"... | train | https://github.com/mabe02/lanterna/blob/8dfd62206ff46ab10223b2ef2dbb0a2c51850954/src/main/java/com/googlecode/lanterna/terminal/swing/TerminalEmulatorPalette.java#L284-L330 |
sematext/ActionGenerator | ag-player-es/src/main/java/com/sematext/ag/es/util/JSONUtils.java | JSONUtils.getElasticSearchBulkHeader | public static String getElasticSearchBulkHeader(SimpleDataEvent event, String index, String type) {
StringBuilder builder = new StringBuilder();
builder.append("{\"index\":{\"_index\":\"");
builder.append(index);
builder.append("\",\"_type\":\"");
builder.append(type);
builder.append("\",\"_id\"... | java | public static String getElasticSearchBulkHeader(SimpleDataEvent event, String index, String type) {
StringBuilder builder = new StringBuilder();
builder.append("{\"index\":{\"_index\":\"");
builder.append(index);
builder.append("\",\"_type\":\"");
builder.append(type);
builder.append("\",\"_id\"... | [
"public",
"static",
"String",
"getElasticSearchBulkHeader",
"(",
"SimpleDataEvent",
"event",
",",
"String",
"index",
",",
"String",
"type",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"builder",
".",
"append",
"(",
"\"{\\\"i... | Constructs ES bulk header for the document.
@param event
data event
@param index
index name
@param type
document type
@return ES bulk header | [
"Constructs",
"ES",
"bulk",
"header",
"for",
"the",
"document",
"."
] | train | https://github.com/sematext/ActionGenerator/blob/10f4a3e680f20d7d151f5d40e6758aeb072d474f/ag-player-es/src/main/java/com/sematext/ag/es/util/JSONUtils.java#L65-L75 |
Azure/azure-sdk-for-java | sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServersInner.java | ServersInner.updateAsync | public Observable<ServerInner> updateAsync(String resourceGroupName, String serverName, ServerUpdate parameters) {
return updateWithServiceResponseAsync(resourceGroupName, serverName, parameters).map(new Func1<ServiceResponse<ServerInner>, ServerInner>() {
@Override
public ServerInner ca... | java | public Observable<ServerInner> updateAsync(String resourceGroupName, String serverName, ServerUpdate parameters) {
return updateWithServiceResponseAsync(resourceGroupName, serverName, parameters).map(new Func1<ServiceResponse<ServerInner>, ServerInner>() {
@Override
public ServerInner ca... | [
"public",
"Observable",
"<",
"ServerInner",
">",
"updateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"serverName",
",",
"ServerUpdate",
"parameters",
")",
"{",
"return",
"updateWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"serverName",
",",
... | Updates an existing server.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param serverName The name of the server.
@param parameters The required parameters for updating a server.
@throws IllegalArgument... | [
"Updates",
"an",
"existing",
"server",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServersInner.java#L393-L400 |
IBM/ibm-cos-sdk-java | ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/internal/crypto/S3CryptoModuleBase.java | S3CryptoModuleBase.newContentCryptoMaterial | private ContentCryptoMaterial newContentCryptoMaterial(
EncryptionMaterialsProvider kekMaterialProvider,
Provider provider, AmazonWebServiceRequest req) {
EncryptionMaterials kekMaterials = kekMaterialProvider.getEncryptionMaterials();
if (kekMaterials == null)
throw ... | java | private ContentCryptoMaterial newContentCryptoMaterial(
EncryptionMaterialsProvider kekMaterialProvider,
Provider provider, AmazonWebServiceRequest req) {
EncryptionMaterials kekMaterials = kekMaterialProvider.getEncryptionMaterials();
if (kekMaterials == null)
throw ... | [
"private",
"ContentCryptoMaterial",
"newContentCryptoMaterial",
"(",
"EncryptionMaterialsProvider",
"kekMaterialProvider",
",",
"Provider",
"provider",
",",
"AmazonWebServiceRequest",
"req",
")",
"{",
"EncryptionMaterials",
"kekMaterials",
"=",
"kekMaterialProvider",
".",
"getE... | Returns a non-null content encryption material generated with the given kek
material and security providers.
@throws SdkClientException if no encryption material can be found from
the given encryption material provider. | [
"Returns",
"a",
"non",
"-",
"null",
"content",
"encryption",
"material",
"generated",
"with",
"the",
"given",
"kek",
"material",
"and",
"security",
"providers",
"."
] | train | https://github.com/IBM/ibm-cos-sdk-java/blob/d0bb2dd754c328a05e7dba8dc42e28b271b6daf2/ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/internal/crypto/S3CryptoModuleBase.java#L485-L492 |
SonarSource/sonarqube | server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java | MyBatis.newScrollingSelectStatement | public PreparedStatement newScrollingSelectStatement(DbSession session, String sql) {
int fetchSize = database.getDialect().getScrollDefaultFetchSize();
return newScrollingSelectStatement(session, sql, fetchSize);
} | java | public PreparedStatement newScrollingSelectStatement(DbSession session, String sql) {
int fetchSize = database.getDialect().getScrollDefaultFetchSize();
return newScrollingSelectStatement(session, sql, fetchSize);
} | [
"public",
"PreparedStatement",
"newScrollingSelectStatement",
"(",
"DbSession",
"session",
",",
"String",
"sql",
")",
"{",
"int",
"fetchSize",
"=",
"database",
".",
"getDialect",
"(",
")",
".",
"getScrollDefaultFetchSize",
"(",
")",
";",
"return",
"newScrollingSelec... | Create a PreparedStatement for SELECT requests with scrolling of results | [
"Create",
"a",
"PreparedStatement",
"for",
"SELECT",
"requests",
"with",
"scrolling",
"of",
"results"
] | train | https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java#L312-L315 |
biojava/biojava | biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/Matrices.java | Matrices.getRotationJAMA | public static Matrix getRotationJAMA(Matrix4d transform) {
Matrix rot = new Matrix(3, 3);
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
rot.set(j, i, transform.getElement(i, j)); // transposed
}
}
return rot;
} | java | public static Matrix getRotationJAMA(Matrix4d transform) {
Matrix rot = new Matrix(3, 3);
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
rot.set(j, i, transform.getElement(i, j)); // transposed
}
}
return rot;
} | [
"public",
"static",
"Matrix",
"getRotationJAMA",
"(",
"Matrix4d",
"transform",
")",
"{",
"Matrix",
"rot",
"=",
"new",
"Matrix",
"(",
"3",
",",
"3",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"3",
";",
"i",
"++",
")",
"{",
"for",
... | Convert a transformation matrix into a JAMA rotation matrix. Because the
JAMA matrix is a pre-multiplication matrix and the Vecmath matrix is a
post-multiplication one, the rotation matrix is transposed to ensure that
the transformation they produce is the same.
@param transform
Matrix4d with transposed rotation matri... | [
"Convert",
"a",
"transformation",
"matrix",
"into",
"a",
"JAMA",
"rotation",
"matrix",
".",
"Because",
"the",
"JAMA",
"matrix",
"is",
"a",
"pre",
"-",
"multiplication",
"matrix",
"and",
"the",
"Vecmath",
"matrix",
"is",
"a",
"post",
"-",
"multiplication",
"o... | train | https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/Matrices.java#L54-L63 |
languagetool-org/languagetool | languagetool-office-extension/src/main/java/org/languagetool/openoffice/ResultCache.java | ResultCache.removeRange | void removeRange(int firstParagraph, int lastParagraph) {
for(int i = 0; i < entries.size(); i++) {
if(entries.get(i).numberOfParagraph >= firstParagraph && entries.get(i).numberOfParagraph <= lastParagraph) {
entries.remove(i);
i--;
}
}
} | java | void removeRange(int firstParagraph, int lastParagraph) {
for(int i = 0; i < entries.size(); i++) {
if(entries.get(i).numberOfParagraph >= firstParagraph && entries.get(i).numberOfParagraph <= lastParagraph) {
entries.remove(i);
i--;
}
}
} | [
"void",
"removeRange",
"(",
"int",
"firstParagraph",
",",
"int",
"lastParagraph",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"entries",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
"entries",
".",
"get",
"(",
"i",
... | Remove all cache entries between firstParagraph and lastParagraph | [
"Remove",
"all",
"cache",
"entries",
"between",
"firstParagraph",
"and",
"lastParagraph"
] | train | https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-office-extension/src/main/java/org/languagetool/openoffice/ResultCache.java#L67-L74 |
netscaler/sdx_nitro | src/main/java/com/citrix/sdx/nitro/resource/config/mps/task_device_log.java | task_device_log.get_nitro_bulk_response | protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
{
task_device_log_responses result = (task_device_log_responses) service.get_payload_formatter().string_to_resource(task_device_log_responses.class, response);
if(result.errorcode != 0)
{
if (result... | java | protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
{
task_device_log_responses result = (task_device_log_responses) service.get_payload_formatter().string_to_resource(task_device_log_responses.class, response);
if(result.errorcode != 0)
{
if (result... | [
"protected",
"base_resource",
"[",
"]",
"get_nitro_bulk_response",
"(",
"nitro_service",
"service",
",",
"String",
"response",
")",
"throws",
"Exception",
"{",
"task_device_log_responses",
"result",
"=",
"(",
"task_device_log_responses",
")",
"service",
".",
"get_payloa... | <pre>
Converts API response of bulk operation into object and returns the object array in case of get request.
</pre> | [
"<pre",
">",
"Converts",
"API",
"response",
"of",
"bulk",
"operation",
"into",
"object",
"and",
"returns",
"the",
"object",
"array",
"in",
"case",
"of",
"get",
"request",
".",
"<",
"/",
"pre",
">"
] | train | https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/task_device_log.java#L269-L286 |
census-instrumentation/opencensus-java | api/src/main/java/io/opencensus/trace/SpanId.java | SpanId.fromBytes | public static SpanId fromBytes(byte[] src, int srcOffset) {
Utils.checkNotNull(src, "src");
return new SpanId(BigendianEncoding.longFromByteArray(src, srcOffset));
} | java | public static SpanId fromBytes(byte[] src, int srcOffset) {
Utils.checkNotNull(src, "src");
return new SpanId(BigendianEncoding.longFromByteArray(src, srcOffset));
} | [
"public",
"static",
"SpanId",
"fromBytes",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
")",
"{",
"Utils",
".",
"checkNotNull",
"(",
"src",
",",
"\"src\"",
")",
";",
"return",
"new",
"SpanId",
"(",
"BigendianEncoding",
".",
"longFromByteArray",
"... | Returns a {@code SpanId} whose representation is copied from the {@code src} beginning at the
{@code srcOffset} offset.
@param src the buffer where the representation of the {@code SpanId} is copied.
@param srcOffset the offset in the buffer where the representation of the {@code SpanId}
begins.
@return a {@code SpanI... | [
"Returns",
"a",
"{",
"@code",
"SpanId",
"}",
"whose",
"representation",
"is",
"copied",
"from",
"the",
"{",
"@code",
"src",
"}",
"beginning",
"at",
"the",
"{",
"@code",
"srcOffset",
"}",
"offset",
"."
] | train | https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/trace/SpanId.java#L85-L88 |
JodaOrg/joda-time | src/main/java/org/joda/time/Duration.java | Duration.withDurationAdded | public Duration withDurationAdded(long durationToAdd, int scalar) {
if (durationToAdd == 0 || scalar == 0) {
return this;
}
long add = FieldUtils.safeMultiply(durationToAdd, scalar);
long duration = FieldUtils.safeAdd(getMillis(), add);
return new Duration(duration);
... | java | public Duration withDurationAdded(long durationToAdd, int scalar) {
if (durationToAdd == 0 || scalar == 0) {
return this;
}
long add = FieldUtils.safeMultiply(durationToAdd, scalar);
long duration = FieldUtils.safeAdd(getMillis(), add);
return new Duration(duration);
... | [
"public",
"Duration",
"withDurationAdded",
"(",
"long",
"durationToAdd",
",",
"int",
"scalar",
")",
"{",
"if",
"(",
"durationToAdd",
"==",
"0",
"||",
"scalar",
"==",
"0",
")",
"{",
"return",
"this",
";",
"}",
"long",
"add",
"=",
"FieldUtils",
".",
"safeM... | Returns a new duration with this length plus that specified multiplied by the scalar.
This instance is immutable and is not altered.
<p>
If the addition is zero, this instance is returned.
@param durationToAdd the duration to add to this one
@param scalar the amount of times to add, such as -1 to subtract once
@retu... | [
"Returns",
"a",
"new",
"duration",
"with",
"this",
"length",
"plus",
"that",
"specified",
"multiplied",
"by",
"the",
"scalar",
".",
"This",
"instance",
"is",
"immutable",
"and",
"is",
"not",
"altered",
".",
"<p",
">",
"If",
"the",
"addition",
"is",
"zero",... | train | https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/Duration.java#L390-L397 |
jparsec/jparsec | jparsec/src/main/java/org/jparsec/ParseContext.java | ParseContext.applyNewNode | final boolean applyNewNode(Parser<?> parser, String name) {
int physical = at;
int logical = step;
TreeNode latestChild = trace.getLatestChild();
trace.push(name);
if (parser.apply(this)) {
trace.setCurrentResult(result);
trace.pop();
return true;
}
if (stillThere(physical,... | java | final boolean applyNewNode(Parser<?> parser, String name) {
int physical = at;
int logical = step;
TreeNode latestChild = trace.getLatestChild();
trace.push(name);
if (parser.apply(this)) {
trace.setCurrentResult(result);
trace.pop();
return true;
}
if (stillThere(physical,... | [
"final",
"boolean",
"applyNewNode",
"(",
"Parser",
"<",
"?",
">",
"parser",
",",
"String",
"name",
")",
"{",
"int",
"physical",
"=",
"at",
";",
"int",
"logical",
"=",
"step",
";",
"TreeNode",
"latestChild",
"=",
"trace",
".",
"getLatestChild",
"(",
")",
... | Applies {@code parser} as a new tree node with {@code name}, and if fails, reports
"expecting $name". | [
"Applies",
"{"
] | train | https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/ParseContext.java#L140-L155 |
iron-io/iron_mq_java | src/main/java/io/iron/ironmq/Queue.java | Queue.touchMessage | public MessageOptions touchMessage(String id, String reservationId) throws IOException {
return touchMessage(id, reservationId, null);
} | java | public MessageOptions touchMessage(String id, String reservationId) throws IOException {
return touchMessage(id, reservationId, null);
} | [
"public",
"MessageOptions",
"touchMessage",
"(",
"String",
"id",
",",
"String",
"reservationId",
")",
"throws",
"IOException",
"{",
"return",
"touchMessage",
"(",
"id",
",",
"reservationId",
",",
"null",
")",
";",
"}"
] | Touching a reserved message extends its timeout to the duration specified when the message was created.
@param id The ID of the message to delete.
@param reservationId This id is returned when you reserve a message and must be provided to delete a message that is reserved.
@throws io.iron.ironmq.HTTPException If the ... | [
"Touching",
"a",
"reserved",
"message",
"extends",
"its",
"timeout",
"to",
"the",
"duration",
"specified",
"when",
"the",
"message",
"was",
"created",
"."
] | train | https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L222-L224 |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwpolicylabel_appfwpolicy_binding.java | appfwpolicylabel_appfwpolicy_binding.count_filtered | public static long count_filtered(nitro_service service, String labelname, String filter) throws Exception{
appfwpolicylabel_appfwpolicy_binding obj = new appfwpolicylabel_appfwpolicy_binding();
obj.set_labelname(labelname);
options option = new options();
option.set_count(true);
option.set_filter(filter);
... | java | public static long count_filtered(nitro_service service, String labelname, String filter) throws Exception{
appfwpolicylabel_appfwpolicy_binding obj = new appfwpolicylabel_appfwpolicy_binding();
obj.set_labelname(labelname);
options option = new options();
option.set_count(true);
option.set_filter(filter);
... | [
"public",
"static",
"long",
"count_filtered",
"(",
"nitro_service",
"service",
",",
"String",
"labelname",
",",
"String",
"filter",
")",
"throws",
"Exception",
"{",
"appfwpolicylabel_appfwpolicy_binding",
"obj",
"=",
"new",
"appfwpolicylabel_appfwpolicy_binding",
"(",
"... | Use this API to count the filtered set of appfwpolicylabel_appfwpolicy_binding resources.
filter string should be in JSON format.eg: "port:80,servicetype:HTTP". | [
"Use",
"this",
"API",
"to",
"count",
"the",
"filtered",
"set",
"of",
"appfwpolicylabel_appfwpolicy_binding",
"resources",
".",
"filter",
"string",
"should",
"be",
"in",
"JSON",
"format",
".",
"eg",
":",
"port",
":",
"80",
"servicetype",
":",
"HTTP",
"."
] | train | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwpolicylabel_appfwpolicy_binding.java#L335-L346 |
khuxtable/seaglass | src/main/java/com/seaglasslookandfeel/painter/AbstractRegionPainter.java | AbstractRegionPainter.getFocusPaint | public Paint getFocusPaint(Shape s, FocusType focusType, boolean useToolBarFocus) {
if (focusType == FocusType.OUTER_FOCUS) {
return useToolBarFocus ? outerToolBarFocus : outerFocus;
} else {
return useToolBarFocus ? innerToolBarFocus : innerFocus;
}
} | java | public Paint getFocusPaint(Shape s, FocusType focusType, boolean useToolBarFocus) {
if (focusType == FocusType.OUTER_FOCUS) {
return useToolBarFocus ? outerToolBarFocus : outerFocus;
} else {
return useToolBarFocus ? innerToolBarFocus : innerFocus;
}
} | [
"public",
"Paint",
"getFocusPaint",
"(",
"Shape",
"s",
",",
"FocusType",
"focusType",
",",
"boolean",
"useToolBarFocus",
")",
"{",
"if",
"(",
"focusType",
"==",
"FocusType",
".",
"OUTER_FOCUS",
")",
"{",
"return",
"useToolBarFocus",
"?",
"outerToolBarFocus",
":"... | Get the paint to use for a focus ring.
@param s the shape to paint.
@param focusType the focus type.
@param useToolBarFocus whether we should use the colors for a toolbar control.
@return the paint to use to paint the focus ring. | [
"Get",
"the",
"paint",
"to",
"use",
"for",
"a",
"focus",
"ring",
"."
] | train | https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/AbstractRegionPainter.java#L175-L181 |
padrig64/ValidationFramework | validationframework-core/src/main/java/com/google/code/validationframework/base/dataprovider/MapCompositeDataProvider.java | MapCompositeDataProvider.addDataProvider | public void addDataProvider(K key, DataProvider<DPO> dataProvider) {
dataProviders.put(key, dataProvider);
} | java | public void addDataProvider(K key, DataProvider<DPO> dataProvider) {
dataProviders.put(key, dataProvider);
} | [
"public",
"void",
"addDataProvider",
"(",
"K",
"key",
",",
"DataProvider",
"<",
"DPO",
">",
"dataProvider",
")",
"{",
"dataProviders",
".",
"put",
"(",
"key",
",",
"dataProvider",
")",
";",
"}"
] | Adds the specified data provider with the specified key.
@param key Key associated to the data provider.
@param dataProvider Data provider associated to the key. | [
"Adds",
"the",
"specified",
"data",
"provider",
"with",
"the",
"specified",
"key",
"."
] | train | https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/dataprovider/MapCompositeDataProvider.java#L56-L58 |
jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java | Error.mapping | public static void mapping(String mappedFieldName, String mappedClassName){
throw new MappingErrorException(MSG.INSTANCE.message(mappingErrorException2length,mappedFieldName,mappedClassName));
} | java | public static void mapping(String mappedFieldName, String mappedClassName){
throw new MappingErrorException(MSG.INSTANCE.message(mappingErrorException2length,mappedFieldName,mappedClassName));
} | [
"public",
"static",
"void",
"mapping",
"(",
"String",
"mappedFieldName",
",",
"String",
"mappedClassName",
")",
"{",
"throw",
"new",
"MappingErrorException",
"(",
"MSG",
".",
"INSTANCE",
".",
"message",
"(",
"mappingErrorException2length",
",",
"mappedFieldName",
",... | Thrown when the length of classes and attribute parameter isn't the same.
@param mappedFieldName name of the mapped field
@param mappedClassName name of the mapped field's class | [
"Thrown",
"when",
"the",
"length",
"of",
"classes",
"and",
"attribute",
"parameter",
"isn",
"t",
"the",
"same",
"."
] | train | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L463-L465 |
cdk/cdk | base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java | ReactionSchemeManipulator.setScheme | private static IReactionScheme setScheme(IReaction reaction, IReactionSet reactionSet) {
IReactionScheme reactionScheme = reaction.getBuilder().newInstance(IReactionScheme.class);
IReactionSet reactConSet = extractSubsequentReaction(reaction, reactionSet);
if (reactConSet.getReactionCount() != ... | java | private static IReactionScheme setScheme(IReaction reaction, IReactionSet reactionSet) {
IReactionScheme reactionScheme = reaction.getBuilder().newInstance(IReactionScheme.class);
IReactionSet reactConSet = extractSubsequentReaction(reaction, reactionSet);
if (reactConSet.getReactionCount() != ... | [
"private",
"static",
"IReactionScheme",
"setScheme",
"(",
"IReaction",
"reaction",
",",
"IReactionSet",
"reactionSet",
")",
"{",
"IReactionScheme",
"reactionScheme",
"=",
"reaction",
".",
"getBuilder",
"(",
")",
".",
"newInstance",
"(",
"IReactionScheme",
".",
"clas... | Create a IReactionScheme given as a top a IReaction. If it doesn't exist any subsequent reaction
return null;
@param reaction The IReaction as a top
@param reactionSet The IReactionSet to extract a IReactionScheme
@return The IReactionScheme | [
"Create",
"a",
"IReactionScheme",
"given",
"as",
"a",
"top",
"a",
"IReaction",
".",
"If",
"it",
"doesn",
"t",
"exist",
"any",
"subsequent",
"reaction",
"return",
"null",
";"
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java#L186-L200 |
alkacon/opencms-core | src/org/opencms/security/CmsPrincipal.java | CmsPrincipal.readPrincipalIncludingHistory | public static I_CmsPrincipal readPrincipalIncludingHistory(CmsObject cms, CmsUUID id) throws CmsException {
try {
// first try to read the principal as a user
return cms.readUser(id);
} catch (CmsException exc) {
// assume user does not exist
}
try {
... | java | public static I_CmsPrincipal readPrincipalIncludingHistory(CmsObject cms, CmsUUID id) throws CmsException {
try {
// first try to read the principal as a user
return cms.readUser(id);
} catch (CmsException exc) {
// assume user does not exist
}
try {
... | [
"public",
"static",
"I_CmsPrincipal",
"readPrincipalIncludingHistory",
"(",
"CmsObject",
"cms",
",",
"CmsUUID",
"id",
")",
"throws",
"CmsException",
"{",
"try",
"{",
"// first try to read the principal as a user",
"return",
"cms",
".",
"readUser",
"(",
"id",
")",
";",... | Utility function to read a principal by its id from the OpenCms database using the
provided OpenCms user context.<p>
@param cms the OpenCms user context to use when reading the principal
@param id the id of the principal to read
@return the principal read from the OpenCms database
@throws CmsException in case the pr... | [
"Utility",
"function",
"to",
"read",
"a",
"principal",
"by",
"its",
"id",
"from",
"the",
"OpenCms",
"database",
"using",
"the",
"provided",
"OpenCms",
"user",
"context",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/security/CmsPrincipal.java#L338-L360 |
paypal/SeLion | codegen/src/main/java/com/paypal/selion/plugins/GUIObjectDetails.java | GUIObjectDetails.transformKeys | public static List<GUIObjectDetails> transformKeys(List<String> keys) {
return transformKeys(keys, TestPlatform.WEB);
} | java | public static List<GUIObjectDetails> transformKeys(List<String> keys) {
return transformKeys(keys, TestPlatform.WEB);
} | [
"public",
"static",
"List",
"<",
"GUIObjectDetails",
">",
"transformKeys",
"(",
"List",
"<",
"String",
">",
"keys",
")",
"{",
"return",
"transformKeys",
"(",
"keys",
",",
"TestPlatform",
".",
"WEB",
")",
";",
"}"
] | A overloaded version of transformKeys method which internally specifies {@link TestPlatform#WEB} as the
{@link TestPlatform}
@param keys
keys for which {@link GUIObjectDetails} is to be created.
@return the {@link List} of {@link GUIObjectDetails} | [
"A",
"overloaded",
"version",
"of",
"transformKeys",
"method",
"which",
"internally",
"specifies",
"{",
"@link",
"TestPlatform#WEB",
"}",
"as",
"the",
"{",
"@link",
"TestPlatform",
"}"
] | train | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/codegen/src/main/java/com/paypal/selion/plugins/GUIObjectDetails.java#L124-L126 |
spotbugs/spotbugs | spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java | Subtypes2.addSupertypeEdges | private void addSupertypeEdges(ClassVertex vertex, LinkedList<XClass> workList) {
XClass xclass = vertex.getXClass();
// Direct superclass
ClassDescriptor superclassDescriptor = xclass.getSuperclassDescriptor();
if (superclassDescriptor != null) {
addInheritanceEdge(vertex, ... | java | private void addSupertypeEdges(ClassVertex vertex, LinkedList<XClass> workList) {
XClass xclass = vertex.getXClass();
// Direct superclass
ClassDescriptor superclassDescriptor = xclass.getSuperclassDescriptor();
if (superclassDescriptor != null) {
addInheritanceEdge(vertex, ... | [
"private",
"void",
"addSupertypeEdges",
"(",
"ClassVertex",
"vertex",
",",
"LinkedList",
"<",
"XClass",
">",
"workList",
")",
"{",
"XClass",
"xclass",
"=",
"vertex",
".",
"getXClass",
"(",
")",
";",
"// Direct superclass",
"ClassDescriptor",
"superclassDescriptor",
... | Add supertype edges to the InheritanceGraph for given ClassVertex. If any
direct supertypes have not been processed, add them to the worklist.
@param vertex
a ClassVertex whose supertype edges need to be added
@param workList
work list of ClassVertexes that need to have their supertype
edges added | [
"Add",
"supertype",
"edges",
"to",
"the",
"InheritanceGraph",
"for",
"given",
"ClassVertex",
".",
"If",
"any",
"direct",
"supertypes",
"have",
"not",
"been",
"processed",
"add",
"them",
"to",
"the",
"worklist",
"."
] | train | https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L1307-L1320 |
Stratio/deep-spark | deep-jdbc/src/main/java/com/stratio/deep/jdbc/extractor/JdbcNativeCellExtractor.java | JdbcNativeCellExtractor.transformElement | @Override
protected Cells transformElement(Map<String, Object> entity) {
return UtilJdbc.getCellsFromObject(entity, jdbcDeepJobConfig);
} | java | @Override
protected Cells transformElement(Map<String, Object> entity) {
return UtilJdbc.getCellsFromObject(entity, jdbcDeepJobConfig);
} | [
"@",
"Override",
"protected",
"Cells",
"transformElement",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"entity",
")",
"{",
"return",
"UtilJdbc",
".",
"getCellsFromObject",
"(",
"entity",
",",
"jdbcDeepJobConfig",
")",
";",
"}"
] | Transforms a database row represented as a Map into a Cells object.
@param entity Database row represented as a Map of column name:column value.
@return Cells object with database row data. | [
"Transforms",
"a",
"database",
"row",
"represented",
"as",
"a",
"Map",
"into",
"a",
"Cells",
"object",
"."
] | train | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-jdbc/src/main/java/com/stratio/deep/jdbc/extractor/JdbcNativeCellExtractor.java#L48-L51 |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java | OjbTagsHandler.createTorqueSchema | public String createTorqueSchema(Properties attributes) throws XDocletException
{
String dbName = (String)getDocletContext().getConfigParam(CONFIG_PARAM_DATABASENAME);
_torqueModel = new TorqueModelDef(dbName, _model);
return "";
} | java | public String createTorqueSchema(Properties attributes) throws XDocletException
{
String dbName = (String)getDocletContext().getConfigParam(CONFIG_PARAM_DATABASENAME);
_torqueModel = new TorqueModelDef(dbName, _model);
return "";
} | [
"public",
"String",
"createTorqueSchema",
"(",
"Properties",
"attributes",
")",
"throws",
"XDocletException",
"{",
"String",
"dbName",
"=",
"(",
"String",
")",
"getDocletContext",
"(",
")",
".",
"getConfigParam",
"(",
"CONFIG_PARAM_DATABASENAME",
")",
";",
"_torqueM... | Generates a torque schema for the model.
@param attributes The attributes of the tag
@return The property value
@exception XDocletException If an error occurs
@doc.tag type="content" | [
"Generates",
"a",
"torque",
"schema",
"for",
"the",
"model",
"."
] | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java#L1310-L1316 |
Azure/azure-sdk-for-java | automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscConfigurationsInner.java | DscConfigurationsInner.getContent | public String getContent(String resourceGroupName, String automationAccountName, String configurationName) {
return getContentWithServiceResponseAsync(resourceGroupName, automationAccountName, configurationName).toBlocking().single().body();
} | java | public String getContent(String resourceGroupName, String automationAccountName, String configurationName) {
return getContentWithServiceResponseAsync(resourceGroupName, automationAccountName, configurationName).toBlocking().single().body();
} | [
"public",
"String",
"getContent",
"(",
"String",
"resourceGroupName",
",",
"String",
"automationAccountName",
",",
"String",
"configurationName",
")",
"{",
"return",
"getContentWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"automationAccountName",
",",
"configur... | Retrieve the configuration script identified by configuration name.
@param resourceGroupName Name of an Azure Resource group.
@param automationAccountName The name of the automation account.
@param configurationName The configuration name.
@throws IllegalArgumentException thrown if parameters fail the validation
@thro... | [
"Retrieve",
"the",
"configuration",
"script",
"identified",
"by",
"configuration",
"name",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscConfigurationsInner.java#L571-L573 |
b3dgs/lionengine | lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/MapTileTransitionModel.java | MapTileTransitionModel.updateTransitive | private void updateTransitive(Collection<Tile> resolved, Tile tile, Tile neighbor, GroupTransition transitive)
{
final String transitiveOut = transitive.getOut();
final Transition transition = new Transition(TransitionType.CENTER, transitiveOut, transitiveOut);
final Collection<TileRef> ... | java | private void updateTransitive(Collection<Tile> resolved, Tile tile, Tile neighbor, GroupTransition transitive)
{
final String transitiveOut = transitive.getOut();
final Transition transition = new Transition(TransitionType.CENTER, transitiveOut, transitiveOut);
final Collection<TileRef> ... | [
"private",
"void",
"updateTransitive",
"(",
"Collection",
"<",
"Tile",
">",
"resolved",
",",
"Tile",
"tile",
",",
"Tile",
"neighbor",
",",
"GroupTransition",
"transitive",
")",
"{",
"final",
"String",
"transitiveOut",
"=",
"transitive",
".",
"getOut",
"(",
")"... | Update the transitive between tile and its neighbor.
@param resolved The resolved tiles.
@param tile The tile reference.
@param neighbor The neighbor reference.
@param transitive The transitive involved. | [
"Update",
"the",
"transitive",
"between",
"tile",
"and",
"its",
"neighbor",
"."
] | train | https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/MapTileTransitionModel.java#L358-L376 |
mygreen/xlsmapper | src/main/java/com/gh/mygreen/xlsmapper/util/Utils.java | Utils.normalize | public static String normalize(final String text, final Configuration config){
if(text != null && config.isNormalizeLabelText()){
return text.trim().replaceAll("[\n\r]", "").replaceAll("[\t ]+", " ");
}
return text;
} | java | public static String normalize(final String text, final Configuration config){
if(text != null && config.isNormalizeLabelText()){
return text.trim().replaceAll("[\n\r]", "").replaceAll("[\t ]+", " ");
}
return text;
} | [
"public",
"static",
"String",
"normalize",
"(",
"final",
"String",
"text",
",",
"final",
"Configuration",
"config",
")",
"{",
"if",
"(",
"text",
"!=",
"null",
"&&",
"config",
".",
"isNormalizeLabelText",
"(",
")",
")",
"{",
"return",
"text",
".",
"trim",
... | システム設定に従いラベルを正規化する。
@since 1.1
@param text セルのラベル
@param config システム設定
@return true:ラベルが一致する。 | [
"システム設定に従いラベルを正規化する。"
] | train | https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/util/Utils.java#L256-L261 |
oehf/ipf-oht-atna | auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDMAuditor.java | XDMAuditor.auditPortableMediaImport | public void auditPortableMediaImport(
RFC3881EventOutcomeCodes eventOutcome,
String submissionSetUniqueId,
String patientId,
List<CodedValueType> purposesOfUse)
{
if (!isAuditorEnabled()) {
return;
}
ImportEvent importEvent = new ImportEvent(false, eventOutcome, new IHETransactionEventTy... | java | public void auditPortableMediaImport(
RFC3881EventOutcomeCodes eventOutcome,
String submissionSetUniqueId,
String patientId,
List<CodedValueType> purposesOfUse)
{
if (!isAuditorEnabled()) {
return;
}
ImportEvent importEvent = new ImportEvent(false, eventOutcome, new IHETransactionEventTy... | [
"public",
"void",
"auditPortableMediaImport",
"(",
"RFC3881EventOutcomeCodes",
"eventOutcome",
",",
"String",
"submissionSetUniqueId",
",",
"String",
"patientId",
",",
"List",
"<",
"CodedValueType",
">",
"purposesOfUse",
")",
"{",
"if",
"(",
"!",
"isAuditorEnabled",
"... | Audits a PHI Import event for the IHE XDM Portable Media Importer
actor and ITI-32 Distribute Document Set on Media Transaction.
@param eventOutcome The event outcome indicator
@param submissionSetUniqueId The Unique ID of the Submission Set imported
@param patientId The ID of the Patient to which the Submission Set... | [
"Audits",
"a",
"PHI",
"Import",
"event",
"for",
"the",
"IHE",
"XDM",
"Portable",
"Media",
"Importer",
"actor",
"and",
"ITI",
"-",
"32",
"Distribute",
"Document",
"Set",
"on",
"Media",
"Transaction",
"."
] | train | https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDMAuditor.java#L53-L71 |
jenkinsci/jenkins | core/src/main/java/jenkins/model/Jenkins.java | Jenkins.doQuietDown | @RequirePOST
public HttpRedirect doQuietDown(@QueryParameter boolean block, @QueryParameter int timeout) throws InterruptedException, IOException {
synchronized (this) {
checkPermission(ADMINISTER);
isQuietingDown = true;
}
if (block) {
long waitUntil = ti... | java | @RequirePOST
public HttpRedirect doQuietDown(@QueryParameter boolean block, @QueryParameter int timeout) throws InterruptedException, IOException {
synchronized (this) {
checkPermission(ADMINISTER);
isQuietingDown = true;
}
if (block) {
long waitUntil = ti... | [
"@",
"RequirePOST",
"public",
"HttpRedirect",
"doQuietDown",
"(",
"@",
"QueryParameter",
"boolean",
"block",
",",
"@",
"QueryParameter",
"int",
"timeout",
")",
"throws",
"InterruptedException",
",",
"IOException",
"{",
"synchronized",
"(",
"this",
")",
"{",
"check... | Quiet down Jenkins - preparation for a restart
@param block Block until the system really quiets down and no builds are running
@param timeout If non-zero, only block up to the specified number of milliseconds | [
"Quiet",
"down",
"Jenkins",
"-",
"preparation",
"for",
"a",
"restart"
] | train | https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/Jenkins.java#L3818-L3834 |
OpenLiberty/open-liberty | dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDynacache.java | HTODDynacache.delCacheEntry | public void delCacheEntry(CacheEntry ce, int cause, int source, boolean fromDepIdTemplateInvalidation) {
this.invalidationBuffer.add(ce.id, HTODInvalidationBuffer.EXPLICIT_BUFFER, cause, source, fromDepIdTemplateInvalidation, !HTODInvalidationBuffer.FIRE_EVENT,
!HTODInvalidat... | java | public void delCacheEntry(CacheEntry ce, int cause, int source, boolean fromDepIdTemplateInvalidation) {
this.invalidationBuffer.add(ce.id, HTODInvalidationBuffer.EXPLICIT_BUFFER, cause, source, fromDepIdTemplateInvalidation, !HTODInvalidationBuffer.FIRE_EVENT,
!HTODInvalidat... | [
"public",
"void",
"delCacheEntry",
"(",
"CacheEntry",
"ce",
",",
"int",
"cause",
",",
"int",
"source",
",",
"boolean",
"fromDepIdTemplateInvalidation",
")",
"{",
"this",
".",
"invalidationBuffer",
".",
"add",
"(",
"ce",
".",
"id",
",",
"HTODInvalidationBuffer",
... | ***********************************************************************
delCacheEntry()
Delete cacheEntry from the disk. This also remove dependencies for all dataIds and templates
to the cacheEntry
*********************************************************************** | [
"***********************************************************************",
"delCacheEntry",
"()",
"Delete",
"cacheEntry",
"from",
"the",
"disk",
".",
"This",
"also",
"remove",
"dependencies",
"for",
"all",
"dataIds",
"and",
"templates",
"to",
"the",
"cacheEntry",
"*********... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDynacache.java#L664-L671 |
jenetics/jenetics | jenetics/src/main/java/io/jenetics/engine/Codecs.java | Codecs.ofScalar | public static <A> Codec<A, AnyGene<A>> ofScalar(
final Supplier<? extends A> supplier,
final Predicate<? super A> validator
) {
return Codec.of(
Genotype.of(AnyChromosome.of(supplier, validator)),
gt -> gt.getGene().getAllele()
);
} | java | public static <A> Codec<A, AnyGene<A>> ofScalar(
final Supplier<? extends A> supplier,
final Predicate<? super A> validator
) {
return Codec.of(
Genotype.of(AnyChromosome.of(supplier, validator)),
gt -> gt.getGene().getAllele()
);
} | [
"public",
"static",
"<",
"A",
">",
"Codec",
"<",
"A",
",",
"AnyGene",
"<",
"A",
">",
">",
"ofScalar",
"(",
"final",
"Supplier",
"<",
"?",
"extends",
"A",
">",
"supplier",
",",
"final",
"Predicate",
"<",
"?",
"super",
"A",
">",
"validator",
")",
"{"... | Return a scala {@code Codec} with the given allele {@link Supplier} and
allele {@code validator}. The {@code supplier} is responsible for
creating new random alleles, and the {@code validator} can verify it.
<p>
The following example shows a codec which creates and verifies
{@code BigInteger} objects.
<pre>{@code
final... | [
"Return",
"a",
"scala",
"{",
"@code",
"Codec",
"}",
"with",
"the",
"given",
"allele",
"{",
"@link",
"Supplier",
"}",
"and",
"allele",
"{",
"@code",
"validator",
"}",
".",
"The",
"{",
"@code",
"supplier",
"}",
"is",
"responsible",
"for",
"creating",
"new"... | train | https://github.com/jenetics/jenetics/blob/ee516770c65ef529b27deb283f071c85f344eff4/jenetics/src/main/java/io/jenetics/engine/Codecs.java#L148-L156 |
ModeShape/modeshape | web/modeshape-web-jcr-rest/src/main/java/org/modeshape/web/jcr/rest/model/RestRepositories.java | RestRepositories.addRepository | public Repository addRepository( String name,
HttpServletRequest request ) {
Repository repository = new Repository(name, request);
repositories.add(repository);
return repository;
} | java | public Repository addRepository( String name,
HttpServletRequest request ) {
Repository repository = new Repository(name, request);
repositories.add(repository);
return repository;
} | [
"public",
"Repository",
"addRepository",
"(",
"String",
"name",
",",
"HttpServletRequest",
"request",
")",
"{",
"Repository",
"repository",
"=",
"new",
"Repository",
"(",
"name",
",",
"request",
")",
";",
"repositories",
".",
"add",
"(",
"repository",
")",
";"... | Adds a repository to the list.
@param name a {@code non-null} string, the name of the repository.
@param request a {@link HttpServletRequest} instance
@return a {@link Repository} instance. | [
"Adds",
"a",
"repository",
"to",
"the",
"list",
"."
] | train | https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-jcr-rest/src/main/java/org/modeshape/web/jcr/rest/model/RestRepositories.java#L52-L57 |
albfernandez/itext2 | src/main/java/com/lowagie/text/Document.java | Document.addProducer | public boolean addProducer() {
try {
return add(new Meta(Element.PRODUCER, getVersion()));
} catch (DocumentException de) {
throw new ExceptionConverter(de);
}
} | java | public boolean addProducer() {
try {
return add(new Meta(Element.PRODUCER, getVersion()));
} catch (DocumentException de) {
throw new ExceptionConverter(de);
}
} | [
"public",
"boolean",
"addProducer",
"(",
")",
"{",
"try",
"{",
"return",
"add",
"(",
"new",
"Meta",
"(",
"Element",
".",
"PRODUCER",
",",
"getVersion",
"(",
")",
")",
")",
";",
"}",
"catch",
"(",
"DocumentException",
"de",
")",
"{",
"throw",
"new",
"... | Adds the producer to a Document.
@return <CODE>true</CODE> if successful, <CODE>false</CODE> otherwise | [
"Adds",
"the",
"producer",
"to",
"a",
"Document",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/Document.java#L606-L612 |
i-net-software/jlessc | src/com/inet/lib/less/CssMediaOutput.java | CssMediaOutput.startBlock | void startBlock( String[] selectors , StringBuilder output ) {
this.results.add( new CssRuleOutput( selectors, output, isReference ) );
} | java | void startBlock( String[] selectors , StringBuilder output ) {
this.results.add( new CssRuleOutput( selectors, output, isReference ) );
} | [
"void",
"startBlock",
"(",
"String",
"[",
"]",
"selectors",
",",
"StringBuilder",
"output",
")",
"{",
"this",
".",
"results",
".",
"add",
"(",
"new",
"CssRuleOutput",
"(",
"selectors",
",",
"output",
",",
"isReference",
")",
")",
";",
"}"
] | Start a block inside the media
@param selectors
the selectors
@param output
a buffer for the content of the rule. | [
"Start",
"a",
"block",
"inside",
"the",
"media"
] | train | https://github.com/i-net-software/jlessc/blob/15b13e1637f6cc2e4d72df021e23ee0ca8d5e629/src/com/inet/lib/less/CssMediaOutput.java#L107-L109 |
flow/commons | src/main/java/com/flowpowered/commons/map/impl/TTripleInt21ObjectHashMap.java | TTripleInt21ObjectHashMap.put | @Override
public T put(int x, int y, int z, T value) {
long key = Int21TripleHashed.key(x, y, z);
return map.put(key, value);
} | java | @Override
public T put(int x, int y, int z, T value) {
long key = Int21TripleHashed.key(x, y, z);
return map.put(key, value);
} | [
"@",
"Override",
"public",
"T",
"put",
"(",
"int",
"x",
",",
"int",
"y",
",",
"int",
"z",
",",
"T",
"value",
")",
"{",
"long",
"key",
"=",
"Int21TripleHashed",
".",
"key",
"(",
"x",
",",
"y",
",",
"z",
")",
";",
"return",
"map",
".",
"put",
"... | Associates the specified value with the specified key in this map (optional operation). If the map previously contained a mapping for the key, the old value is replaced by the specified value.
(A map m is said to contain a mapping for a key k if and only if {@see #containsKey(int, int, int) m.containsKey(k)} would retu... | [
"Associates",
"the",
"specified",
"value",
"with",
"the",
"specified",
"key",
"in",
"this",
"map",
"(",
"optional",
"operation",
")",
".",
"If",
"the",
"map",
"previously",
"contained",
"a",
"mapping",
"for",
"the",
"key",
"the",
"old",
"value",
"is",
"rep... | train | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/map/impl/TTripleInt21ObjectHashMap.java#L82-L86 |
Whiley/WhileyCompiler | src/main/java/wyil/check/FlowTypeCheck.java | FlowTypeCheck.checkBreak | private Environment checkBreak(Stmt.Break stmt, Environment environment, EnclosingScope scope) {
// FIXME: need to check environment to the break destination
return FlowTypeUtils.BOTTOM;
} | java | private Environment checkBreak(Stmt.Break stmt, Environment environment, EnclosingScope scope) {
// FIXME: need to check environment to the break destination
return FlowTypeUtils.BOTTOM;
} | [
"private",
"Environment",
"checkBreak",
"(",
"Stmt",
".",
"Break",
"stmt",
",",
"Environment",
"environment",
",",
"EnclosingScope",
"scope",
")",
"{",
"// FIXME: need to check environment to the break destination",
"return",
"FlowTypeUtils",
".",
"BOTTOM",
";",
"}"
] | Type check a break statement. This requires propagating the current
environment to the block destination, to ensure that the actual types of all
variables at that point are precise.
@param stmt
Statement to type check
@param environment
Determines the type of all variables immediately going into this
block
@return | [
"Type",
"check",
"a",
"break",
"statement",
".",
"This",
"requires",
"propagating",
"the",
"current",
"environment",
"to",
"the",
"block",
"destination",
"to",
"ensure",
"that",
"the",
"actual",
"types",
"of",
"all",
"variables",
"at",
"that",
"point",
"are",
... | train | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/check/FlowTypeCheck.java#L464-L467 |
tvesalainen/util | util/src/main/java/org/vesalainen/navi/Navis.java | Navis.addLongitude | public static final double addLongitude(double longitude, double delta)
{
double gha = longitudeToGHA(longitude);
gha -= delta;
return ghaToLongitude(normalizeAngle(gha));
} | java | public static final double addLongitude(double longitude, double delta)
{
double gha = longitudeToGHA(longitude);
gha -= delta;
return ghaToLongitude(normalizeAngle(gha));
} | [
"public",
"static",
"final",
"double",
"addLongitude",
"(",
"double",
"longitude",
",",
"double",
"delta",
")",
"{",
"double",
"gha",
"=",
"longitudeToGHA",
"(",
"longitude",
")",
";",
"gha",
"-=",
"delta",
";",
"return",
"ghaToLongitude",
"(",
"normalizeAngle... | Adds delta to longitude. Positive delta is to east
@param longitude
@param delta
@return | [
"Adds",
"delta",
"to",
"longitude",
".",
"Positive",
"delta",
"is",
"to",
"east"
] | train | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/navi/Navis.java#L232-L237 |
mfornos/humanize | humanize-icu/src/main/java/humanize/ICUHumanize.java | ICUHumanize.withinLocale | private static <T> T withinLocale(final Callable<T> operation, final Locale locale)
{
DefaultICUContext ctx = context.get();
Locale oldLocale = ctx.getLocale();
try
{
ctx.setLocale(locale);
return operation.call();
} catch (Exception e)
{
... | java | private static <T> T withinLocale(final Callable<T> operation, final Locale locale)
{
DefaultICUContext ctx = context.get();
Locale oldLocale = ctx.getLocale();
try
{
ctx.setLocale(locale);
return operation.call();
} catch (Exception e)
{
... | [
"private",
"static",
"<",
"T",
">",
"T",
"withinLocale",
"(",
"final",
"Callable",
"<",
"T",
">",
"operation",
",",
"final",
"Locale",
"locale",
")",
"{",
"DefaultICUContext",
"ctx",
"=",
"context",
".",
"get",
"(",
")",
";",
"Locale",
"oldLocale",
"=",
... | <p>
Wraps the given operation on a context with the specified locale.
</p>
@param operation
Operation to be performed
@param locale
Target locale
@return Result of the operation | [
"<p",
">",
"Wraps",
"the",
"given",
"operation",
"on",
"a",
"context",
"with",
"the",
"specified",
"locale",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-icu/src/main/java/humanize/ICUHumanize.java#L1777-L1794 |
spotbugs/spotbugs | eclipsePlugin/src/de/tobject/findbugs/FindbugsPlugin.java | FindbugsPlugin.readBugCollectionAndProject | private static void readBugCollectionAndProject(IProject project, IProgressMonitor monitor)
throws IOException, DocumentException, CoreException {
SortedBugCollection bugCollection;
IPath bugCollectionPath = getBugCollectionFile(project);
// Don't turn the path to an IFile because i... | java | private static void readBugCollectionAndProject(IProject project, IProgressMonitor monitor)
throws IOException, DocumentException, CoreException {
SortedBugCollection bugCollection;
IPath bugCollectionPath = getBugCollectionFile(project);
// Don't turn the path to an IFile because i... | [
"private",
"static",
"void",
"readBugCollectionAndProject",
"(",
"IProject",
"project",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"IOException",
",",
"DocumentException",
",",
"CoreException",
"{",
"SortedBugCollection",
"bugCollection",
";",
"IPath",
"bugCollect... | Read saved bug collection and findbugs project from file. Will populate
the bug collection and findbugs project session properties if successful.
If there is no saved bug collection and project for the eclipse project,
then FileNotFoundException will be thrown.
@param project
the eclipse project
@param monitor
a progr... | [
"Read",
"saved",
"bug",
"collection",
"and",
"findbugs",
"project",
"from",
"file",
".",
"Will",
"populate",
"the",
"bug",
"collection",
"and",
"findbugs",
"project",
"session",
"properties",
"if",
"successful",
".",
"If",
"there",
"is",
"no",
"saved",
"bug",
... | train | https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/FindbugsPlugin.java#L703-L729 |
headius/invokebinder | src/main/java/com/headius/invokebinder/Signature.java | Signature.permuteWith | public MethodHandle permuteWith(MethodHandle target, String... permuteArgs) {
return MethodHandles.permuteArguments(target, methodType, to(permute(permuteArgs)));
} | java | public MethodHandle permuteWith(MethodHandle target, String... permuteArgs) {
return MethodHandles.permuteArguments(target, methodType, to(permute(permuteArgs)));
} | [
"public",
"MethodHandle",
"permuteWith",
"(",
"MethodHandle",
"target",
",",
"String",
"...",
"permuteArgs",
")",
"{",
"return",
"MethodHandles",
".",
"permuteArguments",
"(",
"target",
",",
"methodType",
",",
"to",
"(",
"permute",
"(",
"permuteArgs",
")",
")",
... | Produce a method handle permuting the arguments in this signature using
the given permute arguments and targeting the given java.lang.invoke.MethodHandle.
Example:
<pre>
Signature sig = Signature.returning(String.class).appendArg("a", int.class).appendArg("b", int.class);
MethodHandle handle = handleThatTakesOneInt()... | [
"Produce",
"a",
"method",
"handle",
"permuting",
"the",
"arguments",
"in",
"this",
"signature",
"using",
"the",
"given",
"permute",
"arguments",
"and",
"targeting",
"the",
"given",
"java",
".",
"lang",
".",
"invoke",
".",
"MethodHandle",
"."
] | train | https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Signature.java#L730-L732 |
wcm-io/wcm-io-handler | media/src/main/java/io/wcm/handler/mediasource/dam/impl/DefaultRenditionHandler.java | DefaultRenditionHandler.getVirtualRendition | private RenditionMetadata getVirtualRendition(Set<RenditionMetadata> candidates,
long destWidth, long destHeight, double destRatio) {
// if ratio is defined get first rendition with matching ratio and same or bigger size
if (destRatio > 0) {
for (RenditionMetadata candidate : candidates) {
... | java | private RenditionMetadata getVirtualRendition(Set<RenditionMetadata> candidates,
long destWidth, long destHeight, double destRatio) {
// if ratio is defined get first rendition with matching ratio and same or bigger size
if (destRatio > 0) {
for (RenditionMetadata candidate : candidates) {
... | [
"private",
"RenditionMetadata",
"getVirtualRendition",
"(",
"Set",
"<",
"RenditionMetadata",
">",
"candidates",
",",
"long",
"destWidth",
",",
"long",
"destHeight",
",",
"double",
"destRatio",
")",
"{",
"// if ratio is defined get first rendition with matching ratio and same ... | Check if a rendition is available from which the required format can be downscaled from and returns
a virtual rendition in this case.
@param candidates Candidates
@param destWidth Destination width
@param destHeight Destination height
@param destRatio Destination ratio
@return Rendition or null | [
"Check",
"if",
"a",
"rendition",
"is",
"available",
"from",
"which",
"the",
"required",
"format",
"can",
"be",
"downscaled",
"from",
"and",
"returns",
"a",
"virtual",
"rendition",
"in",
"this",
"case",
"."
] | train | https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/mediasource/dam/impl/DefaultRenditionHandler.java#L387-L409 |
netty/netty | codec/src/main/java/io/netty/handler/codec/HeadersUtils.java | HeadersUtils.getAsString | public static <K, V> String getAsString(Headers<K, V, ?> headers, K name) {
V orig = headers.get(name);
return orig != null ? orig.toString() : null;
} | java | public static <K, V> String getAsString(Headers<K, V, ?> headers, K name) {
V orig = headers.get(name);
return orig != null ? orig.toString() : null;
} | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"String",
"getAsString",
"(",
"Headers",
"<",
"K",
",",
"V",
",",
"?",
">",
"headers",
",",
"K",
"name",
")",
"{",
"V",
"orig",
"=",
"headers",
".",
"get",
"(",
"name",
")",
";",
"return",
"orig",
"!... | {@link Headers#get(Object)} and convert the result to a {@link String}.
@param headers the headers to get the {@code name} from
@param name the name of the header to retrieve
@return the first header value if the header is found. {@code null} if there's no such entry. | [
"{"
] | train | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/HeadersUtils.java#L63-L66 |
alkacon/opencms-core | src-modules/org/opencms/workplace/explorer/CmsTree.java | CmsTree.getNode | private String getNode(String path, String title, int type, boolean folder, CmsResourceState state, boolean grey) {
StringBuffer result = new StringBuffer(64);
String parent = CmsResource.getParentFolder(path);
result.append("parent.aC(\"");
// name
result.append(title);
... | java | private String getNode(String path, String title, int type, boolean folder, CmsResourceState state, boolean grey) {
StringBuffer result = new StringBuffer(64);
String parent = CmsResource.getParentFolder(path);
result.append("parent.aC(\"");
// name
result.append(title);
... | [
"private",
"String",
"getNode",
"(",
"String",
"path",
",",
"String",
"title",
",",
"int",
"type",
",",
"boolean",
"folder",
",",
"CmsResourceState",
"state",
",",
"boolean",
"grey",
")",
"{",
"StringBuffer",
"result",
"=",
"new",
"StringBuffer",
"(",
"64",
... | Creates the output for a tree node.<p>
@param path the path of the resource represented by this tree node
@param title the resource name
@param type the resource type
@param folder if the resource is a folder
@param state the resource state
@param grey if true, the node is displayed in grey
@return the output for a t... | [
"Creates",
"the",
"output",
"for",
"a",
"tree",
"node",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/explorer/CmsTree.java#L691-L726 |
vvakame/JsonPullParser | jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java | JsonModelCoder.encodeListNullToNull | public void encodeListNullToNull(Writer writer, List<? extends T> list) throws IOException {
if (list == null) {
writer.write("null");
writer.flush();
return;
}
JsonUtil.startArray(writer);
int size = list.size();
for (int i = 0; i < size; i++) {
encodeNullToNull(writer, list.get(i));
if (i ... | java | public void encodeListNullToNull(Writer writer, List<? extends T> list) throws IOException {
if (list == null) {
writer.write("null");
writer.flush();
return;
}
JsonUtil.startArray(writer);
int size = list.size();
for (int i = 0; i < size; i++) {
encodeNullToNull(writer, list.get(i));
if (i ... | [
"public",
"void",
"encodeListNullToNull",
"(",
"Writer",
"writer",
",",
"List",
"<",
"?",
"extends",
"T",
">",
"list",
")",
"throws",
"IOException",
"{",
"if",
"(",
"list",
"==",
"null",
")",
"{",
"writer",
".",
"write",
"(",
"\"null\"",
")",
";",
"wri... | Encodes the given {@link List} of values into the JSON format, and writes it using the given writer.<br>
Writes "null" if null is given.
@param writer {@link Writer} to be used for writing value
@param list {@link List} of values to be encoded
@throws IOException | [
"Encodes",
"the",
"given",
"{",
"@link",
"List",
"}",
"of",
"values",
"into",
"the",
"JSON",
"format",
"and",
"writes",
"it",
"using",
"the",
"given",
"writer",
".",
"<br",
">",
"Writes",
"null",
"if",
"null",
"is",
"given",
"."
] | train | https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java#L355-L376 |
aws/aws-sdk-java | aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/util/StepFactory.java | StepFactory.newScriptRunnerStep | public HadoopJarStepConfig newScriptRunnerStep(String script, String... args) {
List<String> argsList = new ArrayList<String>();
argsList.add(script);
for (String arg : args) {
argsList.add(arg);
}
return new HadoopJarStepConfig()
.withJar("s3://" + bucket... | java | public HadoopJarStepConfig newScriptRunnerStep(String script, String... args) {
List<String> argsList = new ArrayList<String>();
argsList.add(script);
for (String arg : args) {
argsList.add(arg);
}
return new HadoopJarStepConfig()
.withJar("s3://" + bucket... | [
"public",
"HadoopJarStepConfig",
"newScriptRunnerStep",
"(",
"String",
"script",
",",
"String",
"...",
"args",
")",
"{",
"List",
"<",
"String",
">",
"argsList",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"argsList",
".",
"add",
"(",
"scrip... | Runs a specified script on the master node of your cluster.
@param script
The script to run.
@param args
Arguments that get passed to the script.
@return HadoopJarStepConfig that can be passed to your job flow. | [
"Runs",
"a",
"specified",
"script",
"on",
"the",
"master",
"node",
"of",
"your",
"cluster",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/util/StepFactory.java#L132-L141 |
UrielCh/ovh-java-sdk | ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java | ApiOvhEmaildomain.delegatedAccount_email_responder_GET | public OvhResponderAccount delegatedAccount_email_responder_GET(String email) throws IOException {
String qPath = "/email/domain/delegatedAccount/{email}/responder";
StringBuilder sb = path(qPath, email);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhResponderAccount.class);
... | java | public OvhResponderAccount delegatedAccount_email_responder_GET(String email) throws IOException {
String qPath = "/email/domain/delegatedAccount/{email}/responder";
StringBuilder sb = path(qPath, email);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhResponderAccount.class);
... | [
"public",
"OvhResponderAccount",
"delegatedAccount_email_responder_GET",
"(",
"String",
"email",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/email/domain/delegatedAccount/{email}/responder\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qPath",
",",
... | Get this object properties
REST: GET /email/domain/delegatedAccount/{email}/responder
@param email [required] Email | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L297-L302 |
killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.enterOfflinePayment | public Transaction enterOfflinePayment(final String invoiceId, final Transaction payment) {
return doPOST(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/transactions", payment, Transaction.class);
} | java | public Transaction enterOfflinePayment(final String invoiceId, final Transaction payment) {
return doPOST(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/transactions", payment, Transaction.class);
} | [
"public",
"Transaction",
"enterOfflinePayment",
"(",
"final",
"String",
"invoiceId",
",",
"final",
"Transaction",
"payment",
")",
"{",
"return",
"doPOST",
"(",
"Invoices",
".",
"INVOICES_RESOURCE",
"+",
"\"/\"",
"+",
"invoiceId",
"+",
"\"/transactions\"",
",",
"pa... | Enter an offline payment for a manual invoice (beta) - Recurly Enterprise Feature
@param invoiceId String Recurly Invoice ID
@param payment The external payment | [
"Enter",
"an",
"offline",
"payment",
"for",
"a",
"manual",
"invoice",
"(",
"beta",
")",
"-",
"Recurly",
"Enterprise",
"Feature"
] | train | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1342-L1344 |
motown-io/motown | utils/rest/src/main/java/io/motown/utils/rest/response/ResponseBuilder.java | ResponseBuilder.buildResponse | public static <T> Response<T> buildResponse(final HttpServletRequest request, final int offset, final int limit, final long total, final List<T> elements) {
checkArgument(offset >= 0);
checkArgument(limit >= 1);
checkArgument(total >= 0);
checkArgument(total == 0 || offset < total);
... | java | public static <T> Response<T> buildResponse(final HttpServletRequest request, final int offset, final int limit, final long total, final List<T> elements) {
checkArgument(offset >= 0);
checkArgument(limit >= 1);
checkArgument(total >= 0);
checkArgument(total == 0 || offset < total);
... | [
"public",
"static",
"<",
"T",
">",
"Response",
"<",
"T",
">",
"buildResponse",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"int",
"offset",
",",
"final",
"int",
"limit",
",",
"final",
"long",
"total",
",",
"final",
"List",
"<",
"T",
">",... | Build a {@link Response} from the request, offset, limit, total and list of elements.
@param request The {@link javax.servlet.http.HttpServletRequest} which was executed.
@param offset The offset of the results.
@param limit The maximum number of results.
@param total The total number of elements.
@param ... | [
"Build",
"a",
"{",
"@link",
"Response",
"}",
"from",
"the",
"request",
"offset",
"limit",
"total",
"and",
"list",
"of",
"elements",
"."
] | train | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/utils/rest/src/main/java/io/motown/utils/rest/response/ResponseBuilder.java#L45-L61 |
wdtinc/mapbox-vector-tile-java | src/main/java/com/wdtinc/mapbox_vector_tile/adapt/jts/JtsAdapter.java | JtsAdapter.moveCursor | private static void moveCursor(Vec2d cursor, List<Integer> geomCmds, Vec2d mvtPos) {
// Delta, then zigzag
geomCmds.add(ZigZag.encode((int)mvtPos.x - (int)cursor.x));
geomCmds.add(ZigZag.encode((int)mvtPos.y - (int)cursor.y));
cursor.set(mvtPos);
} | java | private static void moveCursor(Vec2d cursor, List<Integer> geomCmds, Vec2d mvtPos) {
// Delta, then zigzag
geomCmds.add(ZigZag.encode((int)mvtPos.x - (int)cursor.x));
geomCmds.add(ZigZag.encode((int)mvtPos.y - (int)cursor.y));
cursor.set(mvtPos);
} | [
"private",
"static",
"void",
"moveCursor",
"(",
"Vec2d",
"cursor",
",",
"List",
"<",
"Integer",
">",
"geomCmds",
",",
"Vec2d",
"mvtPos",
")",
"{",
"// Delta, then zigzag",
"geomCmds",
".",
"add",
"(",
"ZigZag",
".",
"encode",
"(",
"(",
"int",
")",
"mvtPos"... | <p>Appends {@link ZigZag#encode(int)} of delta in x,y from {@code cursor} to {@code mvtPos} into the {@code geomCmds} buffer.</p>
<p>Afterwards, the {@code cursor} values are changed to match the {@code mvtPos} values.</p>
@param cursor MVT cursor position
@param geomCmds geometry command list
@param mvtPos next MVT ... | [
"<p",
">",
"Appends",
"{",
"@link",
"ZigZag#encode",
"(",
"int",
")",
"}",
"of",
"delta",
"in",
"x",
"y",
"from",
"{",
"@code",
"cursor",
"}",
"to",
"{",
"@code",
"mvtPos",
"}",
"into",
"the",
"{",
"@code",
"geomCmds",
"}",
"buffer",
".",
"<",
"/",... | train | https://github.com/wdtinc/mapbox-vector-tile-java/blob/e5e3df3fc2260709e289f972a1348c0a1ea30339/src/main/java/com/wdtinc/mapbox_vector_tile/adapt/jts/JtsAdapter.java#L600-L607 |
wildfly/wildfly-core | patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java | IdentityPatchContext.createRollbackPatch | protected RollbackPatch createRollbackPatch(final String patchId, final Patch.PatchType patchType) {
// Process elements
final List<PatchElement> elements = new ArrayList<PatchElement>();
// Process layers
for (final PatchEntry entry : getLayers()) {
final PatchElement elemen... | java | protected RollbackPatch createRollbackPatch(final String patchId, final Patch.PatchType patchType) {
// Process elements
final List<PatchElement> elements = new ArrayList<PatchElement>();
// Process layers
for (final PatchEntry entry : getLayers()) {
final PatchElement elemen... | [
"protected",
"RollbackPatch",
"createRollbackPatch",
"(",
"final",
"String",
"patchId",
",",
"final",
"Patch",
".",
"PatchType",
"patchType",
")",
"{",
"// Process elements",
"final",
"List",
"<",
"PatchElement",
">",
"elements",
"=",
"new",
"ArrayList",
"<",
"Pat... | Create a rollback patch based on the recorded actions.
@param patchId the new patch id, depending on release or one-off
@param patchType the current patch identity
@return the rollback patch | [
"Create",
"a",
"rollback",
"patch",
"based",
"on",
"the",
"recorded",
"actions",
"."
] | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L608-L634 |
mailin-api/sendinblue-java-mvn | src/main/java/com/sendinblue/Sendinblue.java | Sendinblue.get_webhooks | public String get_webhooks(Map<String, String> data) {
String is_plat = data.get("is_plat");
String url;
if (EMPTY_STRING.equals(is_plat)) {
url = "webhook/";
}
else {
url = "webhook/is_plat/" + is_plat + "/";
}
return get(url, EMPTY_STRING... | java | public String get_webhooks(Map<String, String> data) {
String is_plat = data.get("is_plat");
String url;
if (EMPTY_STRING.equals(is_plat)) {
url = "webhook/";
}
else {
url = "webhook/is_plat/" + is_plat + "/";
}
return get(url, EMPTY_STRING... | [
"public",
"String",
"get_webhooks",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"data",
")",
"{",
"String",
"is_plat",
"=",
"data",
".",
"get",
"(",
"\"is_plat\"",
")",
";",
"String",
"url",
";",
"if",
"(",
"EMPTY_STRING",
".",
"equals",
"(",
"is_pl... | /*
To retrieve details of all webhooks.
@param {Object} data contains json objects as a key value pair from HashMap.
@options data {String} is_plat: Flag to get webhooks. Possible values – 0 & 1. Example: to get Transactional webhooks, use $is_plat=0, to get Marketing webhooks, use $is_plat=1, & to get all webhooks, us... | [
"/",
"*",
"To",
"retrieve",
"details",
"of",
"all",
"webhooks",
"."
] | train | https://github.com/mailin-api/sendinblue-java-mvn/blob/3a186b004003450f18d619aa084adc8d75086183/src/main/java/com/sendinblue/Sendinblue.java#L699-L709 |
nmorel/gwt-jackson | gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/rebind/CreatorUtils.java | CreatorUtils.findFirstEncounteredAnnotationsOnAllHierarchy | public static <T extends Annotation> Optional<T> findFirstEncounteredAnnotationsOnAllHierarchy( RebindConfiguration configuration,
JClassType type, Class<T> annotation ) {
return findFirstEncounteredAnnotationsOn... | java | public static <T extends Annotation> Optional<T> findFirstEncounteredAnnotationsOnAllHierarchy( RebindConfiguration configuration,
JClassType type, Class<T> annotation ) {
return findFirstEncounteredAnnotationsOn... | [
"public",
"static",
"<",
"T",
"extends",
"Annotation",
">",
"Optional",
"<",
"T",
">",
"findFirstEncounteredAnnotationsOnAllHierarchy",
"(",
"RebindConfiguration",
"configuration",
",",
"JClassType",
"type",
",",
"Class",
"<",
"T",
">",
"annotation",
")",
"{",
"re... | Browse all the hierarchy of the type and return the first corresponding annotation it found
@param type type
@param annotation annotation to find
@return the annotation if found, null otherwise
@param configuration a {@link com.github.nmorel.gwtjackson.rebind.RebindConfiguration} object.
@param <T> a T object. | [
"Browse",
"all",
"the",
"hierarchy",
"of",
"the",
"type",
"and",
"return",
"the",
"first",
"corresponding",
"annotation",
"it",
"found"
] | train | https://github.com/nmorel/gwt-jackson/blob/3fdc4350a27a9b64fc437d5fe516bf9191b74824/gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/rebind/CreatorUtils.java#L55-L58 |
jcuda/jcuda | JCudaJava/src/main/java/jcuda/runtime/JCuda.java | JCuda.cudaMemcpy | public static int cudaMemcpy(Pointer dst, Pointer src, long count, int cudaMemcpyKind_kind)
{
return checkResult(cudaMemcpyNative(dst, src, count, cudaMemcpyKind_kind));
} | java | public static int cudaMemcpy(Pointer dst, Pointer src, long count, int cudaMemcpyKind_kind)
{
return checkResult(cudaMemcpyNative(dst, src, count, cudaMemcpyKind_kind));
} | [
"public",
"static",
"int",
"cudaMemcpy",
"(",
"Pointer",
"dst",
",",
"Pointer",
"src",
",",
"long",
"count",
",",
"int",
"cudaMemcpyKind_kind",
")",
"{",
"return",
"checkResult",
"(",
"cudaMemcpyNative",
"(",
"dst",
",",
"src",
",",
"count",
",",
"cudaMemcpy... | Copies data between host and device.
<pre>
cudaError_t cudaMemcpy (
void* dst,
const void* src,
size_t count,
cudaMemcpyKind kind )
</pre>
<div>
<p>Copies data between host and device.
Copies <tt>count</tt> bytes from the memory area pointed to by <tt>src</tt> to the memory area pointed to by <tt>dst</tt>, where <tt>k... | [
"Copies",
"data",
"between",
"host",
"and",
"device",
"."
] | train | https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/runtime/JCuda.java#L4611-L4614 |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToHTMLStream.java | ToHTMLStream.addUniqueAttribute | public void addUniqueAttribute(String name, String value, int flags)
throws SAXException
{
try
{
final java.io.Writer writer = m_writer;
if ((flags & NO_BAD_CHARS) > 0 && m_htmlcharInfo.onlyQuotAmpLtGt)
{
// "flags" has indicated that the c... | java | public void addUniqueAttribute(String name, String value, int flags)
throws SAXException
{
try
{
final java.io.Writer writer = m_writer;
if ((flags & NO_BAD_CHARS) > 0 && m_htmlcharInfo.onlyQuotAmpLtGt)
{
// "flags" has indicated that the c... | [
"public",
"void",
"addUniqueAttribute",
"(",
"String",
"name",
",",
"String",
"value",
",",
"int",
"flags",
")",
"throws",
"SAXException",
"{",
"try",
"{",
"final",
"java",
".",
"io",
".",
"Writer",
"writer",
"=",
"m_writer",
";",
"if",
"(",
"(",
"flags"... | This method is used to add an attribute to the currently open element.
The caller has guaranted that this attribute is unique, which means that it
not been seen before and will not be seen again.
@param name the qualified name of the attribute
@param value the value of the attribute which can contain only
ASCII printa... | [
"This",
"method",
"is",
"used",
"to",
"add",
"an",
"attribute",
"to",
"the",
"currently",
"open",
"element",
".",
"The",
"caller",
"has",
"guaranted",
"that",
"this",
"attribute",
"is",
"unique",
"which",
"means",
"that",
"it",
"not",
"been",
"seen",
"befo... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToHTMLStream.java#L1930-L1974 |
codelibs/jcifs | src/main/java/jcifs/smb1/Config.java | Config.getBoolean | public static boolean getBoolean( String key, boolean def ) {
String b = getProperty( key );
if( b != null ) {
def = b.toLowerCase().equals( "true" );
}
return def;
} | java | public static boolean getBoolean( String key, boolean def ) {
String b = getProperty( key );
if( b != null ) {
def = b.toLowerCase().equals( "true" );
}
return def;
} | [
"public",
"static",
"boolean",
"getBoolean",
"(",
"String",
"key",
",",
"boolean",
"def",
")",
"{",
"String",
"b",
"=",
"getProperty",
"(",
"key",
")",
";",
"if",
"(",
"b",
"!=",
"null",
")",
"{",
"def",
"=",
"b",
".",
"toLowerCase",
"(",
")",
".",... | Retrieve a boolean value. If the property is not found, the value of <code>def</code> is returned. | [
"Retrieve",
"a",
"boolean",
"value",
".",
"If",
"the",
"property",
"is",
"not",
"found",
"the",
"value",
"of",
"<code",
">",
"def<",
"/",
"code",
">",
"is",
"returned",
"."
] | train | https://github.com/codelibs/jcifs/blob/ac6a8ba2925648ae003ca2508aec32316065dc34/src/main/java/jcifs/smb1/Config.java#L313-L319 |
aalmiray/Json-lib | src/main/java/net/sf/json/JsonConfig.java | JsonConfig.registerPropertyExclusions | public void registerPropertyExclusions( Class target, String[] properties ) {
if( target != null && properties != null && properties.length > 0 ) {
Set set = (Set) exclusionMap.get( target );
if( set == null ) {
set = new HashSet();
exclusionMap.put( target, set );
... | java | public void registerPropertyExclusions( Class target, String[] properties ) {
if( target != null && properties != null && properties.length > 0 ) {
Set set = (Set) exclusionMap.get( target );
if( set == null ) {
set = new HashSet();
exclusionMap.put( target, set );
... | [
"public",
"void",
"registerPropertyExclusions",
"(",
"Class",
"target",
",",
"String",
"[",
"]",
"properties",
")",
"{",
"if",
"(",
"target",
"!=",
"null",
"&&",
"properties",
"!=",
"null",
"&&",
"properties",
".",
"length",
">",
"0",
")",
"{",
"Set",
"s... | Registers exclusions for a target class.<br>
[Java -> JSON]
@param target the class to use as key
@param properties the properties to be excluded | [
"Registers",
"exclusions",
"for",
"a",
"target",
"class",
".",
"<br",
">",
"[",
"Java",
"-",
">",
";",
"JSON",
"]"
] | train | https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JsonConfig.java#L886-L899 |
jMotif/SAX | src/main/java/net/seninp/jmotif/sax/SAXProcessor.java | SAXProcessor.charDistance | public int charDistance(char a, char b) {
return Math.abs(Character.getNumericValue(a) - Character.getNumericValue(b));
} | java | public int charDistance(char a, char b) {
return Math.abs(Character.getNumericValue(a) - Character.getNumericValue(b));
} | [
"public",
"int",
"charDistance",
"(",
"char",
"a",
",",
"char",
"b",
")",
"{",
"return",
"Math",
".",
"abs",
"(",
"Character",
".",
"getNumericValue",
"(",
"a",
")",
"-",
"Character",
".",
"getNumericValue",
"(",
"b",
")",
")",
";",
"}"
] | Compute the distance between the two chars based on the ASCII symbol codes.
@param a The first char.
@param b The second char.
@return The distance. | [
"Compute",
"the",
"distance",
"between",
"the",
"two",
"chars",
"based",
"on",
"the",
"ASCII",
"symbol",
"codes",
"."
] | train | https://github.com/jMotif/SAX/blob/39ee07a69facaa330def5130b8790aeda85f1061/src/main/java/net/seninp/jmotif/sax/SAXProcessor.java#L316-L318 |
eclipse/xtext-extras | org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/validation/ProxyAwareUIStrings.java | ProxyAwareUIStrings.appendTypeSignature | public StringBuilder appendTypeSignature(JvmType type, StringBuilder result) {
result.append(type.getSimpleName());
if(type instanceof JvmTypeParameterDeclarator) {
List<JvmTypeParameter> typeParameters = ((JvmTypeParameterDeclarator) type).getTypeParameters();
if (!typeParameters.isEmpty()) {
result.appe... | java | public StringBuilder appendTypeSignature(JvmType type, StringBuilder result) {
result.append(type.getSimpleName());
if(type instanceof JvmTypeParameterDeclarator) {
List<JvmTypeParameter> typeParameters = ((JvmTypeParameterDeclarator) type).getTypeParameters();
if (!typeParameters.isEmpty()) {
result.appe... | [
"public",
"StringBuilder",
"appendTypeSignature",
"(",
"JvmType",
"type",
",",
"StringBuilder",
"result",
")",
"{",
"result",
".",
"append",
"(",
"type",
".",
"getSimpleName",
"(",
")",
")",
";",
"if",
"(",
"type",
"instanceof",
"JvmTypeParameterDeclarator",
")"... | Returns the signature of the given type. If the type declares type parameters, the type
parameters are included but their bounds are omitted. That is, the type {@code X<T extends CharSequence>}
will be returned as {@code X<T>} | [
"Returns",
"the",
"signature",
"of",
"the",
"given",
"type",
".",
"If",
"the",
"type",
"declares",
"type",
"parameters",
"the",
"type",
"parameters",
"are",
"included",
"but",
"their",
"bounds",
"are",
"omitted",
".",
"That",
"is",
"the",
"type",
"{",
"@co... | train | https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/validation/ProxyAwareUIStrings.java#L60-L76 |
google/error-prone-javac | src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java | DocTreeScanner.visitSee | @Override
public R visitSee(SeeTree node, P p) {
return scan(node.getReference(), p);
} | java | @Override
public R visitSee(SeeTree node, P p) {
return scan(node.getReference(), p);
} | [
"@",
"Override",
"public",
"R",
"visitSee",
"(",
"SeeTree",
"node",
",",
"P",
"p",
")",
"{",
"return",
"scan",
"(",
"node",
".",
"getReference",
"(",
")",
",",
"p",
")",
";",
"}"
] | {@inheritDoc} This implementation scans the children in left to right order.
@param node {@inheritDoc}
@param p {@inheritDoc}
@return the result of scanning | [
"{",
"@inheritDoc",
"}",
"This",
"implementation",
"scans",
"the",
"children",
"in",
"left",
"to",
"right",
"order",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java#L372-L375 |
Impetus/Kundera | src/kundera-couchdb/src/main/java/com/impetus/client/couchdb/CouchDBClient.java | CouchDBClient.onDelete | private void onDelete(String schemaName, Object pKey, HttpResponse response, JsonObject jsonObject)
throws URISyntaxException, IOException, ClientProtocolException
{
URI uri;
String q;
JsonElement rev = jsonObject.get("_rev");
StringBuilder builder = new StringBuilder();... | java | private void onDelete(String schemaName, Object pKey, HttpResponse response, JsonObject jsonObject)
throws URISyntaxException, IOException, ClientProtocolException
{
URI uri;
String q;
JsonElement rev = jsonObject.get("_rev");
StringBuilder builder = new StringBuilder();... | [
"private",
"void",
"onDelete",
"(",
"String",
"schemaName",
",",
"Object",
"pKey",
",",
"HttpResponse",
"response",
",",
"JsonObject",
"jsonObject",
")",
"throws",
"URISyntaxException",
",",
"IOException",
",",
"ClientProtocolException",
"{",
"URI",
"uri",
";",
"S... | On delete.
@param schemaName
the schema name
@param pKey
the key
@param response
the response
@param jsonObject
the json object
@throws URISyntaxException
the URI syntax exception
@throws IOException
Signals that an I/O exception has occurred.
@throws ClientProtocolException
the client protocol exception | [
"On",
"delete",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-couchdb/src/main/java/com/impetus/client/couchdb/CouchDBClient.java#L544-L564 |
zaproxy/zaproxy | src/org/parosproxy/paros/network/HttpSender.java | HttpSender.followRedirections | private void followRedirections(HttpMessage message, HttpRequestConfig requestConfig) throws IOException {
HttpRedirectionValidator validator = requestConfig.getRedirectionValidator();
validator.notifyMessageReceived(message);
User requestingUser = getUser(message);
HttpMessage red... | java | private void followRedirections(HttpMessage message, HttpRequestConfig requestConfig) throws IOException {
HttpRedirectionValidator validator = requestConfig.getRedirectionValidator();
validator.notifyMessageReceived(message);
User requestingUser = getUser(message);
HttpMessage red... | [
"private",
"void",
"followRedirections",
"(",
"HttpMessage",
"message",
",",
"HttpRequestConfig",
"requestConfig",
")",
"throws",
"IOException",
"{",
"HttpRedirectionValidator",
"validator",
"=",
"requestConfig",
".",
"getRedirectionValidator",
"(",
")",
";",
"validator",... | Follows redirections using the response of the given {@code message}. The {@code validator} in the given request
configuration will be called for each redirection received. After the call to this method the given {@code message} will
have the contents of the last response received (possibly the response of a redirectio... | [
"Follows",
"redirections",
"using",
"the",
"response",
"of",
"the",
"given",
"{",
"@code",
"message",
"}",
".",
"The",
"{",
"@code",
"validator",
"}",
"in",
"the",
"given",
"request",
"configuration",
"will",
"be",
"called",
"for",
"each",
"redirection",
"re... | train | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpSender.java#L947-L978 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.