Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
268,200
int (long packedKeyValue) { return (int)(packedKeyValue >> 32); }
key
268,201
int (long packedKeyValue) { return (int)packedKeyValue; }
value
268,202
long[] (int size) { return ThreadLocalRandom.current().longs() .filter(v -> key(v) != NO_VALUE && value(v) != NO_VALUE) .distinct() .limit(size) .toArray(); }
generateUniqueKeyValues
268,203
List<IntFunction<PageImpl>> () { return List.of( PageImplForTests::new, index -> RWLockProtectedPageImpl.createBlankWithOwnLock(index, PAGE_SIZE, FLUSHER) ); }
pagesImplToCheck
268,204
void () { try { while (currentThreadPageIndex < pagesCreated.length) { if (currentThreadPageIndex == sharedPageIndexBarrier.get()) { pagesCreatedByThread[currentThreadPageIndex] = pages.lookupOrCreate( currentThreadPageIndex, pagesFactory ); final int threadsAlreadyFinishedWithPage = threadsOnBarrier.incrementAndGet();...
run
268,205
PageImpl (int index) { return RWLockProtectedPageImpl.createBlankWithOwnLock(index, PAGE_SIZE, FLUSHER); }
createRWLockProtectedPageImpl
268,206
void () { throw new UnsupportedOperationException("Not implemented in this test"); }
pageBecomeDirty
268,207
void () { throw new UnsupportedOperationException("Not implemented in this test"); }
pageBecomeClean
268,208
void (final long startOffsetInFile, final int length) { throw new UnsupportedOperationException("Not implemented in this test"); }
modifiedRegionUpdated
268,209
void () { throw new UnsupportedOperationException("Method is INTENTIONALLY not implemented"); }
lockPageForWrite
268,210
void () { throw new UnsupportedOperationException("Method is INTENTIONALLY not implemented"); }
unlockPageForWrite
268,211
void () { throw new UnsupportedOperationException("Method is INTENTIONALLY not implemented"); }
lockPageForRead
268,212
void () { throw new UnsupportedOperationException("Method is INTENTIONALLY not implemented"); }
unlockPageForRead
268,213
boolean () { return false; //throw new UnsupportedOperationException("Method is INTENTIONALLY not implemented"); }
isDirty
268,214
void (final int startOffsetModified, final int length) { throw new UnsupportedOperationException("Method is INTENTIONALLY not implemented"); }
regionModified
268,215
void () { final int percentileToEstimate = 10; final double step = 0.5; final FrugalQuantileEstimator estimator = new FrugalQuantileEstimator(percentileToEstimate, step); final int[] samples = rnd.ints(0, 100) .limit(SAMPLES) .toArray(); checkEstimatorIsGoodOnSamples(estimator, samples, expectedTolerance(step, SAMPLES)...
estimatorIsGoodForUniformDistribution_0_100
268,216
void () { final int percentileToEstimate = 10; final double step = 0.5; final FrugalQuantileEstimator estimator = new FrugalQuantileEstimator(percentileToEstimate, step); final int[] samples = rnd.ints(400, 1000) .limit(SAMPLES) .toArray(); checkEstimatorIsGoodOnSamples(estimator, samples, expectedTolerance(step, SAMPL...
estimatorIsGoodForUniformDistribution_400_1000
268,217
void () { final int mean = 0; final int stddev = 100; final int percentileToEstimate = 10; final double step = 1; final int startWith = mean; final FrugalQuantileEstimator estimator = new FrugalQuantileEstimator(percentileToEstimate, step, startWith); final int[] samples = new int[SAMPLES]; for (int i = 0; i < samples....
estimatorIsGoodForTruncatedGaussian_0_100
268,218
double (final double step, final int sampleSize) { //RC: This is just a guess -- don't know how to calculate estimation error return 4 * step; }
expectedTolerance
268,219
void (final FrugalQuantileEstimator estimator, final int[] samples, final double estimationTolerance) { final int percentileToEstimate = estimator.percentileToEstimate(); //By definition: Nth percentile is the value at index=[Nth % of SIZE] of sorted samples final int samplesBelowPercentile = (int)(samples.length * per...
checkEstimatorIsGoodOnSamples
268,220
RWLockProtectedPageImpl (int pageIndex, int pageSize, @NotNull PageToStorageHandle pageToStorageHandle) { return new RWLockProtectedPageImpl(pageIndex, pageSize, pageToStorageHandle, new ReentrantReadWriteLock()); }
createPage
268,221
void (final @NotNull ByteBuffer dataToFlush, final long offsetInFile) { dataToFlush.get(backingStorage, (int)offsetInFile, dataToFlush.remaining()); }
flushBytes
268,222
byte[] (int length) { final byte[] array = new byte[length]; final ThreadLocalRandom rnd = ThreadLocalRandom.current(); for (int i = 0; i < array.length; i++) { array[i] = (byte)rnd.nextInt(Byte.MIN_VALUE, Byte.MAX_VALUE); } return array; }
randomByteArrayOfSize
268,223
void () { final int dirtyPages = dirtyPagesCount.incrementAndGet(); if (dirtyPages != 1) { throw new AssertionError("Should be only one dirty page: " + dirtyPages); } }
pageBecomeDirty
268,224
void () { final int dirtyPages = dirtyPagesCount.decrementAndGet(); if (dirtyPages != 0) { throw new AssertionError("Should be 0 dirty pages: " + dirtyPages); } }
pageBecomeClean
268,225
int () { return dirtyPagesCount.get(); }
dirtyPagesCount
268,226
void () { final Map<String, String> graph = new HashMap<>(); graph.put("a", "bd"); graph.put("b", "d"); graph.put("c", "a"); graph.put("d", "ac"); doTest(graph, "a", "da", "bdca"); }
test1
268,227
void () { final Map<String, String> graph = new HashMap<>(); graph.put("a", "b"); graph.put("b", "d"); graph.put("c", "a"); graph.put("d", "ce"); graph.put("e", "d"); doTest(graph, "a", "bdca"); }
test2
268,228
void () { final Map<String, String> graph = new HashMap<>(); graph.put("a", "bd"); graph.put("b", "d"); graph.put("d", "a"); doTest(graph, "a", "da"); }
test3
268,229
void () { final Map<String, String> graph = new HashMap<>(); graph.put("a", "b"); graph.put("b", "d"); graph.put("c", "a"); graph.put("d", "ef"); graph.put("e", "c"); graph.put("f", "e"); doTest(graph, "a", "bdeca"); }
test4
268,230
void () { final Map<String, String> graph = new HashMap<>(); graph.put("a", "be"); graph.put("b", "d"); graph.put("c", "a"); graph.put("d", "ef"); graph.put("e", "c"); graph.put("f", "e"); doTest(graph, "a", "bdeca", "eca"); }
test5
268,231
void (Map<String, String> graph, String node, String... expected) { Set<String> cycles = getAlgorithmsInstance().findCycles(initGraph(graph), node).stream() .map(cycle -> StringUtil.join(cycle, "")) .collect(Collectors.toSet()); assertThat(cycles).containsExactlyInAnyOrder(expected); }
doTest
268,232
GraphAlgorithms () { return new GraphAlgorithmsImpl(); }
getAlgorithmsInstance
268,233
Graph<String> (final Map<String, String> graph) { final Map<String, List<String>> out = new HashMap<>(); final Map<String, List<String>> in = new HashMap<>(); for (String s : graph.keySet()) { out.put(s, new ArrayList<>()); in.put(s, new ArrayList<>()); } for (Map.Entry<String, String> entry : graph.entrySet()) { Strin...
initGraph
268,234
Collection<String> () { return graph.keySet(); }
getNodes
268,235
Iterator<String> (final String n) { return in.get(n).iterator(); }
getIn
268,236
Iterator<String> (String n) { return out.get(n).iterator(); }
getOut
268,237
void () { Map<String, String> graph = new HashMap<>(); graph.put("a", "b"); graph.put("b", "c"); graph.put("c", "c"); doTest(graph, "b", "b", "c"); }
testSimple
268,238
void () { Map<String, String> graph = new HashMap<>(); graph.put("a", "bcd"); graph.put("b", "acd"); graph.put("c", "abd"); graph.put("d", "abc"); doTest(graph, "a", "a", "b", "c", "d"); }
testFull
268,239
void () { Map<String, String> graph = new HashMap<>(); graph.put("a", "bcd"); graph.put("b", "acd"); graph.put("c", "abd"); graph.put("d", "abc"); Set<String> nodes = new HashSet<>(); nodes.add("a"); getAlgorithmsInstance().collectOutsRecursively(initGraph(graph), "a", nodes); assertThat(nodes.size()).isEqualTo(1); }
testVisitedNode
268,240
void () { Map<String, String> graph = new HashMap<>(); List<String> answer = new ArrayList<>(); for (int i = 0; i < 10000; ++i) { graph.put(String.valueOf((char)i), String.valueOf((char)(i + 1))); answer.add(String.valueOf((char)i)); } graph.put(String.valueOf((char)10000), String.valueOf((char)0)); answer.add(String.v...
testBigGraph
268,241
void (final @NotNull Map<String, String> graph, final @NotNull String node, final String @NotNull ... expected) { Set<String> nodes = new HashSet<>(); getAlgorithmsInstance().collectOutsRecursively(initGraph(graph), node, nodes); assertThat(nodes).containsExactlyInAnyOrder(expected); }
doTest
268,242
void () { final Map<String, String> arcs = new HashMap<>(); arcs.put("a", "b"); arcs.put("b", "c"); arcs.put("c", "bd"); arcs.put("d", "e"); arcs.put("e", "d"); final Graph<Chunk<String>> graph = getAlgorithmsInstance().computeSCCGraph(initGraph(arcs)); final List<Chunk<String>> expectedNodes = new ArrayList<>(); Chunk...
testGraph1
268,243
void () { final Map<String, String> arcs = new HashMap<>(); arcs.put("a", "b"); arcs.put("b", "ac"); arcs.put("c", "ad"); arcs.put("d", ""); final Graph<Chunk<String>> graph = getAlgorithmsInstance().computeSCCGraph(initGraph(arcs)); final List<Chunk<String>> expectedNodes = new ArrayList<>(); Chunk<String> ABC = new C...
testGraph2
268,244
void (Map<Chunk<String>, Set<Chunk<String>>> expectedArcs, Graph<Chunk<String>> graph) { for (Chunk<String> chunk : graph.getNodes()) { List<Chunk<String>> ins = ContainerUtil.collect(graph.getIn(chunk)); Set<Chunk<String>> expectedIns = expectedArcs.get(chunk); assertEquals(expectedIns.size(), ins.size()); assertEqual...
checkArcs
268,245
void (List<Chunk<String>> expected, Collection<Chunk<String>> nodes) { List<Chunk<String>> realNodes = new ArrayList<>(nodes); assertEquals(expected.size(), realNodes.size()); assertEquals(new HashSet<>(expected), new HashSet<>(realNodes)); }
checkVertices
268,246
void () { final Map<String, String> graph = new HashMap<>(); graph.put("a", ""); graph.put("b", ""); doTest(graph, "a", "a", "a"); }
testEmptyPath
268,247
void () { final Map<String, String> graph = new HashMap<>(); graph.put("a", "c"); graph.put("b", "a"); graph.put("c", "a"); doTest(graph, "a", "b", null); }
testNoPath
268,248
void () { final Map<String, String> graph = new HashMap<>(); graph.put("a", ""); graph.put("b", "ac"); graph.put("c", "ab"); graph.put("d", "a"); doTest(graph, "b", "a", "ba"); }
test1
268,249
void () { final Map<String, String> graph = new HashMap<>(); graph.put("a", "cd"); graph.put("b", "a"); graph.put("c", "d"); graph.put("d", "ab"); doTest(graph, "c", "b", "cdb"); }
test2
268,250
void () { final Map<String, String> graph = new HashMap<>(); graph.put("a", "bd"); graph.put("b", "d"); graph.put("c", "a"); graph.put("d", "ac"); doTest(graph, "b", "c", "bdc"); }
test3
268,251
void () { final Map<String, String> graph = new HashMap<>(); graph.put("a", "be"); graph.put("b", "d"); graph.put("c", "a"); graph.put("d", "ef"); graph.put("e", "c"); graph.put("f", "e"); doTest(graph, "b", "c", "bdec"); }
test4
268,252
void (Map<String, String> graph, String from, String to, String expectedPath) { List<String> shortestPath = getAlgorithmsInstance().findShortestPath(initGraph(graph), from, to); if (expectedPath != null) { assertNotNull(shortestPath); assertEquals(expectedPath, StringUtil.join(shortestPath, "")); } else { assertNull(sh...
doTest
268,253
void () { Map<String, String> graph = new HashMap<>(); graph.put("s", ""); graph.put("t", ""); doTest(graph); }
testEmpty
268,254
void () { final Map<String, String> graph = new HashMap<>(); graph.put("s", "t"); graph.put("t", ""); doTest(graph, "st"); }
testOneEdge
268,255
void () { final Map<String, String> graph = new HashMap<>(); graph.put("s", "a"); graph.put("a", "s"); graph.put("b", "at"); graph.put("t", "sab"); doTest(graph); }
testNoPaths
268,256
void () { Map<String, String> graph = new HashMap<>(); graph.put("s", ""); doTest(graph, "s", "s", 5, "s"); }
testOneVertex
268,257
void () { final Map<String, String> graph = new HashMap<>(); graph.put("s", "ta"); graph.put("a", "t"); graph.put("t", ""); doTest(graph, "st", "sat"); }
testTwoPaths
268,258
void () { final Map<String, String> graph = new HashMap<>(); graph.put("s", "a"); graph.put("a", "bt"); graph.put("b", "ct"); graph.put("c", "dt"); graph.put("d", "t"); graph.put("t", ""); doTest(graph, "sat", "sabt", "sabct", "sabcdt"); }
testManyEdgesToTarget
268,259
void () { final Map<String, String> graph = new HashMap<>(); graph.put("s", "abcdt"); graph.put("a", "b"); graph.put("b", "c"); graph.put("c", "d"); graph.put("d", "t"); graph.put("t", ""); doTest(graph, "st", "sdt", "scdt", "sbcdt", "sabcdt"); }
testManyEdgesFromSource
268,260
void () { final Map<String, String> graph = new HashMap<>(); graph.put("s", "ab"); graph.put("a", "b"); graph.put("b", "cd"); graph.put("c", "t"); graph.put("d", "e"); graph.put("e", "t"); graph.put("t", ""); doTest(graph, "sbct", "sabct", "sbdet", "sabdet"); }
testTwoParts
268,261
void () { final Map<String, String> graph = new HashMap<>(); graph.put("s", "ae"); graph.put("a", "bc"); graph.put("b", "ac"); graph.put("c", "ab"); graph.put("d", "s"); graph.put("e", "t"); graph.put("t", ""); doTest(graph, "set"); }
testHangingEdges
268,262
void () { final Map<String, String> graph = new HashMap<>(); graph.put("s", "t"); graph.put("t", "s"); doTest(graph, 4, "st", "stst", "ststst", "stststst"); }
testSimpleCycle
268,263
void () { final Map<String, String> graph = new HashMap<>(); graph.put("s", "p"); graph.put("p", "qt"); graph.put("q", "vt"); graph.put("v", "p"); graph.put("t", ""); doTest(graph, 5, "spt", "spqt", "spqvpt", "spqvpqt", "spqvpqvpt"); }
testComplexCycle
268,264
void () { final Map<String, String> graph = new HashMap<>(); graph.put("s", "a"); graph.put("a", "bd"); graph.put("b", "cd"); graph.put("c", "td"); graph.put("d", "e"); graph.put("e", "f"); graph.put("f", "t"); graph.put("t", ""); doTest(graph, "sabct", "sadeft", "sabdeft", "sabcdeft"); }
testHeap
268,265
void () { final Map<String, String> graph = new HashMap<>(); graph.put("s", "lo"); graph.put("a", "tb"); graph.put("b", "t"); graph.put("c", "ad"); graph.put("d", "e"); graph.put("e", "b"); graph.put("f", "cg"); graph.put("g", "h"); graph.put("h", "d"); graph.put("i", "fj"); graph.put("j", "k"); graph.put("k", "g"); gr...
testBigHeap
268,266
void (Map<String, String> graph, String... expectedPaths) { doTest(graph, 10, expectedPaths); }
doTest
268,267
void (Map<String, String> graph, final int k, String... expectedPaths) { doTest(graph, "s", "t", k, expectedPaths); }
doTest
268,268
void (Map<String, String> graph, final String start, final String finish, final int k, String... expectedPaths) { Graph<String> generator = initGraph(graph); List<List<String>> paths = getAlgorithmsInstance().findKShortestPaths(generator, start, finish, k, new EmptyProgressIndicator(ModalityState.nonModal())); List<Str...
doTest
268,269
void () { assertFalse(PROPERTY.getIterator(myContainer).hasNext()); List defaultValue = PROPERTY.get(myContainer); assertEquals(0, defaultValue.size()); ArrayList modifiableList = PROPERTY.getModifiableList(myContainer); assertSame(modifiableList, PROPERTY.get(myContainer)); assertEquals(0, modifiableList.size()); Mock...
testListProperty
268,270
int (String object) { return Character.toLowerCase(object.charAt(object.length() - 1)); }
hashCode
268,271
boolean (String o1, String o2) { return StringUtil.equalsIgnoreCase(o1, o2); }
equals
268,272
void () { ConcurrentMap<Object, Object> map = CollectionFactory.createConcurrentWeakIdentityMap(); checkKeyTossedEventually(map); }
testConcurrentWeakMapTossedEvenWithIdentityStrategy
268,273
void () { ConcurrentMap<Object, Object> map = CollectionFactory.createConcurrentSoftMap(10, 0.5f, 8, HashingStrategy.identity()); checkKeyTossedEventually(map); }
testConcurrentSoftMapTossedEvenWithIdentityStrategy
268,274
void (Map<Object, Object> map) { checkClearsEventuallyAfterGCPressure(map, ()->map.put(new Object(), new Object())); checkClearsEventuallyAfterGCPressure(map, ()->map.put(new Object(), this)); }
checkKeyTossedEventually
268,275
void (ObjectIntMap<Object> map) { checkClearsEventuallyAfterGCPressure(map, ()->map.put(new Object(), 0)); }
checkKeyTossedEventually
268,276
void (IntObjectMap<Object> map) { checkClearsEventuallyAfterGCPressure(map, ()->map.put(0, new Object())); }
checkValueTossedEventually
268,277
void (Map<Object, Object> map) { checkClearsEventuallyAfterGCPressure(map, ()->map.put(new Object(), new Object())); checkClearsEventuallyAfterGCPressure(map, ()->map.put(this, new Object())); }
checkValueTossedEventually
268,278
void () { ConcurrentMap<Object, Object> map = CollectionFactory.createConcurrentWeakKeyWeakValueIdentityMap(); checkKeyTossedEventually(map); checkValueTossedEventually(map); }
testConcurrentWeakKeyWeakValueTossedEvenWithIdentityStrategy
268,279
void () { ConcurrentMap<Object, Object> map = CollectionFactory.createConcurrentSoftKeySoftValueIdentityMap(10, 0.5f, 8); checkKeyTossedEventually(map); checkValueTossedEventually(map); }
testConcurrentSoftKeySoftValueTossedEvenWithIdentityStrategy
268,280
void () { ConcurrentMap<Object, Object> map = CollectionFactory.createConcurrentWeakKeySoftValueIdentityMap(10, 0.5f, 8); checkKeyTossedEventually(map); checkValueTossedEventually(map); }
testConcurrentWeakKeySoftValueTossedEvenWithIdentityStrategy
268,281
void () { Map<Object, Object> map = CollectionFactory.createWeakIdentityMap(10, 0.5f); checkKeyTossedEventually(map); }
testWeakMapTossedEvenWithIdentityStrategy
268,282
void () { Map<Object, Object> map = CollectionFactory.createSoftMap(HashingStrategy.identity()); checkKeyTossedEventually(map); }
testSoftMapTossedEvenWithIdentityStrategy
268,283
void () { ConcurrentMap<Object, Object> map = CollectionFactory.createConcurrentSoftMap(); map.put(this, this); Set<Map.Entry<Object, Object>> entries = map.entrySet(); assertEquals(1, entries.size()); Map.Entry<Object, Object> entry = entries.iterator().next(); entries.remove(entry); assertTrue(map.isEmpty()); }
testRemoveFromSoftEntrySet
268,284
void () { ConcurrentMap<Object, Object> map = ContainerUtil.createConcurrentWeakMap(); map.put(this, this); Set<Map.Entry<Object, Object>> entries = map.entrySet(); assertEquals(1, entries.size()); Map.Entry<Object, Object> entry = entries.iterator().next(); entries.remove(entry); assertTrue(map.isEmpty()); }
testRemoveFromWeakEntrySet
268,285
void () { ConcurrentMap<Object, Object> map = ContainerUtil.createConcurrentWeakMap(); checkKeyTossedEventually(map); }
testConcurrentWeakMapTossed
268,286
void () { checkMapDoesntLeakOldValueAfterPutWithTheSameKeyButDifferentValue(ContainerUtil.createConcurrentWeakMap()); }
testConcurrentWeakMapDoesntRetainOldValueKeyAfterPutWithTheSameKeyButDifferentValue
268,287
void () { checkMapDoesntLeakOldValueAfterPutWithTheSameKeyButDifferentValue(CollectionFactory.createConcurrentSoftMap()); }
testConcurrentSoftMapDoesntRetainOldValueKeyAfterPutWithTheSameKeyButDifferentValue
268,288
void () { checkMapDoesntLeakOldValueAfterPutWithTheSameKeyButDifferentValue(CollectionFactory.createConcurrentWeakKeyWeakValueMap()); }
testConcurrentWKWVMapDoesntRetainOldValueKeyAfterPutWithTheSameKeyButDifferentValue
268,289
void () { checkMapDoesntLeakOldValueAfterPutWithTheSameKeyButDifferentValue(CollectionFactory.createConcurrentWeakKeySoftValueMap()); }
testConcurrentWKSVMapDoesntRetainOldValueKeyAfterPutWithTheSameKeyButDifferentValue
268,290
void () { checkMapDoesntLeakOldValueAfterPutWithTheSameKeyButDifferentValue(CollectionFactory.createConcurrentSoftKeySoftValueMap(1, 1, 1)); }
testConcurrentSKSVMapDoesntRetainOldValueKeyAfterPutWithTheSameKeyButDifferentValue
268,291
void (Map<Object, Object> map) { Object key = new Object(); class MyValue_ {} map.put(key, strong = new MyValue_()); map.put(key, this); strong = null; LeakHunter.checkLeak(map, MyValue_.class); }
checkMapDoesntLeakOldValueAfterPutWithTheSameKeyButDifferentValue
268,292
void () { ConcurrentMap<Object, Object> map = CollectionFactory.createConcurrentSoftMap(); checkKeyTossedEventually(map); }
testConcurrentSoftMapTossed
268,293
void () { ConcurrentMap<Object, Object> map = CollectionFactory.createConcurrentWeakValueMap(); checkValueTossedEventually(map); }
testConcurrentWeakValueMapTossed
268,294
void () { ConcurrentMap<Object, Object> map = ContainerUtil.createConcurrentSoftValueMap(); checkValueTossedEventually(map); }
testConcurrentSoftValueMapTossed
268,295
void (Map<Object, Object> map, @NotNull Runnable putKey) { assertTrue(map.isEmpty()); assertEquals(0, map.size()); putKey.run(); Object strong = new Object(); //noinspection SizeReplaceableByIsEmpty do { map.put(strong, strong); // to run processQueues(); assertFalse(map.isEmpty()); map.remove(strong); assertNull(map.g...
checkClearsEventuallyAfterGCPressure
268,296
void (ObjectIntMap<Object> map, @NotNull Runnable put) { assertTrue(map.isEmpty()); assertEquals(0, map.size()); put.run(); strong = new Object(); //noinspection SizeReplaceableByIsEmpty do { map.put(strong, RANDOM_INT); // to run processQueues(); assertFalse(map.isEmpty()); map.remove(strong); assertEquals(0, map.get(...
checkClearsEventuallyAfterGCPressure
268,297
void (IntObjectMap<Object> map, @NotNull Runnable put) { assertTrue(map.isEmpty()); assertEquals(0, map.size()); put.run(); strong = new Object(); //noinspection SizeReplaceableByIsEmpty do { map.put(RANDOM_INT, strong); // to run processQueues(); assertFalse(map.isEmpty()); map.remove(RANDOM_INT); assertNull(map.get(R...
checkClearsEventuallyAfterGCPressure
268,298
void () { Map<String, String> map = CollectionFactory.createSoftMap(IGNORE_CASE_WITH_CRAZY_HASH_STRATEGY); map.put("ab", "ab"); assertEquals("ab", map.get("AB")); String removed = map.remove("aB"); assertEquals("ab", removed); assertTrue(map.isEmpty()); }
testSoftMapCustomStrategy
268,299
void () { Map<String, String> map = CollectionFactory.createWeakMap(10, 0.5f, IGNORE_CASE_WITH_CRAZY_HASH_STRATEGY); String keyL = "ab"; String keyU = StringUtil.toUpperCase(keyL); String value = "asdfab"; map.put(keyL, value); assertSame(value, map.get(keyU)); assertSame(value, map.get(keyL)); String removed = map.rem...
testWeakMapCustomStrategy