id
stringlengths
24
24
repo
stringlengths
7
59
path
stringlengths
11
234
func_name
stringlengths
3
140
url
stringlengths
102
339
split
stringclasses
3 values
language
stringclasses
1 value
docstring
stringlengths
1
34k
code
stringlengths
63
466k
text
stringlengths
101
467k
token_count
int32
22
125k
doc_chars
int32
1
34k
code_chars
int32
63
466k
license_basis
stringclasses
1 value
source
stringclasses
1 value
added
stringdate
2026-12-05 00:00:00
2026-12-05 00:00:00
record_sha256
stringlengths
64
64
license
stringclasses
18 values
license_class
stringclasses
4 values
license_source
stringlengths
45
101
a4aefcc17a59a6efe94a3e43
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java
TransactionalHashMap.put
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java#L522-L556
test
java
Associates the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced. @param key key with which the specified value is to be associated. @param value value to be associated with the specified key. @return previous value associated with spe...
@Override public V put(K key, V value) throws ConcurrentModificationException { K k = maskNull(key); int hash = hash(k); int i = indexFor(hash, table.length); V oldValue = null; for (Entry<K,V> e = table[i]; e != null; e = e.next) { ...
Associates the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced. @param key key with which the specified value is to be associated. @param value value to be associated with the specified key. @return previous value associated with spe...
333
500
1,194
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
bb0c5999a0830486bc90e3dc097462b4d0046b342304f985a07e947d169e923d
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
e49f9b82f9fd7315c568053b
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java
TransactionalHashMap.putForCreate
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java#L564-L585
test
java
This method is used instead of put by constructors and pseudoconstructors (clone, readObject). It does not resize the table, check for comodification, etc. It calls createEntry rather than addEntry.
private void putForCreate(K key, V value) { K k = maskNull(key); int hash = hash(k); int i = indexFor(hash, table.length); /** * Look for preexisting entry for key. This will never happen for * clone or deserialize. It will only happen for constru...
This method is used instead of put by constructors and pseudoconstructors (clone, readObject). It does not resize the table, check for comodification, etc. It calls createEntry rather than addEntry. private void putForCreate(K key, V value) { K k = maskNull(key); int hash = hash(k); i...
206
200
705
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
c92c2b8d2b1f66cf5122016762a8661383762144e5383b4fe27646c8d832cb04
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
1c2a6c387b57d826a8efa495
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java
TransactionalHashMap.resize
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java#L610-L625
test
java
Rehashes the contents of this map into a new array with a larger capacity. This method is called automatically when the number of keys in this map reaches its threshold. If current capacity is MAXIMUM_CAPACITY, this method does not resize the map, but but sets threshold to Integer.MAX_VALUE. This has the effect of pr...
@SuppressWarnings("unchecked") void resize(int newCapacity) { Entry<K,V>[] oldTable = table; int oldCapacity = oldTable.length; if (oldCapacity == MAXIMUM_CAPACITY) { threshold = Integer.MAX_VALUE; return; } Entry<K,V>[]...
Rehashes the contents of this map into a new array with a larger capacity. This method is called automatically when the number of keys in this map reaches its threshold. If current capacity is MAXIMUM_CAPACITY, this method does not resize the map, but but sets threshold to Integer.MAX_VALUE. This has the effect of pr...
205
523
472
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
5b4520d5ea7a585e849bfceff04d1194e0b16b498cc6a95b29922c4bf9431af0
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
56e88c3f663c2026e5e04f5e
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java
TransactionalHashMap.putAll
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java#L660-L693
test
java
Copies all of the mappings from the specified map to this map These mappings will replace any mappings that this map had for any of the keys currently in the specified map. @param m mappings to be stored in this map. @throws NullPointerException if the specified map is null.
@Override public void putAll(Map<? extends K, ? extends V> m) { int numKeysToBeAdded = m.size(); if (numKeysToBeAdded == 0) return; /* * Expand the map if the map if the number of mappings to be added * is greater than or equal to threshold...
Copies all of the mappings from the specified map to this map These mappings will replace any mappings that this map had for any of the keys currently in the specified map. @param m mappings to be stored in this map. @throws NullPointerException if the specified map is null. @Override public void putAll(Map<? ex...
361
276
1,425
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f8ca6afdcc0aad7331ff61f5f5bf56f02db9c79d5b4914f3af499d7cca90cc29
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
8a68f281797bab981ad8e6b7
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java
TransactionalHashMap.remove
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java#L704-L709
test
java
Removes the mapping for this key from this map if present. @param key key whose mapping is to be removed from the map. @return previous value associated with specified key, or <tt>null</tt> if there was no mapping for key. A <tt>null</tt> return can also indicate that the map previously associated <tt>null</tt> with...
@Override public V remove(Object key) throws ConcurrentModificationException { Entry<K,V> e = removeEntryForKey(key); return (e == null ? null : e.value); }
Removes the mapping for this key from this map if present. @param key key whose mapping is to be removed from the map. @return previous value associated with specified key, or <tt>null</tt> if there was no mapping for key. A <tt>null</tt> return can also indicate that the map previously associated <tt>null</tt> with...
121
339
189
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
21f4dd247e1e25cd649b395d7df5c83ccc703ca1d7fdbc54bff96d2531d691aa
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
73a96de8094d5164d8c023a3
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java
TransactionalHashMap.removeEntryForKey
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java#L716-L750
test
java
Removes and returns the entry associated with the specified key in the HashMap. Returns null if the HashMap contains no mapping for this key.
Entry<K,V> removeEntryForKey(Object key) throws ConcurrentModificationException { Object k = maskNull(key); int hash = hash(k); int i = indexFor(hash, table.length); Entry<K,V> prev = table[i]; Entry<K,V> e = prev; while (e != null) { ...
Removes and returns the entry associated with the specified key in the HashMap. Returns null if the HashMap contains no mapping for this key. Entry<K,V> removeEntryForKey(Object key) throws ConcurrentModificationException { Object k = maskNull(key); int hash = hash(k); int i = indexFor...
244
142
1,123
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
52ef8c6f3e7d01432320db496592f339e92c6085394c7cf13dad12632ed4af13
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
48cbe15100049e82fed5697f
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java
TransactionalHashMap.removeMapping
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java#L755-L791
test
java
Special version of remove for EntrySet.
@SuppressWarnings("unchecked") Entry<K,V> removeMapping(Object o) { if (!(o instanceof Map.Entry)) return null; Map.Entry<K,V> entry = (Map.Entry<K,V>)o; Object k = maskNull(entry.getKey()); int hash = hash(k); int i = indexFor(hash, table.le...
Special version of remove for EntrySet. @SuppressWarnings("unchecked") Entry<K,V> removeMapping(Object o) { if (!(o instanceof Map.Entry)) return null; Map.Entry<K,V> entry = (Map.Entry<K,V>)o; Object k = maskNull(entry.getKey()); int hash = hash(k);...
217
39
1,073
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
6721a2272dc734e6a673e3a947be519fb7d1d11d3e4e2f3945f963dbd6a68e76
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
3977922404b249dd561429bc
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java
TransactionalHashMap.clear
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java#L796-L804
test
java
Removes all mappings from this map.
@Override public void clear() { modCount++; Entry<K,V> tab[] = table; for (int i = 0; i < tab.length; i++) tab[i] = null; size = 0; }
Removes all mappings from this map. @Override public void clear() { modCount++; Entry<K,V> tab[] = table; for (int i = 0; i < tab.length; i++) tab[i] = null; size = 0; }
62
35
197
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
8920c90bab943c264a7175dc9e74dc9dd4b615489222b433d6bb938f98777625
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
4b0c8bd4b0b0852ad5fa4830
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java
TransactionalHashMap.addEntry
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java#L942-L949
test
java
Add a new entry with the specified key, value and hash code to the specified bucket. It is the responsibility of this method to resize the table if appropriate. Subclass overrides this to alter the behavior of put method.
void addEntry(int hash, K key, V value, int bucketIndex) { table[bucketIndex] = new Entry<K,V>(hash, key, value, table[bucketIndex]); if (!auto_commit) table[bucketIndex].setStatus(Entry.ADDED, getCurrentThreadId()); if (size++ >= threshold) resize(2 * table.len...
Add a new entry with the specified key, value and hash code to the specified bucket. It is the responsibility of this method to resize the table if appropriate. Subclass overrides this to alter the behavior of put method. void addEntry(int hash, K key, V value, int bucketIndex) { table[bucketIndex] = n...
127
223
332
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
c93b6cbc2b19ff5a690c53ec73bb24a7695e2b5f72475a1694532cf414c0a1cc
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
1e7dd6b14e0bf48fd571eec2
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java
TransactionalHashMap.createEntry
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java#L959-L963
test
java
Like addEntry except that this version is used when creating entries as part of Map construction or "pseudo-construction" (cloning, deserialization). This version needn't worry about resizing the table. Subclass overrides this to alter the behavior of HashMap(Map), clone, and readObject.
void createEntry(int hash, K key, V value, int bucketIndex) { table[bucketIndex] = new Entry<K,V>(hash, key, value, table[bucketIndex]); size++; }
Like addEntry except that this version is used when creating entries as part of Map construction or "pseudo-construction" (cloning, deserialization). This version needn't worry about resizing the table. Subclass overrides this to alter the behavior of HashMap(Map), clone, and readObject. void createEntry(int hash, K...
107
290
174
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0da5cd2da23420e34c85dad317030ee73d887282f40e96f954b4207c6c6d86be
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
8510e3186c73500d188eb6f3
gvlasov/collections-utils
src/main/java/org/tenidwa/collections/utils/AugmentedMap.java
AugmentedMap.createDelegate
https://github.com/gvlasov/collections-utils/blob/82f20efc8e53ea876896b779e35ed33633ec2e23/src/main/java/org/tenidwa/collections/utils/AugmentedMap.java#L69-L80
test
java
Creates map delegate. @param base Base map to augment. @param keys Keys to the augmented map. @param augmentation Function used to generate the new values. @param <K> Key @param <V> Value @return A copy of the {@code base} map augmented with new values.
private static <K, V> ImmutableMap<K, V> createDelegate( final Map<K, V> base, final Set<? extends K> keys, final Function<K, V> augmentation ) { final ImmutableMap.Builder<K, V> builder = ImmutableMap.builder(); builder.putAll(base); keys.stream() .filter...
Creates map delegate. @param base Base map to augment. @param keys Keys to the augmented map. @param augmentation Function used to generate the new values. @param <K> Key @param <V> Value @return A copy of the {@code base} map augmented with new values. private static <K, V> ImmutableMap<K, V> createDelegate( ...
157
253
461
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
13510598257f63254dc00ef0610d5b16e81e04c9333f3a6c1bf8654057a1099f
MIT
permissive
https://github.com/gvlasov/collections-utils/blob/master/LICENSE.txt
ffef4d464ba0a130be3bb921
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.parseDate
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L181-L226
test
java
Parses the given date string in either of the three profiles of <a href="http://xmpp.org/extensions/xep-0082.html">XEP-0082 - XMPP Date and Time Profiles</a> or <a href="http://xmpp.org/extensions/xep-0091.html">XEP-0091 - Legacy Delayed Delivery</a> format. <p> This method uses internal date formatters and is thus thr...
public static Date parseDate(String dateString) throws ParseException { Matcher matcher = xep0091Pattern.matcher(dateString); /* * if date is in XEP-0091 format handle ambiguous dates missing the * leading zero in month and day */ if (matcher.matches()) { ...
Parses the given date string in either of the three profiles of <a href="http://xmpp.org/extensions/xep-0082.html">XEP-0082 - XMPP Date and Time Profiles</a> or <a href="http://xmpp.org/extensions/xep-0091.html">XEP-0091 - Legacy Delayed Delivery</a> format. <p> This method uses internal date formatters and is thus thr...
426
460
1,646
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
cd5459fdc24b2d3c65755ae7f4d6268992ad108d19f985ff1af7879e7cf140de
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
21bf29dc5289f4afa495841e
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.handleDateWithMissingLeadingZeros
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L240-L261
test
java
Parses the given date string in different ways and returns the date that lies in the past and/or is nearest to the current date-time. @param stampString date in string representation @param dateLength @param noFuture @return the parsed date @throws ParseException The date string was of an unknown format
private static Date handleDateWithMissingLeadingZeros(String stampString, int dateLength) throws ParseException { if (dateLength == 6) { synchronized (xep0091Date6DigitFormatter) { return xep0091Date6DigitFormatter.parse(stampString); } } Calen...
Parses the given date string in different ways and returns the date that lies in the past and/or is nearest to the current date-time. @param stampString date in string representation @param dateLength @param noFuture @return the parsed date @throws ParseException The date string was of an unknown format private stati...
238
305
813
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b5364c40e90e032600ba9cdb1728ebce67f2dbda380673af26825e5ccb6cbcfd
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
d54a8f674eaa0c2def29666a
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.parseName
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L332-L342
test
java
Returns the name portion of a XMPP address. For example, for the address "matt@jivesoftware.com/Smack", "matt" would be returned. If no username is present in the address, the empty string will be returned. @param XMPPAddress the XMPP address. @return the name portion of the XMPP address.
public static String parseName(String XMPPAddress) { if (XMPPAddress == null) { return null; } int atIndex = XMPPAddress.lastIndexOf("@"); if (atIndex <= 0) { return ""; } else { return XMPPAddress.substring(0, atIndex); } }
Returns the name portion of a XMPP address. For example, for the address "matt@jivesoftware.com/Smack", "matt" would be returned. If no username is present in the address, the empty string will be returned. @param XMPPAddress the XMPP address. @return the name portion of the XMPP address. public static String parseNa...
143
290
312
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
af1c24022e24ec51f46909a6b66dbe471e714b382f41a7f3ea98d69032d9c969
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
4c9853f4504e2107f4487fba
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.parseServer
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L354-L369
test
java
Returns the server portion of a XMPP address. For example, for the address "matt@jivesoftware.com/Smack", "jivesoftware.com" would be returned. If no server is present in the address, the empty string will be returned. @param XMPPAddress the XMPP address. @return the server portion of the XMPP address.
public static String parseServer(String XMPPAddress) { if (XMPPAddress == null) { return null; } int atIndex = XMPPAddress.lastIndexOf("@"); // If the String ends with '@', return the empty string. if (atIndex + 1 > XMPPAddress.length()) { return ""; ...
Returns the server portion of a XMPP address. For example, for the address "matt@jivesoftware.com/Smack", "jivesoftware.com" would be returned. If no server is present in the address, the empty string will be returned. @param XMPPAddress the XMPP address. @return the server portion of the XMPP address. public static ...
208
304
584
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
5bb32ac2919d1f4dcb8e9c924dd3b72e63fa515dfc201f6d00e30e39d5b56c3e
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
62852fa310333238d4fc3e59
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.parseResource
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L380-L390
test
java
Returns the resource portion of a XMPP address. For example, for the address "matt@jivesoftware.com/Smack", "Smack" would be returned. If no resource is present in the address, the empty string will be returned. @param XMPPAddress the XMPP address. @return the resource portion of the XMPP address.
public static String parseResource(String XMPPAddress) { if (XMPPAddress == null) { return null; } int slashIndex = XMPPAddress.indexOf("/"); if (slashIndex + 1 > XMPPAddress.length() || slashIndex < 0) { return ""; } else { return XMPPAddress....
Returns the resource portion of a XMPP address. For example, for the address "matt@jivesoftware.com/Smack", "Smack" would be returned. If no resource is present in the address, the empty string will be returned. @param XMPPAddress the XMPP address. @return the resource portion of the XMPP address. public static Strin...
157
299
362
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
691c5a7c4fd167aaebed870a8f812ab95dbbadf98f73fc2f51cbe27cd4cd9dac
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
800c4471b9e245cbb3764a8f
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.parseBareAddress
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L401-L413
test
java
Returns the XMPP address with any resource information removed. For example, for the address "matt@jivesoftware.com/Smack", "matt@jivesoftware.com" would be returned. @param XMPPAddress the XMPP address. @return the bare XMPP address without resource information.
public static String parseBareAddress(String XMPPAddress) { if (XMPPAddress == null) { return null; } int slashIndex = XMPPAddress.indexOf("/"); if (slashIndex < 0) { return XMPPAddress; } else if (slashIndex == 0) { return ""; } else {...
Returns the XMPP address with any resource information removed. For example, for the address "matt@jivesoftware.com/Smack", "matt@jivesoftware.com" would be returned. @param XMPPAddress the XMPP address. @return the bare XMPP address without resource information. public static String parseBareAddress(String XMPPAddre...
153
264
393
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
c96c0af162483268c2a860292cf84e4a95793ce1a8f9f3729079369f4e4a75ca
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
c5f8e46ccc1312be1f38977f
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.isFullJID
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L421-L427
test
java
Returns true if jid is a full JID (i.e. a JID with resource part). @param jid @return true if full JID, false otherwise
public static boolean isFullJID(String jid) { if (parseName(jid).length() <= 0 || parseServer(jid).length() <= 0 || parseResource(jid).length() <= 0) { return false; } return true; }
Returns true if jid is a full JID (i.e. a JID with resource part). @param jid @return true if full JID, false otherwise public static boolean isFullJID(String jid) { if (parseName(jid).length() <= 0 || parseServer(jid).length() <= 0 || parseResource(jid).length() <= 0) { return fal...
98
120
238
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
cdbe779ed79c1c1f1503d51b7185850233fcc82e04d67a96a56362fe7f8c8850
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
38ef11c62708795f7ac1cf57
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.escapeNode
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L499-L544
test
java
Escapes the node portion of a JID according to "JID Escaping" (JEP-0106). Escaping replaces characters prohibited by node-prep with escape sequences, as follows: <p> <table border="1"> <tr> <td><b>Unescaped Character</b></td> <td><b>Encoded Sequence</b></td> </tr> <tr> <td>&lt;space&gt;</td> <td>\20</td> </tr> <tr> <t...
public static String escapeNode(String node) { if (node == null) { return null; } StringBuilder buf = new StringBuilder(node.length() + 8); for (int i = 0, n = node.length(); i < n; i++) { char c = node.charAt(i); switch (c) { case '"': ...
Escapes the node portion of a JID according to "JID Escaping" (JEP-0106). Escaping replaces characters prohibited by node-prep with escape sequences, as follows: <p> <table border="1"> <tr> <td><b>Unescaped Character</b></td> <td><b>Encoded Sequence</b></td> </tr> <tr> <td>&lt;space&gt;</td> <td>\20</td> </tr> <tr> <t...
634
1,232
1,290
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
a9eee9b1df03004de0e5e37f930a44ce600405836de20c2f83946d2741c4eba6
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
79a406c56fd39a60bda086ad
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.unescapeNode
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L618-L686
test
java
Un-escapes the node portion of a JID according to "JID Escaping" (JEP-0106). <p> Escaping replaces characters prohibited by node-prep with escape sequences, as follows: <p> <table border="1"> <tr> <td><b>Unescaped Character</b></td> <td><b>Encoded Sequence</b></td> </tr> <tr> <td>&lt;space&gt;</td> <td>\20</td> </tr> ...
public static String unescapeNode(String node) { if (node == null) { return null; } char[] nodeChars = node.toCharArray(); StringBuilder buf = new StringBuilder(nodeChars.length); for (int i = 0, n = nodeChars.length; i < n; i++) { compare: { ...
Un-escapes the node portion of a JID according to "JID Escaping" (JEP-0106). <p> Escaping replaces characters prohibited by node-prep with escape sequences, as follows: <p> <table border="1"> <tr> <td><b>Unescaped Character</b></td> <td><b>Encoded Sequence</b></td> </tr> <tr> <td>&lt;space&gt;</td> <td>\20</td> </tr> ...
821
1,265
2,566
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
cc122f8eb0280b5bee61c5355c4b2172bd3bdbd16897e7cf03017e4c5e32cab2
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
8d93f411ac4dedd3d3a621ae
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.xmlAttribEncodeBinary
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L693-L725
test
java
Encodes a string for use in an XML attribute by escaping characters with a special meaning. In particular, white spaces are encoded as character references, such that they are not replaced by ' ' on parsing.
private static String xmlAttribEncodeBinary(String value) { StringBuilder s = new StringBuilder(); char buf[] = value.toCharArray(); for (char c : buf) { switch (c) { case '<': s.append("&lt;"); break; case '>': ...
Encodes a string for use in an XML attribute by escaping characters with a special meaning. In particular, white spaces are encoded as character references, such that they are not replaced by ' ' on parsing. private static String xmlAttribEncodeBinary(String value) { StringBuilder s = new StringBuilder(); ...
240
207
1,039
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
73ce72bc8a5d7d8b9d034cc5ca62de007ca77c4ba341839c7f95950dd4f5899c
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
34cc9262fbfbaaf0f8a2d2fd
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.hash
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L837-L854
test
java
Hashes a String using the SHA-1 algorithm and returns the result as a String of hexadecimal numbers. This method is synchronized to avoid excessive MessageDigest object creation. If calling this method becomes a bottleneck in your code, you may wish to maintain a pool of MessageDigest objects instead of using this meth...
public synchronized static String hash(String data) { if (digest == null) { try { digest = MessageDigest.getInstance("SHA-1"); } catch (NoSuchAlgorithmException nsae) { log.log(Level.ERROR, "Failed to load the SHA-1 MessageDigest. S...
Hashes a String using the SHA-1 algorithm and returns the result as a String of hexadecimal numbers. This method is synchronized to avoid excessive MessageDigest object creation. If calling this method becomes a bottleneck in your code, you may wish to maintain a pool of MessageDigest objects instead of using this meth...
288
718
684
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1cdfa9f5648781e98f3a0de2e4327f3e5fb083860ab9b53150e87984dda06adc
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
7f025c002957d33491134ca8
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.encodeHex
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L863-L874
test
java
Encodes an array of bytes as String representation of hexadecimal. @param bytes an array of bytes to convert to a hex string. @return generated hex string.
public static String encodeHex(byte[] bytes) { StringBuilder hex = new StringBuilder(bytes.length * 2); for (byte aByte : bytes) { if (((int) aByte & 0xff) < 0x10) { hex.append("0"); } hex.append(Integer.toString((int) aByte & 0xff, 16)); } ...
Encodes an array of bytes as String representation of hexadecimal. @param bytes an array of bytes to convert to a hex string. @return generated hex string. public static String encodeHex(byte[] bytes) { StringBuilder hex = new StringBuilder(bytes.length * 2); for (byte aByte : bytes) { if...
117
156
355
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f97c715eb18712634103b79bff354b7dcde0e6fbd36c57637ed873e7b01b2ba2
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
aad9d6f13807c8b094754de2
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.encodeBase64
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L883-L891
test
java
Encodes a String as a base64 String. @param data a String to encode. @return a base64 encoded String.
public static String encodeBase64(String data) { byte[] bytes = null; try { bytes = data.getBytes("ISO-8859-1"); } catch (UnsupportedEncodingException uee) { throw new IllegalStateException(uee); } return encodeBase64(bytes); }
Encodes a String as a base64 String. @param data a String to encode. @return a base64 encoded String. public static String encodeBase64(String data) { byte[] bytes = null; try { bytes = data.getBytes("ISO-8859-1"); } catch (UnsupportedEncodingException uee) { throw new ...
87
102
295
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1d457d5a2941a09832df98ab2f7cc425d69717c3a707b54021ae4873cb4e6097
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
f3a7ef034a4eb3f65b5357d0
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.encodeBase64
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L932-L936
test
java
Encodes a byte array into a bse64 String. @param data The byte arry to encode. @param offset the offset of the bytearray to begin encoding at. @param len the length of bytes to encode. @param lineBreaks True if the encoding should contain line breaks and false if it should not. @return A base64 encoded String.
public static String encodeBase64(byte[] data, int offset, int len, boolean lineBreaks) { return Base64.encodeBytes(data, offset, len, (lineBreaks ? Base64.NO_OPTIONS : Base64.DONT_BREAK_LINES)); }
Encodes a byte array into a bse64 String. @param data The byte arry to encode. @param offset the offset of the bytearray to begin encoding at. @param len the length of bytes to encode. @param lineBreaks True if the encoding should contain line breaks and false if it should not. @return A base64 encoded String. public...
128
312
237
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
cb0c06f8be4f0fe6c7cd9f0fff37b3ad969cabacfc25ddafd218c8216eac5d20
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
d60d82f8f7732dd296530d70
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.decodeBase64
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L946-L956
test
java
Decodes a base64 String. Unlike Base64.decode() this method does not try to detect and decompress a gzip-compressed input. @param data a base64 encoded String to decode. @return the decoded String.
public static byte[] decodeBase64(String data) { byte[] bytes; try { bytes = data.getBytes("UTF-8"); } catch (java.io.UnsupportedEncodingException uee) { bytes = data.getBytes(); } bytes = Base64.decode(bytes, 0, bytes.length, Base64.NO_OPTIONS); ...
Decodes a base64 String. Unlike Base64.decode() this method does not try to detect and decompress a gzip-compressed input. @param data a base64 encoded String to decode. @return the decoded String. public static byte[] decodeBase64(String data) { byte[] bytes; try { bytes = data.getBytes("...
119
198
339
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
7af6d24b194c5f11ca8af589dd98c69181538fd40dd9d088d420b270bd5723a1
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
7d2e03946a3debc0872b32bc
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.randomString
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L989-L999
test
java
Returns a random String of numbers and letters (lower and upper case) of the specified length. The method uses the Random class that is built-in to Java which is suitable for low to medium grade security uses. This means that the output is only pseudo random, i.e., each number is mathematically generated so is not trul...
public static String randomString(int length) { if (length < 1) { return null; } // Create a char buffer to put random letters and numbers in. char[] randBuffer = new char[length]; for (int i = 0; i < randBuffer.length; i++) { randBuffer[i] = numbersAndLet...
Returns a random String of numbers and letters (lower and upper case) of the specified length. The method uses the Random class that is built-in to Java which is suitable for low to medium grade security uses. This means that the output is only pseudo random, i.e., each number is mathematically generated so is not trul...
211
552
401
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1e9dc2e13fe6cbc93cac6b944c8972471fd0b01fbd130ffeded45e5d5ff31692
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
db39fe7ca30d040f43d99f9c
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/collections/helpers/CounterIterativeCallback.java
CounterIterativeCallback.iterate
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/collections/helpers/CounterIterativeCallback.java#L41-L48
test
java
Overridden to just get the count, and nothing else.
@Override public Integer iterate(final FilterableCollection<? extends T> c) { checkUsed(); // No point doing the iteration. Just return size of collection. count = c.size(); return count; }
Overridden to just get the count, and nothing else. @Override public Integer iterate(final FilterableCollection<? extends T> c) { checkUsed(); // No point doing the iteration. Just return size of collection. count = c.size(); return count; }
60
51
240
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
5241cf565441db71d689abec0684c7486d159b3bc571269cedf3a721ec039e69
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
3521e69d7bc087c5c6bafe7e
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/collections/HashMap4Template.java
HashMap4Template.getOrCreate
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/collections/HashMap4Template.java#L34-L45
test
java
Method to get existing [key1,key2,key3,key4] value or create new one if it's absent. Needs implementation of create(key1,key2,key3,key4) in order to work
public V getOrCreate(K1 key1, K2 key2, K3 key3, K4 key4) { // already got it? MultiKey multi_key = new MultiKey(key1, key2, key3, key4); if (containsKey(multi_key)) return get(multi_key); // if not, create and add it V result = create(key1, key2, ...
Method to get existing [key1,key2,key3,key4] value or create new one if it's absent. Needs implementation of create(key1,key2,key3,key4) in order to work public V getOrCreate(K1 key1, K2 key2, K3 key3, K4 key4) { // already got it? MultiKey multi_key = new MultiKey(key1, key2, key3, key4); ...
155
153
396
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d0765fec88480dc5bbde73fedb6dada015367d50d218111cd393dc767e44a3bb
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
a1ed3d4c2ec75c1dc332f3b2
abmargb/jamppa
src/main/java/org/jivesoftware/smack/keepalive/KeepAliveManager.java
KeepAliveManager.getInstanceFor
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/keepalive/KeepAliveManager.java#L89-L98
test
java
Retrieves a {@link KeepAliveManager} for the specified {@link Connection} , creating one if it doesn't already exist. @param connection The connection the manager is attached to. @return The new or existing manager.
public synchronized static KeepAliveManager getInstanceFor( Connection connection) { KeepAliveManager pingManager = instances.get(connection); if (pingManager == null) { pingManager = new KeepAliveManager(connection); instances.put(connection, pingManager); }...
Retrieves a {@link KeepAliveManager} for the specified {@link Connection} , creating one if it doesn't already exist. @param connection The connection the manager is attached to. @return The new or existing manager. public synchronized static KeepAliveManager getInstanceFor( Connection connection) { ...
106
216
354
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
87d183c4cb644afed43e20adb2e663429ecde6985539b55a3f9f7b8d74cbf5cc
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
f23510dc1a77dccbcc6c3d49
abmargb/jamppa
src/main/java/org/jivesoftware/smack/keepalive/KeepAliveManager.java
KeepAliveManager.enableExecutorService
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/keepalive/KeepAliveManager.java#L103-L116
test
java
/* Start the executor service if it hasn't been started yet.
private synchronized static void enableExecutorService() { if (periodicPingExecutorService == null) { periodicPingExecutorService = new ScheduledThreadPoolExecutor(1, new ThreadFactory() { @Override public Thread newThread(Runnable ...
/* Start the executor service if it hasn't been started yet. private synchronized static void enableExecutorService() { if (periodicPingExecutorService == null) { periodicPingExecutorService = new ScheduledThreadPoolExecutor(1, new ThreadFactory() { @Over...
104
60
625
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f57ed1c863566bb58849bd499d4bfb83b81c121e0734f15d8fa4ae9aadbb818a
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
35f475d3e65c702a0cb02008
abmargb/jamppa
src/main/java/org/jivesoftware/smack/keepalive/KeepAliveManager.java
KeepAliveManager.handleDisconnect
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/keepalive/KeepAliveManager.java#L121-L130
test
java
/* Stop the executor service if all monitored connections are disconnected.
private synchronized static void handleDisconnect(Connection con) { if (periodicPingExecutorService != null) { instances.remove(con); if (instances.isEmpty()) { periodicPingExecutorService.shutdownNow(); periodicPingExecutorService = null; } ...
/* Stop the executor service if all monitored connections are disconnected. private synchronized static void handleDisconnect(Connection con) { if (periodicPingExecutorService != null) { instances.remove(con); if (instances.isEmpty()) { periodicPingExecutorService.shutd...
68
75
334
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
7b200403a03d8c0c667c1b189581c6d0bde8c7a347fab8941b1b33e0dc940c8b
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
06031c3746536205b49cc43b
abmargb/jamppa
src/main/java/org/jivesoftware/smack/keepalive/KeepAliveManager.java
KeepAliveManager.handleConnect
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/keepalive/KeepAliveManager.java#L174-L187
test
java
/* Call after every connection to add the packet listener.
private void handleConnect() { Connection connection = weakRefConnection.get(); // Listen for all incoming packets and reset the scheduled ping whenever // one arrives. connection.addPacketListener(new PacketListener() { @Override public void processPacket(Packet...
/* Call after every connection to add the packet listener. private void handleConnect() { Connection connection = weakRefConnection.get(); // Listen for all incoming packets and reset the scheduled ping whenever // one arrives. connection.addPacketListener(new PacketListener() { ...
103
58
551
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
8c9932c8ca8a0a7698861e003c1fe408feececd043546d3143bf6c00920dd5eb
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
b30a2d8481436767f1d70193
abmargb/jamppa
src/main/java/org/jivesoftware/smack/keepalive/KeepAliveManager.java
KeepAliveManager.setPingInterval
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/keepalive/KeepAliveManager.java#L195-L210
test
java
Sets the ping interval. @param pingInterval The new ping time interval in milliseconds.
public void setPingInterval(long newPingInterval) { if (pingInterval == newPingInterval) return; // Enable the executor service if (newPingInterval > 0) enableExecutorService(); pingInterval = newPingInterval; if (pingInterval < 0) { stopPin...
Sets the ping interval. @param pingInterval The new ping time interval in milliseconds. public void setPingInterval(long newPingInterval) { if (pingInterval == newPingInterval) return; // Enable the executor service if (newPingInterval > 0) enableExecutorService(); ...
100
88
398
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b319ed95148ad750f51405b9822cdc1ce45ccdcea1b69207f5e8a5632cbcc321
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
8613c036b9243003dd4621f6
abmargb/jamppa
src/main/java/org/jivesoftware/smack/keepalive/KeepAliveManager.java
KeepAliveManager.schedulePingServerTask
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/keepalive/KeepAliveManager.java#L281-L329
test
java
Cancels any existing periodic ping task if there is one and schedules a new ping task if pingInterval is greater then zero. This is designed so only one executor is used for scheduling all pings on all connections. This results in only 1 thread used for pinging.
private synchronized void schedulePingServerTask() { enableExecutorService(); stopPingServerTask(); if (pingInterval > 0) { periodicPingTask = periodicPingExecutorService.schedule( new Runnable() { @Override public ...
Cancels any existing periodic ping task if there is one and schedules a new ping task if pingInterval is greater then zero. This is designed so only one executor is used for scheduling all pings on all connections. This results in only 1 thread used for pinging. private synchronized void schedulePingServerTask() { ...
348
263
2,644
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
7baf41d6bcec71fd0e9e02be9a890b962e76ca9044718d9d0152e6fd155fc1b6
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
fa75d2d012018097f286d1fb
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/threadpool/ThreadObjectFactory.java
ThreadObjectFactory.makeObject
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/threadpool/ThreadObjectFactory.java#L35-L41
test
java
/* (non-Javadoc) @see org.apache.commons.pool.PoolableObjectFactory#makeObject()
public final Object makeObject() { log.debug(" makeObject..."); WorkerThread thread = new WorkerThread(); initialiseThread(thread); thread.start(); return thread; }
/* (non-Javadoc) @see org.apache.commons.pool.PoolableObjectFactory#makeObject() public final Object makeObject() { log.debug(" makeObject..."); WorkerThread thread = new WorkerThread(); initialiseThread(thread); thread.start(); return thread; }
56
80
203
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
7519247e520cdbdfee02d1f10b6981041ba146abf78d79778ab9cfdc0f07375b
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
2066162afd3dfec5e6bceb63
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/threadpool/ThreadObjectFactory.java
ThreadObjectFactory.destroyObject
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/threadpool/ThreadObjectFactory.java#L48-L54
test
java
/* (non-Javadoc) @see org.apache.commons.pool.PoolableObjectFactory#destroyObject(java.lang.Object)
public final void destroyObject(Object obj) { log.debug(" !!! destroyObject... !!!" + obj); if (obj instanceof WorkerThread) { WorkerThread rt = (WorkerThread) obj; rt.setStopped(); } }
/* (non-Javadoc) @see org.apache.commons.pool.PoolableObjectFactory#destroyObject(java.lang.Object) public final void destroyObject(Object obj) { log.debug(" !!! destroyObject... !!!" + obj); if (obj instanceof WorkerThread) { WorkerThread rt = (WorkerThread) obj; rt.setStopped(); ...
72
99
230
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
8809fb9452dddeb7bc8bbbbf0dbd599fc47b2fe4deaed0dc599fd956b64924d7
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
85067eee03e1b54b05bc3750
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/threadpool/ThreadObjectFactory.java
ThreadObjectFactory.validateObject
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/threadpool/ThreadObjectFactory.java#L59-L74
test
java
/* (non-Javadoc) @see org.apache.commons.pool.PoolableObjectFactory#validateObject(java.lang.Object)
public final boolean validateObject(Object obj) { log.debug(" validateObject..." + obj); if (obj instanceof WorkerThread) { WorkerThread rt = (WorkerThread) obj; if(!rt.isDone()) { //if the thread is running the previous task, get another one. return false; } ...
/* (non-Javadoc) @see org.apache.commons.pool.PoolableObjectFactory#validateObject(java.lang.Object) public final boolean validateObject(Object obj) { log.debug(" validateObject..." + obj); if (obj instanceof WorkerThread) { WorkerThread rt = (WorkerThread) obj; if(!rt.isDone()) { //...
129
100
515
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
df3b1ee645c3ba2d045414712d5c5c428690ac3b7bbbec80a664549af9fd0649
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
430b1ce4bd420a57021ea6c0
vdmeer/execs
src/main/java/de/vandermeer/execs/options/ExecS_CliParser.java
ExecS_CliParser.addOption
https://github.com/vdmeer/execs/blob/ac73170bfd449de1f460248d56ece57ff3b0c761/src/main/java/de/vandermeer/execs/options/ExecS_CliParser.java#L61-L66
test
java
Adds a CLI option to the parser. @param option new CLI option, ignored if the option is null or getOption() on the option is null @throws IllegalArgumentException if the option uses short/long options already in use @return self to allow for chaining
public ExecS_CliParser addOption(ApplicationOption<?> option){ if(option!=null && option.getCliOption()!=null){ this._addOption(option.getCliOption()); } return this; }
Adds a CLI option to the parser. @param option new CLI option, ignored if the option is null or getOption() on the option is null @throws IllegalArgumentException if the option uses short/long options already in use @return self to allow for chaining public ExecS_CliParser addOption(ApplicationOption<?> option){ if...
97
250
183
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
234f35cde4d9c7ea443c91822541c4b197702e2ee01dab686151fc34cd505f78
Apache-2.0
permissive
https://github.com/vdmeer/execs/blob/master/LICENSE
231944cdd38c73b53082b9ac
vdmeer/execs
src/main/java/de/vandermeer/execs/options/ExecS_CliParser.java
ExecS_CliParser.addAllOptions
https://github.com/vdmeer/execs/blob/ac73170bfd449de1f460248d56ece57ff3b0c761/src/main/java/de/vandermeer/execs/options/ExecS_CliParser.java#L87-L94
test
java
Adds all given option ignoring null elements. @param options array of options @return self to allow for chaining
public ExecS_CliParser addAllOptions(ApplicationOption<?>[] options){ if(options!=null){ for(ApplicationOption<?> option : options){ this.addOption(option); } } return this; }
Adds all given option ignoring null elements. @param options array of options @return self to allow for chaining public ExecS_CliParser addAllOptions(ApplicationOption<?>[] options){ if(options!=null){ for(ApplicationOption<?> option : options){ this.addOption(option); } } return this; }
69
112
199
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
213e45a8240954c72342363c926ff9c5edec2545ea4f574092cd088a04cbe6de
Apache-2.0
permissive
https://github.com/vdmeer/execs/blob/master/LICENSE
9350e2514ac1b60afb4adb97
vdmeer/execs
src/main/java/de/vandermeer/execs/options/ExecS_CliParser.java
ExecS_CliParser._addOption
https://github.com/vdmeer/execs/blob/ac73170bfd449de1f460248d56ece57ff3b0c761/src/main/java/de/vandermeer/execs/options/ExecS_CliParser.java#L115-L133
test
java
Adds a CLI option to the parser. @param option new CLI option, ignored if the option is null or getOption() on the option is null @throws IllegalArgumentException if short or long option was in use already
protected void _addOption(Option option){ if(option==null){ return; } if(this.usedOptions.contains(option.getOpt())){ throw new IllegalArgumentException("ExecS Cli: short option <" + option.getOpt() + "> already in use"); } if(this.usedOptions.contains(option.getLongOpt())){ throw new Illeg...
Adds a CLI option to the parser. @param option new CLI option, ignored if the option is null or getOption() on the option is null @throws IllegalArgumentException if short or long option was in use already protected void _addOption(Option option){ if(option==null){ return; } if(this.usedOptions.contains...
189
205
619
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
8611897a1118d6a067f45a427a417146cd2dcd96067809b6de7837cda42b1381
Apache-2.0
permissive
https://github.com/vdmeer/execs/blob/master/LICENSE
631a897e6009c18e02f32851
vdmeer/execs
src/main/java/de/vandermeer/execs/options/ExecS_CliParser.java
ExecS_CliParser.hasOption
https://github.com/vdmeer/execs/blob/ac73170bfd449de1f460248d56ece57ff3b0c761/src/main/java/de/vandermeer/execs/options/ExecS_CliParser.java#L140-L151
test
java
Tests if an option is already added to the parser. @param option the option to test for @return false if option was null or n short and long version of this option is used, true otherwise
public boolean hasOption(Option option){ if(option==null){ return false; } if(this.usedOptions.contains(option.getOpt())){ return true; } if(this.usedOptions.contains(option.getLongOpt())){ return true; } return false; }
Tests if an option is already added to the parser. @param option the option to test for @return false if option was null or n short and long version of this option is used, true otherwise public boolean hasOption(Option option){ if(option==null){ return false; } if(this.usedOptions.contains(option.getOpt(...
103
187
255
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
71478a59399c65989266737eb6a2f41bebda29ba0de33d7795317169bbb9ac50
Apache-2.0
permissive
https://github.com/vdmeer/execs/blob/master/LICENSE
d538673764efeaf9c5111370
vdmeer/execs
src/main/java/de/vandermeer/execs/options/ExecS_CliParser.java
ExecS_CliParser.parse
https://github.com/vdmeer/execs/blob/ac73170bfd449de1f460248d56ece57ff3b0c761/src/main/java/de/vandermeer/execs/options/ExecS_CliParser.java#L158-L168
test
java
Parses command line arguments and fills set options. @param args command line arguments @return null on success, an exception with message on parsing error
public ParseException parse(String[] args){ ParseException ret = null; CommandLineParser parser = new DefaultParser(); try{ this.cmdLine = parser.parse(this.options, args); } catch(ParseException pe){ ret = pe; } return ret; }
Parses command line arguments and fills set options. @param args command line arguments @return null on success, an exception with message on parsing error public ParseException parse(String[] args){ ParseException ret = null; CommandLineParser parser = new DefaultParser(); try{ this.cmdLine = parser.pars...
93
155
257
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
9093be12b259f6dd274e4654e07d277bf7fb89a6a144407a6f579cbad7e0c8c8
Apache-2.0
permissive
https://github.com/vdmeer/execs/blob/master/LICENSE
f96d9339ec09ec38c6c2a034
vdmeer/execs
src/main/java/de/vandermeer/execs/options/ExecS_CliParser.java
ExecS_CliParser.usage
https://github.com/vdmeer/execs/blob/ac73170bfd449de1f460248d56ece57ff3b0c761/src/main/java/de/vandermeer/execs/options/ExecS_CliParser.java#L174-L177
test
java
Prints a usage screen based on set options. @param appName name of the application to be used for the usage screen
public void usage(String appName){ HelpFormatter formatter=new HelpFormatter(); formatter.printHelp(appName, null, this.options, null, false); }
Prints a usage screen based on set options. @param appName name of the application to be used for the usage screen public void usage(String appName){ HelpFormatter formatter=new HelpFormatter(); formatter.printHelp(appName, null, this.options, null, false); }
58
114
152
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b5ecd90deebcfe4ca3a3d6e718124f22e847af50ffef36c91e1be4a6be8a97e6
Apache-2.0
permissive
https://github.com/vdmeer/execs/blob/master/LICENSE
80c33b6851378b7aa5dc0d63
vdmeer/execs
src/main/java/de/vandermeer/execs/options/ExecS_CliParser.java
ExecS_CliParser.doParse
https://github.com/vdmeer/execs/blob/ac73170bfd449de1f460248d56ece57ff3b0c761/src/main/java/de/vandermeer/execs/options/ExecS_CliParser.java#L186-L193
test
java
Parses command line arguments for a given CLI parser. @param args command line arguments to parse @param cli CLI object with options to parse for @param appName application name for error messages @return 0 on success, -1 on error with error being logged
static int doParse(String[] args, ExecS_CliParser cli, String appName){ Exception err = cli.parse(args); if(err!=null){ System.err.println(appName + ": error parsing command line -> " + err.getMessage()); return -1; } return 0; }
Parses command line arguments for a given CLI parser. @param args command line arguments to parse @param cli CLI object with options to parse for @param appName application name for error messages @return 0 on success, -1 on error with error being logged static int doParse(String[] args, ExecS_CliParser cli, String ap...
120
254
252
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
08063ab7760ac43e8c4cbd9251e8ee764fb16ea38752800e35e19b8ab00c1ae2
Apache-2.0
permissive
https://github.com/vdmeer/execs/blob/master/LICENSE
6e43f5458fe776ffd5ce7d87
abmargb/jamppa
src/main/java/org/jivesoftware/smack/XMPPConnection.java
XMPPConnection.shutdown
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/XMPPConnection.java#L465-L511
test
java
Closes the connection by setting presence to unavailable then closing the stream to the XMPP server. The shutdown logic will be used during a planned disconnection or when dealing with an unexpected disconnection. Unlike {@link #disconnect()} the connection's packet reader, packet writer, and {@link UserRoster} will no...
protected void shutdown(Presence unavailablePresence) { // Set presence to offline. if (packetWriter != null) { packetWriter.sendPacket(unavailablePresence); } this.setWasAuthenticated(authenticated); authenticated = false; if (packetReader != null) { ...
Closes the connection by setting presence to unavailable then closing the stream to the XMPP server. The shutdown logic will be used during a planned disconnection or when dealing with an unexpected disconnection. Unlike {@link #disconnect()} the connection's packet reader, packet writer, and {@link UserRoster} will no...
358
439
1,337
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
396c8f69e5627acb82a0bf7ec52f0dbeb4156806e2c27b53a44cd1ae21a9c6cf
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
c7557482d6dc67a266b21bc8
abmargb/jamppa
src/main/java/org/jivesoftware/smack/XMPPConnection.java
XMPPConnection.initConnection
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/XMPPConnection.java#L672-L764
test
java
Initializes the connection by creating a packet reader and writer and opening a XMPP stream to the server. @throws XMPPException if establishing a connection to the server fails.
private void initConnection() throws XMPPException { boolean isFirstInitialization = packetReader == null || packetWriter == null; compressionHandler = null; serverAckdCompression = false; // Set the reader and writer instance variables initReaderAndWriter(); ...
Initializes the connection by creating a packet reader and writer and opening a XMPP stream to the server. @throws XMPPException if establishing a connection to the server fails. private void initConnection() throws XMPPException { boolean isFirstInitialization = packetReader == null || packet...
597
179
3,324
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0725f4f9e5ce32f667acdc6626c05a9552f3d29c07499603cab0e30ac01cfb42
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
beb295298961a3ecf40b280a
abmargb/jamppa
src/main/java/org/jivesoftware/smack/XMPPConnection.java
XMPPConnection.startTLSReceived
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/XMPPConnection.java#L829-L847
test
java
Notification message saying that the server supports TLS so confirm the server that we want to secure the connection. @param required true when the server indicates that TLS is required.
void startTLSReceived(boolean required) { if (required && config.getSecurityMode() == ConnectionConfiguration.SecurityMode.disabled) { notifyConnectionError(new IllegalStateException( "TLS required by server but not allowed by connection configuration")); ...
Notification message saying that the server supports TLS so confirm the server that we want to secure the connection. @param required true when the server indicates that TLS is required. void startTLSReceived(boolean required) { if (required && config.getSecurityMode() == ConnectionConfigurati...
170
187
751
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
dae29ea23ccd3475a68a917971ccd9631f4d31d82380e85d63a8a659b580f28e
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
80424a2c4a44f2802c5c8acc
abmargb/jamppa
src/main/java/org/jivesoftware/smack/XMPPConnection.java
XMPPConnection.proceedTLSReceived
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/XMPPConnection.java#L858-L952
test
java
The server has indicated that TLS negotiation can start. We now need to secure the existing plain connection and perform a handshake. This method won't return until the connection has finished the handshake or an error occured while securing the connection. @throws Exception if an exception occurs.
void proceedTLSReceived() throws Exception { SSLContext context = this.config.getCustomSSLContext(); KeyStore ks = null; KeyManager[] kms = null; PasswordCallback pcb = null; if (config.getCallbackHandler() == null) { ks = null; } else if (context == null) { ...
The server has indicated that TLS negotiation can start. We now need to secure the existing plain connection and perform a handshake. This method won't return until the connection has finished the handshake or an error occured while securing the connection. @throws Exception if an exception occurs. void proceedTLSRec...
819
300
4,072
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b65a6fbaa51609e93818463670c2206bd912946c09b0bbfd7eb0a0818a1a77f9
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
f607efcbc6b09766ae72b9d6
abmargb/jamppa
src/main/java/org/jivesoftware/smack/XMPPConnection.java
XMPPConnection.maybeGetCompressionHandler
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/XMPPConnection.java#L972-L984
test
java
Returns the compression handler that can be used for one compression methods offered by the server. @return a instance of XMPPInputOutputStream or null if no suitable instance was found
private XMPPInputOutputStream maybeGetCompressionHandler() { if (compressionMethods != null) { for (XMPPInputOutputStream handler : compressionHandlers) { if (!handler.isSupported()) continue; String method = handler.getCompressionMethod(); ...
Returns the compression handler that can be used for one compression methods offered by the server. @return a instance of XMPPInputOutputStream or null if no suitable instance was found private XMPPInputOutputStream maybeGetCompressionHandler() { if (compressionMethods != null) { for (XMPPInputOut...
110
186
457
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3059cd99728655638d89e9716f510f691082335a1168414214afaf36fa482661
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
d1da77c0fb24fd39713bf585
abmargb/jamppa
src/main/java/org/jivesoftware/smack/XMPPConnection.java
XMPPConnection.useCompression
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/XMPPConnection.java#L1008-L1029
test
java
Starts using stream compression that will compress network traffic. Traffic can be reduced up to 90%. Therefore, stream compression is ideal when using a slow speed network connection. However, the server and the client will need to use more CPU time in order to un/compress network data so under high load the server pe...
private boolean useCompression() { // If stream compression was offered by the server and we want to use // compression then send compression request to the server if (authenticated) { throw new IllegalStateException( "Compression should be negotiated before authe...
Starts using stream compression that will compress network traffic. Traffic can be reduced up to 90%. Therefore, stream compression is ideal when using a slow speed network connection. However, the server and the client will need to use more CPU time in order to un/compress network data so under high load the server pe...
293
727
902
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e549dccad12cc76deb981e340df3a12890b1d143dc09061a614f46d0bb763a52
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
135d22698aaa2e3f8dd80d4b
abmargb/jamppa
src/main/java/org/jivesoftware/smack/XMPPConnection.java
XMPPConnection.requestStreamCompression
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/XMPPConnection.java#L1037-L1045
test
java
Request the server that we want to start using stream compression. When using TLS then negotiation of stream compression can only happen after TLS was negotiated. If TLS compression is being used the stream compression should not be used.
private void requestStreamCompression(String method) { try { writer.write("<compress xmlns='http://jabber.org/protocol/compress'>"); writer.write("<method>" + method + "</method></compress>"); writer.flush(); } catch (IOException e) { notifyConnectionError...
Request the server that we want to start using stream compression. When using TLS then negotiation of stream compression can only happen after TLS was negotiated. If TLS compression is being used the stream compression should not be used. private void requestStreamCompression(String method) { try { ...
111
238
340
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
41b030f414a6f3c4e28fdc0ea5a2afbc89169e8e2dbd5e92b4e29abd7ba67ada
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
a1eb00a704c993ea8b3706c6
abmargb/jamppa
src/main/java/org/jivesoftware/smack/XMPPConnection.java
XMPPConnection.startStreamCompression
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/XMPPConnection.java#L1054-L1067
test
java
Start using stream compression since the server has acknowledged stream compression. @throws Exception if there is an exception starting stream compression.
void startStreamCompression() throws Exception { serverAckdCompression = true; // Initialize the reader and writer with the new secured version initReaderAndWriter(); // Set the new writer to use packetWriter.setWriter(writer); // Send a new opening stream to the server ...
Start using stream compression since the server has acknowledged stream compression. @throws Exception if there is an exception starting stream compression. void startStreamCompression() throws Exception { serverAckdCompression = true; // Initialize the reader and writer with the new secured version ...
117
157
476
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1f039fd83a9641420554dc49205bb09ae4adecbbce531353b0afff9e132a1276
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
675e9be5cdc2fe3e0291f652
abmargb/jamppa
src/main/java/org/jivesoftware/smack/XMPPConnection.java
XMPPConnection.connect
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/XMPPConnection.java#L1096-L1113
test
java
Establishes a connection to the XMPP server and performs an automatic login only if the previous connection state was logged (authenticated). It basically creates and maintains a socket connection to the server. <p> <p/> Listeners will be preserved from a previous connection if the reconnection occurs after an abrupt t...
public void connect() throws XMPPException { // Establishes the connection, readers and writers connectUsingConfiguration(config); // Automatically makes the login if the user was previously connected // successfully // to the server and the connection was terminated abruptly ...
Establishes a connection to the XMPP server and performs an automatic login only if the previous connection state was logged (authenticated). It basically creates and maintains a socket connection to the server. <p> <p/> Listeners will be preserved from a previous connection if the reconnection occurs after an abrupt t...
252
681
702
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
2bf6b6b21c984499da2a959709f6fa3bf2be32fc45fb4ca984a1078f00ed36e0
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
a77af932589c0399e53676ae
abmargb/jamppa
src/main/java/org/jivesoftware/smack/XMPPConnection.java
XMPPConnection.notifyConnectionError
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/XMPPConnection.java#L1134-L1156
test
java
Sends out a notification that there was an error with the connection and closes the connection. Also prints the stack trace of the given exception @param e the exception that causes the connection close event.
synchronized void notifyConnectionError(Exception e) { // Listeners were already notified of the exception, return right here. if ((packetReader == null || packetReader.done) && (packetWriter == null || packetWriter.done)) return; if (packetReader != null) ...
Sends out a notification that there was an error with the connection and closes the connection. Also prints the stack trace of the given exception @param e the exception that causes the connection close event. synchronized void notifyConnectionError(Exception e) { // Listeners were already notified of the exc...
218
210
958
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
6c797e694d9abbba28845dfa86359fccc7312ccd5519745954ad6cd9b576c043
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
4cf135849d56bad9a768b463
abmargb/jamppa
src/main/java/org/jivesoftware/smack/XMPPConnection.java
XMPPConnection.notifyReconnection
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/XMPPConnection.java#L1162-L1173
test
java
Sends a notification indicating that the connection was reconnected successfully.
protected void notifyReconnection() { // Notify connection listeners of the reconnection. for (ConnectionListener listener : getConnectionListeners()) { try { listener.reconnectionSuccessful(); } catch (Exception e) { // Catch and print any excepti...
Sends a notification indicating that the connection was reconnected successfully. protected void notifyReconnection() { // Notify connection listeners of the reconnection. for (ConnectionListener listener : getConnectionListeners()) { try { listener.reconnectionSuccessful();...
88
81
449
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
9fe2a9c85b3603d2fbcfe0cd91aeff82c8325de79e2b98f0d4144448028f0ecf
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
23f17be9847462faa58b1180
abmargb/jamppa
src/main/java/org/jivesoftware/smack/SASLAuthentication.java
SASLAuthentication.registerSASLMechanism
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/SASLAuthentication.java#L138-L141
test
java
Registers a new SASL mechanism @param name common name of the SASL mechanism. E.g.: PLAIN, DIGEST-MD5 or KERBEROS_V4. @param mClass a SASLMechanism subclass.
public static void registerSASLMechanism(String name, Class<? extends SASLMechanism> mClass) { implementedMechanisms.put(name, mClass); }
Registers a new SASL mechanism @param name common name of the SASL mechanism. E.g.: PLAIN, DIGEST-MD5 or KERBEROS_V4. @param mClass a SASLMechanism subclass. public static void registerSASLMechanism(String name, Class<? extends SASLMechanism> mClass) { implementedMechanisms.put(name, mClass); ...
86
158
161
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
26529b0cedea78e05951e792afbab7fa25108f44e3d01b13abb4a01f7df5914c
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
05bfed03861d9f87c60a9ce4
abmargb/jamppa
src/main/java/org/jivesoftware/smack/SASLAuthentication.java
SASLAuthentication.getRegisterSASLMechanisms
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/SASLAuthentication.java#L211-L217
test
java
Returns the registerd SASLMechanism classes sorted by the level of preference. @return the registerd SASLMechanism classes sorted by the level of preference.
public static List<Class<? extends SASLMechanism>> getRegisterSASLMechanisms() { List<Class<? extends SASLMechanism>> answer = new ArrayList<Class<? extends SASLMechanism>>(); for (String mechanismsPreference : mechanismsPreferences) { answer.add(implementedMechanisms.get(mechanismsPreferenc...
Returns the registerd SASLMechanism classes sorted by the level of preference. @return the registerd SASLMechanism classes sorted by the level of preference. public static List<Class<? extends SASLMechanism>> getRegisterSASLMechanisms() { List<Class<? extends SASLMechanism>> answer = new ArrayList<Class<? ext...
113
158
363
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
27dc3126a2a640155bf411b39a8e7f09863f15e739a2b53266c59b2c2c5cacd4
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
631d5349de05b93f1571687d
abmargb/jamppa
src/main/java/org/jivesoftware/smack/SASLAuthentication.java
SASLAuthentication.authenticate
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/SASLAuthentication.java#L269-L340
test
java
Performs SASL authentication of the specified user. If SASL authentication was successful then resource binding and session establishment will be performed. This method will return the full JID provided by the server while binding a resource to the connection. <p> The server may assign a full JID with a username or re...
public String authenticate(String username, String resource, CallbackHandler cbh) throws XMPPException { // Locate the SASLMechanism to use String selectedMechanism = null; for (String mechanism : mechanismsPreferences) { if (implementedMechanisms.containsKey(mechanism) ...
Performs SASL authentication of the specified user. If SASL authentication was successful then resource binding and session establishment will be performed. This method will return the full JID provided by the server while binding a resource to the connection. <p> The server may assign a full JID with a username or re...
660
700
3,126
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d87588a876e32a7e5e9707a87b49e6d9530ff83e469e96552a4c74fca52531da
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
496b3c5628202f9ad5aaa0ca
abmargb/jamppa
src/main/java/org/jivesoftware/smack/SASLAuthentication.java
SASLAuthentication.authenticate
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/SASLAuthentication.java#L363-L447
test
java
Performs SASL authentication of the specified user. If SASL authentication was successful then resource binding and session establishment will be performed. This method will return the full JID provided by the server while binding a resource to the connection. <p> The server may assign a full JID with a username or re...
public String authenticate(String username, String password, String resource) throws XMPPException { // Locate the SASLMechanism to use String selectedMechanism = null; for (String mechanism : mechanismsPreferences) { if (implementedMechanisms.containsKey(mechanism) ...
Performs SASL authentication of the specified user. If SASL authentication was successful then resource binding and session establishment will be performed. This method will return the full JID provided by the server while binding a resource to the connection. <p> The server may assign a full JID with a username or re...
790
683
3,936
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e1abd7b58386c2783610f68c6cc4d9d26e80def1cb9c442f366bfe0c50284770
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
566ab2ec77a118bf907d0b59
abmargb/jamppa
src/main/java/org/jivesoftware/smack/SASLAuthentication.java
SASLAuthentication.authenticateAnonymously
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/SASLAuthentication.java#L464-L503
test
java
Performs ANONYMOUS SASL authentication. If SASL authentication was successful then resource binding and session establishment will be performed. This method will return the full JID provided by the server while binding a resource to the connection. <p> The server will assign a full JID with a randomly generated resour...
public String authenticateAnonymously() throws XMPPException { try { currentMechanism = new SASLAnonymous(this); currentMechanism.authenticate(null, null, null, ""); // Wait until SASL negotiation finishes synchronized (this) { if (!saslNegotiated...
Performs ANONYMOUS SASL authentication. If SASL authentication was successful then resource binding and session establishment will be performed. This method will return the full JID provided by the server while binding a resource to the connection. <p> The server will assign a full JID with a randomly generated resour...
363
506
1,485
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
978af3f2bfb908afc0f5b9200831542b4e0956d6ce81fda66770c5ee3e80ddc3
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
47412bc6200237f5412d18a8
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/ObservableWriter.java
ObservableWriter.notifyListeners
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/ObservableWriter.java#L79-L88
test
java
Notify that a new string has been written. @param str the written String to notify
private void notifyListeners(String str) { WriterListener[] writerListeners = null; synchronized (listeners) { writerListeners = new WriterListener[listeners.size()]; listeners.toArray(writerListeners); } for (int i = 0; i < writerListeners.length; i++) { ...
Notify that a new string has been written. @param str the written String to notify private void notifyListeners(String str) { WriterListener[] writerListeners = null; synchronized (listeners) { writerListeners = new WriterListener[listeners.size()]; listeners.toArray(writerList...
90
83
370
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
c58ca508d2732ef6da6ad2b10b589aa3aaaa5fa602ddd5f95765193ad8ddec09
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
fadef4e2159f379bf844be5d
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/collections/decorators/SynchronizedTransactionalSortedFilterableBidiMap.java
SynchronizedTransactionalSortedFilterableBidiMap.decorate
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/collections/decorators/SynchronizedTransactionalSortedFilterableBidiMap.java#L41-L43
test
java
Factory method to create a synchronized map. @param map the map to decorate, must not be null @throws IllegalArgumentException if map is null
public static <K,V> TransactionalSortedFilterableBidiMap<K,V> decorate(TransactionalSortedFilterableBidiMap<K,V> map) { return new SynchronizedTransactionalSortedFilterableBidiMap<K,V>(map); }
Factory method to create a synchronized map. @param map the map to decorate, must not be null @throws IllegalArgumentException if map is null public static <K,V> TransactionalSortedFilterableBidiMap<K,V> decorate(TransactionalSortedFilterableBidiMap<K,V> map) { return new SynchronizedTransactionalSortedFilt...
80
143
206
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
bb2695f7acd4f2c3cc107d2dd0ab6888c172a782c4ddc8ca9ed8a846783e8378
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
241e43ac59e2d2fee7af242c
vdmeer/execs
src/main/java/de/vandermeer/execs/cf/CF_Locator.java
CF_Locator.setJarFilter
https://github.com/vdmeer/execs/blob/ac73170bfd449de1f460248d56ece57ff3b0c761/src/main/java/de/vandermeer/execs/cf/CF_Locator.java#L70-L77
test
java
Sets a jar filter. @param jarFilter new filter, use null or empty list to not filter. The list will be copied locally. @return self to allow for chaining
public CF_Locator setJarFilter(List<String> jarFilter){ this.jarFilter.clear(); if(jarFilter!=null){ this.jarFilter.addAll(jarFilter); } this.needsReRun = true; return this; }
Sets a jar filter. @param jarFilter new filter, use null or empty list to not filter. The list will be copied locally. @return self to allow for chaining public CF_Locator setJarFilter(List<String> jarFilter){ this.jarFilter.clear(); if(jarFilter!=null){ this.jarFilter.addAll(jarFilter); } this.needsReRun =...
88
153
189
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b17139f1b997933b7d29a61ae44e6e41a2222e44526da555ce3d940e7e5dc916
Apache-2.0
permissive
https://github.com/vdmeer/execs/blob/master/LICENSE
5f0fc68932bf36ae6591d6a9
vdmeer/execs
src/main/java/de/vandermeer/execs/cf/CF_Locator.java
CF_Locator.getCfLocations
https://github.com/vdmeer/execs/blob/ac73170bfd449de1f460248d56ece57ff3b0c761/src/main/java/de/vandermeer/execs/cf/CF_Locator.java#L96-L113
test
java
Runs the locator and collects all locations using the filters if set. The method can be called multiple times and will only result in a new map if any of the filters have been changed. If no filter has been changed, the current map will be returned. @return returns a map with all found locations, empty if none found
public Map<URI, String> getCfLocations(){ if(this.needsReRun==true){ this.locationMap.clear(); String pathSep = System.getProperty("path.separator"); String classpath = System.getProperty("java.class.path"); StringTokenizer st = new StringTokenizer(classpath, pathSep); File file = null; while(st.ha...
Runs the locator and collects all locations using the filters if set. The method can be called multiple times and will only result in a new map if any of the filters have been changed. If no filter has been changed, the current map will be returned. @return returns a map with all found locations, empty if none found p...
182
317
487
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
12d786abb8ddc074a41bd374b70fa967209d50434cf1e2309410b5d64fb54388
Apache-2.0
permissive
https://github.com/vdmeer/execs/blob/master/LICENSE
6493ca0790192f8c1b19bb40
vdmeer/execs
src/main/java/de/vandermeer/execs/cf/CF_Locator.java
CF_Locator.include
https://github.com/vdmeer/execs/blob/ac73170bfd449de1f460248d56ece57ff3b0c761/src/main/java/de/vandermeer/execs/cf/CF_Locator.java#L128-L165
test
java
Include a name and file @param name name to be included, if null will be set to empty @param file file to be included
protected final void include(String name, File file){ if(!file.exists()){ return; } if(!file.isDirectory()){ if(this.jarFilter.size()>0){ boolean ok = false; for(String s : this.jarFilter){ if(file.getName().startsWith(s)){ ok = true; } } if(ok==false){ return; } ...
Include a name and file @param name name to be included, if null will be set to empty @param file file to be included protected final void include(String name, File file){ if(!file.exists()){ return; } if(!file.isDirectory()){ if(this.jarFilter.size()>0){ boolean ok = false; for(String s : this.jar...
243
117
780
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
9711d28578a65240e165cbf11af04ecb60d32947949e40451277c660517569c9
Apache-2.0
permissive
https://github.com/vdmeer/execs/blob/master/LICENSE
ae7a00369dbe3927a29a8c31
vdmeer/execs
src/main/java/de/vandermeer/execs/cf/CF_Locator.java
CF_Locator.includeJar
https://github.com/vdmeer/execs/blob/ac73170bfd449de1f460248d56ece57ff3b0c761/src/main/java/de/vandermeer/execs/cf/CF_Locator.java#L171-L210
test
java
Include from a jar file @param file jar file
private void includeJar(File file){ if(file.isDirectory()){ return; } URL jarURL = null; JarFile jar = null; try{ jarURL = new URL("jar:" + new URL("file:/" + file.getCanonicalPath()).toExternalForm() + "!/"); JarURLConnection conn = (JarURLConnection)jarURL.openConnection(); jar = conn.getJarFil...
Include from a jar file @param file jar file private void includeJar(File file){ if(file.isDirectory()){ return; } URL jarURL = null; JarFile jar = null; try{ jarURL = new URL("jar:" + new URL("file:/" + file.getCanonicalPath()).toExternalForm() + "!/"); JarURLConnection conn = (JarURLConnection)ja...
282
44
1,045
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
87737f1ff30bc2cff8d6a48bfd84c0ee12e1b1ffa4581c99fd03369c5fca9b92
Apache-2.0
permissive
https://github.com/vdmeer/execs/blob/master/LICENSE
b75165bf9693e06ab350d141
abmargb/jamppa
src/main/java/org/jivesoftware/smack/SmackConfiguration.java
SmackConfiguration.addSaslMech
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/SmackConfiguration.java#L178-L184
test
java
Add a SASL mechanism to the list to be used. @param mech the SASL mechanism to be added
public static void addSaslMech(String mech) { initialize(); if (!defaultMechs.contains(mech)) { defaultMechs.add(mech); } }
Add a SASL mechanism to the list to be used. @param mech the SASL mechanism to be added public static void addSaslMech(String mech) { initialize(); if (!defaultMechs.contains(mech)) { defaultMechs.add(mech); } }
60
88
164
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
92384775d4ce423881420dac2ed0def6a60966b43267f040050850e3d397f636
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
5b580a28bb08207b615b3b2c
abmargb/jamppa
src/main/java/org/jivesoftware/smack/SmackConfiguration.java
SmackConfiguration.addSaslMechs
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/SmackConfiguration.java#L192-L198
test
java
Add a Collection of SASL mechanisms to the list to be used. @param mechs the Collection of SASL mechanisms to be added
public static void addSaslMechs(Collection<String> mechs) { initialize(); for (String mech : mechs) { addSaslMech(mech); } }
Add a Collection of SASL mechanisms to the list to be used. @param mechs the Collection of SASL mechanisms to be added public static void addSaslMechs(Collection<String> mechs) { initialize(); for (String mech : mechs) { addSaslMech(mech); } }
68
119
165
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
dc4f975f9f0c934508033b4b99c30fda99cc37127a8b70f01eb782e25cff12a0
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
2e98c3d1c1fcbf590c654fff
abmargb/jamppa
src/main/java/org/jivesoftware/smack/debugger/ConsoleDebugger.java
ConsoleDebugger.createDebug
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/debugger/ConsoleDebugger.java#L73-L149
test
java
Creates the listeners that will print in the console when new activity is detected.
private void createDebug() { // Create a special Reader that wraps the main Reader and logs data to // the GUI. ObservableReader debugReader = new ObservableReader(reader); readerListener = new ReaderListener() { public void read(String str) { System.out.print...
Creates the listeners that will print in the console when new activity is detected. private void createDebug() { // Create a special Reader that wraps the main Reader and logs data to // the GUI. ObservableReader debugReader = new ObservableReader(reader); readerListener = new ReaderLis...
586
83
3,272
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
8991f34d916a6ac004f87d4c65b3ec0f359172d64cf0016e64a6ff41848012f1
Apache-2.0
permissive
https://github.com/abmargb/jamppa/blob/master/LICENSE
44270e65a6a4fb1bc0f5a08c
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/internal/ClusterIdentifier.java
ClusterIdentifier.getInstance
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/internal/ClusterIdentifier.java#L42-L45
test
java
Helper method to get an instance of {@link ClusterIdentifier}. @param hostsAndPorts example {@code "localhost:9042,host2,host3:19042"} @param username username to authenticate against Cassandra cluster @param password password to authenticate against Cassandra cluster @return
public static ClusterIdentifier getInstance(String hostsAndPorts, String username, String password) { return getInstance(hostsAndPorts, username, password, null); }
Helper method to get an instance of {@link ClusterIdentifier}. @param hostsAndPorts example {@code "localhost:9042,host2,host3:19042"} @param username username to authenticate against Cassandra cluster @param password password to authenticate against Cassandra cluster @return public static ClusterIdentifier getInstan...
92
277
188
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
105e668c8615e92a9662225721886c6f66d92c093c53ecfe135e26dac4199951
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
c33c675133b74a37597eef3d
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/internal/ClusterIdentifier.java
ClusterIdentifier.getInstance
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/internal/ClusterIdentifier.java#L60-L68
test
java
Helper method to get an instance of {@link ClusterIdentifier}. @param hostsAndPorts example {@code "localhost:9042,host2,host3:19042"} @param username username to authenticate against Cassandra cluster @param password password to authenticate against Cassandra cluster @param authorizationId DSE's proxied user/role id ...
public static ClusterIdentifier getInstance(String hostsAndPorts, String username, String password, String authorizationId) { String[] key = { hostsAndPorts, username, password, authorizationId }; try { return cache.get(key); } catch (ExecutionException e) { t...
Helper method to get an instance of {@link ClusterIdentifier}. @param hostsAndPorts example {@code "localhost:9042,host2,host3:19042"} @param username username to authenticate against Cassandra cluster @param password password to authenticate against Cassandra cluster @param authorizationId DSE's proxied user/role id ...
145
348
365
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
6156e0325a0c62fa68e8fae4cf3e77e80a9961c3b934ed5da80a79752567bcd3
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
c889182d1564bbda1e90565a
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/DseUtils.java
DseUtils.newDseCluster
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/DseUtils.java#L38-L41
test
java
Build a new DSE cluster instance. @param hostsAndPorts format: "host1:port1,host2,host3:port3". If no port is specified, the {@link #DEFAULT_CASSANDRA_PORT} is used. @param username @param password @param proxiedUser DSE allows a user to connect as another user or role, provide the name of the user/role you want to co...
public static DseCluster newDseCluster(String hostsAndPorts, String username, String password, String proxiedUser) { return newDseCluster(hostsAndPorts, username, password, proxiedUser, null); }
Build a new DSE cluster instance. @param hostsAndPorts format: "host1:port1,host2,host3:port3". If no port is specified, the {@link #DEFAULT_CASSANDRA_PORT} is used. @param username @param password @param proxiedUser DSE allows a user to connect as another user or role, provide the name of the user/role you want to co...
146
355
218
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
01693d8acf8d0cb2d0e3b88f3c3050e64ab4652b1182130cd6f9be58f897304f
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
7acfc06345200eeee30b2336
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/DseUtils.java
DseUtils.newDseCluster
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/DseUtils.java#L57-L84
test
java
Build a new DSE cluster instance. @param hostsAndPorts format: "host1:port1,host2,host3:port3". If no port is specified, the {@link #DEFAULT_CASSANDRA_PORT} is used. @param username @param password @param proxiedUser DSE allows a user to connect as another user or role, provide the name of the user/role you want to co...
public static DseCluster newDseCluster(String hostsAndPorts, String username, String password, String proxiedUser, Configuration configuration) { DseCluster.Builder builder = DseCluster.builder(); if (!StringUtils.isBlank(username)) { AuthProvider authProvider; if (St...
Build a new DSE cluster instance. @param hostsAndPorts format: "host1:port1,host2,host3:port3". If no port is specified, the {@link #DEFAULT_CASSANDRA_PORT} is used. @param username @param password @param proxiedUser DSE allows a user to connect as another user or role, provide the name of the user/role you want to co...
366
376
1,393
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
9b9f8fa369913f50dde692fa6232023fee8bdd76f8b15a37b9028cf055bc8778
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
7ba5b5729d1f9d8b3abb2fdf
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/DseUtils.java
DseUtils.newDseSession
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/DseUtils.java#L97-L99
test
java
Create a new session for a DSE cluster, initializes it and sets the keyspace to the provided one. @param cluster @param keyspace @return @throws NoHostAvailableException @throws AuthenticationException @throws IllegalStateException
public static DseSession newDseSession(DseCluster cluster, String keyspace) { return cluster.connect(StringUtils.isBlank(keyspace) ? null : keyspace); }
Create a new session for a DSE cluster, initializes it and sets the keyspace to the provided one. @param cluster @param keyspace @return @throws NoHostAvailableException @throws AuthenticationException @throws IllegalStateException public static DseSession newDseSession(DseCluster cluster, String keyspace) { ...
84
232
164
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
9772623f5eafb11aa48e9a9d5d7db10e2995242e461073a8c5603c92b355be5f
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
9e393f47d109d87cfc424525
jillesvangurp/urlbuilder
src/main/java/com/github/jillesvangurp/urlbuilder/UrlBuilder.java
UrlBuilder.append
https://github.com/jillesvangurp/urlbuilder/blob/22a8a4edf74a08b07cb17aad08c58c9feec8a2c0/src/main/java/com/github/jillesvangurp/urlbuilder/UrlBuilder.java#L109-L127
test
java
Appends one or more postfixes and separates them by slashes. @param encode if true, the postFixes are url encoded. @param postFix one or more String values @return the builder
public UrlBuilder append(boolean encode,String... postFix) { for (String part : postFix) { if(StringUtils.isNotBlank(part)) { if (url.charAt(url.length() - 1) != '/' && !part.startsWith("/")) { url.append('/'); } if(encode) { ...
Appends one or more postfixes and separates them by slashes. @param encode if true, the postFixes are url encoded. @param postFix one or more String values @return the builder public UrlBuilder append(boolean encode,String... postFix) { for (String part : postFix) { if(StringUtils.isNotBlank(part))...
156
175
686
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e611f404bcc6d0e6a1ca1b7226a6884f38c9371eaebc59c9f4845b62327aa859
MIT
permissive
https://github.com/jillesvangurp/urlbuilder/blob/master/LICENSE
236b03d4284e573b7e3c8804
jillesvangurp/urlbuilder
src/main/java/com/github/jillesvangurp/urlbuilder/UrlBuilder.java
UrlBuilder.queryParam
https://github.com/jillesvangurp/urlbuilder/blob/22a8a4edf74a08b07cb17aad08c58c9feec8a2c0/src/main/java/com/github/jillesvangurp/urlbuilder/UrlBuilder.java#L135-L141
test
java
Create a query parameter with a boolean value. @param name parameter name @param value value @return the builder
public UrlBuilder queryParam(String name, Boolean value) { if(value != null) { return queryParam(name, value.toString()); } else { return null; } }
Create a query parameter with a boolean value. @param name parameter name @param value value @return the builder public UrlBuilder queryParam(String name, Boolean value) { if(value != null) { return queryParam(name, value.toString()); } else { return null; } }
62
112
199
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
c2d0a7dd368a05c82bfa5466215768e2f56e7095aaf66a8a8dea16dff07fd843
MIT
permissive
https://github.com/jillesvangurp/urlbuilder/blob/master/LICENSE
4e547c6d11e773f2c6603de8
jillesvangurp/urlbuilder
src/main/java/com/github/jillesvangurp/urlbuilder/UrlBuilder.java
UrlBuilder.queryParam
https://github.com/jillesvangurp/urlbuilder/blob/22a8a4edf74a08b07cb17aad08c58c9feec8a2c0/src/main/java/com/github/jillesvangurp/urlbuilder/UrlBuilder.java#L149-L155
test
java
Create a query parameter with a number value. @param name parameter name @param value value @return the builder
public UrlBuilder queryParam(String name, Number value) { if(value != null) { return queryParam(name, value.toString()); } else { return null; } }
Create a query parameter with a number value. @param name parameter name @param value value @return the builder public UrlBuilder queryParam(String name, Number value) { if(value != null) { return queryParam(name, value.toString()); } else { return null; } }
62
111
198
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ec5280f81c4a4eb7ab0956f439a91c8247d2eba61bd6758711d637cfac6e80cb
MIT
permissive
https://github.com/jillesvangurp/urlbuilder/blob/master/LICENSE
bf9605328eeee4dac077f20e
jillesvangurp/urlbuilder
src/main/java/com/github/jillesvangurp/urlbuilder/UrlBuilder.java
UrlBuilder.queryParam
https://github.com/jillesvangurp/urlbuilder/blob/22a8a4edf74a08b07cb17aad08c58c9feec8a2c0/src/main/java/com/github/jillesvangurp/urlbuilder/UrlBuilder.java#L163-L165
test
java
Create a query parameter with a String value. The value will be urlencoded. @param name name @param value value @return the builder
public UrlBuilder queryParam(String name, String value) { return queryParam(name, value, true); }
Create a query parameter with a String value. The value will be urlencoded. @param name name @param value value @return the builder public UrlBuilder queryParam(String name, String value) { return queryParam(name, value, true); }
52
131
109
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f38f1fbc813cfdfceb4c91a4aa649236a742b7d5f8132f3731adde8e71963df0
MIT
permissive
https://github.com/jillesvangurp/urlbuilder/blob/master/LICENSE
8628a61d179ea49a7eddc70e
jillesvangurp/urlbuilder
src/main/java/com/github/jillesvangurp/urlbuilder/UrlBuilder.java
UrlBuilder.queryParam
https://github.com/jillesvangurp/urlbuilder/blob/22a8a4edf74a08b07cb17aad08c58c9feec8a2c0/src/main/java/com/github/jillesvangurp/urlbuilder/UrlBuilder.java#L174-L186
test
java
Create a query parameter with a String value. @param name name @param value value @param encode if true, the value is urlencoded. @return the builder
public UrlBuilder queryParam(String name, String value, boolean encode) { if (StringUtils.isNotEmpty(value)) { if (encode) { try { value = URLEncoder.encode(value, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new I...
Create a query parameter with a String value. @param name name @param value value @param encode if true, the value is urlencoded. @return the builder public UrlBuilder queryParam(String name, String value, boolean encode) { if (StringUtils.isNotEmpty(value)) { if (encode) { try { ...
114
149
465
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
24fdf99064a85e08576c5b3e3a6c2cf2c122a8859808361c471a1ef94d5fae9b
MIT
permissive
https://github.com/jillesvangurp/urlbuilder/blob/master/LICENSE
759c4a6491d518ba69bcdb96
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/collections/IntArray.java
IntArray.with
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/collections/IntArray.java#L34-L40
test
java
Replace contents with given values
public IntArray with(int... values) { if (values.length != this.length) throw new IllegalArgumentException("Array size mismatch"); value = values.clone(); return this; }
Replace contents with given values public IntArray with(int... values) { if (values.length != this.length) throw new IllegalArgumentException("Array size mismatch"); value = values.clone(); return this; }
46
34
219
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
71be8f6e1f1b8650cbf15bb935f4c42605474f1591585f3f2f5293bc78957d69
Apache-2.0
permissive
https://github.com/workplacesystems/utilsj/blob/master/LICENSE
be727a2fb440c5aa63f9ce8a
firepick1/firerest-client
src/main/java/org/firepick/JSONResult.java
JSONResult.get
https://github.com/firepick1/firerest-client/blob/f43c85ca093b1f9f62f0375f905adae9351de1e6/src/main/java/org/firepick/JSONResult.java#L45-L54
test
java
Advance current JSON value to specified element in JSON array. Set current JSON value to null otherwise. @param index zero-based JSON array index @return JSONResult for fluent method chaining
public JSONResult get(int index) { if (value instanceof JSONArray) { JSONArray array = (JSONArray) value; Object result = array.get(index); return new JSONResult(result); } else if (value instanceof JSONObject) { return get(String.valueOf(index)); } return new JSONResult(null); ...
Advance current JSON value to specified element in JSON array. Set current JSON value to null otherwise. @param index zero-based JSON array index @return JSONResult for fluent method chaining public JSONResult get(int index) { if (value instanceof JSONArray) { JSONArray array = (JSONArray) value; Obje...
103
192
322
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
705708a28c6c623e924b70ea482ed0b17bec2ba9862215a674a1fe35e3c3653b
MIT
permissive
https://github.com/firepick1/firerest-client/blob/master/LICENSE
3923d219c45cd5346d6205d9
firepick1/firerest-client
src/main/java/org/firepick/JSONResult.java
JSONResult.get
https://github.com/firepick1/firerest-client/blob/f43c85ca093b1f9f62f0375f905adae9351de1e6/src/main/java/org/firepick/JSONResult.java#L63-L77
test
java
Advance current JSON value to specified value of current JSON object. Set current JSON value to null otherwise. @param key element key @return JSONResult for fluent method chaining
public JSONResult get(String key) { if (value instanceof JSONObject) { JSONObject obj = (JSONObject) value; Object result = obj.get(key); return new JSONResult(result); } else if (value instanceof JSONArray) { try { int index = Integer.parseInt(key); return get(index); } catch(Nu...
Advance current JSON value to specified value of current JSON object. Set current JSON value to null otherwise. @param key element key @return JSONResult for fluent method chaining public JSONResult get(String key) { if (value instanceof JSONObject) { JSONObject obj = (JSONObject) value; Object result...
132
181
463
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
de00f358c80e7455db780934b8d07a970071dd5d06cf7e43a44ac13465d435c3
MIT
permissive
https://github.com/firepick1/firerest-client/blob/master/LICENSE
4e205815bba49ae9a77f0a1c
firepick1/firerest-client
src/main/java/org/firepick/JSONResult.java
JSONResult.getInt
https://github.com/firepick1/firerest-client/blob/f43c85ca093b1f9f62f0375f905adae9351de1e6/src/main/java/org/firepick/JSONResult.java#L109-L121
test
java
Return an integer for current JSON value, parsing string values as required.
public Integer getInt(Integer defaultValue) { if (value instanceof Number) { return ((Number) value).intValue(); } if (value instanceof String) { String s = (String) value; return Integer.parseInt(s); } if (value == null) { return defaultValue; } throw createException...
Return an integer for current JSON value, parsing string values as required. public Integer getInt(Integer defaultValue) { if (value instanceof Number) { return ((Number) value).intValue(); } if (value instanceof String) { String s = (String) value; return Integer.parseInt(s); } i...
89
76
346
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
9adc5bffed89fa2d4d783dcd035e6b530437fe33ac7eeea934213b3924e4e450
MIT
permissive
https://github.com/firepick1/firerest-client/blob/master/LICENSE
f41890138813534213cf224f
firepick1/firerest-client
src/main/java/org/firepick/JSONResult.java
JSONResult.getDouble
https://github.com/firepick1/firerest-client/blob/f43c85ca093b1f9f62f0375f905adae9351de1e6/src/main/java/org/firepick/JSONResult.java#L133-L145
test
java
Return a double number for current JSON value, parsing string values as required.
public Double getDouble(Double defaultValue) { if (value instanceof Number) { return ((Number) value).doubleValue(); } if (value instanceof String) { String s = (String) value; return Double.parseDouble(s); } if (value == null) { return defaultValue; } throw createExc...
Return a double number for current JSON value, parsing string values as required. public Double getDouble(Double defaultValue) { if (value instanceof Number) { return ((Number) value).doubleValue(); } if (value instanceof String) { String s = (String) value; return Double.parseDouble(s); ...
91
81
351
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
03c7613c30f81056fd635974fe7bd64d65a795d87c9d7b0ef0cf657c0a82ea14
MIT
permissive
https://github.com/firepick1/firerest-client/blob/master/LICENSE
04369ab5e8bce81789e626dc
firepick1/firerest-client
src/main/java/org/firepick/JSONResult.java
JSONResult.getString
https://github.com/firepick1/firerest-client/blob/f43c85ca093b1f9f62f0375f905adae9351de1e6/src/main/java/org/firepick/JSONResult.java#L157-L174
test
java
Return string value for current JSON value
public String getString(String defaultValue) { if (value instanceof String || value instanceof Number) { return value.toString(); } if (value == null) { return null; } if (value instanceof JSONArray) { return ((JSONArray) value).toJSONString(); } if (value instanceof JSONOb...
Return string value for current JSON value public String getString(String defaultValue) { if (value instanceof String || value instanceof Number) { return value.toString(); } if (value == null) { return null; } if (value instanceof JSONArray) { return ((JSONArray) value).toJSONStr...
114
42
492
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
967120e22900daca967571b8718636799de0685f97d9d64d67879b9349ce2ead
MIT
permissive
https://github.com/firepick1/firerest-client/blob/master/LICENSE
40891a6bd813ec8ce83695c9
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/SessionManager.java
SessionManager.createCluster
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/SessionManager.java#L534-L536
test
java
Create a {@link Cluster} instance. @param ci @return @since 0.4.0
protected Cluster createCluster(ClusterIdentifier ci) { return CqlUtils.newCluster(ci.hostsAndPorts, ci.username, ci.password, getConfiguration()); }
Create a {@link Cluster} instance. @param ci @return @since 0.4.0 protected Cluster createCluster(ClusterIdentifier ci) { return CqlUtils.newCluster(ci.hostsAndPorts, ci.username, ci.password, getConfiguration()); }
56
66
161
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
c342e7b1eda89702ffe26703fb6bc8dd1ab92e3af0a7ab39b3c1a084f95980b5
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
2fa63cd38a64d75b8342087f
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/SessionManager.java
SessionManager.createSession
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/SessionManager.java#L545-L547
test
java
Create a {@link Session} instance. @param cluster @param keyspace @return
protected Session createSession(Cluster cluster, String keyspace) { return CqlUtils.newSession(cluster, keyspace); }
Create a {@link Session} instance. @param cluster @param keyspace @return protected Session createSession(Cluster cluster, String keyspace) { return CqlUtils.newSession(cluster, keyspace); }
44
74
128
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
07ab5173302e3d278b276fed312f8b4380856a86148c0ac6a88412c292dc1a74
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
93d759a10e76dd7904dbaaf8
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/SessionManager.java
SessionManager.getCluster
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/SessionManager.java#L731-L745
test
java
Obtain a Cassandra cluster instance. @param key @return @since 0.4.0
synchronized protected Cluster getCluster(ClusterIdentifier key) { Cluster cluster; try { cluster = clusterCache.get(key); if (cluster.isClosed()) { LOGGER.info("Cluster [" + cluster + "] was closed, obtaining a new one..."); clusterCache.invalidat...
Obtain a Cassandra cluster instance. @param key @return @since 0.4.0 synchronized protected Cluster getCluster(ClusterIdentifier key) { Cluster cluster; try { cluster = clusterCache.get(key); if (cluster.isClosed()) { LOGGER.info("Cluster [" + cluster + "] was c...
130
69
609
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
c436ec8efdf226ff1417406b0c4b93b89f4dbf0353926cca17d93b4e1a238013
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
f22782c624b202bdb2b2fa58
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/SessionManager.java
SessionManager.getCluster
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/SessionManager.java#L757-L759
test
java
Obtain a Cassandra cluster instance. @param hostsAndPorts format: "host1:port1,host2,host3:port3". If no port is specified, the {@link CqlUtils#DEFAULT_CASSANDRA_PORT} is used. @param username @param password @return
public Cluster getCluster(String hostsAndPorts, String username, String password) { return getCluster(ClusterIdentifier.getInstance(hostsAndPorts, username, password)); }
Obtain a Cassandra cluster instance. @param hostsAndPorts format: "host1:port1,host2,host3:port3". If no port is specified, the {@link CqlUtils#DEFAULT_CASSANDRA_PORT} is used. @param username @param password @return public Cluster getCluster(String hostsAndPorts, String username, String password) { return ge...
97
217
182
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d2f7dcfb6b4684cdd275819daf44405f0306448a517ad70c46806178c51b67a5
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
12b7723283b9fd24ad4f124a
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/SessionManager.java
SessionManager.getSession
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/SessionManager.java#L789-L792
test
java
Obtain a Cassandra session instance. <p> The existing session instance will be returned if such existed. </p> @param hostsAndPorts @param username @param password @param keyspace @return @throws NoHostAvailableException @throws AuthenticationException
public Session getSession(String hostsAndPorts, String username, String password, String keyspace) { return getSession(hostsAndPorts, username, password, keyspace, false); }
Obtain a Cassandra session instance. <p> The existing session instance will be returned if such existed. </p> @param hostsAndPorts @param username @param password @param keyspace @return @throws NoHostAvailableException @throws AuthenticationException public Session getSession(String hostsAndPorts, String username, ...
91
253
197
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
a1410fef69c217872b361c766610c16e9b5d02cbc84d7abae98a87ca33255cae
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
e26f7e680f9d4c15acc2a708
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/SessionManager.java
SessionManager.getSession
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/SessionManager.java#L801-L831
test
java
Obtain a Cassandra session instance. @param si @param forceNew @return
synchronized protected Session getSession(SessionIdentifier si, boolean forceNew) { /* * Since 0.2.6: refresh cluster cache before obtaining the session to * avoid exception * "You may have used a PreparedStatement that was created with another Cluster instance" */ Cl...
Obtain a Cassandra session instance. @param si @param forceNew @return synchronized protected Session getSession(SessionIdentifier si, boolean forceNew) { /* * Since 0.2.6: refresh cluster cache before obtaining the session to * avoid exception * "You may have used a PreparedStateme...
261
71
1,357
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
37eaea63ba08f0989ce5d1b30ba42539ed22a2ed821d20a35f5f10e8ad062d22
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
b32aebd2aa4e30de0177238b
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/SessionManager.java
SessionManager.getSession
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/SessionManager.java#L848-L853
test
java
Obtain a Cassandra session instance. @param hostsAndPorts @param username @param password @param keyspace @param forceNew force create new session instance (the existing one, if any, will be closed) @return @throws NoHostAvailableException @throws AuthenticationException @since 0.2.2
public Session getSession(String hostsAndPorts, String username, String password, String keyspace, boolean forceNew) { return getSession( SessionIdentifier.getInstance(hostsAndPorts, username, password, keyspace), forceNew); }
Obtain a Cassandra session instance. @param hostsAndPorts @param username @param password @param keyspace @param forceNew force create new session instance (the existing one, if any, will be closed) @return @throws NoHostAvailableException @throws AuthenticationException @since 0.2.2 public Session getSession(String ...
116
285
282
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
c18db55e0b6b59dbb28bc9eab92518f5c31eb1aeb9d6892776fe47142a9f68a2
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
a8f419b5603bbef2a25d4584
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/SessionManager.java
SessionManager.bindValues
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/SessionManager.java#L906-L908
test
java
Bind values to a {@link PreparedStatement}. @param stm @param values @return @since 0.4.0
public BoundStatement bindValues(PreparedStatement stm, Object... values) { return CqlUtils.bindValues(stm, values); }
Bind values to a {@link PreparedStatement}. @param stm @param values @return @since 0.4.0 public BoundStatement bindValues(PreparedStatement stm, Object... values) { return CqlUtils.bindValues(stm, values); }
54
90
130
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
12050e58b79a3e1c013a63cbba62adcf527dd38405646e451f8b8c96b44cd3ec
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
55146f7ea4be9a6ac0fb9cb0
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/SessionManager.java
SessionManager.bindValues
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/SessionManager.java#L918-L920
test
java
Bind values to a {@link PreparedStatement}. @param stm @param values @return @since 0.4.0
public BoundStatement bindValues(PreparedStatement stm, Map<String, Object> values) { return CqlUtils.bindValues(stm, values); }
Bind values to a {@link PreparedStatement}. @param stm @param values @return @since 0.4.0 public BoundStatement bindValues(PreparedStatement stm, Map<String, Object> values) { return CqlUtils.bindValues(stm, values); }
57
90
140
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1353b30b0a2aa59d1df09bfb8239428fe672568fa71a52e317ce5cf86161bbc8
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
ec170ca6cb2a82007f214640
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/SessionManager.java
SessionManager.execute
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/SessionManager.java#L934-L936
test
java
Execute a SELECT query and returns the {@link ResultSet}. <p> The default session (obtained via {@link #getSession()} is used to execute the query. </p> @param cql @param bindValues @return @since 0.4.0
public ResultSet execute(String cql, Object... bindValues) { return CqlUtils.execute(getSession(), cql, bindValues); }
Execute a SELECT query and returns the {@link ResultSet}. <p> The default session (obtained via {@link #getSession()} is used to execute the query. </p> @param cql @param bindValues @return @since 0.4.0 public ResultSet execute(String cql, Object... bindValues) { return CqlUtils.execute(getSession(), cql, bi...
86
204
130
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
fefc4525b1ea023716cf7c7b4bdffcac3f65c044714a08aed112fdbd2af7c3e4
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
552d76e4728370128a7ea27a
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/SessionManager.java
SessionManager.execute
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/SessionManager.java#L1017-L1019
test
java
Execute a SELECT query and returns the {@link ResultSet}. <p> The default session (obtained via {@link #getSession()} is used to execute the query. </p> @param stm @param bindValues @return @since 0.4.0
public ResultSet execute(PreparedStatement stm, Map<String, Object> bindValues) { return CqlUtils.execute(getSession(), stm, bindValues); }
Execute a SELECT query and returns the {@link ResultSet}. <p> The default session (obtained via {@link #getSession()} is used to execute the query. </p> @param stm @param bindValues @return @since 0.4.0 public ResultSet execute(PreparedStatement stm, Map<String, Object> bindValues) { return CqlUtils.execute(...
87
204
151
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ea80fc48244bde193942b7cdaec47dedfce7dc98995690c1c110207b679ea4c9
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
0ca11096b05ff097d35b1bb3
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/SessionManager.java
SessionManager.execute
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/SessionManager.java#L1084-L1094
test
java
Execute a SELECT query and returns the {@link ResultSet}. <p> The default session (obtained via {@link #getSession()} is used to execute the query. </p> @param stm @param consistencyLevel @return @since 0.4.0.2
public ResultSet execute(Statement stm, ConsistencyLevel consistencyLevel) { if (consistencyLevel != null) { if (consistencyLevel == ConsistencyLevel.SERIAL || consistencyLevel == ConsistencyLevel.LOCAL_SERIAL) { stm.setSerialConsistencyLevel(consistencyLevel); ...
Execute a SELECT query and returns the {@link ResultSet}. <p> The default session (obtained via {@link #getSession()} is used to execute the query. </p> @param stm @param consistencyLevel @return @since 0.4.0.2 public ResultSet execute(Statement stm, ConsistencyLevel consistencyLevel) { if (consistencyLevel ...
149
212
469
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
015f9d00805ee5c50021f24d57ff047e46cc3ccf980c151a1efcf0b74b75ea9c
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
dac47a2dcf65321fcfe8957e
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/SessionManager.java
SessionManager.executeOne
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/SessionManager.java#L1158-L1161
test
java
Execute a SELECT query and returns just one row. <p> The default session (obtained via {@link #getSession()} is used to execute the query. </p> @param cql @param consistencyLevel @param bindValues @return @since 0.4.0
public Row executeOne(String cql, ConsistencyLevel consistencyLevel, Map<String, Object> bindValues) { return CqlUtils.executeOne(getSession(), cql, consistencyLevel, bindValues); }
Execute a SELECT query and returns just one row. <p> The default session (obtained via {@link #getSession()} is used to execute the query. </p> @param cql @param consistencyLevel @param bindValues @return @since 0.4.0 public Row executeOne(String cql, ConsistencyLevel consistencyLevel, Map<String, Object...
103
219
205
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
268a5f933364091b9de6b39931521858bb61ec5e4accf4d1fb95e70dd41a465a
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt
90275871e845eb5d53205f13
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/SessionManager.java
SessionManager.executeOne
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/SessionManager.java#L1175-L1177
test
java
Execute a SELECT query and returns just one row. <p> The default session (obtained via {@link #getSession()} is used to execute the query. </p> @param stm @param bindValues @return @since 0.4.0
public Row executeOne(PreparedStatement stm, Object... bindValues) { return CqlUtils.executeOne(getSession(), stm, bindValues); }
Execute a SELECT query and returns just one row. <p> The default session (obtained via {@link #getSession()} is used to execute the query. </p> @param stm @param bindValues @return @since 0.4.0 public Row executeOne(PreparedStatement stm, Object... bindValues) { return CqlUtils.executeOne(getSession(), stm, ...
84
195
141
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
c7fdad27cb1f98342b91274b8a703ef19fec5e807a2d6689bc5451e028718521
MIT
permissive
https://github.com/DDTH/ddth-cql-utils/blob/master/LICENSE.txt