/libcore/benchmarks/src/benchmarks/regression/ |
D | StringBuilderBenchmark.java | 31 for (int j = 0; j < length; ++j) { in timeAppendBoolean() 40 for (int j = 0; j < length; ++j) { in timeAppendChar() 50 for (int j = 0; j < length; ++j) { in timeAppendCharArray() 60 for (int j = 0; j < length; ++j) { in timeAppendCharSequence() 70 for (int j = 0; j < length; ++j) { in timeAppendSubCharSequence() 80 for (int j = 0; j < length; ++j) { in timeAppendDouble() 90 for (int j = 0; j < length; ++j) { in timeAppendFloat() 100 for (int j = 0; j < length; ++j) { in timeAppendInt() 110 for (int j = 0; j < length; ++j) { in timeAppendLong() 125 for (int j = 0; j < length; ++j) { in timeAppendObject() [all …]
|
D | LoopingBackwardsBenchmark.java | 32 for (int j = 0; j < max; j++) { in timeForwards() 33 fake += j; in timeForwards() 42 for (int j = max - 1; j >= 0; j--) { in timeBackwards() 43 fake += j; in timeBackwards()
|
/libcore/ojluni/src/test/java/lang/String/ |
D | Chars.java | 47 for (int j = 0; j < n; j++) { in testCharsAndCodePoints() 48 cc[j] = (char)(ccExp[j] = cpExp[j] = r.nextInt(0x80)); in testCharsAndCodePoints() 54 for (int j = 0; j < n; j++) { in testCharsAndCodePoints() 55 cc[j] = (char)(ccExp[j] = cpExp[j] = r.nextInt(0x8000)); in testCharsAndCodePoints() 62 for (int j = 0; j < n; j++) { in testCharsAndCodePoints() 63 if (j % 9 == 5 && j + 1 < n) { in testCharsAndCodePoints() 66 Character.toChars(cp, cc, j); in testCharsAndCodePoints() 67 ccExp[j] = cc[j]; in testCharsAndCodePoints() 68 ccExp[j + 1] = cc[j + 1]; in testCharsAndCodePoints() 69 j++; in testCharsAndCodePoints() [all …]
|
/libcore/ojluni/src/test/java/lang/Math/ |
D | CubeRootTests.java | 250 for (int j = 0; j < pcNeighbors.length; j++) { in testCubeRoot() 251 pcNeighborsCbrt[j] = Math.cbrt(pcNeighbors[j]); in testCubeRoot() 252 pcNeighborsStrictCbrt[j] = StrictMath.cbrt(pcNeighbors[j]); in testCubeRoot() 255 for (int j = 0; j < pcNeighborsCbrt.length - 1; j++) { in testCubeRoot() 256 if (pcNeighborsCbrt[j] > pcNeighborsCbrt[j + 1]) { in testCubeRoot() 258 pcNeighbors[j] + " and " + in testCubeRoot() 259 pcNeighbors[j + 1] + "\n\treturned " + in testCubeRoot() 260 pcNeighborsCbrt[j] + " and " + in testCubeRoot() 261 pcNeighborsCbrt[j + 1]); in testCubeRoot() 264 if (pcNeighborsStrictCbrt[j] > pcNeighborsStrictCbrt[j + 1]) { in testCubeRoot() [all …]
|
D | HypotTests.java | 138 for (int j = 0; j <= 13; j += 1) { in testHypot() 170 for (int j = 0; j < pcNeighbors.length; j++) { in testHypot() 171 pcNeighborsHypot[j] = Math.hypot(2.0, pcNeighbors[j]); in testHypot() 172 pcNeighborsStrictHypot[j] = StrictMath.hypot(2.0, pcNeighbors[j]); in testHypot() 175 for (int j = 0; j < pcNeighborsHypot.length - 1; j++) { in testHypot() 176 if (pcNeighborsHypot[j] > pcNeighborsHypot[j + 1]) { in testHypot() 178 pcNeighbors[j] + " and " + in testHypot() 179 pcNeighbors[j + 1] + "\n\treturned " + in testHypot() 180 pcNeighborsHypot[j] + " and " + in testHypot() 181 pcNeighborsHypot[j + 1]); in testHypot() [all …]
|
D | Log1pTests.java | 120 for (int j = -53; j <= 52; j++) { in testLog1p() 153 for (int j = 0; j < pcNeighbors.length; j++) { in testLog1p() 154 pcNeighborsLog1p[j] = Math.log1p(pcNeighbors[j]); in testLog1p() 155 pcNeighborsStrictLog1p[j] = StrictMath.log1p(pcNeighbors[j]); in testLog1p() 158 for (int j = 0; j < pcNeighborsLog1p.length - 1; j++) { in testLog1p() 159 if (pcNeighborsLog1p[j] > pcNeighborsLog1p[j + 1]) { in testLog1p() 161 pcNeighbors[j] + " and " + in testLog1p() 162 pcNeighbors[j + 1] + "\n\treturned " + in testLog1p() 163 pcNeighborsLog1p[j] + " and " + in testLog1p() 164 pcNeighborsLog1p[j + 1]); in testLog1p() [all …]
|
D | Expm1Tests.java | 148 for (int j = 0; j < pcNeighbors.length; j++) { in testExpm1() 149 pcNeighborsExpm1[j] = Math.expm1(pcNeighbors[j]); in testExpm1() 150 pcNeighborsStrictExpm1[j] = StrictMath.expm1(pcNeighbors[j]); in testExpm1() 153 for (int j = 0; j < pcNeighborsExpm1.length - 1; j++) { in testExpm1() 154 if (pcNeighborsExpm1[j] > pcNeighborsExpm1[j + 1]) { in testExpm1() 156 pcNeighbors[j] + " and " + in testExpm1() 157 pcNeighbors[j + 1] + "\n\treturned " + in testExpm1() 158 pcNeighborsExpm1[j] + " and " + in testExpm1() 159 pcNeighborsExpm1[j + 1]); in testExpm1() 162 if (pcNeighborsStrictExpm1[j] > pcNeighborsStrictExpm1[j + 1]) { in testExpm1() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/ |
D | OldSHA1PRNGSecureRandomTest.java | 94 for (int j = 0; j < i; j++) { in testGenerateSeedint03() 95 if (myBytes1[j] == myBytes2[j]) { in testGenerateSeedint03() 130 for (int j = 1; j < i; j++) { in testNextBytesbyteArray02() 131 myBytes[j] = (byte) (j & 0xFF); in testNextBytesbyteArray02() 202 for (int j = 0; j < i; j++) { in testNextBytesbyteArray03() 203 flag &= myBytes1[j] == myBytes2[j]; in testNextBytesbyteArray03() 209 for (int j = 0; j < i; j++) { in testNextBytesbyteArray03() 210 flag &= myBytes1[j] == myBytes2[j]; in testNextBytesbyteArray03() 261 for (int j = 0; j < i; j++) { in testNextBytesbyteArray04() 262 flag &= myBytes1[j] == myBytes2[j]; in testNextBytesbyteArray04() [all …]
|
/libcore/ojluni/src/test/java/util/ArrayList/ |
D | AddAll.java | 43 for (int j = 0; j < 1; j++) { in main() 50 for (int j = 0; j < 1; j++) { in main() 57 for (int j = 0; j < 1; j++) { in main() 64 for (int j = 0; j < 1; j++) { in main() 73 for (int j = 0; j < 1; j++) { in main() 82 for (int j = 0; j < 1; j++) { in main()
|
/libcore/ojluni/src/test/java/util/Random/ |
D | RandomTestBsi1999.java | 139 for (int j = 0; j < s.length; j++) { in monobitTest() 140 count += s[j]; in monobitTest() 163 for (int j = 0; j < s.length; j++) { in pokerTest() 164 v = (v << 1) | s[j]; in pokerTest() 165 if ((j & 3) == 3) { in pokerTest() 211 for (int j = 0; j < s.length; j++) { in runTestAndLongRunTest() 213 if ((j == (s.length - 1)) || (s[j+1] != s[j])) { in runTestAndLongRunTest() 214 ++stats[s[j]][(count < 6) ? count : (count < 34) ? 6 : 7]; in runTestAndLongRunTest() 251 for (int j = 0; j < N; j++) { in autocorrelationTest() 252 count += (s[j] ^ s[j+tau]); in autocorrelationTest() [all …]
|
D | RandomTestChiSquared.java | 129 for (int j = 0; j < SEQUENCE_SIZE; j++) { in chiSquaredTest() 175 for (int j = 0; j < testSizes.length; j++) { in testOneRng() 176 int N = testSizes[j]; in testOneRng() 181 for (int j = 0; j < testSizes.length; j++) { in testOneRng() 182 int N = testSizes[j]; in testOneRng() 187 for (int j = 0; j < testSizes.length; j++) { in testOneRng() 188 int N = testSizes[j]; in testOneRng() 193 for (int j = 0; j < testSizes.length; j++) { in testOneRng() 194 int N = testSizes[j]; in testOneRng() 199 for (int j = 0; j < testSizes.length; j++) { in testOneRng() [all …]
|
D | RandomTestMoments.java | 127 for (int j = 0; j < measurements.length; j++) { in checkMoments() 128 double actual = measurements[j]; in checkMoments() 129 double expected = standard[j][0]; in checkMoments() 130 double basis = standard[j][1]; in checkMoments() 131 double tolerance = standard[j][2]; in checkMoments() 142 for (int j = 0; j < SEQUENCE_SIZE; j++) { in testMomentsGaussian() 159 for (int j = 0; j < SEQUENCE_SIZE; j++) { in testMomentsExponential() 176 for (int j = 0; j < SEQUENCE_SIZE; j++) { in testMomentsUniform()
|
/libcore/ojluni/src/test/java/lang/StringBuffer/ |
D | Supplementary.java | 206 for (int j = 0; j < s.length(); j += Character.charCount(c)) { in test4() 207 c = s.codePointAt(j); in test4() 210 int sbc = sb.codePointAt(j); in test4() 234 for (int j = 0; j <= length; j++) { in test5() 235 int result = sb.codePointCount(j, length); in test5() 236 int expected = Character.codePointCount(sb, j, length); in test5() 237 check(result != expected, "codePointCount(input["+i+"], "+j+", "+length+")", in test5() 240 for (int j = length; j >= 0; j--) { in test5() 241 int result = sb.codePointCount(0, j); in test5() 242 int expected = Character.codePointCount(sb, 0, j); in test5() [all …]
|
/libcore/ojluni/src/test/java/lang/StringBuilder/ |
D | Supplementary.java | 208 for (int j = 0; j < s.length(); j += Character.charCount(c)) { in test4() 209 c = s.codePointAt(j); in test4() 212 int sbc = sb.codePointAt(j); in test4() 213 check(sbc != c, "appendCodePoint("+j+") != c", sbc, c); in test4() 236 for (int j = 0; j <= length; j++) { in test5() 237 int result = sb.codePointCount(j, length); in test5() 238 int expected = Character.codePointCount(sb, j, length); in test5() 239 check(result != expected, "codePointCount(input["+i+"], "+j+", "+length+")", in test5() 242 for (int j = length; j >= 0; j--) { in test5() 243 int result = sb.codePointCount(0, j); in test5() [all …]
|
/libcore/ojluni/src/test/java/util/Collections/ |
D | ReplaceAll.java | 46 for (int j=1; j<=SIZE; j++) in main() 47 lst.add(new Integer(j % 3)); in main() 50 for (int j=0; j<3; j++) { in main() 52 if (!Collections.replaceAll(lst, new Integer(j), "*")) in main() 53 throw new Exception("False return value: "+i+", "+j); in main() 55 throw new Exception("Unchanged: "+i+", "+j+", "+": "+lst); in main() 56 if (lst.equals(goal) != (j==2)) in main() 57 throw new Exception("Wrong change:"+i+", "+j); in main()
|
D | Disjoint.java | 52 for (int j = 1; j < size; j++) in main() 61 for (int j = 0; j < N; j++) { in main() 62 boolean disjoint = (Math.abs(i - j) > 1); in main() 64 List<Integer> b = (List<Integer>) lists[j]; in main() 67 throw new RuntimeException("A: " + i + ", " + j); in main() 70 throw new RuntimeException("B: " + i + ", " + j); in main() 73 throw new RuntimeException("C: " + i + ", " + j); in main()
|
/libcore/ojluni/src/test/java/text/BreakIterator/ |
D | Bug4533872.java | 75 int j = expected[i].length - 1; in TestNext() local 76 start = iter.next(j); in TestNext() 79 if (!expected[i][j].equals(given[i].substring(start, end))) { in TestNext() 81 expected[i][j] + ">, got:<" + in TestNext() 133 int j = 0; in TestPrintEachForward() local 136 start = end, end = iter.next(), j++) { in TestPrintEachForward() 145 if (!expected[i][j].equals(given[i].substring(start, end))) { in TestPrintEachForward() 147 expected[i][j] + ">, got:<" + in TestPrintEachForward() 172 int j; in TestPrintEachBackward() local 173 for (start = iter.previous(), j = expected[i].length-1; in TestPrintEachBackward() [all …]
|
/libcore/ojluni/src/test/java/util/Map/ |
D | MapBinToFromTreeTest.java | 77 for (int j = 0; j < s; j++) { in testPutThenGet() 78 assertEquals(m.get(new HashCodeInteger(j)).intValue(), j, in testPutThenGet() 79 String.format("Map.get(%d)", j)); in testPutThenGet() 103 for (int j = i + 1; j < SIZE; j++) { in testRemoveThenGet() 104 assertEquals(m.get(new HashCodeInteger(j)).intValue(), j, in testRemoveThenGet() 105 String.format("Map.get(%d)", j)); in testRemoveThenGet() 134 for (int j = 0; j < INITIAL_CAPACITY; j++) { in testUntreeifyOnResizeWithGet() 135 assertEquals(m.get(new HashCodeInteger(j)).intValue(), j, in testUntreeifyOnResizeWithGet() local 136 String.format("Map.get(%d) < INITIAL_CAPACITY", j)); in testUntreeifyOnResizeWithGet() 138 for (int j = INITIAL_CAPACITY; j <= i; j++) { in testUntreeifyOnResizeWithGet() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | SSLEngineResultTest.java | 101 for (int j = 0; j < enHS.length; j++) { in test_bytesConsumed() 105 enHS[j], pos[n], pos[l]); in test_bytesConsumed() 124 for (int j = 0; j < enHS.length; j++) { in test_bytesProduced() 128 enHS[j], pos[n], pos[l]); in test_bytesProduced() 147 for (int j = 0; j < enHS.length; j++) { in test_getHandshakeStatus() 151 enHS[j], pos[n], pos[l]); in test_getHandshakeStatus() 152 assertEquals("Incorrect HandshakeStatus", enHS[j], in test_getHandshakeStatus() 170 for (int j = 0; j < enHS.length; j++) { in test_getStatus() 174 enHS[j], pos[n], pos[l]); in test_getStatus() 193 for (int j = 0; j < enHS.length; j++) { in test_toString() [all …]
|
/libcore/ojluni/src/main/java/sun/security/x509/ |
D | GeneralSubtrees.java | 199 for (int j = i + 1; j < size(); j++) { in minimize() 200 GeneralNameInterface subsequent = getGeneralNameInterface(j); in minimize() 212 remove(j); in minimize() 213 j--; /* continue check with new subsequent */ in minimize() 360 for (int j = 0; j < other.size(); j++) { in intersect() 361 GeneralSubtree otherEntryGS = other.get(j); in intersect() 396 for (int j = 0; j < size(); j++) { in intersect() 397 GeneralNameInterface thisAltEntry = getGeneralNameInterface(j); in intersect() 443 for (int j = 0; j < size(); j++) { in intersect() 444 GeneralNameInterface thisEntry = getGeneralNameInterface(j); in intersect() [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKZoneOffset.java | 215 for (int j = -59; j <= 59; j++) { in test_factory_string_hours_minutes_noColon() 216 if ((i < 0 && j <= 0) || (i > 0 && j >= 0) || i == 0) { in test_factory_string_hours_minutes_noColon() 217 String str = (i < 0 || j < 0 ? "-" : "+") + in test_factory_string_hours_minutes_noColon() 219 Integer.toString(Math.abs(j) + 100).substring(1); in test_factory_string_hours_minutes_noColon() 221 doTestOffset(test, i, j, 0); in test_factory_string_hours_minutes_noColon() 234 for (int j = -59; j <= 59; j++) { in test_factory_string_hours_minutes_colon() 235 if ((i < 0 && j <= 0) || (i > 0 && j >= 0) || i == 0) { in test_factory_string_hours_minutes_colon() 236 String str = (i < 0 || j < 0 ? "-" : "+") + in test_factory_string_hours_minutes_colon() 238 Integer.toString(Math.abs(j) + 100).substring(1); in test_factory_string_hours_minutes_colon() 240 doTestOffset(test, i, j, 0); in test_factory_string_hours_minutes_colon() [all …]
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | IOUtil.java | 152 for (int j=0; j<iov_len; j++) { in write() 154 ByteBuffer buf = vec.getBuffer(j); in write() 155 int pos = vec.getPosition(j); in write() 156 int rem = vec.getRemaining(j); in write() 162 ByteBuffer shadow = vec.getShadow(j); in write() 165 vec.clearRefs(j); in write() 175 for (int j=0; j<iov_len; j++) { in write() 176 ByteBuffer shadow = vec.getShadow(j); in write() 179 vec.clearRefs(j); in write() 282 for (int j=0; j<iov_len; j++) { in read() [all …]
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | CharacterEncoder.java | 143 int j; in encode() local 155 for (j = 0; j < numBytes; j += bytesPerAtom()) { in encode() 157 if ((j + bytesPerAtom()) <= numBytes) { in encode() 158 encodeAtom(outStream, tmpbuffer, j, bytesPerAtom()); in encode() 160 encodeAtom(outStream, tmpbuffer, j, (numBytes)- j); in encode() 278 int j; in encodeBuffer() local 290 for (j = 0; j < numBytes; j += bytesPerAtom()) { in encodeBuffer() 291 if ((j + bytesPerAtom()) <= numBytes) { in encodeBuffer() 292 encodeAtom(outStream, tmpbuffer, j, bytesPerAtom()); in encodeBuffer() 294 encodeAtom(outStream, tmpbuffer, j, (numBytes)- j); in encodeBuffer()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ThreadLocalRandomTest.java | 166 int j; 168 (j = ThreadLocalRandom.current().nextInt(bound)) == f) { 169 assertTrue(0 <= j && j < bound); 186 int j; 188 (j = ThreadLocalRandom.current().nextInt(least, bound)) == f) { 189 assertTrue(least <= j && j < bound); 237 long j; 239 (j = ThreadLocalRandom.current().nextLong(bound)) == f) { 240 assertTrue(0 <= j && j < bound); 257 long j; [all …]
|
/libcore/ojluni/src/test/java/lang/ref/ |
D | EnqueuePollRaceTest.java | 54 for (int j = 0; j < refs.length; j++) { in run() 55 refs[j] = new WeakReference(new Object(), queue); in run() 61 for (int j = 0; j < refs.length; j++) { in run() 62 refs[j].enqueue(); in run()
|