id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
148,100 | fuinorg/objects4j | src/main/java/org/fuin/objects4j/vo/LocaleConverter.java | LocaleConverter.asLocale | public static Locale asLocale(final String value) {
final Locale locale;
final int p = value.indexOf("__");
if (p > -1) {
locale = new Locale(value.substring(0, p), null, value.substring(p + 2));
} else {
final StringTokenizer tok = new StringTokenizer(value... | java | public static Locale asLocale(final String value) {
final Locale locale;
final int p = value.indexOf("__");
if (p > -1) {
locale = new Locale(value.substring(0, p), null, value.substring(p + 2));
} else {
final StringTokenizer tok = new StringTokenizer(value... | [
"public",
"static",
"Locale",
"asLocale",
"(",
"final",
"String",
"value",
")",
"{",
"final",
"Locale",
"locale",
";",
"final",
"int",
"p",
"=",
"value",
".",
"indexOf",
"(",
"\"__\"",
")",
";",
"if",
"(",
"p",
">",
"-",
"1",
")",
"{",
"locale",
"=... | Returns the given string as locale. The locale is NOT checked against the Java list of avilable locales.
@param value
Value to convert into a locale.
@return Locale. | [
"Returns",
"the",
"given",
"string",
"as",
"locale",
".",
"The",
"locale",
"is",
"NOT",
"checked",
"against",
"the",
"Java",
"list",
"of",
"avilable",
"locales",
"."
] | e7f278b5bae073ebb6a76053650571c718f36246 | https://github.com/fuinorg/objects4j/blob/e7f278b5bae073ebb6a76053650571c718f36246/src/main/java/org/fuin/objects4j/vo/LocaleConverter.java#L67-L85 |
148,101 | fuinorg/objects4j | src/main/java/org/fuin/objects4j/vo/LocaleConverter.java | LocaleConverter.validLocale | public static boolean validLocale(final Locale locale) {
for (final Locale found : Locale.getAvailableLocales()) {
if (found.equals(locale)) {
return true;
}
}
return false;
} | java | public static boolean validLocale(final Locale locale) {
for (final Locale found : Locale.getAvailableLocales()) {
if (found.equals(locale)) {
return true;
}
}
return false;
} | [
"public",
"static",
"boolean",
"validLocale",
"(",
"final",
"Locale",
"locale",
")",
"{",
"for",
"(",
"final",
"Locale",
"found",
":",
"Locale",
".",
"getAvailableLocales",
"(",
")",
")",
"{",
"if",
"(",
"found",
".",
"equals",
"(",
"locale",
")",
")",
... | Verifies if the give locale is in the Java list of known locales.
@param locale
Locale to verify.
@return TRUE if the locale is known else FALSE. | [
"Verifies",
"if",
"the",
"give",
"locale",
"is",
"in",
"the",
"Java",
"list",
"of",
"known",
"locales",
"."
] | e7f278b5bae073ebb6a76053650571c718f36246 | https://github.com/fuinorg/objects4j/blob/e7f278b5bae073ebb6a76053650571c718f36246/src/main/java/org/fuin/objects4j/vo/LocaleConverter.java#L95-L102 |
148,102 | nuun-io/kernel | core/src/main/java/io/nuun/kernel/core/NuunCore.java | NuunCore.createKernel | public static Kernel createKernel(KernelConfiguration configuration)
{
KernelCoreFactory factory = new KernelCoreFactory();
return factory.create(configuration);
} | java | public static Kernel createKernel(KernelConfiguration configuration)
{
KernelCoreFactory factory = new KernelCoreFactory();
return factory.create(configuration);
} | [
"public",
"static",
"Kernel",
"createKernel",
"(",
"KernelConfiguration",
"configuration",
")",
"{",
"KernelCoreFactory",
"factory",
"=",
"new",
"KernelCoreFactory",
"(",
")",
";",
"return",
"factory",
".",
"create",
"(",
"configuration",
")",
";",
"}"
] | Creates a kernel with the given configuration.
@param configuration the kernel configuration
@return the kernel | [
"Creates",
"a",
"kernel",
"with",
"the",
"given",
"configuration",
"."
] | 116a7664fe2a9323e280574803d273699a333732 | https://github.com/nuun-io/kernel/blob/116a7664fe2a9323e280574803d273699a333732/core/src/main/java/io/nuun/kernel/core/NuunCore.java#L48-L52 |
148,103 | projectodd/wunderboss-release | web-undertow/src/main/java/org/projectodd/wunderboss/web/undertow/async/websocket/UndertowWebsocket.java | UndertowWebsocket.toArray | protected static byte[] toArray(ByteBuffer... payload) {
if (payload.length == 1) {
ByteBuffer buf = payload[0];
if (buf.hasArray() && buf.arrayOffset() == 0 && buf.position() == 0) {
return buf.array();
}
}
int size = (int) Buffers.remaining(p... | java | protected static byte[] toArray(ByteBuffer... payload) {
if (payload.length == 1) {
ByteBuffer buf = payload[0];
if (buf.hasArray() && buf.arrayOffset() == 0 && buf.position() == 0) {
return buf.array();
}
}
int size = (int) Buffers.remaining(p... | [
"protected",
"static",
"byte",
"[",
"]",
"toArray",
"(",
"ByteBuffer",
"...",
"payload",
")",
"{",
"if",
"(",
"payload",
".",
"length",
"==",
"1",
")",
"{",
"ByteBuffer",
"buf",
"=",
"payload",
"[",
"0",
"]",
";",
"if",
"(",
"buf",
".",
"hasArray",
... | Lifted from Undertow's FrameHandler.java | [
"Lifted",
"from",
"Undertow",
"s",
"FrameHandler",
".",
"java"
] | f67c68e80c5798169e3a9b2015e278239dbf005d | https://github.com/projectodd/wunderboss-release/blob/f67c68e80c5798169e3a9b2015e278239dbf005d/web-undertow/src/main/java/org/projectodd/wunderboss/web/undertow/async/websocket/UndertowWebsocket.java#L120-L133 |
148,104 | fuinorg/objects4j | src/main/java/org/fuin/objects4j/vo/HourRange.java | HourRange.overlaps | public final boolean overlaps(@NotNull final HourRange other) {
Contract.requireArgNotNull("other", other);
if (this.equals(other)) {
return true;
}
final int otherFrom = other.from.toMinutes();
final int thisFrom = from.toMinutes();
final int otherTo = other.... | java | public final boolean overlaps(@NotNull final HourRange other) {
Contract.requireArgNotNull("other", other);
if (this.equals(other)) {
return true;
}
final int otherFrom = other.from.toMinutes();
final int thisFrom = from.toMinutes();
final int otherTo = other.... | [
"public",
"final",
"boolean",
"overlaps",
"(",
"@",
"NotNull",
"final",
"HourRange",
"other",
")",
"{",
"Contract",
".",
"requireArgNotNull",
"(",
"\"other\"",
",",
"other",
")",
";",
"if",
"(",
"this",
".",
"equals",
"(",
"other",
")",
")",
"{",
"return... | Determines if this range and the given range overlap.
@param other
Range to compare with.
@return {@literal true} if the two ranges overlap, else {@literal false}. | [
"Determines",
"if",
"this",
"range",
"and",
"the",
"given",
"range",
"overlap",
"."
] | e7f278b5bae073ebb6a76053650571c718f36246 | https://github.com/fuinorg/objects4j/blob/e7f278b5bae073ebb6a76053650571c718f36246/src/main/java/org/fuin/objects4j/vo/HourRange.java#L166-L185 |
148,105 | fuinorg/objects4j | src/main/java/org/fuin/objects4j/vo/HourRange.java | HourRange.isValid | public static boolean isValid(@Nullable final String hourRange) {
if (hourRange == null) {
return true;
}
final int p = hourRange.indexOf('-');
if (p != 5) {
return false;
}
final String fromStr = hourRange.substring(0, 5);
final String toS... | java | public static boolean isValid(@Nullable final String hourRange) {
if (hourRange == null) {
return true;
}
final int p = hourRange.indexOf('-');
if (p != 5) {
return false;
}
final String fromStr = hourRange.substring(0, 5);
final String toS... | [
"public",
"static",
"boolean",
"isValid",
"(",
"@",
"Nullable",
"final",
"String",
"hourRange",
")",
"{",
"if",
"(",
"hourRange",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"final",
"int",
"p",
"=",
"hourRange",
".",
"indexOf",
"(",
"'",
"'",
... | Verifies if the string is a valid hour range.
@param hourRange
Hour range string to test.
@return {@literal true} if the string is a valid range, else {@literal false}. | [
"Verifies",
"if",
"the",
"string",
"is",
"a",
"valid",
"hour",
"range",
"."
] | e7f278b5bae073ebb6a76053650571c718f36246 | https://github.com/fuinorg/objects4j/blob/e7f278b5bae073ebb6a76053650571c718f36246/src/main/java/org/fuin/objects4j/vo/HourRange.java#L266-L288 |
148,106 | RestComm/jain-slee.xcap | enablers/xdm-client/sbb/src/main/java/org/restcomm/slee/enabler/xdmc/XDMClientChildSbb.java | XDMClientChildSbb.onDeleteResponseEvent | public void onDeleteResponseEvent(ResponseEvent event,
ActivityContextInterface aci) {
if (event.getException() != null) {
if (tracer.isInfoEnabled()) {
tracer.info("Failed to delete " + event.getURI(),
event.getException());
}
getParent().deleteResponse(event.getURI(), 500, null, null);
} el... | java | public void onDeleteResponseEvent(ResponseEvent event,
ActivityContextInterface aci) {
if (event.getException() != null) {
if (tracer.isInfoEnabled()) {
tracer.info("Failed to delete " + event.getURI(),
event.getException());
}
getParent().deleteResponse(event.getURI(), 500, null, null);
} el... | [
"public",
"void",
"onDeleteResponseEvent",
"(",
"ResponseEvent",
"event",
",",
"ActivityContextInterface",
"aci",
")",
"{",
"if",
"(",
"event",
".",
"getException",
"(",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"tracer",
".",
"isInfoEnabled",
"(",
")",
")",
... | Handles XCAP DELETE response events.
@param event
@param aci | [
"Handles",
"XCAP",
"DELETE",
"response",
"events",
"."
] | 0caa9ab481a545e52c31401f19e99bdfbbfb7bf0 | https://github.com/RestComm/jain-slee.xcap/blob/0caa9ab481a545e52c31401f19e99bdfbbfb7bf0/enablers/xdm-client/sbb/src/main/java/org/restcomm/slee/enabler/xdmc/XDMClientChildSbb.java#L397-L421 |
148,107 | RestComm/jain-slee.xcap | enablers/xdm-client/sbb/src/main/java/org/restcomm/slee/enabler/xdmc/XDMClientChildSbb.java | XDMClientChildSbb.unsubscribeFailed | public void unsubscribeFailed(int arg0,
SubscriptionClientChildSbbLocalObject subscriptionChild) {
try {
final String notifier = subscriptionChild.getSubscriptionData().getNotifierURI();
subscriptionChild.remove();
getParent().unsubscribeFailed(
arg0,
(XDMClientChildSbbLocalObject) this.sbbConte... | java | public void unsubscribeFailed(int arg0,
SubscriptionClientChildSbbLocalObject subscriptionChild) {
try {
final String notifier = subscriptionChild.getSubscriptionData().getNotifierURI();
subscriptionChild.remove();
getParent().unsubscribeFailed(
arg0,
(XDMClientChildSbbLocalObject) this.sbbConte... | [
"public",
"void",
"unsubscribeFailed",
"(",
"int",
"arg0",
",",
"SubscriptionClientChildSbbLocalObject",
"subscriptionChild",
")",
"{",
"try",
"{",
"final",
"String",
"notifier",
"=",
"subscriptionChild",
".",
"getSubscriptionData",
"(",
")",
".",
"getNotifierURI",
"(... | two easy cases. | [
"two",
"easy",
"cases",
"."
] | 0caa9ab481a545e52c31401f19e99bdfbbfb7bf0 | https://github.com/RestComm/jain-slee.xcap/blob/0caa9ab481a545e52c31401f19e99bdfbbfb7bf0/enablers/xdm-client/sbb/src/main/java/org/restcomm/slee/enabler/xdmc/XDMClientChildSbb.java#L603-L615 |
148,108 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericMultiBoJdbcDao.java | GenericMultiBoJdbcDao.lookupDelegateDao | @SuppressWarnings("unchecked")
protected <T> IGenericBoDao<T> lookupDelegateDao(Class<T> clazz) throws DelegateDaoNotFound {
IGenericBoDao<?> result = delegateDaos.get(clazz);
if (result == null) {
throw new DelegateDaoNotFound("Delegate dao for [" + clazz + "] not found!");
}
... | java | @SuppressWarnings("unchecked")
protected <T> IGenericBoDao<T> lookupDelegateDao(Class<T> clazz) throws DelegateDaoNotFound {
IGenericBoDao<?> result = delegateDaos.get(clazz);
if (result == null) {
throw new DelegateDaoNotFound("Delegate dao for [" + clazz + "] not found!");
}
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"<",
"T",
">",
"IGenericBoDao",
"<",
"T",
">",
"lookupDelegateDao",
"(",
"Class",
"<",
"T",
">",
"clazz",
")",
"throws",
"DelegateDaoNotFound",
"{",
"IGenericBoDao",
"<",
"?",
">",
"result",
"=... | Lookup the delegate dao.
@param clazz
@return | [
"Lookup",
"the",
"delegate",
"dao",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericMultiBoJdbcDao.java#L59-L66 |
148,109 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericMultiBoJdbcDao.java | GenericMultiBoJdbcDao.setDelegateDaos | public GenericMultiBoJdbcDao setDelegateDaos(Map<?, IGenericBoDao<?>> daoMappings)
throws ClassNotFoundException {
delegateDaos.clear();
for (Entry<?, IGenericBoDao<?>> entry : daoMappings.entrySet()) {
Object cl = entry.getKey();
IGenericBoDao<?> dao = entry.getValue... | java | public GenericMultiBoJdbcDao setDelegateDaos(Map<?, IGenericBoDao<?>> daoMappings)
throws ClassNotFoundException {
delegateDaos.clear();
for (Entry<?, IGenericBoDao<?>> entry : daoMappings.entrySet()) {
Object cl = entry.getKey();
IGenericBoDao<?> dao = entry.getValue... | [
"public",
"GenericMultiBoJdbcDao",
"setDelegateDaos",
"(",
"Map",
"<",
"?",
",",
"IGenericBoDao",
"<",
"?",
">",
">",
"daoMappings",
")",
"throws",
"ClassNotFoundException",
"{",
"delegateDaos",
".",
"clear",
"(",
")",
";",
"for",
"(",
"Entry",
"<",
"?",
","... | Set delegate dao mappings.
@param daoMappings
@return | [
"Set",
"delegate",
"dao",
"mappings",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericMultiBoJdbcDao.java#L101-L114 |
148,110 | nuun-io/kernel | core/src/main/java/io/nuun/kernel/core/internal/ExtensionManager.java | ExtensionManager.initializing | public void initializing()
{
for (KernelExtension kernelExtension : kernelExtensions.keySet())
{
Collection<Plugin> plugins = kernelExtensions.get(kernelExtension);
kernelExtension.initializing(plugins);
}
} | java | public void initializing()
{
for (KernelExtension kernelExtension : kernelExtensions.keySet())
{
Collection<Plugin> plugins = kernelExtensions.get(kernelExtension);
kernelExtension.initializing(plugins);
}
} | [
"public",
"void",
"initializing",
"(",
")",
"{",
"for",
"(",
"KernelExtension",
"kernelExtension",
":",
"kernelExtensions",
".",
"keySet",
"(",
")",
")",
"{",
"Collection",
"<",
"Plugin",
">",
"plugins",
"=",
"kernelExtensions",
".",
"get",
"(",
"kernelExtensi... | Notifies the extensions that the kernel is initializing | [
"Notifies",
"the",
"extensions",
"that",
"the",
"kernel",
"is",
"initializing"
] | 116a7664fe2a9323e280574803d273699a333732 | https://github.com/nuun-io/kernel/blob/116a7664fe2a9323e280574803d273699a333732/core/src/main/java/io/nuun/kernel/core/internal/ExtensionManager.java#L82-L89 |
148,111 | nuun-io/kernel | core/src/main/java/io/nuun/kernel/core/internal/ExtensionManager.java | ExtensionManager.initialized | public void initialized()
{
for (KernelExtension kernelExtension : kernelExtensions.keySet())
{
kernelExtension.initialized(kernelExtensions.get(kernelExtension));
}
} | java | public void initialized()
{
for (KernelExtension kernelExtension : kernelExtensions.keySet())
{
kernelExtension.initialized(kernelExtensions.get(kernelExtension));
}
} | [
"public",
"void",
"initialized",
"(",
")",
"{",
"for",
"(",
"KernelExtension",
"kernelExtension",
":",
"kernelExtensions",
".",
"keySet",
"(",
")",
")",
"{",
"kernelExtension",
".",
"initialized",
"(",
"kernelExtensions",
".",
"get",
"(",
"kernelExtension",
")",... | Notifies the extensions that the kernel is initialized | [
"Notifies",
"the",
"extensions",
"that",
"the",
"kernel",
"is",
"initialized"
] | 116a7664fe2a9323e280574803d273699a333732 | https://github.com/nuun-io/kernel/blob/116a7664fe2a9323e280574803d273699a333732/core/src/main/java/io/nuun/kernel/core/internal/ExtensionManager.java#L94-L100 |
148,112 | nuun-io/kernel | core/src/main/java/io/nuun/kernel/core/internal/ExtensionManager.java | ExtensionManager.starting | public void starting()
{
for (KernelExtension kernelExtension : kernelExtensions.keySet())
{
kernelExtension.starting(kernelExtensions.get(kernelExtension));
}
} | java | public void starting()
{
for (KernelExtension kernelExtension : kernelExtensions.keySet())
{
kernelExtension.starting(kernelExtensions.get(kernelExtension));
}
} | [
"public",
"void",
"starting",
"(",
")",
"{",
"for",
"(",
"KernelExtension",
"kernelExtension",
":",
"kernelExtensions",
".",
"keySet",
"(",
")",
")",
"{",
"kernelExtension",
".",
"starting",
"(",
"kernelExtensions",
".",
"get",
"(",
"kernelExtension",
")",
")"... | Notifies the extensions that the kernel is starting | [
"Notifies",
"the",
"extensions",
"that",
"the",
"kernel",
"is",
"starting"
] | 116a7664fe2a9323e280574803d273699a333732 | https://github.com/nuun-io/kernel/blob/116a7664fe2a9323e280574803d273699a333732/core/src/main/java/io/nuun/kernel/core/internal/ExtensionManager.java#L105-L111 |
148,113 | nuun-io/kernel | core/src/main/java/io/nuun/kernel/core/internal/ExtensionManager.java | ExtensionManager.started | public void started()
{
for (KernelExtension kernelExtension : kernelExtensions.keySet())
{
kernelExtension.started(kernelExtensions.get(kernelExtension));
}
} | java | public void started()
{
for (KernelExtension kernelExtension : kernelExtensions.keySet())
{
kernelExtension.started(kernelExtensions.get(kernelExtension));
}
} | [
"public",
"void",
"started",
"(",
")",
"{",
"for",
"(",
"KernelExtension",
"kernelExtension",
":",
"kernelExtensions",
".",
"keySet",
"(",
")",
")",
"{",
"kernelExtension",
".",
"started",
"(",
"kernelExtensions",
".",
"get",
"(",
"kernelExtension",
")",
")",
... | Notifies the extensions that the kernel is started | [
"Notifies",
"the",
"extensions",
"that",
"the",
"kernel",
"is",
"started"
] | 116a7664fe2a9323e280574803d273699a333732 | https://github.com/nuun-io/kernel/blob/116a7664fe2a9323e280574803d273699a333732/core/src/main/java/io/nuun/kernel/core/internal/ExtensionManager.java#L116-L122 |
148,114 | nuun-io/kernel | core/src/main/java/io/nuun/kernel/core/internal/ExtensionManager.java | ExtensionManager.stopping | public void stopping()
{
for (KernelExtension kernelExtension : kernelExtensions.keySet())
{
kernelExtension.stopping(kernelExtensions.get(kernelExtension));
}
} | java | public void stopping()
{
for (KernelExtension kernelExtension : kernelExtensions.keySet())
{
kernelExtension.stopping(kernelExtensions.get(kernelExtension));
}
} | [
"public",
"void",
"stopping",
"(",
")",
"{",
"for",
"(",
"KernelExtension",
"kernelExtension",
":",
"kernelExtensions",
".",
"keySet",
"(",
")",
")",
"{",
"kernelExtension",
".",
"stopping",
"(",
"kernelExtensions",
".",
"get",
"(",
"kernelExtension",
")",
")"... | Notifies the extensions that the kernel is stopping | [
"Notifies",
"the",
"extensions",
"that",
"the",
"kernel",
"is",
"stopping"
] | 116a7664fe2a9323e280574803d273699a333732 | https://github.com/nuun-io/kernel/blob/116a7664fe2a9323e280574803d273699a333732/core/src/main/java/io/nuun/kernel/core/internal/ExtensionManager.java#L127-L133 |
148,115 | nuun-io/kernel | core/src/main/java/io/nuun/kernel/core/internal/ExtensionManager.java | ExtensionManager.stopped | public void stopped()
{
for (KernelExtension kernelExtension : kernelExtensions.keySet())
{
kernelExtension.stopped(kernelExtensions.get(kernelExtension));
}
} | java | public void stopped()
{
for (KernelExtension kernelExtension : kernelExtensions.keySet())
{
kernelExtension.stopped(kernelExtensions.get(kernelExtension));
}
} | [
"public",
"void",
"stopped",
"(",
")",
"{",
"for",
"(",
"KernelExtension",
"kernelExtension",
":",
"kernelExtensions",
".",
"keySet",
"(",
")",
")",
"{",
"kernelExtension",
".",
"stopped",
"(",
"kernelExtensions",
".",
"get",
"(",
"kernelExtension",
")",
")",
... | Notifies the extensions that the kernel is stopped | [
"Notifies",
"the",
"extensions",
"that",
"the",
"kernel",
"is",
"stopped"
] | 116a7664fe2a9323e280574803d273699a333732 | https://github.com/nuun-io/kernel/blob/116a7664fe2a9323e280574803d273699a333732/core/src/main/java/io/nuun/kernel/core/internal/ExtensionManager.java#L138-L144 |
148,116 | nuun-io/kernel | core/src/main/java/io/nuun/kernel/core/internal/DependenciesAsserter.java | DependenciesAsserter.assertDependencies | void assertDependencies(final Plugin plugin)
{
Collection<Class<?>> expectedDependencies = new ArrayList<>();
Collection<Class<?>> requiredPlugins = plugin.requiredPlugins();
if (requiredPlugins != null)
{
expectedDependencies.addAll(requiredPlugins);
}
... | java | void assertDependencies(final Plugin plugin)
{
Collection<Class<?>> expectedDependencies = new ArrayList<>();
Collection<Class<?>> requiredPlugins = plugin.requiredPlugins();
if (requiredPlugins != null)
{
expectedDependencies.addAll(requiredPlugins);
}
... | [
"void",
"assertDependencies",
"(",
"final",
"Plugin",
"plugin",
")",
"{",
"Collection",
"<",
"Class",
"<",
"?",
">",
">",
"expectedDependencies",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"Collection",
"<",
"Class",
"<",
"?",
">",
">",
"requiredPlugins... | Verifies that the plugin dependencies are present in the plugin list.
The list should contains both dependent and required plugins.
@param plugin the plugin to check | [
"Verifies",
"that",
"the",
"plugin",
"dependencies",
"are",
"present",
"in",
"the",
"plugin",
"list",
".",
"The",
"list",
"should",
"contains",
"both",
"dependent",
"and",
"required",
"plugins",
"."
] | 116a7664fe2a9323e280574803d273699a333732 | https://github.com/nuun-io/kernel/blob/116a7664fe2a9323e280574803d273699a333732/core/src/main/java/io/nuun/kernel/core/internal/DependenciesAsserter.java#L42-L67 |
148,117 | grycap/coreutils | coreutils-common/src/main/java/es/upv/grycap/coreutils/common/concurrent/TaskRunner.java | TaskRunner.submit | public <T> CompletableFuture<T> submit(final Supplier<T> supplier) {
requireNonNull(supplier, "A non-null supplier expected");
CompletableFuture<T> future = null;
if (isRunning.get()) {
future = supplyAsync(supplier, executor);
} else {
future = new CompletableFuture<>();
future.completeExceptionally(n... | java | public <T> CompletableFuture<T> submit(final Supplier<T> supplier) {
requireNonNull(supplier, "A non-null supplier expected");
CompletableFuture<T> future = null;
if (isRunning.get()) {
future = supplyAsync(supplier, executor);
} else {
future = new CompletableFuture<>();
future.completeExceptionally(n... | [
"public",
"<",
"T",
">",
"CompletableFuture",
"<",
"T",
">",
"submit",
"(",
"final",
"Supplier",
"<",
"T",
">",
"supplier",
")",
"{",
"requireNonNull",
"(",
"supplier",
",",
"\"A non-null supplier expected\"",
")",
";",
"CompletableFuture",
"<",
"T",
">",
"f... | Submits a new task for execution to the pool of threads managed by this class.
@param <T> - specific type of supplier
@param supplier - a function returning the value to be used to complete the returned {@link CompletableFuture}
@return a {@link CompletableFuture} that the caller can use to track the execution of the t... | [
"Submits",
"a",
"new",
"task",
"for",
"execution",
"to",
"the",
"pool",
"of",
"threads",
"managed",
"by",
"this",
"class",
"."
] | e6db61dc50b49ea7276c0c29c7401204681a10c2 | https://github.com/grycap/coreutils/blob/e6db61dc50b49ea7276c0c29c7401204681a10c2/coreutils-common/src/main/java/es/upv/grycap/coreutils/common/concurrent/TaskRunner.java#L93-L103 |
148,118 | RestComm/jain-slee.xcap | resources/xcap-client/api/src/main/java/org/restcomm/xcap/client/uri/encoding/UriComponentEncoder.java | UriComponentEncoder.encodePath | public static String encodePath(String path) throws NullPointerException {
return new String(encode(path, UriComponentEncoderBitSets.allowed_abs_path));
} | java | public static String encodePath(String path) throws NullPointerException {
return new String(encode(path, UriComponentEncoderBitSets.allowed_abs_path));
} | [
"public",
"static",
"String",
"encodePath",
"(",
"String",
"path",
")",
"throws",
"NullPointerException",
"{",
"return",
"new",
"String",
"(",
"encode",
"(",
"path",
",",
"UriComponentEncoderBitSets",
".",
"allowed_abs_path",
")",
")",
";",
"}"
] | Encodes an HTTP URI Path.
@param path
@return
@throws NullPointerException | [
"Encodes",
"an",
"HTTP",
"URI",
"Path",
"."
] | 0caa9ab481a545e52c31401f19e99bdfbbfb7bf0 | https://github.com/RestComm/jain-slee.xcap/blob/0caa9ab481a545e52c31401f19e99bdfbbfb7bf0/resources/xcap-client/api/src/main/java/org/restcomm/xcap/client/uri/encoding/UriComponentEncoder.java#L58-L60 |
148,119 | RestComm/jain-slee.xcap | resources/xcap-client/api/src/main/java/org/restcomm/xcap/client/uri/encoding/UriComponentEncoder.java | UriComponentEncoder.encodeQuery | public static String encodeQuery(String query) throws NullPointerException {
return new String(encode(query, UriComponentEncoderBitSets.allowed_query));
} | java | public static String encodeQuery(String query) throws NullPointerException {
return new String(encode(query, UriComponentEncoderBitSets.allowed_query));
} | [
"public",
"static",
"String",
"encodeQuery",
"(",
"String",
"query",
")",
"throws",
"NullPointerException",
"{",
"return",
"new",
"String",
"(",
"encode",
"(",
"query",
",",
"UriComponentEncoderBitSets",
".",
"allowed_query",
")",
")",
";",
"}"
] | Encodes an HTTP URI Query.
@param query
@return
@throws NullPointerException | [
"Encodes",
"an",
"HTTP",
"URI",
"Query",
"."
] | 0caa9ab481a545e52c31401f19e99bdfbbfb7bf0 | https://github.com/RestComm/jain-slee.xcap/blob/0caa9ab481a545e52c31401f19e99bdfbbfb7bf0/resources/xcap-client/api/src/main/java/org/restcomm/xcap/client/uri/encoding/UriComponentEncoder.java#L68-L70 |
148,120 | fuinorg/objects4j | src/main/java/org/fuin/objects4j/vo/Hour.java | Hour.isValid | public static boolean isValid(@Nullable final String hour) {
if (hour == null) {
return true;
}
return PATTERN.matcher(hour).matches();
} | java | public static boolean isValid(@Nullable final String hour) {
if (hour == null) {
return true;
}
return PATTERN.matcher(hour).matches();
} | [
"public",
"static",
"boolean",
"isValid",
"(",
"@",
"Nullable",
"final",
"String",
"hour",
")",
"{",
"if",
"(",
"hour",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"return",
"PATTERN",
".",
"matcher",
"(",
"hour",
")",
".",
"matches",
"(",
")... | Verifies if the string is a valid hour.
@param hour
Hour string to test.
@return {@literal true} if the string is a valid number, else {@literal false}. | [
"Verifies",
"if",
"the",
"string",
"is",
"a",
"valid",
"hour",
"."
] | e7f278b5bae073ebb6a76053650571c718f36246 | https://github.com/fuinorg/objects4j/blob/e7f278b5bae073ebb6a76053650571c718f36246/src/main/java/org/fuin/objects4j/vo/Hour.java#L150-L155 |
148,121 | acromusashi/acromusashi-stream | src/main/java/acromusashi/stream/config/PropertyConfigLoader.java | PropertyConfigLoader.get | public static Object get(String filePath, String configKey)
{
if (propertiesMap.containsKey(filePath) == false)
{
loadProperty(filePath);
}
Properties properties = propertiesMap.get(filePath);
if (properties == null)
{
return null;
}
... | java | public static Object get(String filePath, String configKey)
{
if (propertiesMap.containsKey(filePath) == false)
{
loadProperty(filePath);
}
Properties properties = propertiesMap.get(filePath);
if (properties == null)
{
return null;
}
... | [
"public",
"static",
"Object",
"get",
"(",
"String",
"filePath",
",",
"String",
"configKey",
")",
"{",
"if",
"(",
"propertiesMap",
".",
"containsKey",
"(",
"filePath",
")",
"==",
"false",
")",
"{",
"loadProperty",
"(",
"filePath",
")",
";",
"}",
"Properties... | Get from config defined property files in classpath.
@param filePath property file path in classpath
@param configKey configkey
@return config value defined in property file | [
"Get",
"from",
"config",
"defined",
"property",
"files",
"in",
"classpath",
"."
] | 65b1f335d771d657c5640a2056ab5c8546eddec9 | https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/config/PropertyConfigLoader.java#L55-L70 |
148,122 | acromusashi/acromusashi-stream | src/main/java/acromusashi/stream/config/PropertyConfigLoader.java | PropertyConfigLoader.loadProperty | private static void loadProperty(String filePath)
{
try (InputStream propertyStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(
filePath);
Reader propertyReader = new InputStreamReader(propertyStream, DEFAULT_CHARSET);)
{
Properti... | java | private static void loadProperty(String filePath)
{
try (InputStream propertyStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(
filePath);
Reader propertyReader = new InputStreamReader(propertyStream, DEFAULT_CHARSET);)
{
Properti... | [
"private",
"static",
"void",
"loadProperty",
"(",
"String",
"filePath",
")",
"{",
"try",
"(",
"InputStream",
"propertyStream",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getContextClassLoader",
"(",
")",
".",
"getResourceAsStream",
"(",
"filePath",
")"... | Load property file.
@param filePath property file path in classpath | [
"Load",
"property",
"file",
"."
] | 65b1f335d771d657c5640a2056ab5c8546eddec9 | https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/config/PropertyConfigLoader.java#L77-L92 |
148,123 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/utils/JdbcHelper.java | JdbcHelper.buildBindValues | private static Object[] buildBindValues(Object bindValue) {
if (bindValue instanceof boolean[]) {
boolean[] bools = (boolean[]) bindValue;
return bools.length > 0 ? ArrayUtils.toObject(bools) : null;
} else if (bindValue instanceof short[]) {
short[] shorts = (short[]... | java | private static Object[] buildBindValues(Object bindValue) {
if (bindValue instanceof boolean[]) {
boolean[] bools = (boolean[]) bindValue;
return bools.length > 0 ? ArrayUtils.toObject(bools) : null;
} else if (bindValue instanceof short[]) {
short[] shorts = (short[]... | [
"private",
"static",
"Object",
"[",
"]",
"buildBindValues",
"(",
"Object",
"bindValue",
")",
"{",
"if",
"(",
"bindValue",
"instanceof",
"boolean",
"[",
"]",
")",
"{",
"boolean",
"[",
"]",
"bools",
"=",
"(",
"boolean",
"[",
"]",
")",
"bindValue",
";",
"... | Build array of final build values according the supplied build value.
@param bindValue
@return | [
"Build",
"array",
"of",
"final",
"build",
"values",
"according",
"the",
"supplied",
"build",
"value",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/utils/JdbcHelper.java#L170-L289 |
148,124 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractJdbcHelper.java | AbstractJdbcHelper.calcFetchSizeForStream | protected int calcFetchSizeForStream(int hintFetchSize, Connection conn) throws SQLException {
DatabaseVendor dbVendor = DbcHelper.detectDbVendor(conn);
switch (dbVendor) {
case MYSQL:
return Integer.MIN_VALUE;
default:
return hintFetchSize < 0 ? 1 : hintFetchSize... | java | protected int calcFetchSizeForStream(int hintFetchSize, Connection conn) throws SQLException {
DatabaseVendor dbVendor = DbcHelper.detectDbVendor(conn);
switch (dbVendor) {
case MYSQL:
return Integer.MIN_VALUE;
default:
return hintFetchSize < 0 ? 1 : hintFetchSize... | [
"protected",
"int",
"calcFetchSizeForStream",
"(",
"int",
"hintFetchSize",
",",
"Connection",
"conn",
")",
"throws",
"SQLException",
"{",
"DatabaseVendor",
"dbVendor",
"=",
"DbcHelper",
".",
"detectDbVendor",
"(",
"conn",
")",
";",
"switch",
"(",
"dbVendor",
")",
... | Calculate fetch size used for streaming.
@param hintFetchSize
@param conn
@return
@throws SQLException | [
"Calculate",
"fetch",
"size",
"used",
"for",
"streaming",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractJdbcHelper.java#L549-L557 |
148,125 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractGenericRowMapper.java | AbstractGenericRowMapper.generateSqlSelect | public String generateSqlSelect(String tableName) {
try {
return cacheSQLs.get("SELECT:" + tableName, () -> {
return MessageFormat.format("SELECT {2} FROM {0} WHERE {1}", tableName,
strWherePkClause, strAllColumns);
});
} catch (ExecutionEx... | java | public String generateSqlSelect(String tableName) {
try {
return cacheSQLs.get("SELECT:" + tableName, () -> {
return MessageFormat.format("SELECT {2} FROM {0} WHERE {1}", tableName,
strWherePkClause, strAllColumns);
});
} catch (ExecutionEx... | [
"public",
"String",
"generateSqlSelect",
"(",
"String",
"tableName",
")",
"{",
"try",
"{",
"return",
"cacheSQLs",
".",
"get",
"(",
"\"SELECT:\"",
"+",
"tableName",
",",
"(",
")",
"->",
"{",
"return",
"MessageFormat",
".",
"format",
"(",
"\"SELECT {2} FROM {0} ... | Generate SELECT statement to select a BO.
<p>
The generated SQL will look like this
{@code SELECT all-columns FROM table WHERE pk-1=? AND pk-2=?...}
</p>
@param tableName
@return
@since 0.8.5 | [
"Generate",
"SELECT",
"statement",
"to",
"select",
"a",
"BO",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractGenericRowMapper.java#L65-L74 |
148,126 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractGenericRowMapper.java | AbstractGenericRowMapper.generateSqlSelectAll | public String generateSqlSelectAll(String tableName) {
try {
return cacheSQLs.get("SELECT-ALL:" + tableName, () -> {
return MessageFormat.format("SELECT {2} FROM {0} ORDER BY {1}", tableName,
strPkColumns, strAllColumns);
});
} catch (Execu... | java | public String generateSqlSelectAll(String tableName) {
try {
return cacheSQLs.get("SELECT-ALL:" + tableName, () -> {
return MessageFormat.format("SELECT {2} FROM {0} ORDER BY {1}", tableName,
strPkColumns, strAllColumns);
});
} catch (Execu... | [
"public",
"String",
"generateSqlSelectAll",
"(",
"String",
"tableName",
")",
"{",
"try",
"{",
"return",
"cacheSQLs",
".",
"get",
"(",
"\"SELECT-ALL:\"",
"+",
"tableName",
",",
"(",
")",
"->",
"{",
"return",
"MessageFormat",
".",
"format",
"(",
"\"SELECT {2} FR... | Generate SELECT statement to SELECT all BOs, ordered by promary keys.
<p>
The generated SQL will look like this
{@code SELECT all-columns FROM table ORDER BY pk-1, pk-2...}
</p>
@param tableName
@return
@since 0.8.5 | [
"Generate",
"SELECT",
"statement",
"to",
"SELECT",
"all",
"BOs",
"ordered",
"by",
"promary",
"keys",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractGenericRowMapper.java#L88-L97 |
148,127 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractGenericRowMapper.java | AbstractGenericRowMapper.generateSqlInsert | public String generateSqlInsert(String tableName) {
try {
return cacheSQLs.get("INSERT:" + tableName, () -> {
return MessageFormat.format("INSERT INTO {0} ({1}) VALUES ({2})", tableName,
strAllColumns, StringUtils.repeat("?", ",", getAllColumns().length));
... | java | public String generateSqlInsert(String tableName) {
try {
return cacheSQLs.get("INSERT:" + tableName, () -> {
return MessageFormat.format("INSERT INTO {0} ({1}) VALUES ({2})", tableName,
strAllColumns, StringUtils.repeat("?", ",", getAllColumns().length));
... | [
"public",
"String",
"generateSqlInsert",
"(",
"String",
"tableName",
")",
"{",
"try",
"{",
"return",
"cacheSQLs",
".",
"get",
"(",
"\"INSERT:\"",
"+",
"tableName",
",",
"(",
")",
"->",
"{",
"return",
"MessageFormat",
".",
"format",
"(",
"\"INSERT INTO {0} ({1}... | Generate INSERT statement to insert a BO.
<p>
The generated SQL will look like this
{@code INSERT INTO table (all-columns) VALUES (?,?,...)}
</p>
@param tableName
@return
@since 0.8.5 | [
"Generate",
"INSERT",
"statement",
"to",
"insert",
"a",
"BO",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractGenericRowMapper.java#L111-L120 |
148,128 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractGenericRowMapper.java | AbstractGenericRowMapper.generateSqlDelete | public String generateSqlDelete(String tableName) {
try {
return cacheSQLs.get("DELETE:" + tableName, () -> {
return MessageFormat.format("DELETE FROM {0} WHERE {1}", tableName,
strWherePkClause);
});
} catch (ExecutionException e) {
... | java | public String generateSqlDelete(String tableName) {
try {
return cacheSQLs.get("DELETE:" + tableName, () -> {
return MessageFormat.format("DELETE FROM {0} WHERE {1}", tableName,
strWherePkClause);
});
} catch (ExecutionException e) {
... | [
"public",
"String",
"generateSqlDelete",
"(",
"String",
"tableName",
")",
"{",
"try",
"{",
"return",
"cacheSQLs",
".",
"get",
"(",
"\"DELETE:\"",
"+",
"tableName",
",",
"(",
")",
"->",
"{",
"return",
"MessageFormat",
".",
"format",
"(",
"\"DELETE FROM {0} WHER... | Generate DELETE statement to delete an existing BO.
<p>
The generated SQL will look like this {@code DELETE FROM table WHERE pk-1=? AND pk-2=?...}
</p>
@param tableName
@return
@since 0.8.5 | [
"Generate",
"DELETE",
"statement",
"to",
"delete",
"an",
"existing",
"BO",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractGenericRowMapper.java#L133-L142 |
148,129 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractGenericRowMapper.java | AbstractGenericRowMapper.generateSqlUpdate | public String generateSqlUpdate(String tableName) {
try {
return cacheSQLs.get("UPDATE:" + tableName, () -> {
return MessageFormat.format("UPDATE {0} SET {2} WHERE {1}", tableName,
strWherePkClause, strUpdateSetClause);
});
} catch (Executi... | java | public String generateSqlUpdate(String tableName) {
try {
return cacheSQLs.get("UPDATE:" + tableName, () -> {
return MessageFormat.format("UPDATE {0} SET {2} WHERE {1}", tableName,
strWherePkClause, strUpdateSetClause);
});
} catch (Executi... | [
"public",
"String",
"generateSqlUpdate",
"(",
"String",
"tableName",
")",
"{",
"try",
"{",
"return",
"cacheSQLs",
".",
"get",
"(",
"\"UPDATE:\"",
"+",
"tableName",
",",
"(",
")",
"->",
"{",
"return",
"MessageFormat",
".",
"format",
"(",
"\"UPDATE {0} SET {2} W... | Generate UPDATE statement to update an existing BO.
<p>
The generated SQL will look like this
{@code UPDATE table SET col1=?, col2=?...WHERE pk-1=? AND pk-2=?...}
</p>
@param tableName
@return
@since 0.8.5 | [
"Generate",
"UPDATE",
"statement",
"to",
"update",
"an",
"existing",
"BO",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractGenericRowMapper.java#L156-L165 |
148,130 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractGenericRowMapper.java | AbstractGenericRowMapper.valuesForColumns | public Object[] valuesForColumns(T bo, String... columns) {
Map<String, ColAttrMapping> columnAttributeMappings = getColumnAttributeMappings();
Object[] result = new Object[columns.length];
for (int i = 0; i < columns.length; i++) {
ColAttrMapping colAttrMapping = columnAttributeMapp... | java | public Object[] valuesForColumns(T bo, String... columns) {
Map<String, ColAttrMapping> columnAttributeMappings = getColumnAttributeMappings();
Object[] result = new Object[columns.length];
for (int i = 0; i < columns.length; i++) {
ColAttrMapping colAttrMapping = columnAttributeMapp... | [
"public",
"Object",
"[",
"]",
"valuesForColumns",
"(",
"T",
"bo",
",",
"String",
"...",
"columns",
")",
"{",
"Map",
"<",
"String",
",",
"ColAttrMapping",
">",
"columnAttributeMappings",
"=",
"getColumnAttributeMappings",
"(",
")",
";",
"Object",
"[",
"]",
"r... | Extract attribute values from a BO for corresponding DB table columns
@param bo
@return | [
"Extract",
"attribute",
"values",
"from",
"a",
"BO",
"for",
"corresponding",
"DB",
"table",
"columns"
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractGenericRowMapper.java#L392-L405 |
148,131 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractGenericRowMapper.java | AbstractGenericRowMapper.getAllColumns | public String[] getAllColumns() {
if (cachedAllColumns == null) {
cachedAllColumns = new ArrayList<String>(getColumnAttributeMappings().keySet())
.toArray(ArrayUtils.EMPTY_STRING_ARRAY);
}
return cachedAllColumns;
} | java | public String[] getAllColumns() {
if (cachedAllColumns == null) {
cachedAllColumns = new ArrayList<String>(getColumnAttributeMappings().keySet())
.toArray(ArrayUtils.EMPTY_STRING_ARRAY);
}
return cachedAllColumns;
} | [
"public",
"String",
"[",
"]",
"getAllColumns",
"(",
")",
"{",
"if",
"(",
"cachedAllColumns",
"==",
"null",
")",
"{",
"cachedAllColumns",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
"getColumnAttributeMappings",
"(",
")",
".",
"keySet",
"(",
")",
")",... | Get all DB table column names.
@return | [
"Get",
"all",
"DB",
"table",
"column",
"names",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/AbstractGenericRowMapper.java#L414-L420 |
148,132 | tehuti-io/tehuti | src/main/java/io/tehuti/metrics/Sensor.java | Sensor.checkForest | private void checkForest(Set<Sensor> sensors) {
if (!sensors.add(this))
throw new IllegalArgumentException("Circular dependency in sensors: " + name() + " is its own parent.");
for (int i = 0; i < parents.length; i++)
parents[i].checkForest(sensors);
} | java | private void checkForest(Set<Sensor> sensors) {
if (!sensors.add(this))
throw new IllegalArgumentException("Circular dependency in sensors: " + name() + " is its own parent.");
for (int i = 0; i < parents.length; i++)
parents[i].checkForest(sensors);
} | [
"private",
"void",
"checkForest",
"(",
"Set",
"<",
"Sensor",
">",
"sensors",
")",
"{",
"if",
"(",
"!",
"sensors",
".",
"add",
"(",
"this",
")",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Circular dependency in sensors: \"",
"+",
"name",
"(",
")... | Validate that this sensor doesn't end up referencing itself | [
"Validate",
"that",
"this",
"sensor",
"doesn",
"t",
"end",
"up",
"referencing",
"itself"
] | c28a2f838eac775660efb270aafd2a464d712948 | https://github.com/tehuti-io/tehuti/blob/c28a2f838eac775660efb270aafd2a464d712948/src/main/java/io/tehuti/metrics/Sensor.java#L59-L64 |
148,133 | tehuti-io/tehuti | src/main/java/io/tehuti/metrics/Sensor.java | Sensor.checkQuotas | private void checkQuotas(long timeMs, boolean preCheck, double requestedValue) {
for (int i = 0; i < this.metrics.size(); i++) {
TehutiMetric metric = this.metrics.get(i);
MetricConfig config = metric.config();
if (config != null) {
Quota quota = config.quota(... | java | private void checkQuotas(long timeMs, boolean preCheck, double requestedValue) {
for (int i = 0; i < this.metrics.size(); i++) {
TehutiMetric metric = this.metrics.get(i);
MetricConfig config = metric.config();
if (config != null) {
Quota quota = config.quota(... | [
"private",
"void",
"checkQuotas",
"(",
"long",
"timeMs",
",",
"boolean",
"preCheck",
",",
"double",
"requestedValue",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"metrics",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{"... | Check if we have violated our quota for any metric that has a configured quota
@param timeMs The current POSIX time in milliseconds | [
"Check",
"if",
"we",
"have",
"violated",
"our",
"quota",
"for",
"any",
"metric",
"that",
"has",
"a",
"configured",
"quota"
] | c28a2f838eac775660efb270aafd2a464d712948 | https://github.com/tehuti-io/tehuti/blob/c28a2f838eac775660efb270aafd2a464d712948/src/main/java/io/tehuti/metrics/Sensor.java#L117-L139 |
148,134 | tehuti-io/tehuti | src/main/java/io/tehuti/metrics/Sensor.java | Sensor.add | public synchronized Metric add(String name, String description, MeasurableStat stat, MetricConfig config) {
MetricConfig statConfig = (config == null ? this.config : config);
TehutiMetric metric = new TehutiMetric(this,
Utils.notNull(name),
... | java | public synchronized Metric add(String name, String description, MeasurableStat stat, MetricConfig config) {
MetricConfig statConfig = (config == null ? this.config : config);
TehutiMetric metric = new TehutiMetric(this,
Utils.notNull(name),
... | [
"public",
"synchronized",
"Metric",
"add",
"(",
"String",
"name",
",",
"String",
"description",
",",
"MeasurableStat",
"stat",
",",
"MetricConfig",
"config",
")",
"{",
"MetricConfig",
"statConfig",
"=",
"(",
"config",
"==",
"null",
"?",
"this",
".",
"config",
... | Register a metric with this sensor
@param name The name of the metric
@param description A description used when reporting the value
@param stat The statistic to keep
@param config A special configuration for this metric. If null use the sensor default configuration.
@return a {@link Metric} instance representing the r... | [
"Register",
"a",
"metric",
"with",
"this",
"sensor"
] | c28a2f838eac775660efb270aafd2a464d712948 | https://github.com/tehuti-io/tehuti/blob/c28a2f838eac775660efb270aafd2a464d712948/src/main/java/io/tehuti/metrics/Sensor.java#L204-L217 |
148,135 | bernardladenthin/streambuffer | src/main/java/net/ladenthin/streambuffer/StreamBuffer.java | StreamBuffer.trim | private void trim() throws IOException {
if (isTrimShouldBeExecuted()) {
/**
* Need to store more bufs, may it is not possible to read out all
* data at once. The available method only returns an int value
* instead a long value. Store all read parts of the fu... | java | private void trim() throws IOException {
if (isTrimShouldBeExecuted()) {
/**
* Need to store more bufs, may it is not possible to read out all
* data at once. The available method only returns an int value
* instead a long value. Store all read parts of the fu... | [
"private",
"void",
"trim",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"isTrimShouldBeExecuted",
"(",
")",
")",
"{",
"/**\n * Need to store more bufs, may it is not possible to read out all\n * data at once. The available method only returns an int value\... | This method trims the buffer. This method can be invoked after every
write operation. The method checks itself if the buffer should be trimmed
or not. | [
"This",
"method",
"trims",
"the",
"buffer",
".",
"This",
"method",
"can",
"be",
"invoked",
"after",
"every",
"write",
"operation",
".",
"The",
"method",
"checks",
"itself",
"if",
"the",
"buffer",
"should",
"be",
"trimmed",
"or",
"not",
"."
] | 46d586c95fc3316c7a92b76a556c932b9346015d | https://github.com/bernardladenthin/streambuffer/blob/46d586c95fc3316c7a92b76a556c932b9346015d/src/main/java/net/ladenthin/streambuffer/StreamBuffer.java#L239-L280 |
148,136 | bernardladenthin/streambuffer | src/main/java/net/ladenthin/streambuffer/StreamBuffer.java | StreamBuffer.tryWaitForEnoughBytes | private long tryWaitForEnoughBytes(final long bytes) throws IOException {
// we can only wait for a positive number of bytes
assert bytes > 0 : "Number of bytes are negative or zero : " + bytes;
// if we haven't enough bytes, the loop starts and wait for enough bytes
while (bytes > avai... | java | private long tryWaitForEnoughBytes(final long bytes) throws IOException {
// we can only wait for a positive number of bytes
assert bytes > 0 : "Number of bytes are negative or zero : " + bytes;
// if we haven't enough bytes, the loop starts and wait for enough bytes
while (bytes > avai... | [
"private",
"long",
"tryWaitForEnoughBytes",
"(",
"final",
"long",
"bytes",
")",
"throws",
"IOException",
"{",
"// we can only wait for a positive number of bytes",
"assert",
"bytes",
">",
"0",
":",
"\"Number of bytes are negative or zero : \"",
"+",
"bytes",
";",
"// if we ... | This method blocks until the stream is closed or enough bytes are
available, which can be read from the buffer.
@param bytes the number of bytes waiting for.
@throws IOException If the thread is interrupted.
@return The available bytes. | [
"This",
"method",
"blocks",
"until",
"the",
"stream",
"is",
"closed",
"or",
"enough",
"bytes",
"are",
"available",
"which",
"can",
"be",
"read",
"from",
"the",
"buffer",
"."
] | 46d586c95fc3316c7a92b76a556c932b9346015d | https://github.com/bernardladenthin/streambuffer/blob/46d586c95fc3316c7a92b76a556c932b9346015d/src/main/java/net/ladenthin/streambuffer/StreamBuffer.java#L313-L333 |
148,137 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/nosql/lucene/LuceneKdStorage.java | LuceneKdStorage.createIndexField | protected Field createIndexField(String key, Object value) {
if (key == null || value == null) {
return null;
}
if (value instanceof Boolean) {
return new IntPoint(key, ((Boolean) value).booleanValue() ? 1 : 0);
}
if (value instanceof Character) {
... | java | protected Field createIndexField(String key, Object value) {
if (key == null || value == null) {
return null;
}
if (value instanceof Boolean) {
return new IntPoint(key, ((Boolean) value).booleanValue() ? 1 : 0);
}
if (value instanceof Character) {
... | [
"protected",
"Field",
"createIndexField",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"key",
"==",
"null",
"||",
"value",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"value",
"instanceof",
"Boolean",
")",
"{",
... | Create index field for a document's field value.
<ul>
<li>Boolean: indexed as a {@link IntPoint} with value {@code 1=true/0=false}</li>
<li>Character: indexed as a {@link StringField}</li>
<li>Byte, Short, Integer, Long: indexed as a {@link LongPoint}</li>
<li>Float, Double: indexed as a {@link DoublePoint}</li>
<li>S... | [
"Create",
"index",
"field",
"for",
"a",
"document",
"s",
"field",
"value",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/nosql/lucene/LuceneKdStorage.java#L190-L219 |
148,138 | acromusashi/acromusashi-stream | src/main/java/acromusashi/stream/hook/AmLogServerAdapter.java | AmLogServerAdapter.init | public synchronized void init(int serverPort)
{
if (this.initialized)
{
return;
}
String hostname = null;
try
{
hostname = InetAddress.getLocalHost().getHostName();
}
catch (UnknownHostException ex)
{
logge... | java | public synchronized void init(int serverPort)
{
if (this.initialized)
{
return;
}
String hostname = null;
try
{
hostname = InetAddress.getLocalHost().getHostName();
}
catch (UnknownHostException ex)
{
logge... | [
"public",
"synchronized",
"void",
"init",
"(",
"int",
"serverPort",
")",
"{",
"if",
"(",
"this",
".",
"initialized",
")",
"{",
"return",
";",
"}",
"String",
"hostname",
"=",
"null",
";",
"try",
"{",
"hostname",
"=",
"InetAddress",
".",
"getLocalHost",
"(... | Initialize WebSocket server.
@param serverPort serverPort | [
"Initialize",
"WebSocket",
"server",
"."
] | 65b1f335d771d657c5640a2056ab5c8546eddec9 | https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/hook/AmLogServerAdapter.java#L104-L135 |
148,139 | acromusashi/acromusashi-stream | src/main/java/acromusashi/stream/hook/AmLogServerAdapter.java | AmLogServerAdapter.emit | public void emit(ComponentInfo componentInfo, EmitInfo info)
{
if (this.sessions.size() == 0)
{
return;
}
Date nowTime = new Date();
DateFormat format = new SimpleDateFormat(DATE_PATTERN);
String nowTimeStr = format.format(nowTime);
Map<String, O... | java | public void emit(ComponentInfo componentInfo, EmitInfo info)
{
if (this.sessions.size() == 0)
{
return;
}
Date nowTime = new Date();
DateFormat format = new SimpleDateFormat(DATE_PATTERN);
String nowTimeStr = format.format(nowTime);
Map<String, O... | [
"public",
"void",
"emit",
"(",
"ComponentInfo",
"componentInfo",
",",
"EmitInfo",
"info",
")",
"{",
"if",
"(",
"this",
".",
"sessions",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"return",
";",
"}",
"Date",
"nowTime",
"=",
"new",
"Date",
"(",
")",
... | Log emit info.
@param componentInfo component info
@param info emit info | [
"Log",
"emit",
"info",
"."
] | 65b1f335d771d657c5640a2056ab5c8546eddec9 | https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/hook/AmLogServerAdapter.java#L175-L209 |
148,140 | f2prateek/bundler | bundler/src/main/java/com/f2prateek/bundler/FragmentBundlerCompat.java | FragmentBundlerCompat.create | public static <F extends Fragment> FragmentBundlerCompat<F> create(F fragment) {
return new FragmentBundlerCompat<F>(fragment);
} | java | public static <F extends Fragment> FragmentBundlerCompat<F> create(F fragment) {
return new FragmentBundlerCompat<F>(fragment);
} | [
"public",
"static",
"<",
"F",
"extends",
"Fragment",
">",
"FragmentBundlerCompat",
"<",
"F",
">",
"create",
"(",
"F",
"fragment",
")",
"{",
"return",
"new",
"FragmentBundlerCompat",
"<",
"F",
">",
"(",
"fragment",
")",
";",
"}"
] | Constructs a FragmentBundlerCompat for the provided Fragment instance
@param fragment the fragment instance
@return this bundler instance to chain method calls | [
"Constructs",
"a",
"FragmentBundlerCompat",
"for",
"the",
"provided",
"Fragment",
"instance"
] | 7efaba0541e5b564d5f3de2e7121c53512f5df45 | https://github.com/f2prateek/bundler/blob/7efaba0541e5b564d5f3de2e7121c53512f5df45/bundler/src/main/java/com/f2prateek/bundler/FragmentBundlerCompat.java#L32-L34 |
148,141 | Commonjava/webdav-handler | common/src/main/java/net/sf/webdav/util/RequestUtil.java | RequestUtil.convertHexDigit | private static byte convertHexDigit( final byte b )
{
if ( ( b >= '0' ) && ( b <= '9' ) )
{
return (byte) ( b - '0' );
}
if ( ( b >= 'a' ) && ( b <= 'f' ) )
{
return (byte) ( b - 'a' + 10 );
}
if ( ( b >= 'A' ) && ( b <= 'F' ) )
... | java | private static byte convertHexDigit( final byte b )
{
if ( ( b >= '0' ) && ( b <= '9' ) )
{
return (byte) ( b - '0' );
}
if ( ( b >= 'a' ) && ( b <= 'f' ) )
{
return (byte) ( b - 'a' + 10 );
}
if ( ( b >= 'A' ) && ( b <= 'F' ) )
... | [
"private",
"static",
"byte",
"convertHexDigit",
"(",
"final",
"byte",
"b",
")",
"{",
"if",
"(",
"(",
"b",
">=",
"'",
"'",
")",
"&&",
"(",
"b",
"<=",
"'",
"'",
")",
")",
"{",
"return",
"(",
"byte",
")",
"(",
"b",
"-",
"'",
"'",
")",
";",
"}"... | Convert a byte character value to hexidecimal digit value.
@param b
the character value byte | [
"Convert",
"a",
"byte",
"character",
"value",
"to",
"hexidecimal",
"digit",
"value",
"."
] | 39bb7032fc75c1b67d3f2440dd1c234ead96cb9d | https://github.com/Commonjava/webdav-handler/blob/39bb7032fc75c1b67d3f2440dd1c234ead96cb9d/common/src/main/java/net/sf/webdav/util/RequestUtil.java#L644-L659 |
148,142 | Commonjava/webdav-handler | common/src/main/java/net/sf/webdav/util/RequestUtil.java | RequestUtil.putMapEntry | private static void putMapEntry( final Map<String, String[]> map, final String name, final String value )
{
String[] newValues = null;
final String[] oldValues = map.get( name );
if ( oldValues == null )
{
newValues = new String[1];
newValues[0] = value;
... | java | private static void putMapEntry( final Map<String, String[]> map, final String name, final String value )
{
String[] newValues = null;
final String[] oldValues = map.get( name );
if ( oldValues == null )
{
newValues = new String[1];
newValues[0] = value;
... | [
"private",
"static",
"void",
"putMapEntry",
"(",
"final",
"Map",
"<",
"String",
",",
"String",
"[",
"]",
">",
"map",
",",
"final",
"String",
"name",
",",
"final",
"String",
"value",
")",
"{",
"String",
"[",
"]",
"newValues",
"=",
"null",
";",
"final",
... | Put name and value pair in map. When name already exist, add value to
array of values.
@param map
The map to populate
@param name
The parameter name
@param value
The parameter value | [
"Put",
"name",
"and",
"value",
"pair",
"in",
"map",
".",
"When",
"name",
"already",
"exist",
"add",
"value",
"to",
"array",
"of",
"values",
"."
] | 39bb7032fc75c1b67d3f2440dd1c234ead96cb9d | https://github.com/Commonjava/webdav-handler/blob/39bb7032fc75c1b67d3f2440dd1c234ead96cb9d/common/src/main/java/net/sf/webdav/util/RequestUtil.java#L672-L688 |
148,143 | sematext/ActionGenerator | ag-player-es/src/main/java/com/sematext/ag/es/sink/BulkJSONDataESSink.java | BulkJSONDataESSink.getBulkData | protected String getBulkData(List<SimpleDataEvent> events) {
StringBuilder builder = new StringBuilder();
for (SimpleDataEvent event : events) {
builder.append(JSONUtils.getElasticSearchBulkHeader(event, this.indexName, this.typeName));
builder.append("\n");
builder.append(JSONUtils.getElastic... | java | protected String getBulkData(List<SimpleDataEvent> events) {
StringBuilder builder = new StringBuilder();
for (SimpleDataEvent event : events) {
builder.append(JSONUtils.getElasticSearchBulkHeader(event, this.indexName, this.typeName));
builder.append("\n");
builder.append(JSONUtils.getElastic... | [
"protected",
"String",
"getBulkData",
"(",
"List",
"<",
"SimpleDataEvent",
">",
"events",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"SimpleDataEvent",
"event",
":",
"events",
")",
"{",
"builder",
".",
"appe... | Returns ES bulk data.
@return ES bulk data | [
"Returns",
"ES",
"bulk",
"data",
"."
] | 10f4a3e680f20d7d151f5d40e6758aeb072d474f | https://github.com/sematext/ActionGenerator/blob/10f4a3e680f20d7d151f5d40e6758aeb072d474f/ag-player-es/src/main/java/com/sematext/ag/es/sink/BulkJSONDataESSink.java#L100-L109 |
148,144 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/BaseDataJsonFieldBo.java | BaseDataJsonFieldBo.setDataAttr | public BaseDataJsonFieldBo setDataAttr(String dPath, Object value) {
if (value == null) {
return removeDataAttr(dPath);
}
Lock lock = lockForWrite();
try {
if (dataJson == null || dataJson instanceof MissingNode
|| dataJson instanceof NullNode)... | java | public BaseDataJsonFieldBo setDataAttr(String dPath, Object value) {
if (value == null) {
return removeDataAttr(dPath);
}
Lock lock = lockForWrite();
try {
if (dataJson == null || dataJson instanceof MissingNode
|| dataJson instanceof NullNode)... | [
"public",
"BaseDataJsonFieldBo",
"setDataAttr",
"(",
"String",
"dPath",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"removeDataAttr",
"(",
"dPath",
")",
";",
"}",
"Lock",
"lock",
"=",
"lockForWrite",
"(",
")",
... | Set a "data"'s sub-attribute using d-path.
@param dPath
@param value
@return
@see DPathUtils | [
"Set",
"a",
"data",
"s",
"sub",
"-",
"attribute",
"using",
"d",
"-",
"path",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/BaseDataJsonFieldBo.java#L187-L209 |
148,145 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/BaseDataJsonFieldBo.java | BaseDataJsonFieldBo.removeDataAttr | public BaseDataJsonFieldBo removeDataAttr(String dPath) {
Lock lock = lockForWrite();
try {
JacksonUtils.deleteValue(dataJson, dPath);
return (BaseDataJsonFieldBo) setAttribute(ATTR_DATA,
SerializationUtils.toJsonString(dataJson), false);
} finally {
... | java | public BaseDataJsonFieldBo removeDataAttr(String dPath) {
Lock lock = lockForWrite();
try {
JacksonUtils.deleteValue(dataJson, dPath);
return (BaseDataJsonFieldBo) setAttribute(ATTR_DATA,
SerializationUtils.toJsonString(dataJson), false);
} finally {
... | [
"public",
"BaseDataJsonFieldBo",
"removeDataAttr",
"(",
"String",
"dPath",
")",
"{",
"Lock",
"lock",
"=",
"lockForWrite",
"(",
")",
";",
"try",
"{",
"JacksonUtils",
".",
"deleteValue",
"(",
"dataJson",
",",
"dPath",
")",
";",
"return",
"(",
"BaseDataJsonFieldB... | Remove a "data"'s sub-attribute using d-path.
@param dPath
@return
@since 0.10.0 | [
"Remove",
"a",
"data",
"s",
"sub",
"-",
"attribute",
"using",
"d",
"-",
"path",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/BaseDataJsonFieldBo.java#L218-L227 |
148,146 | tehuti-io/tehuti | src/main/java/io/tehuti/metrics/stats/SampledStat.java | SampledStat.checkInit | private void checkInit(MetricConfig config, long now) {
if (samples.size() == 0) {
this.samples.add(newSample(now));
this.samples.add(newSample(now - config.timeWindowMs()));
}
} | java | private void checkInit(MetricConfig config, long now) {
if (samples.size() == 0) {
this.samples.add(newSample(now));
this.samples.add(newSample(now - config.timeWindowMs()));
}
} | [
"private",
"void",
"checkInit",
"(",
"MetricConfig",
"config",
",",
"long",
"now",
")",
"{",
"if",
"(",
"samples",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"this",
".",
"samples",
".",
"add",
"(",
"newSample",
"(",
"now",
")",
")",
";",
"this",
... | Checks that the sample windows are properly initialized.
In case there are no initialized sample yet, this creates two windows: one that begins now, as well as the
previous window before that. This ensures that any measurement won't be calculated over an elapsed time of zero
or few milliseconds. This is particularly s... | [
"Checks",
"that",
"the",
"sample",
"windows",
"are",
"properly",
"initialized",
"."
] | c28a2f838eac775660efb270aafd2a464d712948 | https://github.com/tehuti-io/tehuti/blob/c28a2f838eac775660efb270aafd2a464d712948/src/main/java/io/tehuti/metrics/stats/SampledStat.java#L111-L116 |
148,147 | tehuti-io/tehuti | src/main/java/io/tehuti/metrics/stats/SampledStat.java | SampledStat.purgeObsoleteSamples | protected void purgeObsoleteSamples(MetricConfig config, long now) {
long expireAge = config.samples() * config.timeWindowMs();
for (int i = 0; i < samples.size(); i++) {
Sample sample = this.samples.get(i);
if (now - sample.lastWindowMs >= expireAge) {
// The sam... | java | protected void purgeObsoleteSamples(MetricConfig config, long now) {
long expireAge = config.samples() * config.timeWindowMs();
for (int i = 0; i < samples.size(); i++) {
Sample sample = this.samples.get(i);
if (now - sample.lastWindowMs >= expireAge) {
// The sam... | [
"protected",
"void",
"purgeObsoleteSamples",
"(",
"MetricConfig",
"config",
",",
"long",
"now",
")",
"{",
"long",
"expireAge",
"=",
"config",
".",
"samples",
"(",
")",
"*",
"config",
".",
"timeWindowMs",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
... | Timeout any windows that have expired in the absence of any events | [
"Timeout",
"any",
"windows",
"that",
"have",
"expired",
"in",
"the",
"absence",
"of",
"any",
"events"
] | c28a2f838eac775660efb270aafd2a464d712948 | https://github.com/tehuti-io/tehuti/blob/c28a2f838eac775660efb270aafd2a464d712948/src/main/java/io/tehuti/metrics/stats/SampledStat.java#L125-L141 |
148,148 | fuinorg/objects4j | src/main/java/org/fuin/objects4j/ui/TableColumnInfo.java | TableColumnInfo.create | public static List<TableColumnInfo> create(@NotNull final Class<?> clasz, @NotNull final Locale locale) {
Contract.requireArgNotNull("clasz", clasz);
Contract.requireArgNotNull("locale", locale);
final List<TableColumnInfo> list = new ArrayList<TableColumnInfo>();
final Field[] f... | java | public static List<TableColumnInfo> create(@NotNull final Class<?> clasz, @NotNull final Locale locale) {
Contract.requireArgNotNull("clasz", clasz);
Contract.requireArgNotNull("locale", locale);
final List<TableColumnInfo> list = new ArrayList<TableColumnInfo>();
final Field[] f... | [
"public",
"static",
"List",
"<",
"TableColumnInfo",
">",
"create",
"(",
"@",
"NotNull",
"final",
"Class",
"<",
"?",
">",
"clasz",
",",
"@",
"NotNull",
"final",
"Locale",
"locale",
")",
"{",
"Contract",
".",
"requireArgNotNull",
"(",
"\"clasz\"",
",",
"clas... | Return a list of table column informations for the given class.
@param clasz
Class to check for <code>@TableColumn</code> and <code>@Label</code> annotations.
@param locale
Locale to use.
@return List of table columns sorted by the position. | [
"Return",
"a",
"list",
"of",
"table",
"column",
"informations",
"for",
"the",
"given",
"class",
"."
] | e7f278b5bae073ebb6a76053650571c718f36246 | https://github.com/fuinorg/objects4j/blob/e7f278b5bae073ebb6a76053650571c718f36246/src/main/java/org/fuin/objects4j/ui/TableColumnInfo.java#L214-L229 |
148,149 | fuinorg/objects4j | src/main/java/org/fuin/objects4j/ui/TableColumnInfo.java | TableColumnInfo.create | public static TableColumnInfo create(@NotNull final Field field, @NotNull final Locale locale) {
Contract.requireArgNotNull("field", field);
Contract.requireArgNotNull("locale", locale);
final TableColumn tableColumn = field.getAnnotation(TableColumn.class);
if (tableColumn == nu... | java | public static TableColumnInfo create(@NotNull final Field field, @NotNull final Locale locale) {
Contract.requireArgNotNull("field", field);
Contract.requireArgNotNull("locale", locale);
final TableColumn tableColumn = field.getAnnotation(TableColumn.class);
if (tableColumn == nu... | [
"public",
"static",
"TableColumnInfo",
"create",
"(",
"@",
"NotNull",
"final",
"Field",
"field",
",",
"@",
"NotNull",
"final",
"Locale",
"locale",
")",
"{",
"Contract",
".",
"requireArgNotNull",
"(",
"\"field\"",
",",
"field",
")",
";",
"Contract",
".",
"req... | Return the table column information for a given field.
@param field
Field to check for <code>@TableColumn</code> and <code>@Label</code> annotations.
@param locale
Locale to use.
@return Information or <code>null</code>. | [
"Return",
"the",
"table",
"column",
"information",
"for",
"a",
"given",
"field",
"."
] | e7f278b5bae073ebb6a76053650571c718f36246 | https://github.com/fuinorg/objects4j/blob/e7f278b5bae073ebb6a76053650571c718f36246/src/main/java/org/fuin/objects4j/ui/TableColumnInfo.java#L241-L281 |
148,150 | Commonjava/webdav-handler | common/src/main/java/net/sf/webdav/methods/DoCopy.java | DoCopy.parseDestinationHeader | private String parseDestinationHeader( final WebdavRequest req, final WebdavResponse resp )
throws IOException
{
String destinationPath = req.getHeader( "Destination" );
if ( destinationPath == null )
{
resp.sendError( WebdavStatus.SC_BAD_REQUEST );
return nu... | java | private String parseDestinationHeader( final WebdavRequest req, final WebdavResponse resp )
throws IOException
{
String destinationPath = req.getHeader( "Destination" );
if ( destinationPath == null )
{
resp.sendError( WebdavStatus.SC_BAD_REQUEST );
return nu... | [
"private",
"String",
"parseDestinationHeader",
"(",
"final",
"WebdavRequest",
"req",
",",
"final",
"WebdavResponse",
"resp",
")",
"throws",
"IOException",
"{",
"String",
"destinationPath",
"=",
"req",
".",
"getHeader",
"(",
"\"Destination\"",
")",
";",
"if",
"(",
... | Parses and normalizes the destination header.
@param req
Servlet request
@param resp
Servlet response
@return destinationPath
@throws IOException
if an error occurs while sending response | [
"Parses",
"and",
"normalizes",
"the",
"destination",
"header",
"."
] | 39bb7032fc75c1b67d3f2440dd1c234ead96cb9d | https://github.com/Commonjava/webdav-handler/blob/39bb7032fc75c1b67d3f2440dd1c234ead96cb9d/common/src/main/java/net/sf/webdav/methods/DoCopy.java#L416-L493 |
148,151 | f2prateek/bundler | bundler/src/main/java/com/f2prateek/bundler/FragmentBundler.java | FragmentBundler.create | public static <F extends Fragment> FragmentBundler<F> create(F fragment) {
return new FragmentBundler<F>(fragment);
} | java | public static <F extends Fragment> FragmentBundler<F> create(F fragment) {
return new FragmentBundler<F>(fragment);
} | [
"public",
"static",
"<",
"F",
"extends",
"Fragment",
">",
"FragmentBundler",
"<",
"F",
">",
"create",
"(",
"F",
"fragment",
")",
"{",
"return",
"new",
"FragmentBundler",
"<",
"F",
">",
"(",
"fragment",
")",
";",
"}"
] | Constructs a FragmentBundler for the provided Fragment instance
@param fragment the fragment instance
@return this bundler instance to chain method calls | [
"Constructs",
"a",
"FragmentBundler",
"for",
"the",
"provided",
"Fragment",
"instance"
] | 7efaba0541e5b564d5f3de2e7121c53512f5df45 | https://github.com/f2prateek/bundler/blob/7efaba0541e5b564d5f3de2e7121c53512f5df45/bundler/src/main/java/com/f2prateek/bundler/FragmentBundler.java#L31-L33 |
148,152 | f2prateek/bundler | bundler/src/main/java/com/f2prateek/bundler/FragmentBundler.java | FragmentBundler.create | public static <F extends Fragment> FragmentBundler<F> create(Class<F> klass) {
try {
return create(klass.newInstance());
} catch (InstantiationException e) {
throw new IllegalArgumentException("Class must have a no-arguments constructor.");
} catch (IllegalAccessException e) {
throw new Il... | java | public static <F extends Fragment> FragmentBundler<F> create(Class<F> klass) {
try {
return create(klass.newInstance());
} catch (InstantiationException e) {
throw new IllegalArgumentException("Class must have a no-arguments constructor.");
} catch (IllegalAccessException e) {
throw new Il... | [
"public",
"static",
"<",
"F",
"extends",
"Fragment",
">",
"FragmentBundler",
"<",
"F",
">",
"create",
"(",
"Class",
"<",
"F",
">",
"klass",
")",
"{",
"try",
"{",
"return",
"create",
"(",
"klass",
".",
"newInstance",
"(",
")",
")",
";",
"}",
"catch",
... | Constructs a FragmentBundler for the provided Fragment class
@param klass the fragment class
@return this bundler instance to chain method calls | [
"Constructs",
"a",
"FragmentBundler",
"for",
"the",
"provided",
"Fragment",
"class"
] | 7efaba0541e5b564d5f3de2e7121c53512f5df45 | https://github.com/f2prateek/bundler/blob/7efaba0541e5b564d5f3de2e7121c53512f5df45/bundler/src/main/java/com/f2prateek/bundler/FragmentBundler.java#L41-L49 |
148,153 | sematext/ActionGenerator | ag-player/src/main/java/com/sematext/ag/config/Configurable.java | Configurable.init | public void init() {
String fileName = null;
try {
fileName = System.getProperty(SYSTEM_PROPERTY);
if (fileName == null) {
LOG.info("User file configuration not provided, reading default file.");
readConfiguration(getClass().getResourceAsStream(DEFAULT_FILE_NAME));
} else {
... | java | public void init() {
String fileName = null;
try {
fileName = System.getProperty(SYSTEM_PROPERTY);
if (fileName == null) {
LOG.info("User file configuration not provided, reading default file.");
readConfiguration(getClass().getResourceAsStream(DEFAULT_FILE_NAME));
} else {
... | [
"public",
"void",
"init",
"(",
")",
"{",
"String",
"fileName",
"=",
"null",
";",
"try",
"{",
"fileName",
"=",
"System",
".",
"getProperty",
"(",
"SYSTEM_PROPERTY",
")",
";",
"if",
"(",
"fileName",
"==",
"null",
")",
"{",
"LOG",
".",
"info",
"(",
"\"U... | Initializes configuration.
@throws IOException
thrown when initialization error occurs | [
"Initializes",
"configuration",
"."
] | 10f4a3e680f20d7d151f5d40e6758aeb072d474f | https://github.com/sematext/ActionGenerator/blob/10f4a3e680f20d7d151f5d40e6758aeb072d474f/ag-player/src/main/java/com/sematext/ag/config/Configurable.java#L45-L65 |
148,154 | acromusashi/acromusashi-stream | src/main/java/acromusashi/stream/entity/StreamMessage.java | StreamMessage.addField | @SuppressWarnings({"unchecked", "rawtypes"})
public void addField(String key, Object value)
{
if (this.body == null || Map.class.isAssignableFrom(this.body.getClass()) == false)
{
this.body = Maps.newLinkedHashMap();
}
((Map) this.body).put(key, value);
} | java | @SuppressWarnings({"unchecked", "rawtypes"})
public void addField(String key, Object value)
{
if (this.body == null || Map.class.isAssignableFrom(this.body.getClass()) == false)
{
this.body = Maps.newLinkedHashMap();
}
((Map) this.body).put(key, value);
} | [
"@",
"SuppressWarnings",
"(",
"{",
"\"unchecked\"",
",",
"\"rawtypes\"",
"}",
")",
"public",
"void",
"addField",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"this",
".",
"body",
"==",
"null",
"||",
"Map",
".",
"class",
".",
"isAs... | Add field to message body.
@param key key
@param value value | [
"Add",
"field",
"to",
"message",
"body",
"."
] | 65b1f335d771d657c5640a2056ab5c8546eddec9 | https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/entity/StreamMessage.java#L94-L103 |
148,155 | acromusashi/acromusashi-stream | src/main/java/acromusashi/stream/entity/StreamMessage.java | StreamMessage.getField | @SuppressWarnings("rawtypes")
public Object getField(String key)
{
if (this.body == null || Map.class.isAssignableFrom(this.body.getClass()) == false)
{
return null;
}
return ((Map) this.body).get(key);
} | java | @SuppressWarnings("rawtypes")
public Object getField(String key)
{
if (this.body == null || Map.class.isAssignableFrom(this.body.getClass()) == false)
{
return null;
}
return ((Map) this.body).get(key);
} | [
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"public",
"Object",
"getField",
"(",
"String",
"key",
")",
"{",
"if",
"(",
"this",
".",
"body",
"==",
"null",
"||",
"Map",
".",
"class",
".",
"isAssignableFrom",
"(",
"this",
".",
"body",
".",
"getClass"... | Get field from message body.
@param key key
@return field mapped key | [
"Get",
"field",
"from",
"message",
"body",
"."
] | 65b1f335d771d657c5640a2056ab5c8546eddec9 | https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/entity/StreamMessage.java#L111-L120 |
148,156 | Commonjava/webdav-handler | common/src/main/java/net/sf/webdav/util/XMLWriter.java | XMLWriter.writeProperty | public void writeProperty(String name, String value) {
writeElement(name, OPENING);
_buffer.append(value);
writeElement(name, CLOSING);
} | java | public void writeProperty(String name, String value) {
writeElement(name, OPENING);
_buffer.append(value);
writeElement(name, CLOSING);
} | [
"public",
"void",
"writeProperty",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"writeElement",
"(",
"name",
",",
"OPENING",
")",
";",
"_buffer",
".",
"append",
"(",
"value",
")",
";",
"writeElement",
"(",
"name",
",",
"CLOSING",
")",
";",
... | Write property to the XML.
@param name
Property name
@param value
Property value | [
"Write",
"property",
"to",
"the",
"XML",
"."
] | 39bb7032fc75c1b67d3f2440dd1c234ead96cb9d | https://github.com/Commonjava/webdav-handler/blob/39bb7032fc75c1b67d3f2440dd1c234ead96cb9d/common/src/main/java/net/sf/webdav/util/XMLWriter.java#L106-L110 |
148,157 | Commonjava/webdav-handler | common/src/main/java/net/sf/webdav/util/XMLWriter.java | XMLWriter.writeData | public void writeData(String data) {
_buffer.append("<![CDATA[");
_buffer.append( data);
_buffer.append( "]]>");
} | java | public void writeData(String data) {
_buffer.append("<![CDATA[");
_buffer.append( data);
_buffer.append( "]]>");
} | [
"public",
"void",
"writeData",
"(",
"String",
"data",
")",
"{",
"_buffer",
".",
"append",
"(",
"\"<![CDATA[\"",
")",
";",
"_buffer",
".",
"append",
"(",
"data",
")",
";",
"_buffer",
".",
"append",
"(",
"\"]]>\"",
")",
";",
"}"
] | Write data.
@param data
Data to append | [
"Write",
"data",
"."
] | 39bb7032fc75c1b67d3f2440dd1c234ead96cb9d | https://github.com/Commonjava/webdav-handler/blob/39bb7032fc75c1b67d3f2440dd1c234ead96cb9d/common/src/main/java/net/sf/webdav/util/XMLWriter.java#L200-L204 |
148,158 | RestComm/jain-slee.xcap | resources/xcap-client/ra/src/main/java/org/restcomm/slee/resource/xcapclient/XCAPClientResourceAdaptor.java | XCAPClientResourceAdaptor.processResponseEvent | public void processResponseEvent(FireableEventType eventType, ResponseEvent event, XCAPResourceAdaptorActivityHandle handle){
if (tracer.isFineEnabled()) {
tracer.fine("NEW RESPONSE EVENT");
}
try {
... | java | public void processResponseEvent(FireableEventType eventType, ResponseEvent event, XCAPResourceAdaptorActivityHandle handle){
if (tracer.isFineEnabled()) {
tracer.fine("NEW RESPONSE EVENT");
}
try {
... | [
"public",
"void",
"processResponseEvent",
"(",
"FireableEventType",
"eventType",
",",
"ResponseEvent",
"event",
",",
"XCAPResourceAdaptorActivityHandle",
"handle",
")",
"{",
"if",
"(",
"tracer",
".",
"isFineEnabled",
"(",
")",
")",
"{",
"tracer",
".",
"fine",
"(",... | Receives an Event and sends it to the SLEE
@param event
@param handle | [
"Receives",
"an",
"Event",
"and",
"sends",
"it",
"to",
"the",
"SLEE"
] | 0caa9ab481a545e52c31401f19e99bdfbbfb7bf0 | https://github.com/RestComm/jain-slee.xcap/blob/0caa9ab481a545e52c31401f19e99bdfbbfb7bf0/resources/xcap-client/ra/src/main/java/org/restcomm/slee/resource/xcapclient/XCAPClientResourceAdaptor.java#L184-L195 |
148,159 | Lucas3oo/jicunit | src/jicunit-framework/src/main/java/org/jicunit/framework/internal/webrunner/ViewBase.java | ViewBase.run | protected void run(List<TestDescription> selectedTests) {
mRunning = true;
mTotalTestCount = selectedTests.size();
mRunnerBean.run(this, selectedTests);
} | java | protected void run(List<TestDescription> selectedTests) {
mRunning = true;
mTotalTestCount = selectedTests.size();
mRunnerBean.run(this, selectedTests);
} | [
"protected",
"void",
"run",
"(",
"List",
"<",
"TestDescription",
">",
"selectedTests",
")",
"{",
"mRunning",
"=",
"true",
";",
"mTotalTestCount",
"=",
"selectedTests",
".",
"size",
"(",
")",
";",
"mRunnerBean",
".",
"run",
"(",
"this",
",",
"selectedTests",
... | Start running the tests
@param selectedTests | [
"Start",
"running",
"the",
"tests"
] | 1ed41891ccf8e5c6068c6b544d214280bb93945b | https://github.com/Lucas3oo/jicunit/blob/1ed41891ccf8e5c6068c6b544d214280bb93945b/src/jicunit-framework/src/main/java/org/jicunit/framework/internal/webrunner/ViewBase.java#L123-L127 |
148,160 | Lucas3oo/jicunit | src/jicunit-framework/src/main/java/org/jicunit/framework/internal/webrunner/ViewBase.java | ViewBase.runSelected | protected void runSelected() {
List<TestDescription> selectedTests = getSelectedTests();
if (selectedTests != null) {
List<TestDescription> selectedTestsIncludedLeafs = new ArrayList<>();
for (TestDescription desc : selectedTests) {
includeAllLeafs(desc, selectedTestsIncludedLeafs);
}
... | java | protected void runSelected() {
List<TestDescription> selectedTests = getSelectedTests();
if (selectedTests != null) {
List<TestDescription> selectedTestsIncludedLeafs = new ArrayList<>();
for (TestDescription desc : selectedTests) {
includeAllLeafs(desc, selectedTestsIncludedLeafs);
}
... | [
"protected",
"void",
"runSelected",
"(",
")",
"{",
"List",
"<",
"TestDescription",
">",
"selectedTests",
"=",
"getSelectedTests",
"(",
")",
";",
"if",
"(",
"selectedTests",
"!=",
"null",
")",
"{",
"List",
"<",
"TestDescription",
">",
"selectedTestsIncludedLeafs"... | Execute the selected tests | [
"Execute",
"the",
"selected",
"tests"
] | 1ed41891ccf8e5c6068c6b544d214280bb93945b | https://github.com/Lucas3oo/jicunit/blob/1ed41891ccf8e5c6068c6b544d214280bb93945b/src/jicunit-framework/src/main/java/org/jicunit/framework/internal/webrunner/ViewBase.java#L139-L149 |
148,161 | fuinorg/objects4j | src/main/java/org/fuin/objects4j/vo/EmailAddressStrValidator.java | EmailAddressStrValidator.isValid | public static boolean isValid(final String value) {
if (value == null) {
return true;
}
if (value.length() == 0) {
return false;
}
try {
InternetAddress.parse(value, false);
return true;
} catch (final AddressException ex) {... | java | public static boolean isValid(final String value) {
if (value == null) {
return true;
}
if (value.length() == 0) {
return false;
}
try {
InternetAddress.parse(value, false);
return true;
} catch (final AddressException ex) {... | [
"public",
"static",
"boolean",
"isValid",
"(",
"final",
"String",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"value",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"false",
";",
... | Check that a given string is a well-formed email address.
@param value
Value to check.
@return Returns <code>true</code> if it's a valid email address else <code>false</code> is returned. | [
"Check",
"that",
"a",
"given",
"string",
"is",
"a",
"well",
"-",
"formed",
"email",
"address",
"."
] | e7f278b5bae073ebb6a76053650571c718f36246 | https://github.com/fuinorg/objects4j/blob/e7f278b5bae073ebb6a76053650571c718f36246/src/main/java/org/fuin/objects4j/vo/EmailAddressStrValidator.java#L51-L64 |
148,162 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/BaseJsonBo.java | BaseJsonBo.setSubAttr | public BaseJsonBo setSubAttr(String attrName, String dPath, Object value) {
if (value == null) {
return removeSubAttr(attrName, dPath);
}
Lock lock = lockForWrite();
try {
JsonNode attr = cacheJsonObjs.get(attrName);
if (attr == null) {
... | java | public BaseJsonBo setSubAttr(String attrName, String dPath, Object value) {
if (value == null) {
return removeSubAttr(attrName, dPath);
}
Lock lock = lockForWrite();
try {
JsonNode attr = cacheJsonObjs.get(attrName);
if (attr == null) {
... | [
"public",
"BaseJsonBo",
"setSubAttr",
"(",
"String",
"attrName",
",",
"String",
"dPath",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"removeSubAttr",
"(",
"attrName",
",",
"dPath",
")",
";",
"}",
"Lock",
"lock"... | Set a sub-attribute.
@param attrName
@param value
@return | [
"Set",
"a",
"sub",
"-",
"attribute",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/BaseJsonBo.java#L201-L224 |
148,163 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/BaseJsonBo.java | BaseJsonBo.removeSubAttr | public BaseJsonBo removeSubAttr(String attrName, String dPath) {
Lock lock = lockForWrite();
try {
JsonNode attr = cacheJsonObjs.get(attrName);
JacksonUtils.deleteValue(attr, dPath);
return (BaseJsonBo) setAttribute(attrName, SerializationUtils.toJsonString(attr),
... | java | public BaseJsonBo removeSubAttr(String attrName, String dPath) {
Lock lock = lockForWrite();
try {
JsonNode attr = cacheJsonObjs.get(attrName);
JacksonUtils.deleteValue(attr, dPath);
return (BaseJsonBo) setAttribute(attrName, SerializationUtils.toJsonString(attr),
... | [
"public",
"BaseJsonBo",
"removeSubAttr",
"(",
"String",
"attrName",
",",
"String",
"dPath",
")",
"{",
"Lock",
"lock",
"=",
"lockForWrite",
"(",
")",
";",
"try",
"{",
"JsonNode",
"attr",
"=",
"cacheJsonObjs",
".",
"get",
"(",
"attrName",
")",
";",
"JacksonU... | Remove a sub-attribute.
@param attrName
@param dPath
@return | [
"Remove",
"a",
"sub",
"-",
"attribute",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/BaseJsonBo.java#L233-L243 |
148,164 | cryptomator/native-functions | JNI/src/main/java/org/cryptomator/jni/MacKeychainAccess.java | MacKeychainAccess.storePassword | public void storePassword(String account, CharSequence password) {
ByteBuffer pwBuf = UTF_8.encode(CharBuffer.wrap(password));
byte[] pwBytes = new byte[pwBuf.remaining()];
pwBuf.get(pwBytes);
int errorCode = storePassword0(account.getBytes(UTF_8), pwBytes);
Arrays.fill(pwBytes, (byte) 0x00);
Arrays.fill(pw... | java | public void storePassword(String account, CharSequence password) {
ByteBuffer pwBuf = UTF_8.encode(CharBuffer.wrap(password));
byte[] pwBytes = new byte[pwBuf.remaining()];
pwBuf.get(pwBytes);
int errorCode = storePassword0(account.getBytes(UTF_8), pwBytes);
Arrays.fill(pwBytes, (byte) 0x00);
Arrays.fill(pw... | [
"public",
"void",
"storePassword",
"(",
"String",
"account",
",",
"CharSequence",
"password",
")",
"{",
"ByteBuffer",
"pwBuf",
"=",
"UTF_8",
".",
"encode",
"(",
"CharBuffer",
".",
"wrap",
"(",
"password",
")",
")",
";",
"byte",
"[",
"]",
"pwBytes",
"=",
... | Associates the specified password with the specified key in the system keychain.
@param account Unique account identifier
@param password Passphrase to store | [
"Associates",
"the",
"specified",
"password",
"with",
"the",
"specified",
"key",
"in",
"the",
"system",
"keychain",
"."
] | 764cb1edbffbc2a4129c71011941adcbd4c12292 | https://github.com/cryptomator/native-functions/blob/764cb1edbffbc2a4129c71011941adcbd4c12292/JNI/src/main/java/org/cryptomator/jni/MacKeychainAccess.java#L28-L38 |
148,165 | cryptomator/native-functions | JNI/src/main/java/org/cryptomator/jni/MacKeychainAccess.java | MacKeychainAccess.loadPassword | public char[] loadPassword(String account) {
byte[] pwBytes = loadPassword0(account.getBytes(UTF_8));
if (pwBytes == null) {
return null;
} else {
CharBuffer pwBuf = UTF_8.decode(ByteBuffer.wrap(pwBytes));
char[] pw = new char[pwBuf.remaining()];
pwBuf.get(pw);
Arrays.fill(pwBytes, (byte) 0x00);
... | java | public char[] loadPassword(String account) {
byte[] pwBytes = loadPassword0(account.getBytes(UTF_8));
if (pwBytes == null) {
return null;
} else {
CharBuffer pwBuf = UTF_8.decode(ByteBuffer.wrap(pwBytes));
char[] pw = new char[pwBuf.remaining()];
pwBuf.get(pw);
Arrays.fill(pwBytes, (byte) 0x00);
... | [
"public",
"char",
"[",
"]",
"loadPassword",
"(",
"String",
"account",
")",
"{",
"byte",
"[",
"]",
"pwBytes",
"=",
"loadPassword0",
"(",
"account",
".",
"getBytes",
"(",
"UTF_8",
")",
")",
";",
"if",
"(",
"pwBytes",
"==",
"null",
")",
"{",
"return",
"... | Loads the password associated with the specified key from the system keychain.
@param account Unique account identifier
@return password or <code>null</code> if no such keychain entry could be loaded from the keychain. | [
"Loads",
"the",
"password",
"associated",
"with",
"the",
"specified",
"key",
"from",
"the",
"system",
"keychain",
"."
] | 764cb1edbffbc2a4129c71011941adcbd4c12292 | https://github.com/cryptomator/native-functions/blob/764cb1edbffbc2a4129c71011941adcbd4c12292/JNI/src/main/java/org/cryptomator/jni/MacKeychainAccess.java#L48-L60 |
148,166 | cryptomator/native-functions | JNI/src/main/java/org/cryptomator/jni/MacKeychainAccess.java | MacKeychainAccess.deletePassword | public boolean deletePassword(String account) {
int errorCode = deletePassword0(account.getBytes(UTF_8));
if (errorCode == OSSTATUS_SUCCESS) {
return true;
} else if (errorCode == OSSTATUS_NOT_FOUND) {
return false;
} else {
throw new JniException("Failed to delete password. Error code " + errorCode);
... | java | public boolean deletePassword(String account) {
int errorCode = deletePassword0(account.getBytes(UTF_8));
if (errorCode == OSSTATUS_SUCCESS) {
return true;
} else if (errorCode == OSSTATUS_NOT_FOUND) {
return false;
} else {
throw new JniException("Failed to delete password. Error code " + errorCode);
... | [
"public",
"boolean",
"deletePassword",
"(",
"String",
"account",
")",
"{",
"int",
"errorCode",
"=",
"deletePassword0",
"(",
"account",
".",
"getBytes",
"(",
"UTF_8",
")",
")",
";",
"if",
"(",
"errorCode",
"==",
"OSSTATUS_SUCCESS",
")",
"{",
"return",
"true",... | Deletes the password associated with the specified key from the system keychain.
@param account Unique account identifier
@return <code>true</code> if the passwords has been deleted, <code>false</code> if no entry for the given key exists. | [
"Deletes",
"the",
"password",
"associated",
"with",
"the",
"specified",
"key",
"from",
"the",
"system",
"keychain",
"."
] | 764cb1edbffbc2a4129c71011941adcbd4c12292 | https://github.com/cryptomator/native-functions/blob/764cb1edbffbc2a4129c71011941adcbd4c12292/JNI/src/main/java/org/cryptomator/jni/MacKeychainAccess.java#L70-L79 |
148,167 | nuun-io/kernel | core/src/main/java/io/nuun/kernel/core/internal/scanner/inmemory/ClasspathScannerInMemory.java | ClasspathScannerInMemory.actualInitReflections | private void actualInitReflections() {
ConfigurationBuilder configurationBuilder = configurationBuilder()
.setScanners(getScanners())
.setMetadataAdapter(new MetadataAdapterInMemory());
InMemoryFactory factory = new InMemoryFactory();
for (ClasspathAbstract... | java | private void actualInitReflections() {
ConfigurationBuilder configurationBuilder = configurationBuilder()
.setScanners(getScanners())
.setMetadataAdapter(new MetadataAdapterInMemory());
InMemoryFactory factory = new InMemoryFactory();
for (ClasspathAbstract... | [
"private",
"void",
"actualInitReflections",
"(",
")",
"{",
"ConfigurationBuilder",
"configurationBuilder",
"=",
"configurationBuilder",
"(",
")",
".",
"setScanners",
"(",
"getScanners",
"(",
")",
")",
".",
"setMetadataAdapter",
"(",
"new",
"MetadataAdapterInMemory",
"... | Its too soon to create reflections in the constructor | [
"Its",
"too",
"soon",
"to",
"create",
"reflections",
"in",
"the",
"constructor"
] | 116a7664fe2a9323e280574803d273699a333732 | https://github.com/nuun-io/kernel/blob/116a7664fe2a9323e280574803d273699a333732/core/src/main/java/io/nuun/kernel/core/internal/scanner/inmemory/ClasspathScannerInMemory.java#L47-L67 |
148,168 | Commonjava/webdav-handler | common/src/main/java/net/sf/webdav/methods/DoLock.java | DoLock.executeLock | private void executeLock( final ITransaction transaction, final WebdavRequest req, final WebdavResponse resp )
throws LockFailedException, IOException, WebdavException
{
// Mac OS lock request workaround
if ( _macLockRequest )
{
LOG.trace( "DoLock.execute() : do workarou... | java | private void executeLock( final ITransaction transaction, final WebdavRequest req, final WebdavResponse resp )
throws LockFailedException, IOException, WebdavException
{
// Mac OS lock request workaround
if ( _macLockRequest )
{
LOG.trace( "DoLock.execute() : do workarou... | [
"private",
"void",
"executeLock",
"(",
"final",
"ITransaction",
"transaction",
",",
"final",
"WebdavRequest",
"req",
",",
"final",
"WebdavResponse",
"resp",
")",
"throws",
"LockFailedException",
",",
"IOException",
",",
"WebdavException",
"{",
"// Mac OS lock request wo... | Executes the LOCK | [
"Executes",
"the",
"LOCK"
] | 39bb7032fc75c1b67d3f2440dd1c234ead96cb9d | https://github.com/Commonjava/webdav-handler/blob/39bb7032fc75c1b67d3f2440dd1c234ead96cb9d/common/src/main/java/net/sf/webdav/methods/DoLock.java#L328-L384 |
148,169 | Commonjava/webdav-handler | common/src/main/java/net/sf/webdav/methods/DoLock.java | DoLock.getTimeout | private int getTimeout( final ITransaction transaction, final WebdavRequest req )
{
int lockDuration = DEFAULT_TIMEOUT;
String lockDurationStr = req.getHeader( "Timeout" );
if ( lockDurationStr == null )
{
lockDuration = DEFAULT_TIMEOUT;
}
else
{... | java | private int getTimeout( final ITransaction transaction, final WebdavRequest req )
{
int lockDuration = DEFAULT_TIMEOUT;
String lockDurationStr = req.getHeader( "Timeout" );
if ( lockDurationStr == null )
{
lockDuration = DEFAULT_TIMEOUT;
}
else
{... | [
"private",
"int",
"getTimeout",
"(",
"final",
"ITransaction",
"transaction",
",",
"final",
"WebdavRequest",
"req",
")",
"{",
"int",
"lockDuration",
"=",
"DEFAULT_TIMEOUT",
";",
"String",
"lockDurationStr",
"=",
"req",
".",
"getHeader",
"(",
"\"Timeout\"",
")",
"... | Ties to read the timeout from request | [
"Ties",
"to",
"read",
"the",
"timeout",
"from",
"request"
] | 39bb7032fc75c1b67d3f2440dd1c234ead96cb9d | https://github.com/Commonjava/webdav-handler/blob/39bb7032fc75c1b67d3f2440dd1c234ead96cb9d/common/src/main/java/net/sf/webdav/methods/DoLock.java#L551-L601 |
148,170 | Commonjava/webdav-handler | common/src/main/java/net/sf/webdav/methods/DoLock.java | DoLock.generateXMLReport | private void generateXMLReport( final ITransaction transaction, final WebdavResponse resp, final LockedObject lo )
throws IOException
{
final HashMap<String, String> namespaces = new HashMap<String, String>();
namespaces.put( "DAV:", "D" );
resp.setStatus( SC_OK );
resp.set... | java | private void generateXMLReport( final ITransaction transaction, final WebdavResponse resp, final LockedObject lo )
throws IOException
{
final HashMap<String, String> namespaces = new HashMap<String, String>();
namespaces.put( "DAV:", "D" );
resp.setStatus( SC_OK );
resp.set... | [
"private",
"void",
"generateXMLReport",
"(",
"final",
"ITransaction",
"transaction",
",",
"final",
"WebdavResponse",
"resp",
",",
"final",
"LockedObject",
"lo",
")",
"throws",
"IOException",
"{",
"final",
"HashMap",
"<",
"String",
",",
"String",
">",
"namespaces",... | Generates the response XML with all lock information | [
"Generates",
"the",
"response",
"XML",
"with",
"all",
"lock",
"information"
] | 39bb7032fc75c1b67d3f2440dd1c234ead96cb9d | https://github.com/Commonjava/webdav-handler/blob/39bb7032fc75c1b67d3f2440dd1c234ead96cb9d/common/src/main/java/net/sf/webdav/methods/DoLock.java#L606-L676 |
148,171 | Commonjava/webdav-handler | common/src/main/java/net/sf/webdav/methods/DoLock.java | DoLock.doMacLockRequestWorkaround | private void doMacLockRequestWorkaround( final ITransaction transaction, final WebdavRequest req, final WebdavResponse resp )
throws LockFailedException, IOException
{
LockedObject lo;
final int depth = getDepth( req );
int lockDuration = getTimeout( transaction, req );
if ( ... | java | private void doMacLockRequestWorkaround( final ITransaction transaction, final WebdavRequest req, final WebdavResponse resp )
throws LockFailedException, IOException
{
LockedObject lo;
final int depth = getDepth( req );
int lockDuration = getTimeout( transaction, req );
if ( ... | [
"private",
"void",
"doMacLockRequestWorkaround",
"(",
"final",
"ITransaction",
"transaction",
",",
"final",
"WebdavRequest",
"req",
",",
"final",
"WebdavResponse",
"resp",
")",
"throws",
"LockFailedException",
",",
"IOException",
"{",
"LockedObject",
"lo",
";",
"final... | Executes the lock for a Mac OS Finder client | [
"Executes",
"the",
"lock",
"for",
"a",
"Mac",
"OS",
"Finder",
"client"
] | 39bb7032fc75c1b67d3f2440dd1c234ead96cb9d | https://github.com/Commonjava/webdav-handler/blob/39bb7032fc75c1b67d3f2440dd1c234ead96cb9d/common/src/main/java/net/sf/webdav/methods/DoLock.java#L681-L713 |
148,172 | Commonjava/webdav-handler | common/src/main/java/net/sf/webdav/methods/DoLock.java | DoLock.sendLockFailError | private void sendLockFailError( final ITransaction transaction, final WebdavRequest req, final WebdavResponse resp )
throws IOException
{
final Hashtable<String, WebdavStatus> errorList = new Hashtable<String, WebdavStatus>();
errorList.put( _path, SC_LOCKED );
sendReport( req, resp,... | java | private void sendLockFailError( final ITransaction transaction, final WebdavRequest req, final WebdavResponse resp )
throws IOException
{
final Hashtable<String, WebdavStatus> errorList = new Hashtable<String, WebdavStatus>();
errorList.put( _path, SC_LOCKED );
sendReport( req, resp,... | [
"private",
"void",
"sendLockFailError",
"(",
"final",
"ITransaction",
"transaction",
",",
"final",
"WebdavRequest",
"req",
",",
"final",
"WebdavResponse",
"resp",
")",
"throws",
"IOException",
"{",
"final",
"Hashtable",
"<",
"String",
",",
"WebdavStatus",
">",
"er... | Sends an error report to the client | [
"Sends",
"an",
"error",
"report",
"to",
"the",
"client"
] | 39bb7032fc75c1b67d3f2440dd1c234ead96cb9d | https://github.com/Commonjava/webdav-handler/blob/39bb7032fc75c1b67d3f2440dd1c234ead96cb9d/common/src/main/java/net/sf/webdav/methods/DoLock.java#L718-L724 |
148,173 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java | GenericBoJdbcDao.invalidateCache | protected void invalidateCache(T bo, CacheInvalidationReason reason) {
final String cacheKey = cacheKey(bo);
switch (reason) {
case CREATE:
case UPDATE:
putToCache(getCacheName(), cacheKey, bo);
case DELETE:
removeFromCache(getCacheName(), cacheKey);
... | java | protected void invalidateCache(T bo, CacheInvalidationReason reason) {
final String cacheKey = cacheKey(bo);
switch (reason) {
case CREATE:
case UPDATE:
putToCache(getCacheName(), cacheKey, bo);
case DELETE:
removeFromCache(getCacheName(), cacheKey);
... | [
"protected",
"void",
"invalidateCache",
"(",
"T",
"bo",
",",
"CacheInvalidationReason",
"reason",
")",
"{",
"final",
"String",
"cacheKey",
"=",
"cacheKey",
"(",
"bo",
")",
";",
"switch",
"(",
"reason",
")",
"{",
"case",
"CREATE",
":",
"case",
"UPDATE",
":"... | Invalidate a BO from cache.
@param bo
@param reason | [
"Invalidate",
"a",
"BO",
"from",
"cache",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java#L414-L423 |
148,174 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java | GenericBoJdbcDao.delete | protected DaoResult delete(Connection conn, T bo) {
if (bo == null) {
return new DaoResult(DaoOperationStatus.NOT_FOUND);
}
int numRows = execute(conn, calcSqlDeleteOne(bo),
rowMapper.valuesForColumns(bo, rowMapper.getPrimaryKeyColumns()));
DaoResult result = ... | java | protected DaoResult delete(Connection conn, T bo) {
if (bo == null) {
return new DaoResult(DaoOperationStatus.NOT_FOUND);
}
int numRows = execute(conn, calcSqlDeleteOne(bo),
rowMapper.valuesForColumns(bo, rowMapper.getPrimaryKeyColumns()));
DaoResult result = ... | [
"protected",
"DaoResult",
"delete",
"(",
"Connection",
"conn",
",",
"T",
"bo",
")",
"{",
"if",
"(",
"bo",
"==",
"null",
")",
"{",
"return",
"new",
"DaoResult",
"(",
"DaoOperationStatus",
".",
"NOT_FOUND",
")",
";",
"}",
"int",
"numRows",
"=",
"execute",
... | Delete an existing BO from storage.
@param conn
@param bo
@return
@since 0.8.1 | [
"Delete",
"an",
"existing",
"BO",
"from",
"storage",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java#L485-L497 |
148,175 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java | GenericBoJdbcDao.get | protected T get(Connection conn, BoId id) {
if (id == null || id.values == null || id.values.length == 0) {
return null;
}
final String cacheKey = cacheKey(id);
T bo = getFromCache(getCacheName(), cacheKey, typeClass);
if (bo == null) {
bo = executeSelectO... | java | protected T get(Connection conn, BoId id) {
if (id == null || id.values == null || id.values.length == 0) {
return null;
}
final String cacheKey = cacheKey(id);
T bo = getFromCache(getCacheName(), cacheKey, typeClass);
if (bo == null) {
bo = executeSelectO... | [
"protected",
"T",
"get",
"(",
"Connection",
"conn",
",",
"BoId",
"id",
")",
"{",
"if",
"(",
"id",
"==",
"null",
"||",
"id",
".",
"values",
"==",
"null",
"||",
"id",
".",
"values",
".",
"length",
"==",
"0",
")",
"{",
"return",
"null",
";",
"}",
... | Fetch an existing BO from storage by id.
@param conn
@param id
@return | [
"Fetch",
"an",
"existing",
"BO",
"from",
"storage",
"by",
"id",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java#L521-L532 |
148,176 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java | GenericBoJdbcDao.get | @SuppressWarnings("unchecked")
protected T[] get(Connection conn, BoId... idList) {
T[] result = (T[]) Array.newInstance(typeClass, idList != null ? idList.length : 0);
if (idList != null) {
for (int i = 0; i < idList.length; i++) {
result[i] = get(conn, idList[i]);
... | java | @SuppressWarnings("unchecked")
protected T[] get(Connection conn, BoId... idList) {
T[] result = (T[]) Array.newInstance(typeClass, idList != null ? idList.length : 0);
if (idList != null) {
for (int i = 0; i < idList.length; i++) {
result[i] = get(conn, idList[i]);
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"T",
"[",
"]",
"get",
"(",
"Connection",
"conn",
",",
"BoId",
"...",
"idList",
")",
"{",
"T",
"[",
"]",
"result",
"=",
"(",
"T",
"[",
"]",
")",
"Array",
".",
"newInstance",
"(",
"typeCl... | Fetch list of existing BOs from storage by id.
@param conn
@param idList
@return
@since 0.8.1 | [
"Fetch",
"list",
"of",
"existing",
"BOs",
"from",
"storage",
"by",
"id",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java#L562-L571 |
148,177 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java | GenericBoJdbcDao.getAll | protected Stream<T> getAll(Connection conn) {
return executeSelectAsStream(rowMapper, conn, true, calcSqlSelectAll());
} | java | protected Stream<T> getAll(Connection conn) {
return executeSelectAsStream(rowMapper, conn, true, calcSqlSelectAll());
} | [
"protected",
"Stream",
"<",
"T",
">",
"getAll",
"(",
"Connection",
"conn",
")",
"{",
"return",
"executeSelectAsStream",
"(",
"rowMapper",
",",
"conn",
",",
"true",
",",
"calcSqlSelectAll",
"(",
")",
")",
";",
"}"
] | Fetch all existing BOs from storage and return the result as a stream.
@param conn
@return
@since 0.9.0 | [
"Fetch",
"all",
"existing",
"BOs",
"from",
"storage",
"and",
"return",
"the",
"result",
"as",
"a",
"stream",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java#L596-L598 |
148,178 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java | GenericBoJdbcDao.update | protected DaoResult update(Connection conn, T bo) {
if (bo == null) {
return new DaoResult(DaoOperationStatus.NOT_FOUND);
}
Savepoint savepoint = null;
try {
try {
String[] bindColumns = ArrayUtils.addAll(rowMapper.getUpdateColumns(),
... | java | protected DaoResult update(Connection conn, T bo) {
if (bo == null) {
return new DaoResult(DaoOperationStatus.NOT_FOUND);
}
Savepoint savepoint = null;
try {
try {
String[] bindColumns = ArrayUtils.addAll(rowMapper.getUpdateColumns(),
... | [
"protected",
"DaoResult",
"update",
"(",
"Connection",
"conn",
",",
"T",
"bo",
")",
"{",
"if",
"(",
"bo",
"==",
"null",
")",
"{",
"return",
"new",
"DaoResult",
"(",
"DaoOperationStatus",
".",
"NOT_FOUND",
")",
";",
"}",
"Savepoint",
"savepoint",
"=",
"nu... | Update an existing BO.
@param conn
@param bo
@return
@since 0.8.1 | [
"Update",
"an",
"existing",
"BO",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java#L636-L667 |
148,179 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java | GenericBoJdbcDao.createOrUpdate | protected DaoResult createOrUpdate(Connection conn, T bo) {
if (bo == null) {
return null;
}
DaoResult result = create(conn, bo);
DaoOperationStatus status = result.getStatus();
if (status == DaoOperationStatus.DUPLICATED_VALUE
|| status == DaoOperatio... | java | protected DaoResult createOrUpdate(Connection conn, T bo) {
if (bo == null) {
return null;
}
DaoResult result = create(conn, bo);
DaoOperationStatus status = result.getStatus();
if (status == DaoOperationStatus.DUPLICATED_VALUE
|| status == DaoOperatio... | [
"protected",
"DaoResult",
"createOrUpdate",
"(",
"Connection",
"conn",
",",
"T",
"bo",
")",
"{",
"if",
"(",
"bo",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"DaoResult",
"result",
"=",
"create",
"(",
"conn",
",",
"bo",
")",
";",
"DaoOperationS... | Create a new BO or update an existing one.
@param conn
@param bo
@return
@since 0.8.1 | [
"Create",
"a",
"new",
"BO",
"or",
"update",
"an",
"existing",
"one",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java#L692-L703 |
148,180 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java | GenericBoJdbcDao.updateOrCreate | protected DaoResult updateOrCreate(Connection conn, T bo) {
if (bo == null) {
return new DaoResult(DaoOperationStatus.NOT_FOUND);
}
DaoResult result = update(conn, bo);
DaoOperationStatus status = result.getStatus();
if (status == DaoOperationStatus.NOT_FOUND) {
... | java | protected DaoResult updateOrCreate(Connection conn, T bo) {
if (bo == null) {
return new DaoResult(DaoOperationStatus.NOT_FOUND);
}
DaoResult result = update(conn, bo);
DaoOperationStatus status = result.getStatus();
if (status == DaoOperationStatus.NOT_FOUND) {
... | [
"protected",
"DaoResult",
"updateOrCreate",
"(",
"Connection",
"conn",
",",
"T",
"bo",
")",
"{",
"if",
"(",
"bo",
"==",
"null",
")",
"{",
"return",
"new",
"DaoResult",
"(",
"DaoOperationStatus",
".",
"NOT_FOUND",
")",
";",
"}",
"DaoResult",
"result",
"=",
... | Update an existing BO or create a new one.
@param conn
@param bo
@return
@since 0.8.1 | [
"Update",
"an",
"existing",
"BO",
"or",
"create",
"a",
"new",
"one",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java#L730-L740 |
148,181 | lisicnu/droidUtil | src/main/java/com/github/lisicnu/libDroid/util/BitmapUtils.java | BitmapUtils.load | public synchronized static Bitmap load(InputStream is, int width, int height) {
BitmapFactory.Options opt = null;
try {
opt = new BitmapFactory.Options();
if (width > 0 && height > 0) {
if (is.markSupported()) {
is.mark(is.available());
... | java | public synchronized static Bitmap load(InputStream is, int width, int height) {
BitmapFactory.Options opt = null;
try {
opt = new BitmapFactory.Options();
if (width > 0 && height > 0) {
if (is.markSupported()) {
is.mark(is.available());
... | [
"public",
"synchronized",
"static",
"Bitmap",
"load",
"(",
"InputStream",
"is",
",",
"int",
"width",
",",
"int",
"height",
")",
"{",
"BitmapFactory",
".",
"Options",
"opt",
"=",
"null",
";",
"try",
"{",
"opt",
"=",
"new",
"BitmapFactory",
".",
"Options",
... | BitmapFactory fails to decode the InputStream. | [
"BitmapFactory",
"fails",
"to",
"decode",
"the",
"InputStream",
"."
] | e4d6cf3e3f60e5efb5a75672607ded94d1725519 | https://github.com/lisicnu/droidUtil/blob/e4d6cf3e3f60e5efb5a75672607ded94d1725519/src/main/java/com/github/lisicnu/libDroid/util/BitmapUtils.java#L117-L150 |
148,182 | lisicnu/droidUtil | src/main/java/com/github/lisicnu/libDroid/util/BitmapUtils.java | BitmapUtils.writeToFile | public static boolean writeToFile(Bitmap bmp, String fileName) {
if (bmp == null || StringUtils.isNullOrEmpty(fileName))
return false;
FileOutputStream fos = null;
try {
fos = new FileOutputStream(fileName);
bmp.compress(CompressFormat.PNG, 100, fos);
... | java | public static boolean writeToFile(Bitmap bmp, String fileName) {
if (bmp == null || StringUtils.isNullOrEmpty(fileName))
return false;
FileOutputStream fos = null;
try {
fos = new FileOutputStream(fileName);
bmp.compress(CompressFormat.PNG, 100, fos);
... | [
"public",
"static",
"boolean",
"writeToFile",
"(",
"Bitmap",
"bmp",
",",
"String",
"fileName",
")",
"{",
"if",
"(",
"bmp",
"==",
"null",
"||",
"StringUtils",
".",
"isNullOrEmpty",
"(",
"fileName",
")",
")",
"return",
"false",
";",
"FileOutputStream",
"fos",
... | write bitmap to file.
@param bmp
@param fileName
@return whether the file has been created success. | [
"write",
"bitmap",
"to",
"file",
"."
] | e4d6cf3e3f60e5efb5a75672607ded94d1725519 | https://github.com/lisicnu/droidUtil/blob/e4d6cf3e3f60e5efb5a75672607ded94d1725519/src/main/java/com/github/lisicnu/libDroid/util/BitmapUtils.java#L218-L240 |
148,183 | fuinorg/objects4j | src/main/java/org/fuin/objects4j/vo/PasswordStrValidator.java | PasswordStrValidator.isValid | public static final boolean isValid(final String value) {
if (value == null) {
return true;
}
if ((value.length() < 8) || (value.length() > 20)) {
return false;
}
return true;
} | java | public static final boolean isValid(final String value) {
if (value == null) {
return true;
}
if ((value.length() < 8) || (value.length() > 20)) {
return false;
}
return true;
} | [
"public",
"static",
"final",
"boolean",
"isValid",
"(",
"final",
"String",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"(",
"value",
".",
"length",
"(",
")",
"<",
"8",
")",
"||",
"(",
"val... | Check that a given string is an allowed password.
@param value
Value to check.
@return Returns <code>true</code> if it's an allowed password else <code>false</code> is returned. | [
"Check",
"that",
"a",
"given",
"string",
"is",
"an",
"allowed",
"password",
"."
] | e7f278b5bae073ebb6a76053650571c718f36246 | https://github.com/fuinorg/objects4j/blob/e7f278b5bae073ebb6a76053650571c718f36246/src/main/java/org/fuin/objects4j/vo/PasswordStrValidator.java#L48-L56 |
148,184 | jriecken/gae-java-mini-profiler | src/main/java/ca/jimr/gae/profiler/MiniProfilerServlet.java | MiniProfilerServlet.doResource | private void doResource(HttpServletRequest req, HttpServletResponse resp) throws IOException
{
boolean success = true;
String resource = (String) req.getParameter("id");
if (!isEmpty(resource))
{
if (resource.endsWith(".js"))
{
resp.setContentType("text/javascript");
} else i... | java | private void doResource(HttpServletRequest req, HttpServletResponse resp) throws IOException
{
boolean success = true;
String resource = (String) req.getParameter("id");
if (!isEmpty(resource))
{
if (resource.endsWith(".js"))
{
resp.setContentType("text/javascript");
} else i... | [
"private",
"void",
"doResource",
"(",
"HttpServletRequest",
"req",
",",
"HttpServletResponse",
"resp",
")",
"throws",
"IOException",
"{",
"boolean",
"success",
"=",
"true",
";",
"String",
"resource",
"=",
"(",
"String",
")",
"req",
".",
"getParameter",
"(",
"\... | Serve one of the static resources for the profiler UI. | [
"Serve",
"one",
"of",
"the",
"static",
"resources",
"for",
"the",
"profiler",
"UI",
"."
] | 184e3d2470104e066919960d6fbfe0cdc05921d5 | https://github.com/jriecken/gae-java-mini-profiler/blob/184e3d2470104e066919960d6fbfe0cdc05921d5/src/main/java/ca/jimr/gae/profiler/MiniProfilerServlet.java#L124-L169 |
148,185 | jriecken/gae-java-mini-profiler | src/main/java/ca/jimr/gae/profiler/MiniProfilerServlet.java | MiniProfilerServlet.doResults | private void doResults(HttpServletRequest req, HttpServletResponse resp) throws IOException, JsonGenerationException, JsonMappingException
{
Map<String, Object> result = new HashMap<String, Object>();
String requestIds = req.getParameter("ids");
if (!isEmpty(requestIds))
{
List<Map<String, Obje... | java | private void doResults(HttpServletRequest req, HttpServletResponse resp) throws IOException, JsonGenerationException, JsonMappingException
{
Map<String, Object> result = new HashMap<String, Object>();
String requestIds = req.getParameter("ids");
if (!isEmpty(requestIds))
{
List<Map<String, Obje... | [
"private",
"void",
"doResults",
"(",
"HttpServletRequest",
"req",
",",
"HttpServletResponse",
"resp",
")",
"throws",
"IOException",
",",
"JsonGenerationException",
",",
"JsonMappingException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"new",
"H... | Generate the results for a set of requests in JSON format. | [
"Generate",
"the",
"results",
"for",
"a",
"set",
"of",
"requests",
"in",
"JSON",
"format",
"."
] | 184e3d2470104e066919960d6fbfe0cdc05921d5 | https://github.com/jriecken/gae-java-mini-profiler/blob/184e3d2470104e066919960d6fbfe0cdc05921d5/src/main/java/ca/jimr/gae/profiler/MiniProfilerServlet.java#L174-L218 |
148,186 | grycap/coreutils | coreutils-fiber/src/main/java/es/upv/grycap/coreutils/fiber/net/UrlBuilder.java | UrlBuilder.getUrlBuilder | public static UrlBuilder getUrlBuilder(final URL baseUrl) {
URL url = null;
try {
url = new URL(decode(requireNonNull(baseUrl).toString(), defaultCharset().name()));
} catch (MalformedURLException | UnsupportedEncodingException e) {
throw new IllegalArgumentException(new StringBuilder("Cannot create a UR... | java | public static UrlBuilder getUrlBuilder(final URL baseUrl) {
URL url = null;
try {
url = new URL(decode(requireNonNull(baseUrl).toString(), defaultCharset().name()));
} catch (MalformedURLException | UnsupportedEncodingException e) {
throw new IllegalArgumentException(new StringBuilder("Cannot create a UR... | [
"public",
"static",
"UrlBuilder",
"getUrlBuilder",
"(",
"final",
"URL",
"baseUrl",
")",
"{",
"URL",
"url",
"=",
"null",
";",
"try",
"{",
"url",
"=",
"new",
"URL",
"(",
"decode",
"(",
"requireNonNull",
"(",
"baseUrl",
")",
".",
"toString",
"(",
")",
","... | Convenient factory method that creates a new instance of this class.
@param baseUrl - base URL that will be used to create new URLs
@return A new instance of this class, allowing callers to use the methods of this class to create new URLs
from the base URL provided as argument. | [
"Convenient",
"factory",
"method",
"that",
"creates",
"a",
"new",
"instance",
"of",
"this",
"class",
"."
] | e6db61dc50b49ea7276c0c29c7401204681a10c2 | https://github.com/grycap/coreutils/blob/e6db61dc50b49ea7276c0c29c7401204681a10c2/coreutils-fiber/src/main/java/es/upv/grycap/coreutils/fiber/net/UrlBuilder.java#L69-L78 |
148,187 | acromusashi/acromusashi-stream | src/main/java/acromusashi/stream/config/StormConfigGenerator.java | StormConfigGenerator.loadStormConfig | public static Config loadStormConfig(File targetFile) throws IOException
{
Map<String, Object> yamlConfig = readYaml(targetFile);
Config stormConf = convertYamlToStormConf(yamlConfig);
// For track update config, has init file path.
if (stormConf.containsKey(INIT_CONFIG_KEY) =... | java | public static Config loadStormConfig(File targetFile) throws IOException
{
Map<String, Object> yamlConfig = readYaml(targetFile);
Config stormConf = convertYamlToStormConf(yamlConfig);
// For track update config, has init file path.
if (stormConf.containsKey(INIT_CONFIG_KEY) =... | [
"public",
"static",
"Config",
"loadStormConfig",
"(",
"File",
"targetFile",
")",
"throws",
"IOException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"yamlConfig",
"=",
"readYaml",
"(",
"targetFile",
")",
";",
"Config",
"stormConf",
"=",
"convertYamlToStormCo... | Generate storm config object from the yaml file at specified file.
@param targetFile target file
@return Storm config object
@throws IOException Fail read yaml file or convert to storm config object. | [
"Generate",
"storm",
"config",
"object",
"from",
"the",
"yaml",
"file",
"at",
"specified",
"file",
"."
] | 65b1f335d771d657c5640a2056ab5c8546eddec9 | https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/config/StormConfigGenerator.java#L75-L88 |
148,188 | acromusashi/acromusashi-stream | src/main/java/acromusashi/stream/config/StormConfigGenerator.java | StormConfigGenerator.convertYamlToStormConf | public static Config convertYamlToStormConf(Map<String, Object> yamlConf)
{
Config stormConf = new Config();
for (Entry<String, Object> targetConfigEntry : yamlConf.entrySet())
{
stormConf.put(targetConfigEntry.getKey(), targetConfigEntry.getValue());
}
... | java | public static Config convertYamlToStormConf(Map<String, Object> yamlConf)
{
Config stormConf = new Config();
for (Entry<String, Object> targetConfigEntry : yamlConf.entrySet())
{
stormConf.put(targetConfigEntry.getKey(), targetConfigEntry.getValue());
}
... | [
"public",
"static",
"Config",
"convertYamlToStormConf",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"yamlConf",
")",
"{",
"Config",
"stormConf",
"=",
"new",
"Config",
"(",
")",
";",
"for",
"(",
"Entry",
"<",
"String",
",",
"Object",
">",
"targetConfigEn... | Convert config read from yaml file config to storm config object.
@param yamlConf config read from yaml
@return Storm config object | [
"Convert",
"config",
"read",
"from",
"yaml",
"file",
"config",
"to",
"storm",
"config",
"object",
"."
] | 65b1f335d771d657c5640a2056ab5c8546eddec9 | https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/config/StormConfigGenerator.java#L96-L106 |
148,189 | acromusashi/acromusashi-stream | src/main/java/acromusashi/stream/config/StormConfigGenerator.java | StormConfigGenerator.readYaml | public static Map<String, Object> readYaml(String filePath) throws IOException
{
File targetFile = new File(filePath);
Map<String, Object> configObject = readYaml(targetFile);
return configObject;
} | java | public static Map<String, Object> readYaml(String filePath) throws IOException
{
File targetFile = new File(filePath);
Map<String, Object> configObject = readYaml(targetFile);
return configObject;
} | [
"public",
"static",
"Map",
"<",
"String",
",",
"Object",
">",
"readYaml",
"(",
"String",
"filePath",
")",
"throws",
"IOException",
"{",
"File",
"targetFile",
"=",
"new",
"File",
"(",
"filePath",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"config... | Read yaml config object from the yaml file at specified path.
@param filePath target file path
@return config read from yaml
@throws IOException Fail read yaml file or convert to config object. | [
"Read",
"yaml",
"config",
"object",
"from",
"the",
"yaml",
"file",
"at",
"specified",
"path",
"."
] | 65b1f335d771d657c5640a2056ab5c8546eddec9 | https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/config/StormConfigGenerator.java#L115-L120 |
148,190 | acromusashi/acromusashi-stream | src/main/java/acromusashi/stream/config/StormConfigGenerator.java | StormConfigGenerator.readYaml | @SuppressWarnings("unchecked")
public static Map<String, Object> readYaml(File targetFile) throws IOException
{
Map<String, Object> configObject = null;
Yaml yaml = new Yaml();
InputStream inputStream = null;
InputStreamReader steamReader = null;
try
{... | java | @SuppressWarnings("unchecked")
public static Map<String, Object> readYaml(File targetFile) throws IOException
{
Map<String, Object> configObject = null;
Yaml yaml = new Yaml();
InputStream inputStream = null;
InputStreamReader steamReader = null;
try
{... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"Map",
"<",
"String",
",",
"Object",
">",
"readYaml",
"(",
"File",
"targetFile",
")",
"throws",
"IOException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"configObject",
"=",
"null",... | Read yaml config object from the yaml file at specified file.
@param targetFile target file
@return config read from yaml
@throws IOException Fail read yaml file or convert to config object. | [
"Read",
"yaml",
"config",
"object",
"from",
"the",
"yaml",
"file",
"at",
"specified",
"file",
"."
] | 65b1f335d771d657c5640a2056ab5c8546eddec9 | https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/config/StormConfigGenerator.java#L129-L156 |
148,191 | jriecken/gae-java-mini-profiler | src/main/java/ca/jimr/gae/profiler/MiniProfilerFilter.java | MiniProfilerFilter.doFilter | @Override
public void doFilter(ServletRequest sReq, ServletResponse sRes, FilterChain chain) throws IOException, ServletException
{
HttpServletRequest req = (HttpServletRequest) sReq;
HttpServletResponse res = (HttpServletResponse) sRes;
if (shouldProfile(req.getRequestURI()))
{
String querySt... | java | @Override
public void doFilter(ServletRequest sReq, ServletResponse sRes, FilterChain chain) throws IOException, ServletException
{
HttpServletRequest req = (HttpServletRequest) sReq;
HttpServletResponse res = (HttpServletResponse) sRes;
if (shouldProfile(req.getRequestURI()))
{
String querySt... | [
"@",
"Override",
"public",
"void",
"doFilter",
"(",
"ServletRequest",
"sReq",
",",
"ServletResponse",
"sRes",
",",
"FilterChain",
"chain",
")",
"throws",
"IOException",
",",
"ServletException",
"{",
"HttpServletRequest",
"req",
"=",
"(",
"HttpServletRequest",
")",
... | If profiling is supposed to occur for the current request, profile the
request. Otherwise this filter does nothing. | [
"If",
"profiling",
"is",
"supposed",
"to",
"occur",
"for",
"the",
"current",
"request",
"profile",
"the",
"request",
".",
"Otherwise",
"this",
"filter",
"does",
"nothing",
"."
] | 184e3d2470104e066919960d6fbfe0cdc05921d5 | https://github.com/jriecken/gae-java-mini-profiler/blob/184e3d2470104e066919960d6fbfe0cdc05921d5/src/main/java/ca/jimr/gae/profiler/MiniProfilerFilter.java#L177-L234 |
148,192 | jriecken/gae-java-mini-profiler | src/main/java/ca/jimr/gae/profiler/MiniProfilerFilter.java | MiniProfilerFilter.shouldProfile | public boolean shouldProfile(String url)
{
// Don't profile requests to to results servlet
if (url.startsWith(servletURL))
{
return false;
}
if (!restrictedURLs.isEmpty())
{
boolean matches = false;
for (Pattern p : restrictedURLs)
{
if (p.matcher(url).find())
... | java | public boolean shouldProfile(String url)
{
// Don't profile requests to to results servlet
if (url.startsWith(servletURL))
{
return false;
}
if (!restrictedURLs.isEmpty())
{
boolean matches = false;
for (Pattern p : restrictedURLs)
{
if (p.matcher(url).find())
... | [
"public",
"boolean",
"shouldProfile",
"(",
"String",
"url",
")",
"{",
"// Don't profile requests to to results servlet",
"if",
"(",
"url",
".",
"startsWith",
"(",
"servletURL",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"restrictedURLs",
".",
... | Whether the specified URL should be profiled given the current
configuration of the filter.
@param url
The URL to check.
@return Whether the URL should be profiled. | [
"Whether",
"the",
"specified",
"URL",
"should",
"be",
"profiled",
"given",
"the",
"current",
"configuration",
"of",
"the",
"filter",
"."
] | 184e3d2470104e066919960d6fbfe0cdc05921d5 | https://github.com/jriecken/gae-java-mini-profiler/blob/184e3d2470104e066919960d6fbfe0cdc05921d5/src/main/java/ca/jimr/gae/profiler/MiniProfilerFilter.java#L269-L311 |
148,193 | lisicnu/droidUtil | src/main/java/com/github/lisicnu/libDroid/util/DateUtils.java | DateUtils.getShortDateString | public static String getShortDateString(long time, String format) {
if (format == null || format.isEmpty()) {
format = "yyyy-MM-dd";
}
SimpleDateFormat smpf = new SimpleDateFormat(format);
return smpf.format(new Date(time));
} | java | public static String getShortDateString(long time, String format) {
if (format == null || format.isEmpty()) {
format = "yyyy-MM-dd";
}
SimpleDateFormat smpf = new SimpleDateFormat(format);
return smpf.format(new Date(time));
} | [
"public",
"static",
"String",
"getShortDateString",
"(",
"long",
"time",
",",
"String",
"format",
")",
"{",
"if",
"(",
"format",
"==",
"null",
"||",
"format",
".",
"isEmpty",
"(",
")",
")",
"{",
"format",
"=",
"\"yyyy-MM-dd\"",
";",
"}",
"SimpleDateFormat"... | get formated date String
@param time
@param format if is null or empty, will use "yyyy-MM-dd" | [
"get",
"formated",
"date",
"String"
] | e4d6cf3e3f60e5efb5a75672607ded94d1725519 | https://github.com/lisicnu/droidUtil/blob/e4d6cf3e3f60e5efb5a75672607ded94d1725519/src/main/java/com/github/lisicnu/libDroid/util/DateUtils.java#L23-L30 |
148,194 | acromusashi/acromusashi-stream | src/main/java/acromusashi/stream/bolt/AmBaseBolt.java | AmBaseBolt.onMessage | @Override
public void onMessage(StreamMessage received)
{
if (this.reloadConfig && this.watcher != null)
{
Map<String, Object> reloadedConfig = null;
try
{
reloadedConfig = this.watcher.readIfUpdated();
}
catch (IOExcep... | java | @Override
public void onMessage(StreamMessage received)
{
if (this.reloadConfig && this.watcher != null)
{
Map<String, Object> reloadedConfig = null;
try
{
reloadedConfig = this.watcher.readIfUpdated();
}
catch (IOExcep... | [
"@",
"Override",
"public",
"void",
"onMessage",
"(",
"StreamMessage",
"received",
")",
"{",
"if",
"(",
"this",
".",
"reloadConfig",
"&&",
"this",
".",
"watcher",
"!=",
"null",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"reloadedConfig",
"=",
"nu... | Execute when receive message.
@param received received message | [
"Execute",
"when",
"receive",
"message",
"."
] | 65b1f335d771d657c5640a2056ab5c8546eddec9 | https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/bolt/AmBaseBolt.java#L137-L180 |
148,195 | acromusashi/acromusashi-stream | src/main/java/acromusashi/stream/bolt/AmBaseBolt.java | AmBaseBolt.createKeyRecorededHistory | protected KeyHistory createKeyRecorededHistory(KeyHistory history, Object messageKey)
{
KeyHistory result = null;
if (history == null)
{
result = new KeyHistory();
}
else
{
// For adjust message splited, use keyhistory's deepcopy.
... | java | protected KeyHistory createKeyRecorededHistory(KeyHistory history, Object messageKey)
{
KeyHistory result = null;
if (history == null)
{
result = new KeyHistory();
}
else
{
// For adjust message splited, use keyhistory's deepcopy.
... | [
"protected",
"KeyHistory",
"createKeyRecorededHistory",
"(",
"KeyHistory",
"history",
",",
"Object",
"messageKey",
")",
"{",
"KeyHistory",
"result",
"=",
"null",
";",
"if",
"(",
"history",
"==",
"null",
")",
"{",
"result",
"=",
"new",
"KeyHistory",
"(",
")",
... | Create keyhistory from original key history and current message key.
@param history original key history
@param messageKey current message key
@return created key history | [
"Create",
"keyhistory",
"from",
"original",
"key",
"history",
"and",
"current",
"message",
"key",
"."
] | 65b1f335d771d657c5640a2056ab5c8546eddec9 | https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/bolt/AmBaseBolt.java#L295-L312 |
148,196 | lisicnu/droidUtil | src/main/java/com/github/lisicnu/libDroid/util/ShellUtils.java | ShellUtils.execCommand | public static CommandResult execCommand(String command, boolean isRoot) {
return execCommand(new String[]{command}, isRoot, true);
} | java | public static CommandResult execCommand(String command, boolean isRoot) {
return execCommand(new String[]{command}, isRoot, true);
} | [
"public",
"static",
"CommandResult",
"execCommand",
"(",
"String",
"command",
",",
"boolean",
"isRoot",
")",
"{",
"return",
"execCommand",
"(",
"new",
"String",
"[",
"]",
"{",
"command",
"}",
",",
"isRoot",
",",
"true",
")",
";",
"}"
] | execute shell command, default return result msg
@param command command
@param isRoot whether need to run with root
@return
@see ShellUtils#execCommand(String[], boolean, boolean) | [
"execute",
"shell",
"command",
"default",
"return",
"result",
"msg"
] | e4d6cf3e3f60e5efb5a75672607ded94d1725519 | https://github.com/lisicnu/droidUtil/blob/e4d6cf3e3f60e5efb5a75672607ded94d1725519/src/main/java/com/github/lisicnu/libDroid/util/ShellUtils.java#L44-L46 |
148,197 | lisicnu/droidUtil | src/main/java/com/github/lisicnu/libDroid/util/ShellUtils.java | ShellUtils.execCommand | public static CommandResult execCommand(String command, boolean isRoot, boolean isNeedResultMsg) {
return execCommand(new String[]{command}, isRoot, isNeedResultMsg);
} | java | public static CommandResult execCommand(String command, boolean isRoot, boolean isNeedResultMsg) {
return execCommand(new String[]{command}, isRoot, isNeedResultMsg);
} | [
"public",
"static",
"CommandResult",
"execCommand",
"(",
"String",
"command",
",",
"boolean",
"isRoot",
",",
"boolean",
"isNeedResultMsg",
")",
"{",
"return",
"execCommand",
"(",
"new",
"String",
"[",
"]",
"{",
"command",
"}",
",",
"isRoot",
",",
"isNeedResult... | execute shell command
@param command command
@param isRoot whether need to run with root
@param isNeedResultMsg whether need result msg
@return
@see ShellUtils#execCommand(String[], boolean, boolean) | [
"execute",
"shell",
"command"
] | e4d6cf3e3f60e5efb5a75672607ded94d1725519 | https://github.com/lisicnu/droidUtil/blob/e4d6cf3e3f60e5efb5a75672607ded94d1725519/src/main/java/com/github/lisicnu/libDroid/util/ShellUtils.java#L81-L83 |
148,198 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/nosql/BaseNoSqlDao.java | BaseNoSqlDao.invalidateCacheEntry | protected void invalidateCacheEntry(String spaceId, String key) {
if (isCacheEnabled()) {
removeFromCache(getCacheName(), calcCacheKey(spaceId, key));
}
} | java | protected void invalidateCacheEntry(String spaceId, String key) {
if (isCacheEnabled()) {
removeFromCache(getCacheName(), calcCacheKey(spaceId, key));
}
} | [
"protected",
"void",
"invalidateCacheEntry",
"(",
"String",
"spaceId",
",",
"String",
"key",
")",
"{",
"if",
"(",
"isCacheEnabled",
"(",
")",
")",
"{",
"removeFromCache",
"(",
"getCacheName",
"(",
")",
",",
"calcCacheKey",
"(",
"spaceId",
",",
"key",
")",
... | Invalidate a cache entry.
@param spaceId
@param key | [
"Invalidate",
"a",
"cache",
"entry",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/nosql/BaseNoSqlDao.java#L51-L55 |
148,199 | DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/nosql/BaseNoSqlDao.java | BaseNoSqlDao.invalidateCacheEntry | protected void invalidateCacheEntry(String spaceId, String key, Object data) {
if (isCacheEnabled()) {
putToCache(getCacheName(), calcCacheKey(spaceId, key), data);
}
} | java | protected void invalidateCacheEntry(String spaceId, String key, Object data) {
if (isCacheEnabled()) {
putToCache(getCacheName(), calcCacheKey(spaceId, key), data);
}
} | [
"protected",
"void",
"invalidateCacheEntry",
"(",
"String",
"spaceId",
",",
"String",
"key",
",",
"Object",
"data",
")",
"{",
"if",
"(",
"isCacheEnabled",
"(",
")",
")",
"{",
"putToCache",
"(",
"getCacheName",
"(",
")",
",",
"calcCacheKey",
"(",
"spaceId",
... | Invalidate a cache entry due to updated content.
@param spaceId
@param key
@param data | [
"Invalidate",
"a",
"cache",
"entry",
"due",
"to",
"updated",
"content",
"."
] | 8d059ddf641a1629aa53851f9d1b41abf175a180 | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/nosql/BaseNoSqlDao.java#L64-L68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.