repository_name stringlengths 7 54 | func_path_in_repository stringlengths 18 218 | func_name stringlengths 5 140 | whole_func_string stringlengths 79 3.99k | language stringclasses 1
value | func_code_string stringlengths 79 3.99k | func_code_tokens listlengths 20 624 | func_documentation_string stringlengths 61 1.96k | func_documentation_tokens listlengths 1 478 | split_name stringclasses 1
value | func_code_url stringlengths 107 339 |
|---|---|---|---|---|---|---|---|---|---|---|
sirensolutions/siren-join | src/main/java/solutions/siren/join/action/coordinate/execution/FilterJoinVisitor.java | FilterJoinVisitor.executeAsyncOperation | protected void executeAsyncOperation(final FilterJoinNode node) {
logger.debug("Executing async actions");
node.setState(FilterJoinNode.State.RUNNING); // set state before execution to avoid race conditions with listener
NodePipelineManager pipeline = new NodePipelineManager();
pipeline.addListener(new... | java | protected void executeAsyncOperation(final FilterJoinNode node) {
logger.debug("Executing async actions");
node.setState(FilterJoinNode.State.RUNNING); // set state before execution to avoid race conditions with listener
NodePipelineManager pipeline = new NodePipelineManager();
pipeline.addListener(new... | [
"protected",
"void",
"executeAsyncOperation",
"(",
"final",
"FilterJoinNode",
"node",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Executing async actions\"",
")",
";",
"node",
".",
"setState",
"(",
"FilterJoinNode",
".",
"State",
".",
"RUNNING",
")",
";",
"// set ... | Executes the pipeline of async actions to compute the terms for this node. | [
"Executes",
"the",
"pipeline",
"of",
"async",
"actions",
"to",
"compute",
"the",
"terms",
"for",
"this",
"node",
"."
] | train | https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/coordinate/execution/FilterJoinVisitor.java#L193-L223 |
leancloud/java-sdk-all | android-sdk/huawei-hmsagent/src/main/java/com/huawei/android/hms/agent/pay/PaySignUtil.java | PaySignUtil.doCheck | public static boolean doCheck(String noSignStr, String sign, String publicKey) {
if (sign == null || noSignStr == null || publicKey == null) {
return false;
}
try {
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
byte[] encodedKey = Base64.dec... | java | public static boolean doCheck(String noSignStr, String sign, String publicKey) {
if (sign == null || noSignStr == null || publicKey == null) {
return false;
}
try {
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
byte[] encodedKey = Base64.dec... | [
"public",
"static",
"boolean",
"doCheck",
"(",
"String",
"noSignStr",
",",
"String",
"sign",
",",
"String",
"publicKey",
")",
"{",
"if",
"(",
"sign",
"==",
"null",
"||",
"noSignStr",
"==",
"null",
"||",
"publicKey",
"==",
"null",
")",
"{",
"return",
"fal... | 校验签名信息
@param noSignStr 待校验未字符串
@param sign 签名字符串
@param publicKey 公钥
@return 是否校验通过 | [
"校验签名信息"
] | train | https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/android-sdk/huawei-hmsagent/src/main/java/com/huawei/android/hms/agent/pay/PaySignUtil.java#L403-L425 |
craftercms/commons | utilities/src/main/java/org/craftercms/commons/lang/RegexUtils.java | RegexUtils.matchesAny | public static boolean matchesAny(String str, String... regexes) {
if (ArrayUtils.isNotEmpty(regexes)) {
return matchesAny(str, Arrays.asList(regexes));
} else {
return false;
}
} | java | public static boolean matchesAny(String str, String... regexes) {
if (ArrayUtils.isNotEmpty(regexes)) {
return matchesAny(str, Arrays.asList(regexes));
} else {
return false;
}
} | [
"public",
"static",
"boolean",
"matchesAny",
"(",
"String",
"str",
",",
"String",
"...",
"regexes",
")",
"{",
"if",
"(",
"ArrayUtils",
".",
"isNotEmpty",
"(",
"regexes",
")",
")",
"{",
"return",
"matchesAny",
"(",
"str",
",",
"Arrays",
".",
"asList",
"("... | Returns true if the string matches any of the specified regexes.
@param str the string to match
@param regexes the regexes used for matching
@return true if the string matches one or more of the regexes | [
"Returns",
"true",
"if",
"the",
"string",
"matches",
"any",
"of",
"the",
"specified",
"regexes",
"."
] | train | https://github.com/craftercms/commons/blob/3074fe49e56c2a4aae0832f40b17ae563335dc83/utilities/src/main/java/org/craftercms/commons/lang/RegexUtils.java#L45-L51 |
UrielCh/ovh-java-sdk | ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java | ApiOvhIp.ip_delegation_POST | public OvhReverseDelegation ip_delegation_POST(String ip, String target) throws IOException {
String qPath = "/ip/{ip}/delegation";
StringBuilder sb = path(qPath, ip);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "target", target);
String resp = exec(qPath, "POST", sb.toString(), o);
... | java | public OvhReverseDelegation ip_delegation_POST(String ip, String target) throws IOException {
String qPath = "/ip/{ip}/delegation";
StringBuilder sb = path(qPath, ip);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "target", target);
String resp = exec(qPath, "POST", sb.toString(), o);
... | [
"public",
"OvhReverseDelegation",
"ip_delegation_POST",
"(",
"String",
"ip",
",",
"String",
"target",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/ip/{ip}/delegation\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qPath",
",",
"ip",
")",
";"... | Add target for reverse delegation on IPv6 subnet
REST: POST /ip/{ip}/delegation
@param target [required] Target for reverse delegation on IPv6
@param ip [required] | [
"Add",
"target",
"for",
"reverse",
"delegation",
"on",
"IPv6",
"subnet"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L153-L160 |
iipc/openwayback | wayback-core/src/main/java/org/archive/wayback/replay/PreservingHttpHeaderProcessor.java | PreservingHttpHeaderProcessor.preserve | protected void preserve(Map<String, String> output, String name, String value) {
if (prefix != null) {
output.put(prefix + name, value);
}
} | java | protected void preserve(Map<String, String> output, String name, String value) {
if (prefix != null) {
output.put(prefix + name, value);
}
} | [
"protected",
"void",
"preserve",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"output",
",",
"String",
"name",
",",
"String",
"value",
")",
"{",
"if",
"(",
"prefix",
"!=",
"null",
")",
"{",
"output",
".",
"put",
"(",
"prefix",
"+",
"name",
",",
"... | add a header {@code prefix + name} with value {@code value} to {@code output}.
if {@code prefix} is either null or empty, this method is no-op.
@param output headers Map
@param name header name
@param value header value | [
"add",
"a",
"header",
"{"
] | train | https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/replay/PreservingHttpHeaderProcessor.java#L45-L49 |
offbynull/coroutines | instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/generators/GenericGenerators.java | GenericGenerators.cloneInsnList | public static InsnList cloneInsnList(InsnList insnList, Set<LabelNode> globalLabels) {
Validate.notNull(insnList);
// remap all labelnodes
Map<LabelNode, LabelNode> labelNodeMapping = new HashMap<>();
ListIterator<AbstractInsnNode> it = insnList.iterator();
while (it.hasNext()) ... | java | public static InsnList cloneInsnList(InsnList insnList, Set<LabelNode> globalLabels) {
Validate.notNull(insnList);
// remap all labelnodes
Map<LabelNode, LabelNode> labelNodeMapping = new HashMap<>();
ListIterator<AbstractInsnNode> it = insnList.iterator();
while (it.hasNext()) ... | [
"public",
"static",
"InsnList",
"cloneInsnList",
"(",
"InsnList",
"insnList",
",",
"Set",
"<",
"LabelNode",
">",
"globalLabels",
")",
"{",
"Validate",
".",
"notNull",
"(",
"insnList",
")",
";",
"// remap all labelnodes",
"Map",
"<",
"LabelNode",
",",
"LabelNode"... | Clones an instruction list. All labels are remapped unless otherwise specified in {@code globalLabels}.
@param insnList instruction list to clone
@param globalLabels set of labels that should not be remapped
@throws NullPointerException if any argument is {@code null}
@return instruction list with cloned instructions | [
"Clones",
"an",
"instruction",
"list",
".",
"All",
"labels",
"are",
"remapped",
"unless",
"otherwise",
"specified",
"in",
"{"
] | train | https://github.com/offbynull/coroutines/blob/b1b83c293945f53a2f63fca8f15a53e88b796bf5/instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/generators/GenericGenerators.java#L127-L155 |
OpenLiberty/open-liberty | dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/RecoveryDirectorImpl.java | RecoveryDirectorImpl.addTerminationRecord | private void addTerminationRecord(RecoveryAgent recoveryAgent, FailureScope failureScope) {
if (tc.isEntryEnabled())
Tr.entry(tc, "addTerminationRecord", new Object[] { recoveryAgent, failureScope, this });
synchronized (_outstandingTerminationRecords) {
// Extract the set of fa... | java | private void addTerminationRecord(RecoveryAgent recoveryAgent, FailureScope failureScope) {
if (tc.isEntryEnabled())
Tr.entry(tc, "addTerminationRecord", new Object[] { recoveryAgent, failureScope, this });
synchronized (_outstandingTerminationRecords) {
// Extract the set of fa... | [
"private",
"void",
"addTerminationRecord",
"(",
"RecoveryAgent",
"recoveryAgent",
",",
"FailureScope",
"failureScope",
")",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"Tr",
".",
"entry",
"(",
"tc",
",",
"\"addTerminationRecord\"",
",",
"new",
... | <p>
Internal method to record a termination request for the supplied RecoveryAgent
and FailureScope combination.
</p>
<p>
Just prior to requesting a RecoveryAgent to "terminateRecovery" of a
FailureScope, this method is driven to record the request. When the client
service is ready and invokes RecoveryDirector.termina... | [
"<p",
">",
"Internal",
"method",
"to",
"record",
"a",
"termination",
"request",
"for",
"the",
"supplied",
"RecoveryAgent",
"and",
"FailureScope",
"combination",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/RecoveryDirectorImpl.java#L881-L904 |
samskivert/samskivert | src/main/java/com/samskivert/util/Calendars.java | Calendars.in | public static Builder in (TimeZone zone, Locale locale)
{
return with(Calendar.getInstance(zone, locale));
} | java | public static Builder in (TimeZone zone, Locale locale)
{
return with(Calendar.getInstance(zone, locale));
} | [
"public",
"static",
"Builder",
"in",
"(",
"TimeZone",
"zone",
",",
"Locale",
"locale",
")",
"{",
"return",
"with",
"(",
"Calendar",
".",
"getInstance",
"(",
"zone",
",",
"locale",
")",
")",
";",
"}"
] | Returns a fluent wrapper around a calendar for the specifed time zone and locale. | [
"Returns",
"a",
"fluent",
"wrapper",
"around",
"a",
"calendar",
"for",
"the",
"specifed",
"time",
"zone",
"and",
"locale",
"."
] | train | https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/Calendars.java#L233-L236 |
undertow-io/undertow | core/src/main/java/io/undertow/websockets/core/WebSockets.java | WebSockets.sendPong | public static void sendPong(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback) {
sendInternal(pooledData, WebSocketFrameType.PONG, wsChannel, callback, null, -1);
} | java | public static void sendPong(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback) {
sendInternal(pooledData, WebSocketFrameType.PONG, wsChannel, callback, null, -1);
} | [
"public",
"static",
"void",
"sendPong",
"(",
"final",
"PooledByteBuffer",
"pooledData",
",",
"final",
"WebSocketChannel",
"wsChannel",
",",
"final",
"WebSocketCallback",
"<",
"Void",
">",
"callback",
")",
"{",
"sendInternal",
"(",
"pooledData",
",",
"WebSocketFrameT... | Sends a complete pong message, invoking the callback when complete
Automatically frees the pooled byte buffer when done.
@param pooledData The data to send, it will be freed when done
@param wsChannel The web socket channel
@param callback The callback to invoke on completion | [
"Sends",
"a",
"complete",
"pong",
"message",
"invoking",
"the",
"callback",
"when",
"complete",
"Automatically",
"frees",
"the",
"pooled",
"byte",
"buffer",
"when",
"done",
"."
] | train | https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/websockets/core/WebSockets.java#L507-L509 |
taimos/dvalin | interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/InterconnectMapper.java | InterconnectMapper.fromJson | public static <T extends InterconnectObject> T fromJson(String data, Class<T> clazz) throws IOException {
return InterconnectMapper.mapper.readValue(data, clazz);
} | java | public static <T extends InterconnectObject> T fromJson(String data, Class<T> clazz) throws IOException {
return InterconnectMapper.mapper.readValue(data, clazz);
} | [
"public",
"static",
"<",
"T",
"extends",
"InterconnectObject",
">",
"T",
"fromJson",
"(",
"String",
"data",
",",
"Class",
"<",
"T",
">",
"clazz",
")",
"throws",
"IOException",
"{",
"return",
"InterconnectMapper",
".",
"mapper",
".",
"readValue",
"(",
"data",... | Creates an object from the given JSON data.
@param data the JSON data
@param clazz the class object for the content of the JSON data
@param <T> the type of the class object extending {@link InterconnectObject}
@return the object contained in the given JSON data
@throws JsonParseException if a the JSON data could ... | [
"Creates",
"an",
"object",
"from",
"the",
"given",
"JSON",
"data",
"."
] | train | https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/InterconnectMapper.java#L77-L79 |
SG-O/miIO | src/main/java/de/sg_o/app/miio/vacuum/Vacuum.java | Vacuum.setCarpetMode | public boolean setCarpetMode(boolean enabled, int high, int low, int integral, int stallTime) throws CommandExecutionException {
JSONObject payload = new JSONObject();
payload.put("enable", enabled ? 1:0);
payload.put("current_high", high);
payload.put("current_low", low);
payloa... | java | public boolean setCarpetMode(boolean enabled, int high, int low, int integral, int stallTime) throws CommandExecutionException {
JSONObject payload = new JSONObject();
payload.put("enable", enabled ? 1:0);
payload.put("current_high", high);
payload.put("current_low", low);
payloa... | [
"public",
"boolean",
"setCarpetMode",
"(",
"boolean",
"enabled",
",",
"int",
"high",
",",
"int",
"low",
",",
"int",
"integral",
",",
"int",
"stallTime",
")",
"throws",
"CommandExecutionException",
"{",
"JSONObject",
"payload",
"=",
"new",
"JSONObject",
"(",
")... | Change the carped cleaning settings.
@param enabled Weather the carped cleanup mode should be enabled.
@param high The high parameter of the carped cleanup.
@param low The low parameter of the carped cleanup.
@param integral The integral parameter of the carped cleanup.
@param stallTime The stall time parameter of the ... | [
"Change",
"the",
"carped",
"cleaning",
"settings",
"."
] | train | https://github.com/SG-O/miIO/blob/f352dbd2a699d2cdb1b412ca5e6cbb0c38ca779b/src/main/java/de/sg_o/app/miio/vacuum/Vacuum.java#L560-L570 |
groovy/groovy-core | src/main/groovy/lang/MetaProperty.java | MetaProperty.getGetterName | public static String getGetterName(String propertyName, Class type) {
String prefix = type == boolean.class || type == Boolean.class ? "is" : "get";
return prefix + MetaClassHelper.capitalize(propertyName);
} | java | public static String getGetterName(String propertyName, Class type) {
String prefix = type == boolean.class || type == Boolean.class ? "is" : "get";
return prefix + MetaClassHelper.capitalize(propertyName);
} | [
"public",
"static",
"String",
"getGetterName",
"(",
"String",
"propertyName",
",",
"Class",
"type",
")",
"{",
"String",
"prefix",
"=",
"type",
"==",
"boolean",
".",
"class",
"||",
"type",
"==",
"Boolean",
".",
"class",
"?",
"\"is\"",
":",
"\"get\"",
";",
... | Gets the name for the getter for this property
@return The name of the property. The name is "get"+ the capitalized propertyName
or, in the case of boolean values, "is" + the capitalized propertyName | [
"Gets",
"the",
"name",
"for",
"the",
"getter",
"for",
"this",
"property"
] | train | https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/groovy/lang/MetaProperty.java#L90-L93 |
playn/playn | core/src/playn/core/json/JsonParser.java | JsonParser.createHelpfulException | private JsonParserException createHelpfulException(char first, char[] expected, int failurePosition)
throws JsonParserException {
// Build the first part of the token
StringBuilder errorToken = new StringBuilder(first
+ (expected == null ? "" : new String(expected, 0, failurePosition)));
// C... | java | private JsonParserException createHelpfulException(char first, char[] expected, int failurePosition)
throws JsonParserException {
// Build the first part of the token
StringBuilder errorToken = new StringBuilder(first
+ (expected == null ? "" : new String(expected, 0, failurePosition)));
// C... | [
"private",
"JsonParserException",
"createHelpfulException",
"(",
"char",
"first",
",",
"char",
"[",
"]",
"expected",
",",
"int",
"failurePosition",
")",
"throws",
"JsonParserException",
"{",
"// Build the first part of the token",
"StringBuilder",
"errorToken",
"=",
"new"... | Throws a helpful exception based on the current alphanumeric token. | [
"Throws",
"a",
"helpful",
"exception",
"based",
"on",
"the",
"current",
"alphanumeric",
"token",
"."
] | train | https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/core/src/playn/core/json/JsonParser.java#L445-L457 |
BorderTech/wcomponents | wcomponents-core/src/main/java/com/github/bordertech/wcomponents/template/TemplateWriter.java | TemplateWriter.doReplace | @Override
protected void doReplace(final String search, final Writer backing) {
WComponent component = componentsByKey.get(search);
UIContextHolder.pushContext(uic);
try {
component.paint(new WebXmlRenderContext((PrintWriter) backing));
} finally {
UIContextHolder.popContext();
}
} | java | @Override
protected void doReplace(final String search, final Writer backing) {
WComponent component = componentsByKey.get(search);
UIContextHolder.pushContext(uic);
try {
component.paint(new WebXmlRenderContext((PrintWriter) backing));
} finally {
UIContextHolder.popContext();
}
} | [
"@",
"Override",
"protected",
"void",
"doReplace",
"(",
"final",
"String",
"search",
",",
"final",
"Writer",
"backing",
")",
"{",
"WComponent",
"component",
"=",
"componentsByKey",
".",
"get",
"(",
"search",
")",
";",
"UIContextHolder",
".",
"pushContext",
"("... | Replaces the search string by rendering the corresponding component.
@param search the search String that was matched.
@param backing the underlying writer to write the replacement to. | [
"Replaces",
"the",
"search",
"string",
"by",
"rendering",
"the",
"corresponding",
"component",
"."
] | train | https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/template/TemplateWriter.java#L53-L63 |
spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/TemplateAvailabilityProviders.java | TemplateAvailabilityProviders.getProvider | public TemplateAvailabilityProvider getProvider(String view,
ApplicationContext applicationContext) {
Assert.notNull(applicationContext, "ApplicationContext must not be null");
return getProvider(view, applicationContext.getEnvironment(),
applicationContext.getClassLoader(), applicationContext);
} | java | public TemplateAvailabilityProvider getProvider(String view,
ApplicationContext applicationContext) {
Assert.notNull(applicationContext, "ApplicationContext must not be null");
return getProvider(view, applicationContext.getEnvironment(),
applicationContext.getClassLoader(), applicationContext);
} | [
"public",
"TemplateAvailabilityProvider",
"getProvider",
"(",
"String",
"view",
",",
"ApplicationContext",
"applicationContext",
")",
"{",
"Assert",
".",
"notNull",
"(",
"applicationContext",
",",
"\"ApplicationContext must not be null\"",
")",
";",
"return",
"getProvider",... | Get the provider that can be used to render the given view.
@param view the view to render
@param applicationContext the application context
@return a {@link TemplateAvailabilityProvider} or null | [
"Get",
"the",
"provider",
"that",
"can",
"be",
"used",
"to",
"render",
"the",
"given",
"view",
"."
] | train | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/TemplateAvailabilityProviders.java#L116-L121 |
ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/message/ParameterFormatter.java | ParameterFormatter.recursiveDeepToString | private static void recursiveDeepToString(final Object o, final StringBuilder str, final Set<String> dejaVu) {
if (appendSpecialTypes(o, str)) {
return;
}
if (isMaybeRecursive(o)) {
appendPotentiallyRecursiveValue(o, str, dejaVu);
} else {
tryObjectToS... | java | private static void recursiveDeepToString(final Object o, final StringBuilder str, final Set<String> dejaVu) {
if (appendSpecialTypes(o, str)) {
return;
}
if (isMaybeRecursive(o)) {
appendPotentiallyRecursiveValue(o, str, dejaVu);
} else {
tryObjectToS... | [
"private",
"static",
"void",
"recursiveDeepToString",
"(",
"final",
"Object",
"o",
",",
"final",
"StringBuilder",
"str",
",",
"final",
"Set",
"<",
"String",
">",
"dejaVu",
")",
"{",
"if",
"(",
"appendSpecialTypes",
"(",
"o",
",",
"str",
")",
")",
"{",
"r... | This method performs a deep toString of the given Object.
Primitive arrays are converted using their respective Arrays.toString methods while
special handling is implemented for "container types", i.e. Object[], Map and Collection because those could
contain themselves.
<p>
dejaVu is used in case of those container typ... | [
"This",
"method",
"performs",
"a",
"deep",
"toString",
"of",
"the",
"given",
"Object",
".",
"Primitive",
"arrays",
"are",
"converted",
"using",
"their",
"respective",
"Arrays",
".",
"toString",
"methods",
"while",
"special",
"handling",
"is",
"implemented",
"for... | train | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/ParameterFormatter.java#L427-L436 |
google/closure-compiler | src/com/google/javascript/jscomp/TypeValidator.java | TypeValidator.expectSuperType | void expectSuperType(Node n, ObjectType superObject, ObjectType subObject) {
FunctionType subCtor = subObject.getConstructor();
ObjectType implicitProto = subObject.getImplicitPrototype();
ObjectType declaredSuper =
implicitProto == null ? null : implicitProto.getImplicitPrototype();
if (declare... | java | void expectSuperType(Node n, ObjectType superObject, ObjectType subObject) {
FunctionType subCtor = subObject.getConstructor();
ObjectType implicitProto = subObject.getImplicitPrototype();
ObjectType declaredSuper =
implicitProto == null ? null : implicitProto.getImplicitPrototype();
if (declare... | [
"void",
"expectSuperType",
"(",
"Node",
"n",
",",
"ObjectType",
"superObject",
",",
"ObjectType",
"subObject",
")",
"{",
"FunctionType",
"subCtor",
"=",
"subObject",
".",
"getConstructor",
"(",
")",
";",
"ObjectType",
"implicitProto",
"=",
"subObject",
".",
"get... | Expect that the first type is the direct superclass of the second type.
@param t The node traversal.
@param n The node where warnings should point to.
@param superObject The expected super instance type.
@param subObject The sub instance type. | [
"Expect",
"that",
"the",
"first",
"type",
"is",
"the",
"direct",
"superclass",
"of",
"the",
"second",
"type",
"."
] | train | https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeValidator.java#L679-L705 |
actorapp/droidkit-actors | actors/src/main/java/com/droidkit/actors/mailbox/Mailbox.java | Mailbox.isEqualEnvelope | protected boolean isEqualEnvelope(Envelope a, Envelope b) {
return a.getMessage().getClass() == b.getMessage().getClass();
} | java | protected boolean isEqualEnvelope(Envelope a, Envelope b) {
return a.getMessage().getClass() == b.getMessage().getClass();
} | [
"protected",
"boolean",
"isEqualEnvelope",
"(",
"Envelope",
"a",
",",
"Envelope",
"b",
")",
"{",
"return",
"a",
".",
"getMessage",
"(",
")",
".",
"getClass",
"(",
")",
"==",
"b",
".",
"getMessage",
"(",
")",
".",
"getClass",
"(",
")",
";",
"}"
] | Override this if you need to change filtering for scheduleOnce behaviour.
By default it check equality only of class names.
@param a
@param b
@return is equal | [
"Override",
"this",
"if",
"you",
"need",
"to",
"change",
"filtering",
"for",
"scheduleOnce",
"behaviour",
".",
"By",
"default",
"it",
"check",
"equality",
"only",
"of",
"class",
"names",
"."
] | train | https://github.com/actorapp/droidkit-actors/blob/fdb72fcfdd1c5e54a970f203a33a71fa54344217/actors/src/main/java/com/droidkit/actors/mailbox/Mailbox.java#L91-L93 |
haraldk/TwelveMonkeys | servlet/src/main/java/com/twelvemonkeys/servlet/image/ContentNegotiationFilter.java | ContentNegotiationFilter.adjustQualityFromAccept | private void adjustQualityFromAccept(Map<String, Float> pFormatQuality, HttpServletRequest pRequest) {
// Multiply all q factors with qs factors
// No q=.. should be interpreted as q=1.0
// Apache does some extras; if both explicit types and wildcards
// (without qaulity factor) ar... | java | private void adjustQualityFromAccept(Map<String, Float> pFormatQuality, HttpServletRequest pRequest) {
// Multiply all q factors with qs factors
// No q=.. should be interpreted as q=1.0
// Apache does some extras; if both explicit types and wildcards
// (without qaulity factor) ar... | [
"private",
"void",
"adjustQualityFromAccept",
"(",
"Map",
"<",
"String",
",",
"Float",
">",
"pFormatQuality",
",",
"HttpServletRequest",
"pRequest",
")",
"{",
"// Multiply all q factors with qs factors\r",
"// No q=.. should be interpreted as q=1.0\r",
"// Apache does some extras... | Adjust quality from HTTP Accept header
@param pFormatQuality the format to quality mapping
@param pRequest the request | [
"Adjust",
"quality",
"from",
"HTTP",
"Accept",
"header"
] | train | https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/servlet/src/main/java/com/twelvemonkeys/servlet/image/ContentNegotiationFilter.java#L297-L323 |
revelytix/spark | sherpa-java/src/main/java/sherpa/client/QueryExecution.java | QueryExecution.asyncMoreRequest | private void asyncMoreRequest(int startRow) {
try {
DataRequest moreRequest = new DataRequest();
moreRequest.queryId = queryId;
moreRequest.startRow = startRow;
moreRequest.maxSize = maxBatchSize;
logger.debug("Client requesting {} .. {}", startRow, (startRow + maxBatchSize - 1));
... | java | private void asyncMoreRequest(int startRow) {
try {
DataRequest moreRequest = new DataRequest();
moreRequest.queryId = queryId;
moreRequest.startRow = startRow;
moreRequest.maxSize = maxBatchSize;
logger.debug("Client requesting {} .. {}", startRow, (startRow + maxBatchSize - 1));
... | [
"private",
"void",
"asyncMoreRequest",
"(",
"int",
"startRow",
")",
"{",
"try",
"{",
"DataRequest",
"moreRequest",
"=",
"new",
"DataRequest",
"(",
")",
";",
"moreRequest",
".",
"queryId",
"=",
"queryId",
";",
"moreRequest",
".",
"startRow",
"=",
"startRow",
... | Send request for more data for this query.
NOTE: This method is always run in a background thread!!
@param startRow
Start row needed in return batch | [
"Send",
"request",
"for",
"more",
"data",
"for",
"this",
"query",
"."
] | train | https://github.com/revelytix/spark/blob/d777d40c962bc66fdc04b7c3a66d20b777ff6fb4/sherpa-java/src/main/java/sherpa/client/QueryExecution.java#L166-L183 |
fuinorg/utils4j | src/main/java/org/fuin/utils4j/Utils4J.java | Utils4J.toDigit | private static int toDigit(final char ch, final int index) {
final int digit = Character.digit(ch, 16);
if (digit == -1) {
throw new RuntimeException("Illegal hexadecimal charcter " + ch + " at index " + index);
}
return digit;
} | java | private static int toDigit(final char ch, final int index) {
final int digit = Character.digit(ch, 16);
if (digit == -1) {
throw new RuntimeException("Illegal hexadecimal charcter " + ch + " at index " + index);
}
return digit;
} | [
"private",
"static",
"int",
"toDigit",
"(",
"final",
"char",
"ch",
",",
"final",
"int",
"index",
")",
"{",
"final",
"int",
"digit",
"=",
"Character",
".",
"digit",
"(",
"ch",
",",
"16",
")",
";",
"if",
"(",
"digit",
"==",
"-",
"1",
")",
"{",
"thr... | Converts a hexadecimal character to an integer.
@param ch
A character to convert to an integer digit
@param index
The index of the character in the source
@return An integer
@author Apache Software Foundation
@see org.apache.commons.codec.binary.Hex | [
"Converts",
"a",
"hexadecimal",
"character",
"to",
"an",
"integer",
"."
] | train | https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/Utils4J.java#L1227-L1233 |
morimekta/providence | providence-core/src/main/java/net/morimekta/providence/serializer/pretty/Tokenizer.java | Tokenizer.peek | @Nonnull
public Token peek(String message) throws IOException {
if (!hasNext()) {
throw failure(lineNo, linePos + 1, 0, "Expected %s: Got end of file", message);
}
return unreadToken;
} | java | @Nonnull
public Token peek(String message) throws IOException {
if (!hasNext()) {
throw failure(lineNo, linePos + 1, 0, "Expected %s: Got end of file", message);
}
return unreadToken;
} | [
"@",
"Nonnull",
"public",
"Token",
"peek",
"(",
"String",
"message",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"hasNext",
"(",
")",
")",
"{",
"throw",
"failure",
"(",
"lineNo",
",",
"linePos",
"+",
"1",
",",
"0",
",",
"\"Expected %s: Got end of ... | Return the next token or throw an exception. Though it does not consume
that token.
@param message Message to add to exception if there are no more JSON
tokens on the stream.
@return The next token.
@throws IOException If unable to read from stream. | [
"Return",
"the",
"next",
"token",
"or",
"throw",
"an",
"exception",
".",
"Though",
"it",
"does",
"not",
"consume",
"that",
"token",
"."
] | train | https://github.com/morimekta/providence/blob/7c17dc1c96b1a1d4b9ff942c2cfeb725278bd3aa/providence-core/src/main/java/net/morimekta/providence/serializer/pretty/Tokenizer.java#L254-L260 |
structurizr/java | structurizr-core/src/com/structurizr/model/ModelItem.java | ModelItem.addPerspective | public Perspective addPerspective(String name, String description) {
if (StringUtils.isNullOrEmpty(name)) {
throw new IllegalArgumentException("A name must be specified.");
}
if (StringUtils.isNullOrEmpty(description)) {
throw new IllegalArgumentException("A description ... | java | public Perspective addPerspective(String name, String description) {
if (StringUtils.isNullOrEmpty(name)) {
throw new IllegalArgumentException("A name must be specified.");
}
if (StringUtils.isNullOrEmpty(description)) {
throw new IllegalArgumentException("A description ... | [
"public",
"Perspective",
"addPerspective",
"(",
"String",
"name",
",",
"String",
"description",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isNullOrEmpty",
"(",
"name",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"A name must be specified.\"",
... | Adds a perspective to this model item.
@param name the name of the perspective (e.g. "Security", must be unique)
@param description a description of the perspective
@return a Perspective object
@throws IllegalArgumentException if perspective details are not specified, or the named perspecti... | [
"Adds",
"a",
"perspective",
"to",
"this",
"model",
"item",
"."
] | train | https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/ModelItem.java#L156-L173 |
ThreeTen/threetenbp | src/main/java/org/threeten/bp/zone/ZoneRulesBuilder.java | ZoneRulesBuilder.addWindowForever | public ZoneRulesBuilder addWindowForever(ZoneOffset standardOffset) {
return addWindow(standardOffset, LocalDateTime.MAX, TimeDefinition.WALL);
} | java | public ZoneRulesBuilder addWindowForever(ZoneOffset standardOffset) {
return addWindow(standardOffset, LocalDateTime.MAX, TimeDefinition.WALL);
} | [
"public",
"ZoneRulesBuilder",
"addWindowForever",
"(",
"ZoneOffset",
"standardOffset",
")",
"{",
"return",
"addWindow",
"(",
"standardOffset",
",",
"LocalDateTime",
".",
"MAX",
",",
"TimeDefinition",
".",
"WALL",
")",
";",
"}"
] | Adds a window that applies until the end of time to the builder that can be
used to filter a set of rules.
<p>
This method defines and adds a window to the zone where the standard offset is specified.
The window limits the effect of subsequent additions of transition rules
or fixed savings. If neither rules or fixed sa... | [
"Adds",
"a",
"window",
"that",
"applies",
"until",
"the",
"end",
"of",
"time",
"to",
"the",
"builder",
"that",
"can",
"be",
"used",
"to",
"filter",
"a",
"set",
"of",
"rules",
".",
"<p",
">",
"This",
"method",
"defines",
"and",
"adds",
"a",
"window",
... | train | https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/zone/ZoneRulesBuilder.java#L148-L150 |
lessthanoptimal/ejml | main/ejml-zdense/src/org/ejml/dense/row/CommonOps_ZDRM.java | CommonOps_ZDRM.multTransB | public static void multTransB(ZMatrixRMaj a , ZMatrixRMaj b , ZMatrixRMaj c )
{
MatrixMatrixMult_ZDRM.multTransB(a, b, c);
} | java | public static void multTransB(ZMatrixRMaj a , ZMatrixRMaj b , ZMatrixRMaj c )
{
MatrixMatrixMult_ZDRM.multTransB(a, b, c);
} | [
"public",
"static",
"void",
"multTransB",
"(",
"ZMatrixRMaj",
"a",
",",
"ZMatrixRMaj",
"b",
",",
"ZMatrixRMaj",
"c",
")",
"{",
"MatrixMatrixMult_ZDRM",
".",
"multTransB",
"(",
"a",
",",
"b",
",",
"c",
")",
";",
"}"
] | <p>
Performs the following operation:<br>
<br>
c = a * b<sup>H</sup> <br>
c<sub>ij</sub> = ∑<sub>k=1:n</sub> { a<sub>ik</sub> * b<sub>jk</sub>}
</p>
@param a The left matrix in the multiplication operation. Not modified.
@param b The right matrix in the multiplication operation. Not modified.
@param c Where the re... | [
"<p",
">",
"Performs",
"the",
"following",
"operation",
":",
"<br",
">",
"<br",
">",
"c",
"=",
"a",
"*",
"b<sup",
">",
"H<",
"/",
"sup",
">",
"<br",
">",
"c<sub",
">",
"ij<",
"/",
"sub",
">",
"=",
"&sum",
";",
"<sub",
">",
"k",
"=",
"1",
":",... | train | https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/CommonOps_ZDRM.java#L501-L504 |
sebastiangraf/jSCSI | bundles/commons/src/main/java/org/jscsi/parser/ProtocolDataUnit.java | ProtocolDataUnit.deserializeAdditionalHeaderSegments | private final int deserializeAdditionalHeaderSegments (final ByteBuffer pdu, final int offset) throws InternetSCSIException {
// parsing Additional Header Segment
int off = offset;
int ahsLength = basicHeaderSegment.getTotalAHSLength();
while (ahsLength != 0) {
final Additio... | java | private final int deserializeAdditionalHeaderSegments (final ByteBuffer pdu, final int offset) throws InternetSCSIException {
// parsing Additional Header Segment
int off = offset;
int ahsLength = basicHeaderSegment.getTotalAHSLength();
while (ahsLength != 0) {
final Additio... | [
"private",
"final",
"int",
"deserializeAdditionalHeaderSegments",
"(",
"final",
"ByteBuffer",
"pdu",
",",
"final",
"int",
"offset",
")",
"throws",
"InternetSCSIException",
"{",
"// parsing Additional Header Segment",
"int",
"off",
"=",
"offset",
";",
"int",
"ahsLength",... | Deserializes a array (starting from the given offset) and store the informations to the
<code>AdditionalHeaderSegment</code> object.
@param pdu The <code>ByteBuffer</code> to read from.
@param offset The offset to start from.
@return The length of the written bytes.
@throws InternetSCSIException If any violation of th... | [
"Deserializes",
"a",
"array",
"(",
"starting",
"from",
"the",
"given",
"offset",
")",
"and",
"store",
"the",
"informations",
"to",
"the",
"<code",
">",
"AdditionalHeaderSegment<",
"/",
"code",
">",
"object",
"."
] | train | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/parser/ProtocolDataUnit.java#L224-L240 |
molgenis/molgenis | molgenis-data/src/main/java/org/molgenis/data/meta/EntityTypeDependencyResolver.java | EntityTypeDependencyResolver.expandEntityTypeDependencies | private static Set<EntityTypeNode> expandEntityTypeDependencies(EntityTypeNode entityTypeNode) {
if (LOG.isTraceEnabled()) {
LOG.trace(
"expandEntityTypeDependencies(EntityTypeNode entityTypeNode) --- entity: [{}], skip: [{}]",
entityTypeNode.getEntityType().getId(),
entityTypeNo... | java | private static Set<EntityTypeNode> expandEntityTypeDependencies(EntityTypeNode entityTypeNode) {
if (LOG.isTraceEnabled()) {
LOG.trace(
"expandEntityTypeDependencies(EntityTypeNode entityTypeNode) --- entity: [{}], skip: [{}]",
entityTypeNode.getEntityType().getId(),
entityTypeNo... | [
"private",
"static",
"Set",
"<",
"EntityTypeNode",
">",
"expandEntityTypeDependencies",
"(",
"EntityTypeNode",
"entityTypeNode",
")",
"{",
"if",
"(",
"LOG",
".",
"isTraceEnabled",
"(",
")",
")",
"{",
"LOG",
".",
"trace",
"(",
"\"expandEntityTypeDependencies(EntityTy... | Returns whole tree dependencies of the given entity meta data.
@param entityTypeNode entity meta data node
@return dependencies of the entity meta data node | [
"Returns",
"whole",
"tree",
"dependencies",
"of",
"the",
"given",
"entity",
"meta",
"data",
"."
] | train | https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data/src/main/java/org/molgenis/data/meta/EntityTypeDependencyResolver.java#L110-L149 |
elki-project/elki | elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/MultipleObjectsBundle.java | MultipleObjectsBundle.makeSimple | public static <V1, V2, V3> MultipleObjectsBundle makeSimple(SimpleTypeInformation<? super V1> type1, List<? extends V1> data1, SimpleTypeInformation<? super V2> type2, List<? extends V2> data2, SimpleTypeInformation<? super V3> type3, List<? extends V3> data3) {
MultipleObjectsBundle bundle = new MultipleObjectsBun... | java | public static <V1, V2, V3> MultipleObjectsBundle makeSimple(SimpleTypeInformation<? super V1> type1, List<? extends V1> data1, SimpleTypeInformation<? super V2> type2, List<? extends V2> data2, SimpleTypeInformation<? super V3> type3, List<? extends V3> data3) {
MultipleObjectsBundle bundle = new MultipleObjectsBun... | [
"public",
"static",
"<",
"V1",
",",
"V2",
",",
"V3",
">",
"MultipleObjectsBundle",
"makeSimple",
"(",
"SimpleTypeInformation",
"<",
"?",
"super",
"V1",
">",
"type1",
",",
"List",
"<",
"?",
"extends",
"V1",
">",
"data1",
",",
"SimpleTypeInformation",
"<",
"... | Helper to add a single column to the bundle.
@param <V1> First Object type
@param <V2> Second Object type
@param <V3> Third Object type
@param type1 First type information
@param data1 First data column to add
@param type2 Second type information
@param data2 Second data column to add
@param type3 Third type informati... | [
"Helper",
"to",
"add",
"a",
"single",
"column",
"to",
"the",
"bundle",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/MultipleObjectsBundle.java#L210-L216 |
knowm/XChange | xchange-coinbase/src/main/java/org/knowm/xchange/coinbase/v2/service/CoinbaseAccountServiceRaw.java | CoinbaseAccountServiceRaw.getCoinbaseAccounts | public List<CoinbaseAccount> getCoinbaseAccounts() throws IOException {
String apiKey = exchange.getExchangeSpecification().getApiKey();
BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();
return coinbase
.getAccounts(Coinbase.CB_VERSION_VALUE, apiKey, signature... | java | public List<CoinbaseAccount> getCoinbaseAccounts() throws IOException {
String apiKey = exchange.getExchangeSpecification().getApiKey();
BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();
return coinbase
.getAccounts(Coinbase.CB_VERSION_VALUE, apiKey, signature... | [
"public",
"List",
"<",
"CoinbaseAccount",
">",
"getCoinbaseAccounts",
"(",
")",
"throws",
"IOException",
"{",
"String",
"apiKey",
"=",
"exchange",
".",
"getExchangeSpecification",
"(",
")",
".",
"getApiKey",
"(",
")",
";",
"BigDecimal",
"timestamp",
"=",
"coinba... | Authenticated resource that shows the current user accounts.
@see <a
href="https://developers.coinbase.com/api/v2#list-accounts">developers.coinbase.com/api/v2#list-accounts</a> | [
"Authenticated",
"resource",
"that",
"shows",
"the",
"current",
"user",
"accounts",
"."
] | train | https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-coinbase/src/main/java/org/knowm/xchange/coinbase/v2/service/CoinbaseAccountServiceRaw.java#L52-L59 |
googleapis/cloud-bigtable-client | bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/util/ThreadUtil.java | ThreadUtil.getThreadFactory | public static ThreadFactory getThreadFactory(String nameFormat, boolean daemon) {
if (PlatformInformation.isOnGAEStandard7() || PlatformInformation.isOnGAEStandard8()) {
return MoreExecutors.platformThreadFactory();
} else {
return new ThreadFactoryBuilder()
.setDaemon(daemon)
.s... | java | public static ThreadFactory getThreadFactory(String nameFormat, boolean daemon) {
if (PlatformInformation.isOnGAEStandard7() || PlatformInformation.isOnGAEStandard8()) {
return MoreExecutors.platformThreadFactory();
} else {
return new ThreadFactoryBuilder()
.setDaemon(daemon)
.s... | [
"public",
"static",
"ThreadFactory",
"getThreadFactory",
"(",
"String",
"nameFormat",
",",
"boolean",
"daemon",
")",
"{",
"if",
"(",
"PlatformInformation",
".",
"isOnGAEStandard7",
"(",
")",
"||",
"PlatformInformation",
".",
"isOnGAEStandard8",
"(",
")",
")",
"{",... | Get a {@link ThreadFactory} suitable for use in the current environment.
@param nameFormat to apply to threads created by the factory.
@param daemon {@code true} if the threads the factory creates are daemon threads, {@code false}
otherwise.
@return a {@link ThreadFactory}. | [
"Get",
"a",
"{"
] | train | https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/util/ThreadUtil.java#L38-L47 |
mattprecious/telescope | telescope/src/main/java/com/mattprecious/telescope/TelescopeFileProvider.java | TelescopeFileProvider.getUriForFile | public static Uri getUriForFile(Context context, File file) {
return getUriForFile(context, context.getPackageName() + ".telescope.fileprovider", file);
} | java | public static Uri getUriForFile(Context context, File file) {
return getUriForFile(context, context.getPackageName() + ".telescope.fileprovider", file);
} | [
"public",
"static",
"Uri",
"getUriForFile",
"(",
"Context",
"context",
",",
"File",
"file",
")",
"{",
"return",
"getUriForFile",
"(",
"context",
",",
"context",
".",
"getPackageName",
"(",
")",
"+",
"\".telescope.fileprovider\"",
",",
"file",
")",
";",
"}"
] | Calls {@link #getUriForFile(Context, String, File)} using the correct authority for Telescope
screenshots. | [
"Calls",
"{"
] | train | https://github.com/mattprecious/telescope/blob/ce5e2710fb16ee214026fc25b091eb946fdbbb3c/telescope/src/main/java/com/mattprecious/telescope/TelescopeFileProvider.java#L12-L14 |
pressgang-ccms/PressGangCCMSContentSpecProcessor | src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java | ContentSpecParser.calculateLineIndentationLevel | protected int calculateLineIndentationLevel(final ParserData parserData, final String line,
int lineNumber) throws IndentationException {
char[] lineCharArray = line.toCharArray();
int indentationCount = 0;
// Count the amount of whitespace characters before any text to determine the... | java | protected int calculateLineIndentationLevel(final ParserData parserData, final String line,
int lineNumber) throws IndentationException {
char[] lineCharArray = line.toCharArray();
int indentationCount = 0;
// Count the amount of whitespace characters before any text to determine the... | [
"protected",
"int",
"calculateLineIndentationLevel",
"(",
"final",
"ParserData",
"parserData",
",",
"final",
"String",
"line",
",",
"int",
"lineNumber",
")",
"throws",
"IndentationException",
"{",
"char",
"[",
"]",
"lineCharArray",
"=",
"line",
".",
"toCharArray",
... | Calculates the indentation level of a line using the amount of whitespace and the parsers indentation size setting.
@param parserData
@param line The line to calculate the indentation for.
@return The lines indentation level.
@throws IndentationException Thrown if the indentation for the line isn't valid. | [
"Calculates",
"the",
"indentation",
"level",
"of",
"a",
"line",
"using",
"the",
"amount",
"of",
"whitespace",
"and",
"the",
"parsers",
"indentation",
"size",
"setting",
"."
] | train | https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L490-L509 |
pressgang-ccms/PressGangCCMSQuery | src/main/java/org/jboss/pressgang/ccms/filter/utils/JPAUtils.java | JPAUtils.copyJoins | public static void copyJoins(From<?, ?> from, From<?, ?> to) {
for (Join<?, ?> j : from.getJoins()) {
Join<?, ?> toJoin = to.join(j.getAttribute().getName(), j.getJoinType());
toJoin.alias(getOrCreateAlias(j));
copyJoins(j, toJoin);
}
for (Fetch<?, ?> f : fr... | java | public static void copyJoins(From<?, ?> from, From<?, ?> to) {
for (Join<?, ?> j : from.getJoins()) {
Join<?, ?> toJoin = to.join(j.getAttribute().getName(), j.getJoinType());
toJoin.alias(getOrCreateAlias(j));
copyJoins(j, toJoin);
}
for (Fetch<?, ?> f : fr... | [
"public",
"static",
"void",
"copyJoins",
"(",
"From",
"<",
"?",
",",
"?",
">",
"from",
",",
"From",
"<",
"?",
",",
"?",
">",
"to",
")",
"{",
"for",
"(",
"Join",
"<",
"?",
",",
"?",
">",
"j",
":",
"from",
".",
"getJoins",
"(",
")",
")",
"{",... | Copy Joins
@param from source Join
@param to destination Join | [
"Copy",
"Joins"
] | train | https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/utils/JPAUtils.java#L281-L294 |
nguyenq/tess4j | src/main/java/com/recognition/software/jdeskew/ImageUtil.java | ImageUtil.isBlack | public static boolean isBlack(BufferedImage image, int x, int y) {
if (image.getType() == BufferedImage.TYPE_BYTE_BINARY) {
WritableRaster raster = image.getRaster();
int pixelRGBValue = raster.getSample(x, y, 0);
return pixelRGBValue == 0;
}
int lumin... | java | public static boolean isBlack(BufferedImage image, int x, int y) {
if (image.getType() == BufferedImage.TYPE_BYTE_BINARY) {
WritableRaster raster = image.getRaster();
int pixelRGBValue = raster.getSample(x, y, 0);
return pixelRGBValue == 0;
}
int lumin... | [
"public",
"static",
"boolean",
"isBlack",
"(",
"BufferedImage",
"image",
",",
"int",
"x",
",",
"int",
"y",
")",
"{",
"if",
"(",
"image",
".",
"getType",
"(",
")",
"==",
"BufferedImage",
".",
"TYPE_BYTE_BINARY",
")",
"{",
"WritableRaster",
"raster",
"=",
... | Whether the pixel is black.
@param image source image
@param x
@param y
@return | [
"Whether",
"the",
"pixel",
"is",
"black",
"."
] | train | https://github.com/nguyenq/tess4j/blob/cfcd4a8a44042f150b4aaf7bdf5ffc485a2236e1/src/main/java/com/recognition/software/jdeskew/ImageUtil.java#L29-L38 |
zeroturnaround/zt-zip | src/main/java/org/zeroturnaround/zip/Zips.java | Zips.isEntryInDir | private boolean isEntryInDir(Set<String> dirNames, String entryName) {
// this should be done with a trie, put dirNames in a trie and check if entryName leads to
// some node or not.
for(String dirName : dirNames) {
if (entryName.startsWith(dirName)) {
return true;
}
}
return fal... | java | private boolean isEntryInDir(Set<String> dirNames, String entryName) {
// this should be done with a trie, put dirNames in a trie and check if entryName leads to
// some node or not.
for(String dirName : dirNames) {
if (entryName.startsWith(dirName)) {
return true;
}
}
return fal... | [
"private",
"boolean",
"isEntryInDir",
"(",
"Set",
"<",
"String",
">",
"dirNames",
",",
"String",
"entryName",
")",
"{",
"// this should be done with a trie, put dirNames in a trie and check if entryName leads to",
"// some node or not.",
"for",
"(",
"String",
"dirName",
":",
... | Checks if entry given by name resides inside of one of the dirs.
@param dirNames dirs
@param entryName entryPath | [
"Checks",
"if",
"entry",
"given",
"by",
"name",
"resides",
"inside",
"of",
"one",
"of",
"the",
"dirs",
"."
] | train | https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/Zips.java#L607-L616 |
roboconf/roboconf-platform | core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java | Utils.copyDirectory | public static void copyDirectory( File source, File target ) throws IOException {
Utils.createDirectory( target );
for( File sourceFile : listAllFiles( source, false )) {
String path = computeFileRelativeLocation( source, sourceFile );
File targetFile = new File( target, path );
Utils.createDirectory( ta... | java | public static void copyDirectory( File source, File target ) throws IOException {
Utils.createDirectory( target );
for( File sourceFile : listAllFiles( source, false )) {
String path = computeFileRelativeLocation( source, sourceFile );
File targetFile = new File( target, path );
Utils.createDirectory( ta... | [
"public",
"static",
"void",
"copyDirectory",
"(",
"File",
"source",
",",
"File",
"target",
")",
"throws",
"IOException",
"{",
"Utils",
".",
"createDirectory",
"(",
"target",
")",
";",
"for",
"(",
"File",
"sourceFile",
":",
"listAllFiles",
"(",
"source",
",",... | Copies a directory.
<p>
This method copies the content of the source directory
into the a target directory. This latter is created if necessary.
</p>
@param source the directory to copy
@param target the target directory
@throws IOException if a problem occurred during the copy | [
"Copies",
"a",
"directory",
".",
"<p",
">",
"This",
"method",
"copies",
"the",
"content",
"of",
"the",
"source",
"directory",
"into",
"the",
"a",
"target",
"directory",
".",
"This",
"latter",
"is",
"created",
"if",
"necessary",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L1250-L1260 |
couchbase/couchbase-java-client | src/main/java/com/couchbase/client/java/query/dsl/functions/ConditionalFunctions.java | ConditionalFunctions.ifNaN | public static Expression ifNaN(Expression expression1, Expression expression2, Expression... others) {
return build("IFNAN", expression1, expression2, others);
} | java | public static Expression ifNaN(Expression expression1, Expression expression2, Expression... others) {
return build("IFNAN", expression1, expression2, others);
} | [
"public",
"static",
"Expression",
"ifNaN",
"(",
"Expression",
"expression1",
",",
"Expression",
"expression2",
",",
"Expression",
"...",
"others",
")",
"{",
"return",
"build",
"(",
"\"IFNAN\"",
",",
"expression1",
",",
"expression2",
",",
"others",
")",
";",
"... | Returned expression results in first non-MISSING, non-NaN number.
Returns MISSING or NULL if a non-number input is encountered first | [
"Returned",
"expression",
"results",
"in",
"first",
"non",
"-",
"MISSING",
"non",
"-",
"NaN",
"number",
".",
"Returns",
"MISSING",
"or",
"NULL",
"if",
"a",
"non",
"-",
"number",
"input",
"is",
"encountered",
"first"
] | train | https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/ConditionalFunctions.java#L108-L110 |
shinesolutions/swagger-aem | java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/CrxApi.java | CrxApi.postPackageUpdateAsync | public com.squareup.okhttp.Call postPackageUpdateAsync(String groupName, String packageName, String version, String path, String filter, String charset_, final ApiCallback<String> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.Progress... | java | public com.squareup.okhttp.Call postPackageUpdateAsync(String groupName, String packageName, String version, String path, String filter, String charset_, final ApiCallback<String> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.Progress... | [
"public",
"com",
".",
"squareup",
".",
"okhttp",
".",
"Call",
"postPackageUpdateAsync",
"(",
"String",
"groupName",
",",
"String",
"packageName",
",",
"String",
"version",
",",
"String",
"path",
",",
"String",
"filter",
",",
"String",
"charset_",
",",
"final",... | (asynchronously)
@param groupName (required)
@param packageName (required)
@param version (required)
@param path (required)
@param filter (optional)
@param charset_ (optional)
@param callback The callback to be executed when the API call finishes
@return The request call
@throws ApiException If fail to process t... | [
"(",
"asynchronously",
")"
] | train | https://github.com/shinesolutions/swagger-aem/blob/ae7da4df93e817dc2bad843779b2069d9c4e7c6b/java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/CrxApi.java#L747-L772 |
btaz/data-util | src/main/java/com/btaz/util/tf/Template.java | Template.readResource | public static String readResource(String path) {
try {
File file = ResourceUtil.getResourceFile(path);
return ResourceUtil.readFromFileIntoString(file);
} catch (Exception e) {
throw new DataUtilException("Failed to load resource", e);
}
} | java | public static String readResource(String path) {
try {
File file = ResourceUtil.getResourceFile(path);
return ResourceUtil.readFromFileIntoString(file);
} catch (Exception e) {
throw new DataUtilException("Failed to load resource", e);
}
} | [
"public",
"static",
"String",
"readResource",
"(",
"String",
"path",
")",
"{",
"try",
"{",
"File",
"file",
"=",
"ResourceUtil",
".",
"getResourceFile",
"(",
"path",
")",
";",
"return",
"ResourceUtil",
".",
"readFromFileIntoString",
"(",
"file",
")",
";",
"}"... | This method looks for a file on the provided path and returns it as a string
@param path path
@return {@code String} text | [
"This",
"method",
"looks",
"for",
"a",
"file",
"on",
"the",
"provided",
"path",
"and",
"returns",
"it",
"as",
"a",
"string"
] | train | https://github.com/btaz/data-util/blob/f01de64854c456a88a31ffbe8bac6d605151b496/src/main/java/com/btaz/util/tf/Template.java#L61-L68 |
LearnLib/automatalib | commons/util/src/main/java/net/automatalib/commons/util/array/AWUtil.java | AWUtil.safeWrite | public static <T, U extends T> int safeWrite(ArrayWritable<U> aw, T[] array) {
int num = aw.size();
if (num <= 0) {
return 0;
}
if (num > array.length) {
num = array.length;
}
aw.writeToArray(0, array, 0, num);
return num;
} | java | public static <T, U extends T> int safeWrite(ArrayWritable<U> aw, T[] array) {
int num = aw.size();
if (num <= 0) {
return 0;
}
if (num > array.length) {
num = array.length;
}
aw.writeToArray(0, array, 0, num);
return num;
} | [
"public",
"static",
"<",
"T",
",",
"U",
"extends",
"T",
">",
"int",
"safeWrite",
"(",
"ArrayWritable",
"<",
"U",
">",
"aw",
",",
"T",
"[",
"]",
"array",
")",
"{",
"int",
"num",
"=",
"aw",
".",
"size",
"(",
")",
";",
"if",
"(",
"num",
"<=",
"0... | Writes the complete container data to an array. This method ensures that the array's capacity is not exceeded.
@param aw
the container.
@param array
the array
@return the number of elements copied | [
"Writes",
"the",
"complete",
"container",
"data",
"to",
"an",
"array",
".",
"This",
"method",
"ensures",
"that",
"the",
"array",
"s",
"capacity",
"is",
"not",
"exceeded",
"."
] | train | https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/commons/util/src/main/java/net/automatalib/commons/util/array/AWUtil.java#L46-L56 |
pravega/pravega | segmentstore/server/src/main/java/io/pravega/segmentstore/server/containers/StreamSegmentContainerMetadata.java | StreamSegmentContainerMetadata.isEligibleForEviction | private boolean isEligibleForEviction(SegmentMetadata metadata, long sequenceNumberCutoff) {
return !metadata.isPinned()
&& (metadata.getLastUsed() < sequenceNumberCutoff
|| metadata.isDeleted() && metadata.getLastUsed() <= this.lastTruncatedSequenceNumber.get());
} | java | private boolean isEligibleForEviction(SegmentMetadata metadata, long sequenceNumberCutoff) {
return !metadata.isPinned()
&& (metadata.getLastUsed() < sequenceNumberCutoff
|| metadata.isDeleted() && metadata.getLastUsed() <= this.lastTruncatedSequenceNumber.get());
} | [
"private",
"boolean",
"isEligibleForEviction",
"(",
"SegmentMetadata",
"metadata",
",",
"long",
"sequenceNumberCutoff",
")",
"{",
"return",
"!",
"metadata",
".",
"isPinned",
"(",
")",
"&&",
"(",
"metadata",
".",
"getLastUsed",
"(",
")",
"<",
"sequenceNumberCutoff"... | Determines whether the Segment with given metadata can be evicted, based on the the given Sequence Number Threshold.
A Segment will not be chosen for eviction if {@link SegmentMetadata#isPinned()} is true.
@param metadata The Metadata for the Segment that is considered for eviction.
@param sequenceNumberCu... | [
"Determines",
"whether",
"the",
"Segment",
"with",
"given",
"metadata",
"can",
"be",
"evicted",
"based",
"on",
"the",
"the",
"given",
"Sequence",
"Number",
"Threshold",
".",
"A",
"Segment",
"will",
"not",
"be",
"chosen",
"for",
"eviction",
"if",
"{",
"@link"... | train | https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/containers/StreamSegmentContainerMetadata.java#L297-L301 |
javamelody/javamelody | javamelody-swing/src/main/java/net/bull/javamelody/swing/Utilities.java | Utilities.adjustTableHeight | public static void adjustTableHeight(final JTable table) {
table.setPreferredScrollableViewportSize(
new Dimension(-1, table.getPreferredSize().height));
// on utilise invokeLater pour configurer le scrollPane car lors de l'exécution ce cette méthode
// la table n'est pas encore dans son scrollPane parent... | java | public static void adjustTableHeight(final JTable table) {
table.setPreferredScrollableViewportSize(
new Dimension(-1, table.getPreferredSize().height));
// on utilise invokeLater pour configurer le scrollPane car lors de l'exécution ce cette méthode
// la table n'est pas encore dans son scrollPane parent... | [
"public",
"static",
"void",
"adjustTableHeight",
"(",
"final",
"JTable",
"table",
")",
"{",
"table",
".",
"setPreferredScrollableViewportSize",
"(",
"new",
"Dimension",
"(",
"-",
"1",
",",
"table",
".",
"getPreferredSize",
"(",
")",
".",
"height",
")",
")",
... | Fixe la taille exacte d'une JTable à celle nécessaire pour afficher les données.
@param table JTable | [
"Fixe",
"la",
"taille",
"exacte",
"d",
"une",
"JTable",
"à",
"celle",
"nécessaire",
"pour",
"afficher",
"les",
"données",
"."
] | train | https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-swing/src/main/java/net/bull/javamelody/swing/Utilities.java#L101-L121 |
looly/hutool | hutool-extra/src/main/java/cn/hutool/extra/ftp/Ftp.java | Ftp.init | public Ftp init(String host, int port, String user, String password, FtpMode mode) {
final FTPClient client = new FTPClient();
client.setControlEncoding(this.charset.toString());
try {
// 连接ftp服务器
client.connect(host, port);
// 登录ftp服务器
client.login(user, password);
} catch (IOException e) {... | java | public Ftp init(String host, int port, String user, String password, FtpMode mode) {
final FTPClient client = new FTPClient();
client.setControlEncoding(this.charset.toString());
try {
// 连接ftp服务器
client.connect(host, port);
// 登录ftp服务器
client.login(user, password);
} catch (IOException e) {... | [
"public",
"Ftp",
"init",
"(",
"String",
"host",
",",
"int",
"port",
",",
"String",
"user",
",",
"String",
"password",
",",
"FtpMode",
"mode",
")",
"{",
"final",
"FTPClient",
"client",
"=",
"new",
"FTPClient",
"(",
")",
";",
"client",
".",
"setControlEnco... | 初始化连接
@param host 域名或IP
@param port 端口
@param user 用户名
@param password 密码
@param mode 模式
@return this | [
"初始化连接"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/ftp/Ftp.java#L132-L157 |
xhsun/gw2wrapper | src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java | AsynchronousRequest.getTitleInfo | public void getTitleInfo(int[] ids, Callback<List<Title>> callback) throws GuildWars2Exception, NullPointerException {
isParamValid(new ParamChecker(ids));
gw2API.getTitleInfo(processIds(ids), GuildWars2.lang.getValue()).enqueue(callback);
} | java | public void getTitleInfo(int[] ids, Callback<List<Title>> callback) throws GuildWars2Exception, NullPointerException {
isParamValid(new ParamChecker(ids));
gw2API.getTitleInfo(processIds(ids), GuildWars2.lang.getValue()).enqueue(callback);
} | [
"public",
"void",
"getTitleInfo",
"(",
"int",
"[",
"]",
"ids",
",",
"Callback",
"<",
"List",
"<",
"Title",
">",
">",
"callback",
")",
"throws",
"GuildWars2Exception",
",",
"NullPointerException",
"{",
"isParamValid",
"(",
"new",
"ParamChecker",
"(",
"ids",
"... | For more info on titles API go <a href="https://wiki.guildwars2.com/wiki/API:2/titles">here</a><br/>
Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
@param ids list of title id
@param callback callback that is goin... | [
"For",
"more",
"info",
"on",
"titles",
"API",
"go",
"<a",
"href",
"=",
"https",
":",
"//",
"wiki",
".",
"guildwars2",
".",
"com",
"/",
"wiki",
"/",
"API",
":",
"2",
"/",
"titles",
">",
"here<",
"/",
"a",
">",
"<br",
"/",
">",
"Give",
"user",
"t... | train | https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L2495-L2498 |
apache/groovy | src/main/java/org/codehaus/groovy/syntax/Types.java | Types.makePostfix | public static void makePostfix(CSTNode node, boolean throwIfInvalid) {
switch (node.getMeaning()) {
case PLUS_PLUS:
node.setMeaning(POSTFIX_PLUS_PLUS);
break;
case MINUS_MINUS:
node.setMeaning(POSTFIX_MINUS_MINUS);
break;
... | java | public static void makePostfix(CSTNode node, boolean throwIfInvalid) {
switch (node.getMeaning()) {
case PLUS_PLUS:
node.setMeaning(POSTFIX_PLUS_PLUS);
break;
case MINUS_MINUS:
node.setMeaning(POSTFIX_MINUS_MINUS);
break;
... | [
"public",
"static",
"void",
"makePostfix",
"(",
"CSTNode",
"node",
",",
"boolean",
"throwIfInvalid",
")",
"{",
"switch",
"(",
"node",
".",
"getMeaning",
"(",
")",
")",
"{",
"case",
"PLUS_PLUS",
":",
"node",
".",
"setMeaning",
"(",
"POSTFIX_PLUS_PLUS",
")",
... | Converts a node from a generic type to a specific postfix type.
Throws a <code>GroovyBugError</code> if the type can't be converted. | [
"Converts",
"a",
"node",
"from",
"a",
"generic",
"type",
"to",
"a",
"specific",
"postfix",
"type",
".",
"Throws",
"a",
"<code",
">",
"GroovyBugError<",
"/",
"code",
">",
"if",
"the",
"type",
"can",
"t",
"be",
"converted",
"."
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/syntax/Types.java#L887-L904 |
igniterealtime/Smack | smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java | Stanza.overrideExtension | public ExtensionElement overrideExtension(ExtensionElement extension) {
if (extension == null) return null;
synchronized (packetExtensions) {
// Note that we need to use removeExtension(String, String) here. If would use
// removeExtension(ExtensionElement) then we would remove b... | java | public ExtensionElement overrideExtension(ExtensionElement extension) {
if (extension == null) return null;
synchronized (packetExtensions) {
// Note that we need to use removeExtension(String, String) here. If would use
// removeExtension(ExtensionElement) then we would remove b... | [
"public",
"ExtensionElement",
"overrideExtension",
"(",
"ExtensionElement",
"extension",
")",
"{",
"if",
"(",
"extension",
"==",
"null",
")",
"return",
"null",
";",
"synchronized",
"(",
"packetExtensions",
")",
"{",
"// Note that we need to use removeExtension(String, Str... | Add the given extension and override eventually existing extensions with the same name and
namespace.
@param extension the extension element to add.
@return one of the removed extensions or <code>null</code> if there are none.
@since 4.1.2 | [
"Add",
"the",
"given",
"extension",
"and",
"override",
"eventually",
"existing",
"extensions",
"with",
"the",
"same",
"name",
"and",
"namespace",
"."
] | train | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java#L394-L404 |
apache/groovy | src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java | DefaultGroovyMethods.findAll | public static <T> Set<T> findAll(Set<T> self) {
return findAll(self, Closure.IDENTITY);
} | java | public static <T> Set<T> findAll(Set<T> self) {
return findAll(self, Closure.IDENTITY);
} | [
"public",
"static",
"<",
"T",
">",
"Set",
"<",
"T",
">",
"findAll",
"(",
"Set",
"<",
"T",
">",
"self",
")",
"{",
"return",
"findAll",
"(",
"self",
",",
"Closure",
".",
"IDENTITY",
")",
";",
"}"
] | Finds the items matching the IDENTITY Closure (i.e. matching Groovy truth).
<p>
Example:
<pre class="groovyTestCase">
def items = [1, 2, 0, false, true, '', 'foo', [], [4, 5], null] as Set
assert items.findAll() == [1, 2, true, 'foo', [4, 5]] as Set
</pre>
@param self a Set
@return a Set of the values found
@s... | [
"Finds",
"the",
"items",
"matching",
"the",
"IDENTITY",
"Closure",
"(",
"i",
".",
"e",
".",
" ",
";",
"matching",
"Groovy",
"truth",
")",
".",
"<p",
">",
"Example",
":",
"<pre",
"class",
"=",
"groovyTestCase",
">",
"def",
"items",
"=",
"[",
"1",
... | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L4811-L4813 |
jhunters/jprotobuf | src/main/java/com/baidu/bjf/remoting/protobuf/utils/MiniTemplator.java | MiniTemplator.addBlock | public void addBlock(String blockName, boolean isOptional) throws BlockNotDefinedException {
int blockNo = mtp.lookupBlockName(blockName);
if (blockNo == -1) {
if (isOptional) {
return;
}
throw new BlockNotDefinedException(blockName);
}
... | java | public void addBlock(String blockName, boolean isOptional) throws BlockNotDefinedException {
int blockNo = mtp.lookupBlockName(blockName);
if (blockNo == -1) {
if (isOptional) {
return;
}
throw new BlockNotDefinedException(blockName);
}
... | [
"public",
"void",
"addBlock",
"(",
"String",
"blockName",
",",
"boolean",
"isOptional",
")",
"throws",
"BlockNotDefinedException",
"{",
"int",
"blockNo",
"=",
"mtp",
".",
"lookupBlockName",
"(",
"blockName",
")",
";",
"if",
"(",
"blockNo",
"==",
"-",
"1",
")... | Adds an instance of a template block.
<p>
If the block contains variables, these variables must be set before the block is added. If the block contains
subblocks (nested blocks), the subblocks must be added before this block is added. If multiple blocks exist with
the specified name, an instance is added for each block... | [
"Adds",
"an",
"instance",
"of",
"a",
"template",
"block",
".",
"<p",
">",
"If",
"the",
"block",
"contains",
"variables",
"these",
"variables",
"must",
"be",
"set",
"before",
"the",
"block",
"is",
"added",
".",
"If",
"the",
"block",
"contains",
"subblocks",... | train | https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/src/main/java/com/baidu/bjf/remoting/protobuf/utils/MiniTemplator.java#L521-L533 |
Azure/azure-sdk-for-java | mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/LogFilesInner.java | LogFilesInner.listByServerAsync | public Observable<List<LogFileInner>> listByServerAsync(String resourceGroupName, String serverName) {
return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<List<LogFileInner>>, List<LogFileInner>>() {
@Override
public List<LogFileInner>... | java | public Observable<List<LogFileInner>> listByServerAsync(String resourceGroupName, String serverName) {
return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<List<LogFileInner>>, List<LogFileInner>>() {
@Override
public List<LogFileInner>... | [
"public",
"Observable",
"<",
"List",
"<",
"LogFileInner",
">",
">",
"listByServerAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"serverName",
")",
"{",
"return",
"listByServerWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"serverName",
")",
".",... | List all the log files in a given 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.
@throws IllegalArgumentException thrown if parameters fail the validation
... | [
"List",
"all",
"the",
"log",
"files",
"in",
"a",
"given",
"server",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/LogFilesInner.java#L96-L103 |
puniverse/capsule | capsule-util/src/main/java/co/paralleluniverse/capsule/Jar.java | Jar.addClass | public Jar addClass(Class<?> clazz) throws IOException {
final String resource = clazz.getName().replace('.', '/') + ".class";
return addEntry(resource, clazz.getClassLoader().getResourceAsStream(resource));
} | java | public Jar addClass(Class<?> clazz) throws IOException {
final String resource = clazz.getName().replace('.', '/') + ".class";
return addEntry(resource, clazz.getClassLoader().getResourceAsStream(resource));
} | [
"public",
"Jar",
"addClass",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"throws",
"IOException",
"{",
"final",
"String",
"resource",
"=",
"clazz",
".",
"getName",
"(",
")",
".",
"replace",
"(",
"'",
"'",
",",
"'",
"'",
")",
"+",
"\".class\"",
";",
... | Adds a class entry to this JAR.
@param clazz the class to add to the JAR.
@return {@code this} | [
"Adds",
"a",
"class",
"entry",
"to",
"this",
"JAR",
"."
] | train | https://github.com/puniverse/capsule/blob/291a54e501a32aaf0284707b8c1fbff6a566822b/capsule-util/src/main/java/co/paralleluniverse/capsule/Jar.java#L379-L382 |
dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/model/Entry.java | Entry.isShowing | public final boolean isShowing(LocalDate startDate, LocalDate endDate, ZoneId zoneId) {
return isShowing(this, startDate, endDate, zoneId);
} | java | public final boolean isShowing(LocalDate startDate, LocalDate endDate, ZoneId zoneId) {
return isShowing(this, startDate, endDate, zoneId);
} | [
"public",
"final",
"boolean",
"isShowing",
"(",
"LocalDate",
"startDate",
",",
"LocalDate",
"endDate",
",",
"ZoneId",
"zoneId",
")",
"{",
"return",
"isShowing",
"(",
"this",
",",
"startDate",
",",
"endDate",
",",
"zoneId",
")",
";",
"}"
] | Checks whether the entry will be visible within the given start and end dates. This method
takes recurrence into consideration and will return true if any recurrence of this entry
will be displayed inside the given time interval.
@param startDate the start date of the search interval
@param endDate the end date of t... | [
"Checks",
"whether",
"the",
"entry",
"will",
"be",
"visible",
"within",
"the",
"given",
"start",
"and",
"end",
"dates",
".",
"This",
"method",
"takes",
"recurrence",
"into",
"consideration",
"and",
"will",
"return",
"true",
"if",
"any",
"recurrence",
"of",
"... | train | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Entry.java#L1487-L1489 |
UrielCh/ovh-java-sdk | ovh-java-sdk-deskaas/src/main/java/net/minidev/ovh/api/ApiOvhDeskaas.java | ApiOvhDeskaas.serviceName_changeContact_POST | public ArrayList<Long> serviceName_changeContact_POST(String serviceName, String contactAdmin, String contactBilling, String contactTech) throws IOException {
String qPath = "/deskaas/{serviceName}/changeContact";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<String, Object>(... | java | public ArrayList<Long> serviceName_changeContact_POST(String serviceName, String contactAdmin, String contactBilling, String contactTech) throws IOException {
String qPath = "/deskaas/{serviceName}/changeContact";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<String, Object>(... | [
"public",
"ArrayList",
"<",
"Long",
">",
"serviceName_changeContact_POST",
"(",
"String",
"serviceName",
",",
"String",
"contactAdmin",
",",
"String",
"contactBilling",
",",
"String",
"contactTech",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/desk... | Launch a contact change procedure
REST: POST /deskaas/{serviceName}/changeContact
@param contactAdmin The contact to set as admin contact
@param contactTech The contact to set as tech contact
@param contactBilling The contact to set as billing contact
@param serviceName [required] Domain of the service | [
"Launch",
"a",
"contact",
"change",
"procedure"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-deskaas/src/main/java/net/minidev/ovh/api/ApiOvhDeskaas.java#L301-L310 |
lessthanoptimal/BoofCV | main/boofcv-feature/src/main/java/boofcv/factory/feature/detect/extract/FactoryFeatureExtractor.java | FactoryFeatureExtractor.nonmaxCandidate | public static NonMaxSuppression nonmaxCandidate( @Nullable ConfigExtract config ) {
if( config == null )
config = new ConfigExtract();
config.checkValidity();
if( BOverrideFactoryFeatureExtractor.nonmaxCandidate != null ) {
return BOverrideFactoryFeatureExtractor.nonmaxCandidate.process(config);
}
No... | java | public static NonMaxSuppression nonmaxCandidate( @Nullable ConfigExtract config ) {
if( config == null )
config = new ConfigExtract();
config.checkValidity();
if( BOverrideFactoryFeatureExtractor.nonmaxCandidate != null ) {
return BOverrideFactoryFeatureExtractor.nonmaxCandidate.process(config);
}
No... | [
"public",
"static",
"NonMaxSuppression",
"nonmaxCandidate",
"(",
"@",
"Nullable",
"ConfigExtract",
"config",
")",
"{",
"if",
"(",
"config",
"==",
"null",
")",
"config",
"=",
"new",
"ConfigExtract",
"(",
")",
";",
"config",
".",
"checkValidity",
"(",
")",
";"... | Non-max feature extractor which saves a candidate list of all the found local maximums..
@param config Configuration for extractor
@return A feature extractor. | [
"Non",
"-",
"max",
"feature",
"extractor",
"which",
"saves",
"a",
"candidate",
"list",
"of",
"all",
"the",
"found",
"local",
"maximums",
".."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/detect/extract/FactoryFeatureExtractor.java#L110-L140 |
apache/incubator-heron | heron/api/src/java/org/apache/heron/classification/HeronAnnotationProcessor.java | HeronAnnotationProcessor.process | @Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
if (!roundEnv.processingOver()) {
for (TypeElement te : annotations) {
for (Element elt : roundEnv.getElementsAnnotatedWith(te)) {
if (!elt.toString().startsWith("org.apache.heron")) {
... | java | @Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
if (!roundEnv.processingOver()) {
for (TypeElement te : annotations) {
for (Element elt : roundEnv.getElementsAnnotatedWith(te)) {
if (!elt.toString().startsWith("org.apache.heron")) {
... | [
"@",
"Override",
"public",
"boolean",
"process",
"(",
"Set",
"<",
"?",
"extends",
"TypeElement",
">",
"annotations",
",",
"RoundEnvironment",
"roundEnv",
")",
"{",
"if",
"(",
"!",
"roundEnv",
".",
"processingOver",
"(",
")",
")",
"{",
"for",
"(",
"TypeElem... | If a non-heron class extends from a class annotated as Unstable, Private or LimitedPrivate,
emit a warning. | [
"If",
"a",
"non",
"-",
"heron",
"class",
"extends",
"from",
"a",
"class",
"annotated",
"as",
"Unstable",
"Private",
"or",
"LimitedPrivate",
"emit",
"a",
"warning",
"."
] | train | https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/api/src/java/org/apache/heron/classification/HeronAnnotationProcessor.java#L55-L70 |
fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/JournalReader.java | JournalReader.getJournalEntryStartTag | private StartElement getJournalEntryStartTag(XMLEventReader reader)
throws XMLStreamException, JournalException {
XMLEvent event = reader.nextTag();
if (!isStartTagEvent(event, QNAME_TAG_JOURNAL_ENTRY)) {
throw getNotStartTagException(QNAME_TAG_JOURNAL_ENTRY, event);
}
... | java | private StartElement getJournalEntryStartTag(XMLEventReader reader)
throws XMLStreamException, JournalException {
XMLEvent event = reader.nextTag();
if (!isStartTagEvent(event, QNAME_TAG_JOURNAL_ENTRY)) {
throw getNotStartTagException(QNAME_TAG_JOURNAL_ENTRY, event);
}
... | [
"private",
"StartElement",
"getJournalEntryStartTag",
"(",
"XMLEventReader",
"reader",
")",
"throws",
"XMLStreamException",
",",
"JournalException",
"{",
"XMLEvent",
"event",
"=",
"reader",
".",
"nextTag",
"(",
")",
";",
"if",
"(",
"!",
"isStartTagEvent",
"(",
"ev... | Get the next event and complain if it isn't a JournalEntry start tag. | [
"Get",
"the",
"next",
"event",
"and",
"complain",
"if",
"it",
"isn",
"t",
"a",
"JournalEntry",
"start",
"tag",
"."
] | train | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/JournalReader.java#L218-L225 |
albfernandez/itext2 | src/main/java/com/lowagie/text/FontFactory.java | FontFactory.registerFamily | public void registerFamily(String familyName, String fullName, String path) {
fontImp.registerFamily(familyName, fullName, path);
} | java | public void registerFamily(String familyName, String fullName, String path) {
fontImp.registerFamily(familyName, fullName, path);
} | [
"public",
"void",
"registerFamily",
"(",
"String",
"familyName",
",",
"String",
"fullName",
",",
"String",
"path",
")",
"{",
"fontImp",
".",
"registerFamily",
"(",
"familyName",
",",
"fullName",
",",
"path",
")",
";",
"}"
] | Register a font by giving explicitly the font family and name.
@param familyName the font family
@param fullName the font name
@param path the font path | [
"Register",
"a",
"font",
"by",
"giving",
"explicitly",
"the",
"font",
"family",
"and",
"name",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/FontFactory.java#L338-L340 |
apache/flink | flink-metrics/flink-metrics-core/src/main/java/org/apache/flink/metrics/MetricConfig.java | MetricConfig.getFloat | public float getFloat(String key, float defaultValue) {
String argument = getProperty(key, null);
return argument == null
? defaultValue
: Float.parseFloat(argument);
} | java | public float getFloat(String key, float defaultValue) {
String argument = getProperty(key, null);
return argument == null
? defaultValue
: Float.parseFloat(argument);
} | [
"public",
"float",
"getFloat",
"(",
"String",
"key",
",",
"float",
"defaultValue",
")",
"{",
"String",
"argument",
"=",
"getProperty",
"(",
"key",
",",
"null",
")",
";",
"return",
"argument",
"==",
"null",
"?",
"defaultValue",
":",
"Float",
".",
"parseFloa... | Searches for the property with the specified key in this property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns the
default value argument if the property is not found.
@param key the hashtable key.
@param de... | [
"Searches",
"for",
"the",
"property",
"with",
"the",
"specified",
"key",
"in",
"this",
"property",
"list",
".",
"If",
"the",
"key",
"is",
"not",
"found",
"in",
"this",
"property",
"list",
"the",
"default",
"property",
"list",
"and",
"its",
"defaults",
"rec... | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-metrics/flink-metrics-core/src/main/java/org/apache/flink/metrics/MetricConfig.java#L76-L81 |
ModeShape/modeshape | modeshape-schematic/src/main/java/org/modeshape/schematic/Schematic.java | Schematic.getDb | public static <T extends SchematicDb> T getDb(Document document) throws RuntimeException {
return getDb(document, Schematic.class.getClassLoader());
} | java | public static <T extends SchematicDb> T getDb(Document document) throws RuntimeException {
return getDb(document, Schematic.class.getClassLoader());
} | [
"public",
"static",
"<",
"T",
"extends",
"SchematicDb",
">",
"T",
"getDb",
"(",
"Document",
"document",
")",
"throws",
"RuntimeException",
"{",
"return",
"getDb",
"(",
"document",
",",
"Schematic",
".",
"class",
".",
"getClassLoader",
"(",
")",
")",
";",
"... | Returns a DB with the given configuration document {@code Document}. This document is expected to contain
a {@link Schematic#TYPE_FIELD type field} to indicate the type of DB.
@see #getDb(Document, ClassLoader) | [
"Returns",
"a",
"DB",
"with",
"the",
"given",
"configuration",
"document",
"{",
"@code",
"Document",
"}",
".",
"This",
"document",
"is",
"expected",
"to",
"contain",
"a",
"{",
"@link",
"Schematic#TYPE_FIELD",
"type",
"field",
"}",
"to",
"indicate",
"the",
"t... | train | https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-schematic/src/main/java/org/modeshape/schematic/Schematic.java#L52-L54 |
strator-dev/greenpepper | greenpepper/core/src/main/java/com/greenpepper/util/DuckType.java | DuckType.instanceOf | public static boolean instanceOf(Class type, Object object)
{
if (type.isInstance(object)) return true;
Class<?> candidate = object.getClass();
for (Method method : type.getMethods())
{
try
{
candidate.getMethod(method.getName(), (Class[])meth... | java | public static boolean instanceOf(Class type, Object object)
{
if (type.isInstance(object)) return true;
Class<?> candidate = object.getClass();
for (Method method : type.getMethods())
{
try
{
candidate.getMethod(method.getName(), (Class[])meth... | [
"public",
"static",
"boolean",
"instanceOf",
"(",
"Class",
"type",
",",
"Object",
"object",
")",
"{",
"if",
"(",
"type",
".",
"isInstance",
"(",
"object",
")",
")",
"return",
"true",
";",
"Class",
"<",
"?",
">",
"candidate",
"=",
"object",
".",
"getCla... | Indicates if object is a (DuckType) instance of a type (interface). That is,
is every method in type is present on object.
@param type The interface to implement
@param object The object to test
@return true if every method in type is present on object, false otherwise | [
"Indicates",
"if",
"object",
"is",
"a",
"(",
"DuckType",
")",
"instance",
"of",
"a",
"type",
"(",
"interface",
")",
".",
"That",
"is",
"is",
"every",
"method",
"in",
"type",
"is",
"present",
"on",
"object",
"."
] | train | https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/core/src/main/java/com/greenpepper/util/DuckType.java#L51-L68 |
JOML-CI/JOML | src/org/joml/Matrix4d.java | Matrix4d.rotateLocalZ | public Matrix4d rotateLocalZ(double ang, Matrix4d dest) {
double sin = Math.sin(ang);
double cos = Math.cosFromSin(sin, ang);
double nm00 = cos * m00 - sin * m01;
double nm01 = sin * m00 + cos * m01;
double nm10 = cos * m10 - sin * m11;
double nm11 = sin * m10 + cos * m11... | java | public Matrix4d rotateLocalZ(double ang, Matrix4d dest) {
double sin = Math.sin(ang);
double cos = Math.cosFromSin(sin, ang);
double nm00 = cos * m00 - sin * m01;
double nm01 = sin * m00 + cos * m01;
double nm10 = cos * m10 - sin * m11;
double nm11 = sin * m10 + cos * m11... | [
"public",
"Matrix4d",
"rotateLocalZ",
"(",
"double",
"ang",
",",
"Matrix4d",
"dest",
")",
"{",
"double",
"sin",
"=",
"Math",
".",
"sin",
"(",
"ang",
")",
";",
"double",
"cos",
"=",
"Math",
".",
"cosFromSin",
"(",
"sin",
",",
"ang",
")",
";",
"double"... | Pre-multiply a rotation around the Z axis to this matrix by rotating the given amount of radians
about the Z axis and store the result in <code>dest</code>.
<p>
When used with a right-handed coordinate system, the produced rotation will rotate a vector
counter-clockwise around the rotation axis, when viewing along the ... | [
"Pre",
"-",
"multiply",
"a",
"rotation",
"around",
"the",
"Z",
"axis",
"to",
"this",
"matrix",
"by",
"rotating",
"the",
"given",
"amount",
"of",
"radians",
"about",
"the",
"Z",
"axis",
"and",
"store",
"the",
"result",
"in",
"<code",
">",
"dest<",
"/",
... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4d.java#L5926-L5955 |
joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerReader.java | PlannerReader.getTime | private Date getTime(String value) throws MPXJException
{
try
{
Number hours = m_twoDigitFormat.parse(value.substring(0, 2));
Number minutes = m_twoDigitFormat.parse(value.substring(2, 4));
Calendar cal = DateHelper.popCalendar();
cal.set(Calendar.HOUR_OF_DAY, hours.i... | java | private Date getTime(String value) throws MPXJException
{
try
{
Number hours = m_twoDigitFormat.parse(value.substring(0, 2));
Number minutes = m_twoDigitFormat.parse(value.substring(2, 4));
Calendar cal = DateHelper.popCalendar();
cal.set(Calendar.HOUR_OF_DAY, hours.i... | [
"private",
"Date",
"getTime",
"(",
"String",
"value",
")",
"throws",
"MPXJException",
"{",
"try",
"{",
"Number",
"hours",
"=",
"m_twoDigitFormat",
".",
"parse",
"(",
"value",
".",
"substring",
"(",
"0",
",",
"2",
")",
")",
";",
"Number",
"minutes",
"=",
... | Convert a Planner time into a Java date.
0800
@param value Planner time
@return Java Date instance | [
"Convert",
"a",
"Planner",
"time",
"into",
"a",
"Java",
"date",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerReader.java#L869-L891 |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoDs/TemplCommand.java | TemplCommand.find_method | protected Method find_method(Method[] meth_list,String meth_name) throws DevFailed
{
int i;
Method meth_found = null;
for (i = 0;i < meth_list.length;i++)
{
if (meth_name.equals(meth_list[i].getName()))
{
for (int j = i + 1;j < meth_list.length;j++)
{
if (meth_name.equals(meth_list[j].get... | java | protected Method find_method(Method[] meth_list,String meth_name) throws DevFailed
{
int i;
Method meth_found = null;
for (i = 0;i < meth_list.length;i++)
{
if (meth_name.equals(meth_list[i].getName()))
{
for (int j = i + 1;j < meth_list.length;j++)
{
if (meth_name.equals(meth_list[j].get... | [
"protected",
"Method",
"find_method",
"(",
"Method",
"[",
"]",
"meth_list",
",",
"String",
"meth_name",
")",
"throws",
"DevFailed",
"{",
"int",
"i",
";",
"Method",
"meth_found",
"=",
"null",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"meth_list",
"... | Retrieve a Method object from a Method list from its name.
@param meth_list The Method object list
@return The wanted method
@exception DevFailed If the method is not known or if two methods are found
with the same name
Click <a href="../../tango_basic/idl_html/Tango.html#DevFailed">here</a> to read
<b>DevFailed</b> e... | [
"Retrieve",
"a",
"Method",
"object",
"from",
"a",
"Method",
"list",
"from",
"its",
"name",
"."
] | train | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoDs/TemplCommand.java#L708-L747 |
Impetus/Kundera | src/kundera-oracle-nosql/src/main/java/com/impetus/client/oraclenosql/OracleNoSQLClient.java | OracleNoSQLClient.onRelationalAttributes | private void onRelationalAttributes(List<RelationHolder> rlHolders, Row row, Table schemaTable)
{
// Iterate over relations
if (rlHolders != null && !rlHolders.isEmpty())
{
for (RelationHolder rh : rlHolders)
{
String relationName = rh.getRelationName(... | java | private void onRelationalAttributes(List<RelationHolder> rlHolders, Row row, Table schemaTable)
{
// Iterate over relations
if (rlHolders != null && !rlHolders.isEmpty())
{
for (RelationHolder rh : rlHolders)
{
String relationName = rh.getRelationName(... | [
"private",
"void",
"onRelationalAttributes",
"(",
"List",
"<",
"RelationHolder",
">",
"rlHolders",
",",
"Row",
"row",
",",
"Table",
"schemaTable",
")",
"{",
"// Iterate over relations",
"if",
"(",
"rlHolders",
"!=",
"null",
"&&",
"!",
"rlHolders",
".",
"isEmpty"... | Process relational attributes.
@param rlHolders
relation holders
@param row
kv row object
@param schemaTable
the schema table | [
"Process",
"relational",
"attributes",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-oracle-nosql/src/main/java/com/impetus/client/oraclenosql/OracleNoSQLClient.java#L1109-L1131 |
atteo/classindex | classindex/src/main/java/org/atteo/classindex/ClassIndex.java | ClassIndex.getAnnotatedNames | public static Iterable<String> getAnnotatedNames(Class<? extends Annotation> annotation, ClassLoader classLoader) {
return readIndexFile(classLoader, ANNOTATED_INDEX_PREFIX + annotation.getCanonicalName());
} | java | public static Iterable<String> getAnnotatedNames(Class<? extends Annotation> annotation, ClassLoader classLoader) {
return readIndexFile(classLoader, ANNOTATED_INDEX_PREFIX + annotation.getCanonicalName());
} | [
"public",
"static",
"Iterable",
"<",
"String",
">",
"getAnnotatedNames",
"(",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"annotation",
",",
"ClassLoader",
"classLoader",
")",
"{",
"return",
"readIndexFile",
"(",
"classLoader",
",",
"ANNOTATED_INDEX_PREFIX",
... | Retrieves names of classes annotated by given annotation.
<p/>
<p>
The annotation must be annotated with {@link IndexAnnotated} for annotated classes
to be indexed at compile-time by {@link org.atteo.classindex.processor.ClassIndexProcessor}.
</p>
<p>
Please note there is no verification if the class really exists. It ... | [
"Retrieves",
"names",
"of",
"classes",
"annotated",
"by",
"given",
"annotation",
".",
"<p",
"/",
">",
"<p",
">",
"The",
"annotation",
"must",
"be",
"annotated",
"with",
"{"
] | train | https://github.com/atteo/classindex/blob/ad76c6bd8b4e84c594d94e48f466a095ffe2306a/classindex/src/main/java/org/atteo/classindex/ClassIndex.java#L304-L306 |
phax/ph-commons | ph-commons/src/main/java/com/helger/commons/string/StringHelper.java | StringHelper.getImplodedMapped | @Nonnull
public static <ELEMENTTYPE> String getImplodedMapped (@Nonnull final String sSep,
@Nullable final ELEMENTTYPE [] aElements,
@Nonnull final Function <? super ELEMENTTYPE, String> aMapper)
{
Va... | java | @Nonnull
public static <ELEMENTTYPE> String getImplodedMapped (@Nonnull final String sSep,
@Nullable final ELEMENTTYPE [] aElements,
@Nonnull final Function <? super ELEMENTTYPE, String> aMapper)
{
Va... | [
"@",
"Nonnull",
"public",
"static",
"<",
"ELEMENTTYPE",
">",
"String",
"getImplodedMapped",
"(",
"@",
"Nonnull",
"final",
"String",
"sSep",
",",
"@",
"Nullable",
"final",
"ELEMENTTYPE",
"[",
"]",
"aElements",
",",
"@",
"Nonnull",
"final",
"Function",
"<",
"?... | Get a concatenated String from all elements of the passed array, separated by
the specified separator string.
@param sSep
The separator to use. May not be <code>null</code>.
@param aElements
The container to convert. May be <code>null</code> or empty.
@param aMapper
The mapping function to convert from ELEMENTTYPE to ... | [
"Get",
"a",
"concatenated",
"String",
"from",
"all",
"elements",
"of",
"the",
"passed",
"array",
"separated",
"by",
"the",
"specified",
"separator",
"string",
"."
] | train | https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L1335-L1346 |
alkacon/opencms-core | src-gwt/org/opencms/ade/editprovider/client/CmsDirectEditButtons.java | CmsDirectEditButtons.setPosition | public void setPosition(CmsPositionBean position, CmsPositionBean buttonsPosition, Element containerElement) {
m_position = position;
Element parent = CmsDomUtil.getPositioningParent(getElement());
Style style = getElement().getStyle();
style.setRight(
parent.getOffsetWidth(... | java | public void setPosition(CmsPositionBean position, CmsPositionBean buttonsPosition, Element containerElement) {
m_position = position;
Element parent = CmsDomUtil.getPositioningParent(getElement());
Style style = getElement().getStyle();
style.setRight(
parent.getOffsetWidth(... | [
"public",
"void",
"setPosition",
"(",
"CmsPositionBean",
"position",
",",
"CmsPositionBean",
"buttonsPosition",
",",
"Element",
"containerElement",
")",
"{",
"m_position",
"=",
"position",
";",
"Element",
"parent",
"=",
"CmsDomUtil",
".",
"getPositioningParent",
"(",
... | Sets the position. Make sure the widget is attached to the DOM.<p>
@param position the absolute position
@param buttonsPosition the corrected position for the buttons
@param containerElement the parent container element | [
"Sets",
"the",
"position",
".",
"Make",
"sure",
"the",
"widget",
"is",
"attached",
"to",
"the",
"DOM",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/editprovider/client/CmsDirectEditButtons.java#L89-L103 |
raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.takesArgument | public static <T extends MethodDescription> ElementMatcher.Junction<T> takesArgument(int index, TypeDescription type) {
return takesArgument(index, is(type));
} | java | public static <T extends MethodDescription> ElementMatcher.Junction<T> takesArgument(int index, TypeDescription type) {
return takesArgument(index, is(type));
} | [
"public",
"static",
"<",
"T",
"extends",
"MethodDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"takesArgument",
"(",
"int",
"index",
",",
"TypeDescription",
"type",
")",
"{",
"return",
"takesArgument",
"(",
"index",
",",
"is",
"(",
"typ... | Matches {@link MethodDescription}s that define a given type erasure as a parameter at the given index.
@param index The index of the parameter.
@param type The erasure of the type the matched method is expected to define as a parameter type.
@param <T> The type of the matched object.
@return An element matcher that... | [
"Matches",
"{",
"@link",
"MethodDescription",
"}",
"s",
"that",
"define",
"a",
"given",
"type",
"erasure",
"as",
"a",
"parameter",
"at",
"the",
"given",
"index",
"."
] | train | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1254-L1256 |
xerial/snappy-java | src/main/java/org/xerial/snappy/Snappy.java | Snappy.uncompressString | public static String uncompressString(byte[] input, int offset, int length)
throws IOException
{
try {
return uncompressString(input, offset, length, "UTF-8");
}
catch (UnsupportedEncodingException e) {
throw new IllegalStateException("UTF-8 decoder is not... | java | public static String uncompressString(byte[] input, int offset, int length)
throws IOException
{
try {
return uncompressString(input, offset, length, "UTF-8");
}
catch (UnsupportedEncodingException e) {
throw new IllegalStateException("UTF-8 decoder is not... | [
"public",
"static",
"String",
"uncompressString",
"(",
"byte",
"[",
"]",
"input",
",",
"int",
"offset",
",",
"int",
"length",
")",
"throws",
"IOException",
"{",
"try",
"{",
"return",
"uncompressString",
"(",
"input",
",",
"offset",
",",
"length",
",",
"\"U... | Uncompress the input[offset, offset+length) as a String
@param input
@param offset
@param length
@return the uncompressed data
@throws IOException | [
"Uncompress",
"the",
"input",
"[",
"offset",
"offset",
"+",
"length",
")",
"as",
"a",
"String"
] | train | https://github.com/xerial/snappy-java/blob/9df6ed7bbce88186c82f2e7cdcb7b974421b3340/src/main/java/org/xerial/snappy/Snappy.java#L823-L832 |
apache/incubator-gobblin | gobblin-core/src/main/java/org/apache/gobblin/publisher/BaseDataPublisher.java | BaseDataPublisher.getIntermediateMetadataFromState | private String getIntermediateMetadataFromState(WorkUnitState state, int branchId) {
return state.getProp(
ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.WRITER_METADATA_KEY, this.numBranches, branchId));
} | java | private String getIntermediateMetadataFromState(WorkUnitState state, int branchId) {
return state.getProp(
ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.WRITER_METADATA_KEY, this.numBranches, branchId));
} | [
"private",
"String",
"getIntermediateMetadataFromState",
"(",
"WorkUnitState",
"state",
",",
"int",
"branchId",
")",
"{",
"return",
"state",
".",
"getProp",
"(",
"ForkOperatorUtils",
".",
"getPropertyNameForBranch",
"(",
"ConfigurationKeys",
".",
"WRITER_METADATA_KEY",
... | /*
Retrieve intermediate metadata (eg the metadata stored by each writer) for a given state and branch id. | [
"/",
"*",
"Retrieve",
"intermediate",
"metadata",
"(",
"eg",
"the",
"metadata",
"stored",
"by",
"each",
"writer",
")",
"for",
"a",
"given",
"state",
"and",
"branch",
"id",
"."
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/publisher/BaseDataPublisher.java#L743-L746 |
spotbugs/spotbugs | spotbugs/src/main/java/edu/umd/cs/findbugs/model/ClassNameRewriterUtil.java | ClassNameRewriterUtil.rewriteSignature | public static String rewriteSignature(ClassNameRewriter classNameRewriter, String signature) {
if (classNameRewriter != IdentityClassNameRewriter.instance() && signature.startsWith("L")) {
String className = signature.substring(1, signature.length() - 1).replace('/', '.');
className = c... | java | public static String rewriteSignature(ClassNameRewriter classNameRewriter, String signature) {
if (classNameRewriter != IdentityClassNameRewriter.instance() && signature.startsWith("L")) {
String className = signature.substring(1, signature.length() - 1).replace('/', '.');
className = c... | [
"public",
"static",
"String",
"rewriteSignature",
"(",
"ClassNameRewriter",
"classNameRewriter",
",",
"String",
"signature",
")",
"{",
"if",
"(",
"classNameRewriter",
"!=",
"IdentityClassNameRewriter",
".",
"instance",
"(",
")",
"&&",
"signature",
".",
"startsWith",
... | Rewrite a signature.
@param classNameRewriter
a ClassNameRewriter
@param signature
a signature (parameter, return type, or field)
@return rewritten signature with class name updated if required | [
"Rewrite",
"a",
"signature",
"."
] | train | https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/model/ClassNameRewriterUtil.java#L73-L83 |
ngageoint/geopackage-android-map | geopackage-map/src/main/java/mil/nga/geopackage/map/features/FeatureInfoBuilder.java | FeatureInfoBuilder.buildResultsInfoMessage | public String buildResultsInfoMessage(FeatureIndexResults results, double tolerance, Projection projection) {
return buildResultsInfoMessage(results, tolerance, null, projection);
} | java | public String buildResultsInfoMessage(FeatureIndexResults results, double tolerance, Projection projection) {
return buildResultsInfoMessage(results, tolerance, null, projection);
} | [
"public",
"String",
"buildResultsInfoMessage",
"(",
"FeatureIndexResults",
"results",
",",
"double",
"tolerance",
",",
"Projection",
"projection",
")",
"{",
"return",
"buildResultsInfoMessage",
"(",
"results",
",",
"tolerance",
",",
"null",
",",
"projection",
")",
"... | Build a feature results information message
@param results feature index results
@param tolerance distance tolerance
@param projection desired geometry projection
@return results message or null if no results | [
"Build",
"a",
"feature",
"results",
"information",
"message"
] | train | https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/FeatureInfoBuilder.java#L307-L309 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Bidi.java | Bidi.setLine | public Bidi setLine(int start, int limit)
{
verifyValidPara();
verifyRange(start, 0, limit);
verifyRange(limit, 0, length+1);
if (getParagraphIndex(start) != getParagraphIndex(limit - 1)) {
/* the line crosses a paragraph boundary */
throw new IllegalArgumentE... | java | public Bidi setLine(int start, int limit)
{
verifyValidPara();
verifyRange(start, 0, limit);
verifyRange(limit, 0, length+1);
if (getParagraphIndex(start) != getParagraphIndex(limit - 1)) {
/* the line crosses a paragraph boundary */
throw new IllegalArgumentE... | [
"public",
"Bidi",
"setLine",
"(",
"int",
"start",
",",
"int",
"limit",
")",
"{",
"verifyValidPara",
"(",
")",
";",
"verifyRange",
"(",
"start",
",",
"0",
",",
"limit",
")",
";",
"verifyRange",
"(",
"limit",
",",
"0",
",",
"length",
"+",
"1",
")",
"... | <code>setLine()</code> returns a <code>Bidi</code> object to
contain the reordering information, especially the resolved levels,
for all the characters in a line of text. This line of text is
specified by referring to a <code>Bidi</code> object representing
this information for a piece of text containing one or more pa... | [
"<code",
">",
"setLine",
"()",
"<",
"/",
"code",
">",
"returns",
"a",
"<code",
">",
"Bidi<",
"/",
"code",
">",
"object",
"to",
"contain",
"the",
"reordering",
"information",
"especially",
"the",
"resolved",
"levels",
"for",
"all",
"the",
"characters",
"in"... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Bidi.java#L4682-L4692 |
alkacon/opencms-core | src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java | CmsSitemapController.createSitemapSubEntry | public void createSitemapSubEntry(final CmsClientSitemapEntry newEntry, CmsUUID parentId, String sitemapType) {
CmsUUID structureId = m_data.getDefaultNewElementInfo().getCopyResourceId();
newEntry.setResourceTypeName(sitemapType);
create(newEntry, parentId, m_data.getDefaultNewElementInfo().ge... | java | public void createSitemapSubEntry(final CmsClientSitemapEntry newEntry, CmsUUID parentId, String sitemapType) {
CmsUUID structureId = m_data.getDefaultNewElementInfo().getCopyResourceId();
newEntry.setResourceTypeName(sitemapType);
create(newEntry, parentId, m_data.getDefaultNewElementInfo().ge... | [
"public",
"void",
"createSitemapSubEntry",
"(",
"final",
"CmsClientSitemapEntry",
"newEntry",
",",
"CmsUUID",
"parentId",
",",
"String",
"sitemapType",
")",
"{",
"CmsUUID",
"structureId",
"=",
"m_data",
".",
"getDefaultNewElementInfo",
"(",
")",
".",
"getCopyResourceI... | Creates a sitemap folder.<p>
@param newEntry the new entry
@param parentId the entry parent id
@param sitemapType the resource type for the subsitemap folder | [
"Creates",
"a",
"sitemap",
"folder",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java#L595-L600 |
calimero-project/calimero-core | src/tuwien/auto/calimero/dptxlator/DPTXlatorDateTime.java | DPTXlatorDateTime.setValidField | public final void setValidField(final int field, final boolean valid)
{
if (field < 0 || field >= FIELD_MASKS.length)
throw new KNXIllegalArgumentException("illegal field");
setBit(0, FIELD_MASKS[field], !valid);
} | java | public final void setValidField(final int field, final boolean valid)
{
if (field < 0 || field >= FIELD_MASKS.length)
throw new KNXIllegalArgumentException("illegal field");
setBit(0, FIELD_MASKS[field], !valid);
} | [
"public",
"final",
"void",
"setValidField",
"(",
"final",
"int",
"field",
",",
"final",
"boolean",
"valid",
")",
"{",
"if",
"(",
"field",
"<",
"0",
"||",
"field",
">=",
"FIELD_MASKS",
".",
"length",
")",
"throw",
"new",
"KNXIllegalArgumentException",
"(",
... | Sets a date/time field of the first translation item to valid or not valid.
<p>
A field which is valid, i.e., contains valid data, has to be set <code>true</code>,
otherwise the field should be set not valid with <code>false</code>.<br>
Possible fields allowed to be set valid or not valid are {@link #YEAR},
{@link #DAT... | [
"Sets",
"a",
"date",
"/",
"time",
"field",
"of",
"the",
"first",
"translation",
"item",
"to",
"valid",
"or",
"not",
"valid",
".",
"<p",
">",
"A",
"field",
"which",
"is",
"valid",
"i",
".",
"e",
".",
"contains",
"valid",
"data",
"has",
"to",
"be",
"... | train | https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/dptxlator/DPTXlatorDateTime.java#L525-L530 |
lessthanoptimal/BoofCV | main/boofcv-types/src/main/java/boofcv/alg/InputSanityCheck.java | InputSanityCheck.checkDeclare | public static <T extends ImageBase<T>> T checkDeclare(T input, T output) {
if (output == null) {
output = (T) input.createNew(input.width, input.height);
} else {
output.reshape(input.width, input.height);
}
return output;
} | java | public static <T extends ImageBase<T>> T checkDeclare(T input, T output) {
if (output == null) {
output = (T) input.createNew(input.width, input.height);
} else {
output.reshape(input.width, input.height);
}
return output;
} | [
"public",
"static",
"<",
"T",
"extends",
"ImageBase",
"<",
"T",
">",
">",
"T",
"checkDeclare",
"(",
"T",
"input",
",",
"T",
"output",
")",
"{",
"if",
"(",
"output",
"==",
"null",
")",
"{",
"output",
"=",
"(",
"T",
")",
"input",
".",
"createNew",
... | If the output has not been declared a new instance is declared. If an instance of the output
is provided its bounds are checked. | [
"If",
"the",
"output",
"has",
"not",
"been",
"declared",
"a",
"new",
"instance",
"is",
"declared",
".",
"If",
"an",
"instance",
"of",
"the",
"output",
"is",
"provided",
"its",
"bounds",
"are",
"checked",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/alg/InputSanityCheck.java#L58-L65 |
OpenLiberty/open-liberty | dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/config/WSKeyStore.java | WSKeyStore.printWarning | public void printWarning(int daysBeforeExpireWarning, String keyStoreName, String alias, X509Certificate cert) {
try {
long millisDelta = ((((daysBeforeExpireWarning * 24L) * 60L) * 60L) * 1000L);
long millisBeforeExpiration = cert.getNotAfter().getTime() - System.currentTimeMillis();
... | java | public void printWarning(int daysBeforeExpireWarning, String keyStoreName, String alias, X509Certificate cert) {
try {
long millisDelta = ((((daysBeforeExpireWarning * 24L) * 60L) * 60L) * 1000L);
long millisBeforeExpiration = cert.getNotAfter().getTime() - System.currentTimeMillis();
... | [
"public",
"void",
"printWarning",
"(",
"int",
"daysBeforeExpireWarning",
",",
"String",
"keyStoreName",
",",
"String",
"alias",
",",
"X509Certificate",
"cert",
")",
"{",
"try",
"{",
"long",
"millisDelta",
"=",
"(",
"(",
"(",
"(",
"daysBeforeExpireWarning",
"*",
... | Print a warning about a certificate being expired or soon to be expired in
the keystore.
@param daysBeforeExpireWarning
@param keyStoreName
@param alias
@param cert | [
"Print",
"a",
"warning",
"about",
"a",
"certificate",
"being",
"expired",
"or",
"soon",
"to",
"be",
"expired",
"in",
"the",
"keystore",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/config/WSKeyStore.java#L1062-L1082 |
google/j2objc | translator/src/main/java/com/google/devtools/j2objc/gen/SignatureGenerator.java | SignatureGenerator.genMethodTypeSignature | private void genMethodTypeSignature(ExecutableElement method, StringBuilder sb) {
genOptFormalTypeParameters(method.getTypeParameters(), sb);
sb.append('(');
for (VariableElement param : method.getParameters()) {
genTypeSignature(param.asType(), sb);
}
sb.append(')');
genTypeSignature(meth... | java | private void genMethodTypeSignature(ExecutableElement method, StringBuilder sb) {
genOptFormalTypeParameters(method.getTypeParameters(), sb);
sb.append('(');
for (VariableElement param : method.getParameters()) {
genTypeSignature(param.asType(), sb);
}
sb.append(')');
genTypeSignature(meth... | [
"private",
"void",
"genMethodTypeSignature",
"(",
"ExecutableElement",
"method",
",",
"StringBuilder",
"sb",
")",
"{",
"genOptFormalTypeParameters",
"(",
"method",
".",
"getTypeParameters",
"(",
")",
",",
"sb",
")",
";",
"sb",
".",
"append",
"(",
"'",
"'",
")"... | MethodTypeSignature ::= [FormalTypeParameters]
"(" {TypeSignature} ")" ReturnType {ThrowsSignature}. | [
"MethodTypeSignature",
"::",
"=",
"[",
"FormalTypeParameters",
"]",
"(",
"{",
"TypeSignature",
"}",
")",
"ReturnType",
"{",
"ThrowsSignature",
"}",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/gen/SignatureGenerator.java#L347-L362 |
Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java | KeyVaultClientBaseImpl.wrapKeyAsync | public ServiceFuture<KeyOperationResult> wrapKeyAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value, final ServiceCallback<KeyOperationResult> serviceCallback) {
return ServiceFuture.fromResponse(wrapKeyWithServiceResponseAsync(vaultBaseUrl, keyNam... | java | public ServiceFuture<KeyOperationResult> wrapKeyAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value, final ServiceCallback<KeyOperationResult> serviceCallback) {
return ServiceFuture.fromResponse(wrapKeyWithServiceResponseAsync(vaultBaseUrl, keyNam... | [
"public",
"ServiceFuture",
"<",
"KeyOperationResult",
">",
"wrapKeyAsync",
"(",
"String",
"vaultBaseUrl",
",",
"String",
"keyName",
",",
"String",
"keyVersion",
",",
"JsonWebKeyEncryptionAlgorithm",
"algorithm",
",",
"byte",
"[",
"]",
"value",
",",
"final",
"Service... | Wraps a symmetric key using a specified key.
The WRAP operation supports encryption of a symmetric key using a key encryption key that has previously been stored in an Azure Key Vault. The WRAP operation is only strictly necessary for symmetric keys stored in Azure Key Vault since protection with an asymmetric key can ... | [
"Wraps",
"a",
"symmetric",
"key",
"using",
"a",
"specified",
"key",
".",
"The",
"WRAP",
"operation",
"supports",
"encryption",
"of",
"a",
"symmetric",
"key",
"using",
"a",
"key",
"encryption",
"key",
"that",
"has",
"previously",
"been",
"stored",
"in",
"an",... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L2619-L2621 |
vigna/Sux4J | src/it/unimi/dsi/sux4j/mph/HypergraphSorter.java | HypergraphSorter.bitVectorToEdge | public static void bitVectorToEdge(final BitVector bv, final long seed, final int numVertices, final int e[]) {
bitVectorToEdge(bv, seed, numVertices, (int)(numVertices * 0xAAAAAAABL >>> 33), e); // Fast division by 3
} | java | public static void bitVectorToEdge(final BitVector bv, final long seed, final int numVertices, final int e[]) {
bitVectorToEdge(bv, seed, numVertices, (int)(numVertices * 0xAAAAAAABL >>> 33), e); // Fast division by 3
} | [
"public",
"static",
"void",
"bitVectorToEdge",
"(",
"final",
"BitVector",
"bv",
",",
"final",
"long",
"seed",
",",
"final",
"int",
"numVertices",
",",
"final",
"int",
"e",
"[",
"]",
")",
"{",
"bitVectorToEdge",
"(",
"bv",
",",
"seed",
",",
"numVertices",
... | Turns a bit vector into a 3-hyperedge.
@param bv a bit vector.
@param seed the seed for the hash function.
@param numVertices the number of vertices in the underlying hypergraph.
@param e an array to store the resulting edge.
@see #bitVectorToEdge(BitVector, long, int, int, int[]) | [
"Turns",
"a",
"bit",
"vector",
"into",
"a",
"3",
"-",
"hyperedge",
"."
] | train | https://github.com/vigna/Sux4J/blob/d57de8fa897c7d273e0e6dae7a3274174f175a5f/src/it/unimi/dsi/sux4j/mph/HypergraphSorter.java#L219-L221 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/accesslayer/StatementManager.java | StatementManager.setObjectForStatement | private void setObjectForStatement(PreparedStatement stmt, int index, Object value, int sqlType)
throws SQLException
{
if (value == null)
{
m_platform.setNullForStatement(stmt, index, sqlType);
}
else
{
m_platform.setObjectForState... | java | private void setObjectForStatement(PreparedStatement stmt, int index, Object value, int sqlType)
throws SQLException
{
if (value == null)
{
m_platform.setNullForStatement(stmt, index, sqlType);
}
else
{
m_platform.setObjectForState... | [
"private",
"void",
"setObjectForStatement",
"(",
"PreparedStatement",
"stmt",
",",
"int",
"index",
",",
"Object",
"value",
",",
"int",
"sqlType",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"m_platform",
".",
"setNullForStat... | Sets object for statement at specific index, adhering to platform- and null-rules.
@param stmt the statement
@param index the current parameter index
@param value the value to set
@param sqlType the JDBC SQL-type of the value
@throws SQLException on platform error | [
"Sets",
"object",
"for",
"statement",
"at",
"specific",
"index",
"adhering",
"to",
"platform",
"-",
"and",
"null",
"-",
"rules",
"."
] | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L764-L775 |
undera/jmeter-plugins | graphs/graphs-basic/src/main/java/kg/apc/jmeter/vizualizers/ThreadsStateOverTimeGui.java | ThreadsStateOverTimeGui.rebuildAggRow | private void rebuildAggRow(GraphRowSimple row, long time, long duration) {
long key = row.getHigherKey(lastAggUpdateTime - duration - 1);
while (key < time && key != -1) {
GraphPanelChartSimpleElement elt = (GraphPanelChartSimpleElement) row.getElement(key);
elt.add(getAllThreadC... | java | private void rebuildAggRow(GraphRowSimple row, long time, long duration) {
long key = row.getHigherKey(lastAggUpdateTime - duration - 1);
while (key < time && key != -1) {
GraphPanelChartSimpleElement elt = (GraphPanelChartSimpleElement) row.getElement(key);
elt.add(getAllThreadC... | [
"private",
"void",
"rebuildAggRow",
"(",
"GraphRowSimple",
"row",
",",
"long",
"time",
",",
"long",
"duration",
")",
"{",
"long",
"key",
"=",
"row",
".",
"getHigherKey",
"(",
"lastAggUpdateTime",
"-",
"duration",
"-",
"1",
")",
";",
"while",
"(",
"key",
... | perf fix: only process elements between time and last processed - sampler duration | [
"perf",
"fix",
":",
"only",
"process",
"elements",
"between",
"time",
"and",
"last",
"processed",
"-",
"sampler",
"duration"
] | train | https://github.com/undera/jmeter-plugins/blob/416d2a77249ab921c7e4134c3e6a9639901ef7e8/graphs/graphs-basic/src/main/java/kg/apc/jmeter/vizualizers/ThreadsStateOverTimeGui.java#L54-L67 |
infinispan/infinispan | counter/src/main/java/org/infinispan/counter/impl/entries/CounterValue.java | CounterValue.newCounterValue | public static CounterValue newCounterValue(long value, long lowerBound, long upperBound) {
return new CounterValue(value, calculateState(value, lowerBound, upperBound));
} | java | public static CounterValue newCounterValue(long value, long lowerBound, long upperBound) {
return new CounterValue(value, calculateState(value, lowerBound, upperBound));
} | [
"public",
"static",
"CounterValue",
"newCounterValue",
"(",
"long",
"value",
",",
"long",
"lowerBound",
",",
"long",
"upperBound",
")",
"{",
"return",
"new",
"CounterValue",
"(",
"value",
",",
"calculateState",
"(",
"value",
",",
"lowerBound",
",",
"upperBound",... | Creates a new {@link CounterValue} with the value and state based on the boundaries.
@param value the counter's value.
@param lowerBound the counter's lower bound.
@param upperBound the counter's upper bound.
@return the {@link CounterValue}. | [
"Creates",
"a",
"new",
"{",
"@link",
"CounterValue",
"}",
"with",
"the",
"value",
"and",
"state",
"based",
"on",
"the",
"boundaries",
"."
] | train | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/counter/src/main/java/org/infinispan/counter/impl/entries/CounterValue.java#L62-L64 |
Bernardo-MG/dice-notation-java | src/main/java/com/bernardomg/tabletop/dice/parser/listener/DefaultDiceExpressionBuilder.java | DefaultDiceExpressionBuilder.getDiceOperand | private final DiceOperand getDiceOperand(final DiceContext ctx) {
final Dice dice; // Parsed dice
final Integer quantity; // Number of dice
final Integer sides; // Number of sides
final Iterator<TerminalNode> digits; // Parsed digits
... | java | private final DiceOperand getDiceOperand(final DiceContext ctx) {
final Dice dice; // Parsed dice
final Integer quantity; // Number of dice
final Integer sides; // Number of sides
final Iterator<TerminalNode> digits; // Parsed digits
... | [
"private",
"final",
"DiceOperand",
"getDiceOperand",
"(",
"final",
"DiceContext",
"ctx",
")",
"{",
"final",
"Dice",
"dice",
";",
"// Parsed dice",
"final",
"Integer",
"quantity",
";",
"// Number of dice",
"final",
"Integer",
"sides",
";",
"// Number of sides",
"fina... | Creates a dice operand from the parsed context data.
<p>
If the dice is being subtracted then the sign of the dice set is
reversed.
@param ctx
parsed context
@return a dice operand | [
"Creates",
"a",
"dice",
"operand",
"from",
"the",
"parsed",
"context",
"data",
".",
"<p",
">",
"If",
"the",
"dice",
"is",
"being",
"subtracted",
"then",
"the",
"sign",
"of",
"the",
"dice",
"set",
"is",
"reversed",
"."
] | train | https://github.com/Bernardo-MG/dice-notation-java/blob/fdba6a6eb7ff35740399f2694a58514a383dad88/src/main/java/com/bernardomg/tabletop/dice/parser/listener/DefaultDiceExpressionBuilder.java#L243-L271 |
apache/flink | flink-core/src/main/java/org/apache/flink/util/NetUtils.java | NetUtils.unresolvedHostToNormalizedString | public static String unresolvedHostToNormalizedString(String host) {
// Return loopback interface address if host is null
// This represents the behavior of {@code InetAddress.getByName } and RFC 3330
if (host == null) {
host = InetAddress.getLoopbackAddress().getHostAddress();
} else {
host = host.trim()... | java | public static String unresolvedHostToNormalizedString(String host) {
// Return loopback interface address if host is null
// This represents the behavior of {@code InetAddress.getByName } and RFC 3330
if (host == null) {
host = InetAddress.getLoopbackAddress().getHostAddress();
} else {
host = host.trim()... | [
"public",
"static",
"String",
"unresolvedHostToNormalizedString",
"(",
"String",
"host",
")",
"{",
"// Return loopback interface address if host is null",
"// This represents the behavior of {@code InetAddress.getByName } and RFC 3330",
"if",
"(",
"host",
"==",
"null",
")",
"{",
... | Returns an address in a normalized format for Akka.
When an IPv6 address is specified, it normalizes the IPv6 address to avoid
complications with the exact URL match policy of Akka.
@param host The hostname, IPv4 or IPv6 address
@return host which will be normalized if it is an IPv6 address | [
"Returns",
"an",
"address",
"in",
"a",
"normalized",
"format",
"for",
"Akka",
".",
"When",
"an",
"IPv6",
"address",
"is",
"specified",
"it",
"normalizes",
"the",
"IPv6",
"address",
"to",
"avoid",
"complications",
"with",
"the",
"exact",
"URL",
"match",
"poli... | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/NetUtils.java#L130-L155 |
QSFT/Doradus | doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DynamoDBService.java | DynamoDBService.deleteRow | void deleteRow(String storeName, Map<String, AttributeValue> key) {
String tableName = storeToTableName(storeName);
m_logger.debug("Deleting row from table {}, key={}", tableName, DynamoDBService.getDDBKey(key));
Timer timer = new Timer();
boolean bSuccess = false;
for (... | java | void deleteRow(String storeName, Map<String, AttributeValue> key) {
String tableName = storeToTableName(storeName);
m_logger.debug("Deleting row from table {}, key={}", tableName, DynamoDBService.getDDBKey(key));
Timer timer = new Timer();
boolean bSuccess = false;
for (... | [
"void",
"deleteRow",
"(",
"String",
"storeName",
",",
"Map",
"<",
"String",
",",
"AttributeValue",
">",
"key",
")",
"{",
"String",
"tableName",
"=",
"storeToTableName",
"(",
"storeName",
")",
";",
"m_logger",
".",
"debug",
"(",
"\"Deleting row from table {}, key... | Delete row and back off if ProvisionedThroughputExceededException occurs. | [
"Delete",
"row",
"and",
"back",
"off",
"if",
"ProvisionedThroughputExceededException",
"occurs",
"."
] | train | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-dynamodb/src/main/java/com/dell/doradus/db/dynamodb/DynamoDBService.java#L283-L312 |
joniles/mpxj | src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java | MapFileGenerator.generateMapFile | public void generateMapFile(File jarFile, String mapFileName, boolean mapClassMethods) throws XMLStreamException, IOException, ClassNotFoundException, IntrospectionException
{
m_responseList = new LinkedList<String>();
writeMapFile(mapFileName, jarFile, mapClassMethods);
} | java | public void generateMapFile(File jarFile, String mapFileName, boolean mapClassMethods) throws XMLStreamException, IOException, ClassNotFoundException, IntrospectionException
{
m_responseList = new LinkedList<String>();
writeMapFile(mapFileName, jarFile, mapClassMethods);
} | [
"public",
"void",
"generateMapFile",
"(",
"File",
"jarFile",
",",
"String",
"mapFileName",
",",
"boolean",
"mapClassMethods",
")",
"throws",
"XMLStreamException",
",",
"IOException",
",",
"ClassNotFoundException",
",",
"IntrospectionException",
"{",
"m_responseList",
"=... | Generate a map file from a jar file.
@param jarFile jar file
@param mapFileName map file name
@param mapClassMethods true if we want to produce .Net style class method names
@throws XMLStreamException
@throws IOException
@throws ClassNotFoundException
@throws IntrospectionException | [
"Generate",
"a",
"map",
"file",
"from",
"a",
"jar",
"file",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L94-L98 |
albfernandez/itext2 | src/main/java/com/lowagie/text/pdf/PdfString.java | PdfString.toPdf | public void toPdf(PdfWriter writer, OutputStream os) throws IOException {
byte b[] = getBytes();
PdfEncryption crypto = null;
if (writer != null)
crypto = writer.getEncryption();
if (crypto != null && !crypto.isEmbeddedFilesOnly())
b = crypto.encryptByteArray(b);
... | java | public void toPdf(PdfWriter writer, OutputStream os) throws IOException {
byte b[] = getBytes();
PdfEncryption crypto = null;
if (writer != null)
crypto = writer.getEncryption();
if (crypto != null && !crypto.isEmbeddedFilesOnly())
b = crypto.encryptByteArray(b);
... | [
"public",
"void",
"toPdf",
"(",
"PdfWriter",
"writer",
",",
"OutputStream",
"os",
")",
"throws",
"IOException",
"{",
"byte",
"b",
"[",
"]",
"=",
"getBytes",
"(",
")",
";",
"PdfEncryption",
"crypto",
"=",
"null",
";",
"if",
"(",
"writer",
"!=",
"null",
... | Writes the PDF representation of this <CODE>PdfString</CODE> as an array
of <CODE>byte</CODE> to the specified <CODE>OutputStream</CODE>.
@param writer for backwards compatibility
@param os The <CODE>OutputStream</CODE> to write the bytes to. | [
"Writes",
"the",
"PDF",
"representation",
"of",
"this",
"<CODE",
">",
"PdfString<",
"/",
"CODE",
">",
"as",
"an",
"array",
"of",
"<CODE",
">",
"byte<",
"/",
"CODE",
">",
"to",
"the",
"specified",
"<CODE",
">",
"OutputStream<",
"/",
"CODE",
">",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfString.java#L144-L162 |
meertensinstituut/mtas | src/main/java/mtas/codec/MtasFieldsProducer.java | MtasFieldsProducer.openMtasFile | private IndexInput openMtasFile(SegmentReadState state, String name,
String extension) throws IOException {
return openMtasFile(state, name, extension, null, null);
} | java | private IndexInput openMtasFile(SegmentReadState state, String name,
String extension) throws IOException {
return openMtasFile(state, name, extension, null, null);
} | [
"private",
"IndexInput",
"openMtasFile",
"(",
"SegmentReadState",
"state",
",",
"String",
"name",
",",
"String",
"extension",
")",
"throws",
"IOException",
"{",
"return",
"openMtasFile",
"(",
"state",
",",
"name",
",",
"extension",
",",
"null",
",",
"null",
")... | Open mtas file.
@param state the state
@param name the name
@param extension the extension
@return the index input
@throws IOException Signals that an I/O exception has occurred. | [
"Open",
"mtas",
"file",
"."
] | train | https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/MtasFieldsProducer.java#L279-L282 |
Azure/azure-sdk-for-java | mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/AssetsInner.java | AssetsInner.getEncryptionKeyAsync | public Observable<StorageEncryptedAssetDecryptionDataInner> getEncryptionKeyAsync(String resourceGroupName, String accountName, String assetName) {
return getEncryptionKeyWithServiceResponseAsync(resourceGroupName, accountName, assetName).map(new Func1<ServiceResponse<StorageEncryptedAssetDecryptionDataInner>, ... | java | public Observable<StorageEncryptedAssetDecryptionDataInner> getEncryptionKeyAsync(String resourceGroupName, String accountName, String assetName) {
return getEncryptionKeyWithServiceResponseAsync(resourceGroupName, accountName, assetName).map(new Func1<ServiceResponse<StorageEncryptedAssetDecryptionDataInner>, ... | [
"public",
"Observable",
"<",
"StorageEncryptedAssetDecryptionDataInner",
">",
"getEncryptionKeyAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"accountName",
",",
"String",
"assetName",
")",
"{",
"return",
"getEncryptionKeyWithServiceResponseAsync",
"(",
"resourceG... | Gets the Asset storage key.
Gets the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API.
@param resourceGroupName The name of the resource group within the Azure subscription.
@param accountName The Media Services account name.
@param assetName The Asset name.
@throws ... | [
"Gets",
"the",
"Asset",
"storage",
"key",
".",
"Gets",
"the",
"Asset",
"storage",
"encryption",
"keys",
"used",
"to",
"decrypt",
"content",
"created",
"by",
"version",
"2",
"of",
"the",
"Media",
"Services",
"API",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/AssetsInner.java#L924-L931 |
square/okhttp | okhttp/src/main/java/okhttp3/internal/Util.java | Util.delimiterOffset | public static int delimiterOffset(String input, int pos, int limit, char delimiter) {
for (int i = pos; i < limit; i++) {
if (input.charAt(i) == delimiter) return i;
}
return limit;
} | java | public static int delimiterOffset(String input, int pos, int limit, char delimiter) {
for (int i = pos; i < limit; i++) {
if (input.charAt(i) == delimiter) return i;
}
return limit;
} | [
"public",
"static",
"int",
"delimiterOffset",
"(",
"String",
"input",
",",
"int",
"pos",
",",
"int",
"limit",
",",
"char",
"delimiter",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"pos",
";",
"i",
"<",
"limit",
";",
"i",
"++",
")",
"{",
"if",
"(",
"in... | Returns the index of the first character in {@code input} that is {@code delimiter}. Returns
limit if there is no such character. | [
"Returns",
"the",
"index",
"of",
"the",
"first",
"character",
"in",
"{"
] | train | https://github.com/square/okhttp/blob/a8c65a822dd6cadd2de7d115bf94adf312e67868/okhttp/src/main/java/okhttp3/internal/Util.java#L354-L359 |
ManfredTremmel/gwt-commons-lang3 | src/main/java/org/apache/commons/lang3/EnumUtils.java | EnumUtils.generateBitVector | public static <E extends Enum<E>> long generateBitVector(final Class<E> enumClass, final Iterable<? extends E> values) {
checkBitVectorable(enumClass);
Validate.notNull(values);
long total = 0;
for (final E constant : values) {
Validate.isTrue(constant != null, NULL_ELEMENTS_... | java | public static <E extends Enum<E>> long generateBitVector(final Class<E> enumClass, final Iterable<? extends E> values) {
checkBitVectorable(enumClass);
Validate.notNull(values);
long total = 0;
for (final E constant : values) {
Validate.isTrue(constant != null, NULL_ELEMENTS_... | [
"public",
"static",
"<",
"E",
"extends",
"Enum",
"<",
"E",
">",
">",
"long",
"generateBitVector",
"(",
"final",
"Class",
"<",
"E",
">",
"enumClass",
",",
"final",
"Iterable",
"<",
"?",
"extends",
"E",
">",
"values",
")",
"{",
"checkBitVectorable",
"(",
... | <p>Creates a long bit vector representation of the given subset of an Enum.</p>
<p>This generates a value that is usable by {@link EnumUtils#processBitVector}.</p>
<p>Do not use this method if you have more than 64 values in your Enum, as this
would create a value greater than a long can hold.</p>
@param enumClass t... | [
"<p",
">",
"Creates",
"a",
"long",
"bit",
"vector",
"representation",
"of",
"the",
"given",
"subset",
"of",
"an",
"Enum",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/EnumUtils.java#L143-L152 |
sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/codemining/SARLCodeMiningProvider.java | SARLCodeMiningProvider.createImplicitFieldType | private void createImplicitFieldType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) {
createImplicitVarValType(resource, acceptor, XtendField.class,
it -> it.getType(),
it -> {
final JvmField inferredField = (JvmField) this.jvmModelAssocitions.getPrimaryJvmElement(it);
if (inferredFiel... | java | private void createImplicitFieldType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) {
createImplicitVarValType(resource, acceptor, XtendField.class,
it -> it.getType(),
it -> {
final JvmField inferredField = (JvmField) this.jvmModelAssocitions.getPrimaryJvmElement(it);
if (inferredFiel... | [
"private",
"void",
"createImplicitFieldType",
"(",
"XtextResource",
"resource",
",",
"IAcceptor",
"<",
"?",
"super",
"ICodeMining",
">",
"acceptor",
")",
"{",
"createImplicitVarValType",
"(",
"resource",
",",
"acceptor",
",",
"XtendField",
".",
"class",
",",
"it",... | Add an annotation when the field's type is implicit and inferred by the SARL compiler.
@param resource the resource to parse.
@param acceptor the code mining acceptor. | [
"Add",
"an",
"annotation",
"when",
"the",
"field",
"s",
"type",
"is",
"implicit",
"and",
"inferred",
"by",
"the",
"SARL",
"compiler",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/codemining/SARLCodeMiningProvider.java#L233-L245 |
apiman/apiman | gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/LocalClientFactory.java | LocalClientFactory.createLocalClient | public JestClient createLocalClient(Map<String, String> config, String indexName, String defaultIndexName) {
String clientLocClassName = config.get("client.class"); //$NON-NLS-1$
String clientLocFieldName = config.get("client.field"); //$NON-NLS-1$
return createLocalClient(clientLocClassName, cl... | java | public JestClient createLocalClient(Map<String, String> config, String indexName, String defaultIndexName) {
String clientLocClassName = config.get("client.class"); //$NON-NLS-1$
String clientLocFieldName = config.get("client.field"); //$NON-NLS-1$
return createLocalClient(clientLocClassName, cl... | [
"public",
"JestClient",
"createLocalClient",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"config",
",",
"String",
"indexName",
",",
"String",
"defaultIndexName",
")",
"{",
"String",
"clientLocClassName",
"=",
"config",
".",
"get",
"(",
"\"client.class\"",
")"... | Creates a local client from a configuration map.
@param config the config from apiman.properties
@param indexName the name of the ES index
@param defaultIndexName the default ES index name
@return the ES client | [
"Creates",
"a",
"local",
"client",
"from",
"a",
"configuration",
"map",
"."
] | train | https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/LocalClientFactory.java#L59-L63 |
RestComm/sip-servlets | sip-servlets-application-router/src/main/java/org/mobicents/servlet/sip/router/DefaultApplicationRouter.java | DefaultApplicationRouter.init | public void init() {
defaultApplicationRouterParser.init();
try {
defaultSipApplicationRouterInfos = defaultApplicationRouterParser.parse();
} catch (ParseException e) {
log.fatal("Impossible to parse the default application router configuration file", e);
... | java | public void init() {
defaultApplicationRouterParser.init();
try {
defaultSipApplicationRouterInfos = defaultApplicationRouterParser.parse();
} catch (ParseException e) {
log.fatal("Impossible to parse the default application router configuration file", e);
... | [
"public",
"void",
"init",
"(",
")",
"{",
"defaultApplicationRouterParser",
".",
"init",
"(",
")",
";",
"try",
"{",
"defaultSipApplicationRouterInfos",
"=",
"defaultApplicationRouterParser",
".",
"parse",
"(",
")",
";",
"}",
"catch",
"(",
"ParseException",
"e",
"... | load the configuration file as defined in appendix C of JSR289 | [
"load",
"the",
"configuration",
"file",
"as",
"defined",
"in",
"appendix",
"C",
"of",
"JSR289"
] | train | https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-application-router/src/main/java/org/mobicents/servlet/sip/router/DefaultApplicationRouter.java#L442-L450 |
javafxports/javafxmobile-plugin | src/main/java/org/javafxports/jfxmobile/plugin/android/task/ApkBuilder.java | ApkBuilder.addZipFile | public void addZipFile(File zipFile) throws ApkCreationException, SealedApkException,
DuplicateFileException {
if (mIsSealed) {
throw new SealedApkException("APK is already sealed");
}
try {
verbosePrintln("%s:", zipFile);
// reset the filter wit... | java | public void addZipFile(File zipFile) throws ApkCreationException, SealedApkException,
DuplicateFileException {
if (mIsSealed) {
throw new SealedApkException("APK is already sealed");
}
try {
verbosePrintln("%s:", zipFile);
// reset the filter wit... | [
"public",
"void",
"addZipFile",
"(",
"File",
"zipFile",
")",
"throws",
"ApkCreationException",
",",
"SealedApkException",
",",
"DuplicateFileException",
"{",
"if",
"(",
"mIsSealed",
")",
"{",
"throw",
"new",
"SealedApkException",
"(",
"\"APK is already sealed\"",
")",... | Adds the content from a zip file.
All file keep the same path inside the archive.
@param zipFile the zip File.
@throws ApkCreationException if an error occurred
@throws SealedApkException if the APK is already sealed.
@throws DuplicateFileException if a file conflicts with another already added to the APK
at the same l... | [
"Adds",
"the",
"content",
"from",
"a",
"zip",
"file",
".",
"All",
"file",
"keep",
"the",
"same",
"path",
"inside",
"the",
"archive",
"."
] | train | https://github.com/javafxports/javafxmobile-plugin/blob/a9bef513b7e1bfa85f9a668226e6943c6d9f847f/src/main/java/org/javafxports/jfxmobile/plugin/android/task/ApkBuilder.java#L579-L602 |
jbundle/jbundle | thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/base/PKeyArea.java | PKeyArea.doSeek | public BaseBuffer doSeek(String strSeekSign, FieldTable table, KeyAreaInfo keyArea) throws DBException
{
return null;
} | java | public BaseBuffer doSeek(String strSeekSign, FieldTable table, KeyAreaInfo keyArea) throws DBException
{
return null;
} | [
"public",
"BaseBuffer",
"doSeek",
"(",
"String",
"strSeekSign",
",",
"FieldTable",
"table",
",",
"KeyAreaInfo",
"keyArea",
")",
"throws",
"DBException",
"{",
"return",
"null",
";",
"}"
] | Read the record that matches this record's temp key area.<p>
WARNING - This method changes the current record's buffer.
@param strSeekSign - Seek sign:<p>
<pre>
"=" - Look for the first match.
"==" - Look for an exact match (On non-unique keys, must match primary key also).
">" - Look for the first record greater than ... | [
"Read",
"the",
"record",
"that",
"matches",
"this",
"record",
"s",
"temp",
"key",
"area",
".",
"<p",
">",
"WARNING",
"-",
"This",
"method",
"changes",
"the",
"current",
"record",
"s",
"buffer",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/base/PKeyArea.java#L149-L152 |
vkostyukov/la4j | src/main/java/org/la4j/matrix/RowMajorSparseMatrix.java | RowMajorSparseMatrix.randomSymmetric | public static RowMajorSparseMatrix randomSymmetric(int size, double density, Random random) {
return CRSMatrix.randomSymmetric(size, density, random);
} | java | public static RowMajorSparseMatrix randomSymmetric(int size, double density, Random random) {
return CRSMatrix.randomSymmetric(size, density, random);
} | [
"public",
"static",
"RowMajorSparseMatrix",
"randomSymmetric",
"(",
"int",
"size",
",",
"double",
"density",
",",
"Random",
"random",
")",
"{",
"return",
"CRSMatrix",
".",
"randomSymmetric",
"(",
"size",
",",
"density",
",",
"random",
")",
";",
"}"
] | Creates a random symmetric {@link RowMajorSparseMatrix} of the given {@code size}. | [
"Creates",
"a",
"random",
"symmetric",
"{"
] | train | https://github.com/vkostyukov/la4j/blob/dd1b917caf9606399a49afa6b0d738934cd3a7b3/src/main/java/org/la4j/matrix/RowMajorSparseMatrix.java#L93-L95 |
Azure/azure-sdk-for-java | automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ConnectionTypesInner.java | ConnectionTypesInner.listByAutomationAccountAsync | public Observable<Page<ConnectionTypeInner>> listByAutomationAccountAsync(final String resourceGroupName, final String automationAccountName) {
return listByAutomationAccountWithServiceResponseAsync(resourceGroupName, automationAccountName)
.map(new Func1<ServiceResponse<Page<ConnectionTypeInner>>, ... | java | public Observable<Page<ConnectionTypeInner>> listByAutomationAccountAsync(final String resourceGroupName, final String automationAccountName) {
return listByAutomationAccountWithServiceResponseAsync(resourceGroupName, automationAccountName)
.map(new Func1<ServiceResponse<Page<ConnectionTypeInner>>, ... | [
"public",
"Observable",
"<",
"Page",
"<",
"ConnectionTypeInner",
">",
">",
"listByAutomationAccountAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"automationAccountName",
")",
"{",
"return",
"listByAutomationAccountWithServiceResponseAsync",
"(... | Retrieve a list of connectiontypes.
@param resourceGroupName Name of an Azure Resource group.
@param automationAccountName The name of the automation account.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the PagedList<ConnectionTypeInner> object | [
"Retrieve",
"a",
"list",
"of",
"connectiontypes",
"."
] | 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/ConnectionTypesInner.java#L418-L426 |
wcm-io/wcm-io-sling | commons/src/main/java/io/wcm/sling/commons/request/RequestPath.java | RequestPath.hasSelector | public static boolean hasSelector(@NotNull SlingHttpServletRequest request, @NotNull String expectedSelector) {
String[] selectors = request.getRequestPathInfo().getSelectors();
return ArrayUtils.contains(selectors, expectedSelector);
} | java | public static boolean hasSelector(@NotNull SlingHttpServletRequest request, @NotNull String expectedSelector) {
String[] selectors = request.getRequestPathInfo().getSelectors();
return ArrayUtils.contains(selectors, expectedSelector);
} | [
"public",
"static",
"boolean",
"hasSelector",
"(",
"@",
"NotNull",
"SlingHttpServletRequest",
"request",
",",
"@",
"NotNull",
"String",
"expectedSelector",
")",
"{",
"String",
"[",
"]",
"selectors",
"=",
"request",
".",
"getRequestPathInfo",
"(",
")",
".",
"getS... | Checks if the given selector is present in the current URL request (at any position).
@param request Sling request
@param expectedSelector Selector string to check for.
@return true if the selector was found | [
"Checks",
"if",
"the",
"given",
"selector",
"is",
"present",
"in",
"the",
"current",
"URL",
"request",
"(",
"at",
"any",
"position",
")",
"."
] | train | https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/request/RequestPath.java#L43-L46 |
apache/groovy | subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java | NioGroovyMethods.leftShift | public static Path leftShift(Path path, InputStream data) throws IOException {
append(path, data);
return path;
} | java | public static Path leftShift(Path path, InputStream data) throws IOException {
append(path, data);
return path;
} | [
"public",
"static",
"Path",
"leftShift",
"(",
"Path",
"path",
",",
"InputStream",
"data",
")",
"throws",
"IOException",
"{",
"append",
"(",
"path",
",",
"data",
")",
";",
"return",
"path",
";",
"}"
] | Append binary data to the file. See {@link #append(Path, java.io.InputStream)}
@param path a Path
@param data an InputStream of data to write to the file
@return the file
@throws java.io.IOException if an IOException occurs.
@since 2.3.0 | [
"Append",
"binary",
"data",
"to",
"the",
"file",
".",
"See",
"{",
"@link",
"#append",
"(",
"Path",
"java",
".",
"io",
".",
"InputStream",
")",
"}"
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java#L520-L523 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.