File size: 35,540 Bytes
5d5926e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | dataset_index,text,true_label,predicted_label,correct,error_type,probability_authorization_access_control,probability_unrelated
0,"@Override public boolean authenticate( String username, String password, ServerSession session) { try { Subject subject = new Subject(); LoginContext loginContext = new LoginContext(getDomain(), subject, callbacks -> { for (Callback callback : callbacks) {",unrelated,unrelated,True,,0.0006496155401691794,0.999350368976593
1,"boolean readLock = (mask & SftpConstants.SSH_FXF_READ_LOCK) != 0; if (!readLock && canWrite()) { writeLock = true; } } if (writeLock && !canWrite()) { throw new SftpException(SftpConstants.SSH_FX_BYTE_RANGE_LOCK_REFUSED,",authorization_access_control,authorization_access_control,True,,0.9968120455741882,0.0031879295129328966
2,"public static AclEntry buildAclEntry(int aclType, int aclFlag, int aclMask, String aclWho) { UserPrincipal who = new DefaultGroupPrincipal(aclWho); return AclEntry.newBuilder() .setType(ValidateUtils.checkNotNull(decodeAclEntryType(aclType), ""Unknown ACL type: %d"", aclType)) .setFlags(decodeAclFlags(aclFlag)) .setPermissions(decodeAclMask(aclMask)) .setPrincipal(who) .build();",authorization_access_control,authorization_access_control,True,,0.9972447156906128,0.0027553392574191093
3,"public static Boolean checkFileExistsAnySymlinks(Path path, boolean neverFollowSymlinks) { try { if (!neverFollowSymlinks) { path.getFileSystem().provider().checkAccess(path); } else { for (int i = 1; i <= path.getNameCount(); i++) { Path checkForSymLink = getFirstPartsOfPath(path, i);",authorization_access_control,authorization_access_control,True,,0.9947827458381653,0.005217298865318298
4,"@Override public void checkAccess(Path path, AccessMode... modes) throws IOException { DefaultSftpFileSystemSingleton.INSTANCE.checkAccess(path, modes); }",authorization_access_control,authorization_access_control,True,,0.9965973496437073,0.0034026172943413258
5,public static long encodeAclMask(Collection<AclEntryPermission> mask) { if (GenericUtils.isEmpty(mask)) { return 0L; } long aclMask = 0L;,authorization_access_control,authorization_access_control,True,,0.9972332119941711,0.0027667998801916838
6,"if (!GenericUtils.isEmpty(allowedPrincipals)) { if (Stream.of(allowedPrincipals.split("","")) .map(String::trim) .filter(s -> !GenericUtils.isEmpty(s)) .noneMatch(certPrincipals::contains)) { log.debug(""authenticate({})[{}] certificate match ignored, none of the allowed principals matched: {}"", username, session, allowedPrincipals); return false; } } else {",unrelated,unrelated,True,,0.0007499155472032726,0.9992501139640808
7,"@Override public boolean authenticate(String username, PublicKey key, ServerSession session) { if (MapEntryUtils.isEmpty(resolvedKeys)) { if (log.isDebugEnabled()) { log.debug(""authenticate({})[{}] no entries"", username, session); }",unrelated,unrelated,True,,0.0006490523810498416,0.9993509650230408
8,"boolean authenticate(String username, String password, ServerSession session) throws PasswordChangeRequiredException, AsyncAuthException;",unrelated,unrelated,True,,0.0006782567943446338,0.9993218183517456
9,SftpClient.Attributes attrs = new SftpClient.Attributes(); if (lastModifiedTime != null) { attrs.modifyTime(lastModifiedTime); } if (lastAccessTime != null) { attrs.accessTime(lastAccessTime); } if (createTime != null) { attrs.createTime(createTime); },unrelated,unrelated,True,,0.0006965735228732228,0.9993034601211548
10,"@Override public boolean authenticate(String username, PublicKey key, ServerSession session) { Map<PublicKey, Boolean> map = resolveCachedResults(username, key, session); Boolean result = map.get(key); if (result == null) { try { result = authenticator.authenticate(username, key, session);",unrelated,unrelated,True,,0.0006585528026334941,0.9993414282798767
11,@Override public RootedPath toRealPath(LinkOption... options) throws IOException { RootedPath absolute = toAbsolutePath(); FileSystem fs = getFileSystem(); FileSystemProvider provider = fs.provider(); provider.checkAccess(absolute); return absolute; },authorization_access_control,authorization_access_control,True,,0.8677770495414734,0.13222290575504303
12,"@Override public final boolean authenticate(String username, String password, ServerSession session) { boolean accepted = isAccepted(); if (accepted) { handleAcceptance(username, password, session); } else { handleRejection(username, password, session);",unrelated,unrelated,True,,0.0006430847570300102,0.9993569254875183
13,"protected void handleAcceptance( ServerSession session, String username, PublicKey clientHostKey, String clientHostName, String clientUsername, List<X509Certificate> certificates) { log.warn(""authenticate({}[{}]: accepted without checking {}@{} key={} fingerprint={}"", username, session, clientUsername, clientHostName, KeyUtils.getKeyType(clientHostKey), KeyUtils.getFingerPrint(clientHostKey)); }",unrelated,unrelated,True,,0.0006605762173421681,0.9993394017219543
14,"} catch (AsyncAuthException async) { async.addListener(authenticated -> asyncAuth(cmd, buffer, authenticated)); return; } catch (Exception e) { warn(""process({}) Failed ({}) to authenticate using current method={}: {}"", session, e.getClass().getSimpleName(), currentAuth.getName(), e.getMessage(), e); } } if (authed == null) {",unrelated,unrelated,True,,0.0006931841489858925,0.9993067979812622
15,"@Override public final boolean authenticate( ServerSession session, String username, PublicKey clientHostKey, String clientHostName, String clientUsername, List<X509Certificate> certificates) { boolean accepted = isAccepted(); if (accepted) { handleAcceptance(session, username, clientHostKey, clientHostName, clientUsername, certificates);",unrelated,unrelated,True,,0.0006639441126026213,0.9993360638618469
16,"SftpPath dst = toSftpPath(target); if (src.getFileSystem() != dst.getFileSystem()) { throw new ProviderMismatchException(""Mismatched file system providers for "" + src + "" vs. "" + dst); } checkAccess(src); boolean replaceExisting = false; boolean copyAttributes = false; boolean noFollowLinks = false; for (CopyOption opt : options) {",authorization_access_control,unrelated,False,true_authorization_access_control_predicted_unrelated,0.2996297776699066,0.7003702521324158
17,"throws Exception { return null; } @Override public boolean authenticate( ServerSession session, String username, List<String> responses) throws Exception { return false; }",unrelated,unrelated,True,,0.0006773427594453096,0.9993226528167725
18,"public static Boolean checkFileExists(Path path, LinkOption... options) { boolean followLinks = followLinks(options); try { if (followLinks) { path.getFileSystem().provider().checkAccess(path); } else { Files.readAttributes(path, BasicFileAttributes.class, options); } return Boolean.TRUE; } catch (NoSuchFileException e) {",authorization_access_control,authorization_access_control,True,,0.9969514608383179,0.003048546612262726
19,"protected void handleAcceptance(String username, String password, ServerSession session) { log.warn(""authenticate({}[{}]: accepted without checking"", username, session); }",unrelated,unrelated,True,,0.0006590035045519471,0.9993409514427185
20,"} try { boolean authed; try { authed = auth.authenticate(username, password, session); } catch (Error e) { warn(""checkPassword({}) failed ({}) to consult authenticator: {}"", session, e.getClass().getSimpleName(), e.getMessage(), e); throw new RuntimeSshException(e); }",unrelated,unrelated,True,,0.0006443755119107664,0.9993556141853333
21,"if (GenericUtils.isEmpty(from)) { return true; } InetSocketAddress remote = resolveClientAddress(session); if (remote == null) { log.debug(""authenticate({})[{}] authorized key rejected, no client address for from={}"", username, session, from); return false; } InetAddress remoteAddress = remote.getAddress(); String remoteHostAddress = (remoteAddress == null) ? remote.getHostString() : remoteAddress.getHostAddress(); String remoteCanonicalHostName = (remoteAddress == null)",unrelated,unrelated,True,,0.0006532201659865677,0.9993467926979065
22,private boolean canRead() { return getOpenOptions().contains(StandardOpenOption.READ); },authorization_access_control,authorization_access_control,True,,0.9946070313453674,0.005392963532358408
23,"@Override public void checkAccess(Path path, AccessMode... modes) throws IOException { Path r = unroot(path); FileSystemProvider p = provider(r); try { p.checkAccess(r, modes); } catch (IOException ex) {",authorization_access_control,authorization_access_control,True,,0.995941698551178,0.004058294929563999
24,private boolean canWrite() { Set<StandardOpenOption> options = getOpenOptions(); return options.contains(StandardOpenOption.WRITE) || options.contains(StandardOpenOption.APPEND); },authorization_access_control,authorization_access_control,True,,0.9952256679534912,0.004774302244186401
25,public static Set<PosixFilePermission> getPermissionsFromFile(File f) { Set<PosixFilePermission> perms = EnumSet.noneOf(PosixFilePermission.class); if (f.canRead()) { perms.add(PosixFilePermission.OWNER_READ); perms.add(PosixFilePermission.GROUP_READ); perms.add(PosixFilePermission.OTHERS_READ); },authorization_access_control,authorization_access_control,True,,0.9972676038742065,0.0027324373368173838
26,public SftpPath toRealPath(LinkOption... options) throws IOException { SftpPath absolute = toAbsolutePath(); FileSystem fs = getFileSystem(); FileSystemProvider provider = fs.provider(); provider.checkAccess(absolute); return absolute; },authorization_access_control,authorization_access_control,True,,0.899907648563385,0.10009230673313141
27,"@Override public void checkAccess(Path path, AccessMode... modes) throws IOException { throw new NoSuchFileException(path.toString()); }",authorization_access_control,authorization_access_control,True,,0.9952882528305054,0.0047117434442043304
28,restricted.add(acl); } } restricted.add(AclEntry.newBuilder() .setType(AclEntryType.ALLOW) .setPrincipal(owner) .setPermissions(EnumSet.allOf(AclEntryPermission.class)) .build()); view.setAcl(restricted);,authorization_access_control,authorization_access_control,True,,0.9972930550575256,0.002706908853724599
29,"SftpPath p1 = toSftpPath(path1); SftpPath p2 = toSftpPath(path2); if (p1.getFileSystem() != p2.getFileSystem()) { throw new ProviderMismatchException(""Mismatched file system providers for "" + p1 + "" vs. "" + p2); } checkAccess(p1); checkAccess(p2); return p1.equals(p2); }",authorization_access_control,authorization_access_control,True,,0.7444575428962708,0.25554245710372925
30,"@Override public void checkAccess(Path path, AccessMode... modes) throws IOException { SftpPath p = toSftpPath(path); boolean w = false; boolean x = false; if (GenericUtils.length(modes) > 0) { for (AccessMode mode : modes) {",authorization_access_control,authorization_access_control,True,,0.9955009818077087,0.004499065689742565
31,"SftpPath src = toSftpPath(source); SftpPath dst = toSftpPath(target); if (src.getFileSystem() != dst.getFileSystem()) { throw new ProviderMismatchException(""Mismatched file system providers for "" + src + "" vs. "" + dst); } checkAccess(src); boolean replaceExisting = false; boolean copyAttributes = false; boolean noFollowLinks = false; for (CopyOption opt : options) {",authorization_access_control,unrelated,False,true_authorization_access_control_predicted_unrelated,0.1883460283279419,0.8116539716720581
32,public static Set<AclEntryPermission> decodeAclMask(int aclMask) { Set<AclEntryPermission> mask = EnumSet.noneOf(AclEntryPermission.class); if ((aclMask & SftpConstants.ACE4_READ_DATA) != 0) { mask.add(AclEntryPermission.READ_DATA); } if ((aclMask & SftpConstants.ACE4_LIST_DIRECTORY) != 0) {,authorization_access_control,authorization_access_control,True,,0.997253954410553,0.0027460798155516386
33,"@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; LinkConditionFuncKey that = (LinkConditionFuncKey) o; return Objects.equals(roleName, that.roleName) && Objects.equals(domainName, that.domainName); }",unrelated,unrelated,True,,0.0009048751671798527,0.99909508228302
34,public List<Boolean> batchEnforce(List<List<String>> rules) { List<Boolean> results = new ArrayList<>(); for (List<String> rule:rules) { boolean result = this.enforce(rule.toArray()); results.add(result); } return results; },authorization_access_control,unrelated,False,true_authorization_access_control_predicted_unrelated,0.0007188243907876313,0.9992812275886536
35,public String getRoleName() { return roleName; },unrelated,unrelated,True,,0.08852328360080719,0.9114766716957092
36,"@Override public int hashCode() { return Objects.hash(roleName, domainName); }",unrelated,unrelated,True,,0.0006563215283676982,0.9993436932563782
37,public void setRoleName(String roleName) { this.roleName = roleName; },unrelated,unrelated,True,,0.03745249658823013,0.9625474810600281
38,@Override public boolean enforce(Object... rvals) { if (!enableCache.get()) { return super.enforce(rvals); } String key = getKey(rvals); if (key == null) { return super.enforce(rvals);,authorization_access_control,unrelated,False,true_authorization_access_control_predicted_unrelated,0.0007516830810345709,0.9992483258247375
39,"@Override public EnforceResult enforceEx(Object... rvals) { return runSynchronized(() -> super.enforceEx(rvals), getReadWriteLock().readLock()); }",authorization_access_control,unrelated,False,true_authorization_access_control_predicted_unrelated,0.0010474090231582522,0.9989525079727173
40,"public boolean enforce(Object... rvals) { return enforce(null, rvals).isAllow(); }",authorization_access_control,authorization_access_control,True,,0.9971778392791748,0.0028221390675753355
41,"@Override public boolean enforce(Object... rvals) { return runSynchronized(() -> super.enforce(rvals), getReadWriteLock().readLock()); }",authorization_access_control,unrelated,False,true_authorization_access_control_predicted_unrelated,0.0010772275272756815,0.9989227652549744
42,private String roleName;,unrelated,unrelated,True,,0.0014769315021112561,0.9985230565071106
43,"@CheckReturnValue @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static <@NonNull T> Maybe<T> fromSingle(@NonNull SingleSource<T> single) { Objects.requireNonNull(single, ""single is null""); return RxJavaPlugins.onAssembly(new MaybeFromSingle<>(single)); }",unrelated,unrelated,True,,0.0006497474387288094,0.9993502497673035
44,"public StrBuilder replaceAll(final char search, final char replace) { if (search != replace) { for (int i = 0; i < size; i++) { if (buffer[i] == search) { buffer[i] = replace; } } } return this; }",unrelated,unrelated,True,,0.0006525214412249625,0.9993475079536438
45,"@SuppressWarnings(""unchecked"") public final U awaitOnSubscribe(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException { if (!onSubscribeReady.await(timeout, unit)) { throw new TimeoutException(""TestSubscriber.awaitOnSubscribe timed out""); } return (U)this; }",unrelated,unrelated,True,,0.0006691352464258671,0.9993308782577515
46,"public static Formatter append(final CharSequence seq, final Formatter formatter, final int flags, final int width, final int precision) { return append(seq, formatter, flags, width, precision, ' ', null); }",unrelated,unrelated,True,,0.0006621583015657961,0.9993378520011902
47,"public boolean replaceIn(final StrBuilder source, final int offset, final int length) { if (source == null) { return false; } return substitute(source, offset, length); }",unrelated,unrelated,True,,0.0006544078350998461,0.999345600605011
48,"public static <V> String replace(final Object source, final Map<String, V> valueMap, final String prefix, final String suffix) { return new StrSubstitutor(valueMap, prefix, suffix).replace(source); }",unrelated,unrelated,True,,0.0006551035912707448,0.9993448853492737
49,"@CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @NonNull public final Flowable<T> concatWith(@NonNull MaybeSource<? extends T> other) { Objects.requireNonNull(other, ""other is null""); return RxJavaPlugins.onAssembly(new FlowableConcatWithMaybe<>(this, other)); }",unrelated,unrelated,True,,0.0006480060401372612,0.9993520379066467
50,public StrTokenizer setIgnoreEmptyTokens(final boolean ignoreEmptyTokens) { this.ignoreEmptyTokens = ignoreEmptyTokens; return this; },unrelated,unrelated,True,,0.0007094513275660574,0.9992904663085938
51,"@Override public @NonNull CompletionStage<Boolean> next(@NonNull T item) { try { return Objects.requireNonNull(onNext.apply(item), ""onNext returned a null CompletionStage""); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); return CompletableFuture.failedStage(ex); } }",unrelated,unrelated,True,,0.0006617715116590261,0.9993382096290588
52,"public static long verifyPositive(long value, String paramName) { if (value <= 0L) { throw new IllegalArgumentException(paramName + "" > 0 required but it was "" + value); } return value; }",unrelated,unrelated,True,,0.0006695964839309454,0.9993304014205933
53,"private TextStringBuilder replaceImpl(final StringMatcher matcher, final String replaceStr, final int from, int to, int replaceCount) { if (matcher == null || size == 0) { return this; } final int replaceLen = replaceStr == null ? 0 : replaceStr.length(); for (int i = from; i < to && replaceCount != 0; i++) { final char[] buf = buffer; final int removeLen = matcher.isMatch(buf, i, from, to); if (removeLen > 0) { replaceImpl(i, i + removeLen, removeLen, replaceStr, replaceLen); to = to - removeLen + replaceLen; i = i + replaceLen - 1; if (replaceCount > 0) { replaceCount--; } } } return this; }",unrelated,unrelated,True,,0.0006428586202673614,0.9993571639060974
54,@Override public boolean equals(final Object obj) { return obj instanceof StrBuilder && equals((StrBuilder) obj); },unrelated,unrelated,True,,0.0007892716093920171,0.9992107152938843
55,"@CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) @NonNull public final Flowable<T> concatWith(@NonNull CompletableSource other) { Objects.requireNonNull(other, ""other is null""); return RxJavaPlugins.onAssembly(new FlowableConcatWithCompletable<>(this, other)); }",unrelated,unrelated,True,,0.0006491349777206779,0.9993508458137512
56,"@Override public Integer apply(final CharSequence left, final CharSequence right) { return apply(SimilarityInput.input(left), SimilarityInput.input(right)); }",unrelated,unrelated,True,,0.0006531684193760157,0.9993467926979065
57,"@CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.COMPUTATION) @NonNull public final <@NonNull R> Flowable<R> replay(@NonNull Function<? super Flowable<T>, @NonNull ? extends Publisher<R>> selector, long time, @NonNull TimeUnit unit) { return replay(selector, time, unit, Schedulers.computation()); }",unrelated,unrelated,True,,0.000662887585349381,0.9993371367454529
58,"@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @NonNull public static <@NonNull T> Observable<T> merge(@NonNull Iterable<@NonNull ? extends ObservableSource<? extends T>> sources, @NonNull StandardConcurrentBufferedConfig config) { Objects.requireNonNull(config, ""config is null""); return fromIterable(sources).flatMap(Functions.identity(), config); }",unrelated,unrelated,True,,0.0006599532207474113,0.9993399977684021
59,"public static void main(final String[] args) { System.out.println(JavaPlatformStringLookup.class); System.out.printf(""%s = %s%n"", KEY_VERSION, INSTANCE.lookup(KEY_VERSION)); System.out.printf(""%s = %s%n"", KEY_RUNTIME, INSTANCE.lookup(KEY_RUNTIME)); System.out.printf(""%s = %s%n"", KEY_VM, INSTANCE.lookup(KEY_VM)); System.out.printf(""%s = %s%n"", KEY_OS, INSTANCE.lookup(KEY_OS)); System.out.printf(""%s = %s%n"", KEY_HARDWARE, INSTANCE.lookup(KEY_HARDWARE)); System.out.printf(""%s = %s%n"", KEY_LOCALE, INSTANCE.lookup(KEY_LOCALE)); }",unrelated,unrelated,True,,0.000690629065502435,0.9993094205856323
60,"@CheckReturnValue @NonNull static <T> Streamable<T> fromPublisher(@NonNull Flow.Publisher<T> source, @NonNull ExecutorService executor) { Objects.requireNonNull(source, ""source is null""); Objects.requireNonNull(executor, ""executor is null""); return RxJavaPlugins.onAssembly(new StreamableFromPublisher<>(source, executor)); }",unrelated,unrelated,True,,0.0006487421924248338,0.9993512034416199
61,public MpscLinkedQueue() { producerNode = new AtomicReference<>(); consumerNode = new AtomicReference<>(); LinkedQueueNode<T> node = new LinkedQueueNode<>(); spConsumerNode(node); xchgProducerNode(node); },unrelated,unrelated,True,,0.0006519973394460976,0.999347984790802
62,"@Override public @NonNull Streamer<@NonNull T> stream(@NonNull StreamerCancellation cancellation) { return new ConcatIteratorStreamer<>(sources.iterator(), cancellation); }",unrelated,unrelated,True,,0.000673422880936414,0.9993265867233276
63,"protected String resolveVariable(final String variableName, final TextStringBuilder buf, final int startPos, final int endPos) { final StringLookup resolver = getStringLookup(); if (resolver == null) { return null; } return resolver.apply(variableName); }",unrelated,unrelated,True,,0.0006415481911972165,0.9993584752082825
64,"@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @NonNull public final <@NonNull R> Single<R> reduce(R seed, @NonNull BiFunction<R, ? super T, R> reducer) { Objects.requireNonNull(seed, ""seed is null""); Objects.requireNonNull(reducer, ""reducer is null""); return RxJavaPlugins.onAssembly(new ObservableReduceSeedSingle<>(this, seed, reducer)); }",unrelated,unrelated,True,,0.0006456099217757583,0.9993544220924377
65,public StrBuilder appendSeparator(final char separator) { if (isNotEmpty()) { append(separator); } return this; },unrelated,unrelated,True,,0.0006573105929419398,0.9993426203727722
66,"public int indexOf(final char ch, int startIndex) { startIndex = Math.max(startIndex, 0); if (startIndex >= size) { return -1; } final char[] thisBuf = buffer; for (int i = startIndex; i < size; i++) { if (thisBuf[i] == ch) { return i; } } return -1; }",unrelated,unrelated,True,,0.0006482746684923768,0.9993516802787781
67,@Override public Object clone() { try { return cloneReset(); } catch (final CloneNotSupportedException ex) { return null; } },unrelated,unrelated,True,,0.0006527004879899323,0.9993472695350647
68,"private void resizeBuffer(final int minCapacity) { final int oldCapacity = buffer.length; int newCapacity = oldCapacity * 2; if (Integer.compareUnsigned(newCapacity, minCapacity) < 0) { newCapacity = minCapacity; } if (Integer.compareUnsigned(newCapacity, MAX_BUFFER_SIZE) > 0) { newCapacity = createPositiveCapacity(minCapacity); } reallocate(newCapacity); }",unrelated,unrelated,True,,0.0006528024678118527,0.9993471503257751
69,"private int generateRandomNumber(final List<Character> characterList) { final int listSize = characterList.size(); if (random != null) { return String.valueOf(characterList.get(random.applyAsInt(listSize))).codePointAt(0); } return String.valueOf(characterList.get(ThreadLocalRandom.current().nextInt(0, listSize))).codePointAt(0); }",unrelated,unrelated,True,,0.0006413977826014161,0.999358594417572
70,@CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) @NonNull public final Single<Long> count() { return RxJavaPlugins.onAssembly(new FlowableCountSingle<>(this)); },unrelated,unrelated,True,,0.0006776158697903156,0.9993224143981934
71,public StringTokenizer setIgnoreEmptyTokens(final boolean ignoreEmptyTokens) { this.ignoreEmptyTokens = ignoreEmptyTokens; return this; },unrelated,unrelated,True,,0.0007092287996783853,0.9992907047271729
72,"private int appendWholeGrouped(final int wholeCount, final FormatOptions opts) { if (shouldIncludeMinus(opts)) { append(opts.getMinusSign()); } final char[] localizedDigits = opts.getDigits(); final char localizedZero = localizedDigits[0]; final char groupingChar = opts.getGroupingSeparator(); final int appendCount = Math.max(0, Math.min(wholeCount, digitCount)); if (appendCount > 0) { int i; int pos = wholeCount; for (i = 0; i < appendCount; ++i, --pos) { appendLocalizedDigit(digits[i], localizedDigits); if (requiresGroupingSeparatorAfterPosition(pos)) { append(groupingChar); } }",unrelated,unrelated,True,,0.0006418931297957897,0.9993581175804138
73,"public ObservableWithLatestFromMany(@NonNull ObservableSource<T> source, @NonNull Iterable<? extends ObservableSource<?>> otherIterable, @NonNull Function<? super Object[], R> combiner) { super(source); this.otherArray = null; this.otherIterable = otherIterable; this.combiner = combiner; }",unrelated,unrelated,True,,0.000658832723274827,0.9993411898612976
74,"public static String toCamelCase(String str, final boolean capitalizeFirstLetter, final char... delimiters) { if (StringUtils.isEmpty(str)) { return str; } str = str.toLowerCase(Locale.ROOT); final int strLen = str.length(); final int[] newCodePoints = new int[strLen]; int outOffset = 0; final Set<Integer> delimiterSet = toDelimiterSet(delimiters); boolean capitalizeNext = capitalizeFirstLetter; for (int index = 0; index < strLen;) { final int codePoint = str.codePointAt(index); if (delimiterSet.contains(codePoint)) { capitalizeNext = outOffset != 0; index += Character.charCount(codePoint); } else if (capitalizeNext || outOffset == 0 && capitalizeFirstLetter) { final int titleCaseCodePoint = Character.toTitleCase(codePoint); newCodePoints[outOffset++] = titleCaseCodePoint; index += Character.charCount(titleCaseCodePoint); capitalizeNext = false;",unrelated,unrelated,True,,0.0006467652274295688,0.9993532299995422
75,"private String parseFormatDescription(final String pattern, final ParsePosition pos) { final int start = pos.getIndex(); seekNonWs(pattern, pos); final int text = pos.getIndex(); int depth = 1; while (pos.getIndex() < pattern.length()) { switch (pattern.charAt(pos.getIndex())) { case START_FE: depth++; next(pos); break; case END_FE: depth--; if (depth == 0) { return pattern.substring(text, pos.getIndex()); } next(pos); break; case QUOTE: getQuotedString(pattern, pos);",unrelated,unrelated,True,,0.0006729114684276283,0.9993270635604858
76,"@Override public void onSubscribe(@NonNull Disposable d) { try { lastThread = Thread.currentThread(); if (d == null) { errors.add(new NullPointerException(""onSubscribe received a null Subscription"")); return; } if (!upstream.compareAndSet(null, d)) { d.dispose(); if (upstream.get() != DisposableHelper.DISPOSED) { errors.add(new IllegalStateException(""onSubscribe received multiple subscriptions: "" + d)); } return; } downstream.onSubscribe(d); } finally { onSubscribeReady.countDown();",unrelated,unrelated,True,,0.0006518873269669712,0.9993481040000916
77,"private int getDigitStringSize(final int decimalPos, final FormatOptions opts) { int size = digitCount; if (shouldIncludeMinus(opts)) { ++size; } if (decimalPos < 1) { size += 2 + Math.abs(decimalPos); } else if (decimalPos >= digitCount) { size += decimalPos - digitCount; if (opts.isIncludeFractionPlaceholder()) { size += 2; } } else { size += 1;",unrelated,unrelated,True,,0.0006523460033349693,0.9993476271629333
78,"@Override protected void subscribeActual(MaybeObserver<? super R> observer) { source.subscribe(new MapOptionalSingleObserver<>(observer, mapper)); }",unrelated,unrelated,True,,0.0006847453769296408,0.9993152618408203
79,public StringMatcher stringMatcher(final char... chars) { final int length = ArrayUtils.getLength(chars); return length == 0 ? NONE_MATCHER : length == 1 ? new AbstractStringMatcher.CharMatcher(chars[0]) : new AbstractStringMatcher.CharArrayMatcher(chars); },unrelated,unrelated,True,,0.0006466265767812729,0.9993533492088318
80,"public List<String> getTokenList() { checkTokenized(); final List<String> list = new ArrayList<>(tokens.length); Collections.addAll(list, tokens); return list; }",unrelated,unrelated,True,,0.0006779045215807855,0.9993220567703247
81,"@CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) @NonNull public final Observable<T> observeOn(@NonNull Scheduler scheduler) { return observeOn(scheduler, StandardBufferedConfig.DEFAULT); }",unrelated,unrelated,True,,0.0006576465093530715,0.9993423819541931
82,"public StrBuilder deleteCharAt(final int index) { if (index < 0 || index >= size) { throw new StringIndexOutOfBoundsException(index); } deleteImpl(index, index + 1, 1); return this; }",unrelated,unrelated,True,,0.0006469853105954826,0.9993529915809631
83,"@Override protected void subscribeActual(Observer<? super T> t) { CacheDisposable<T> consumer = new CacheDisposable<>(t, multicaster, head); t.onSubscribe(consumer); multicaster.add(consumer); if (consumer.isDisposed()) { multicaster.remove(consumer); } if (!once.get() && once.compareAndSet(false, true)) { source.subscribe(multicaster); } else { multicaster.replay(consumer); } }",unrelated,unrelated,True,,0.0006429983186535537,0.9993570446968079
84,"@SuppressWarnings(""unchecked"") @NonNull public static <T> Predicate<T> alwaysFalse() { return (Predicate<T>)ALWAYS_FALSE; }",unrelated,unrelated,True,,0.0006655032048001885,0.9993345141410828
85,"private void buildScript(final int start1, final int end1, final int start2, final int end2, final EditScript<Character> script) { final Snake middle = getMiddleSnake(start1, end1, start2, end2); if (middle == null || middle.getStart() == end1 && middle.getDiag() == end1 - end2 || middle.getEnd() == start1 && middle.getDiag() == start1 - start2) { int i = start1; int j = start2; while (i < end1 || j < end2) { if (i < end1 && j < end2 && left.charAt(i) == right.charAt(j)) { script.append(new KeepCommand<>(left.charAt(i))); ++i; ++j; } else if (end1 - start1 > end2 - start2) { script.append(new DeleteCommand<>(left.charAt(i))); ++i; } else { script.append(new InsertCommand<>(right.charAt(j)));",unrelated,unrelated,True,,0.0006472980603575706,0.999352753162384
86,"private void seekNonWs(final String pattern, final ParsePosition pos) { final char[] buffer = pattern.toCharArray(); while (pos.getIndex() < buffer.length) { final int len = StringMatcherFactory.INSTANCE.splitMatcher().isMatch(buffer, pos.getIndex(), 0, buffer.length); if (len == 0) { break; } pos.setIndex(pos.getIndex() + len); } }",unrelated,unrelated,True,,0.0006496508722193539,0.999350368976593
87,"public TextStringBuilder appendPadding(final int length, final char padChar) { if (length >= 0) { ensureCapacityInternal(size + length); for (int i = 0; i < length; i++) { buffer[size++] = padChar; } } return this; }",unrelated,unrelated,True,,0.000653014809358865,0.9993470311164856
88,"public DeferredExecutorScheduler(@NonNull Supplier<? extends Executor> executorSupplier, boolean interruptibleWorker, boolean fair) { this.executorSupplier = executorSupplier; this.interruptibleWorker = interruptibleWorker; this.fair = fair; }",unrelated,unrelated,True,,0.0006620244821533561,0.9993379712104797
89,"@SuppressWarnings(""unchecked"") void remove(ReplaySubscription<T> rs) { for (;;) { ReplaySubscription<T>[] a = subscribers.get(); if (a == TERMINATED || a == EMPTY) { return; } int len = a.length; int j = -1; for (int i = 0; i < len; i++) { if (a[i] == rs) { j = i; break; } } if (j < 0) { return; } ReplaySubscription<T>[] b;",unrelated,unrelated,True,,0.0006462815217673779,0.9993537068367004
90,"private static int[] algorithmB(final CharSequence left, final CharSequence right) { final int m = left.length(); final int n = right.length(); final int[][] dpRows = new int[2][1 + n]; for (int i = 1; i <= m; i++) { final int[] temp = dpRows[0]; dpRows[0] = dpRows[1]; dpRows[1] = temp; for (int j = 1; j <= n; j++) { if (left.charAt(i - 1) == right.charAt(j - 1)) { dpRows[1][j] = dpRows[0][j - 1] + 1; } else { dpRows[1][j] = Math.max(dpRows[1][j - 1], dpRows[0][j]);",unrelated,unrelated,True,,0.0006451171939261258,0.999354898929596
91,public SingleScheduler(ThreadFactory threadFactory) { this.threadFactory = threadFactory; executor.lazySet(createExecutor(threadFactory)); },unrelated,unrelated,True,,0.0006583174108527601,0.9993416666984558
92,"public MaybeToSingle(MaybeSource<T> source, T defaultValue) { this.source = source; this.defaultValue = defaultValue; }",unrelated,unrelated,True,,0.0006756168440915644,0.9993244409561157
93,@Override public void onNext(T t) { if (value == null) { value = t; upstream.cancel(); countDown(); } },unrelated,unrelated,True,,0.0006683761021122336,0.9993316531181335
94,"@NonNull static Disposable fromSubscription(@NonNull Subscription subscription) { Objects.requireNonNull(subscription, ""subscription is null""); return new SubscriptionDisposable(subscription); }",unrelated,unrelated,True,,0.0006624283851124346,0.9993374943733215
95,"@Override public int translate(final CharSequence input, final int index, final Writer writer) throws IOException { if (index != 0) { throw new IllegalArgumentException(getClassName() + "".translate(final CharSequence input, final int "" + ""index, final Writer out) cannot handle a non-zero index.""); } translateWhole(input, writer); return Character.codePointCount(input, index, input.length()); }",unrelated,unrelated,True,,0.0006255413172766566,0.9993744492530823
96,"@Override public void onNext(T t) { if (fusionMode == QueueSubscription.NONE) { parent.innerNext(this, t); } else { parent.drain(); } }",unrelated,unrelated,True,,0.0006519718444906175,0.999347984790802
97,"private static Predicate<Integer> generateIsDelimiterFunction(final char[] delimiters) { final Predicate<Integer> isDelimiter; if (delimiters == null || delimiters.length == 0) { isDelimiter = delimiters == null ? Character::isWhitespace : c -> false; } else { final Set<Integer> delimiterSet = new HashSet<>(); for (int index = 0; index < delimiters.length; index++) { delimiterSet.add(Character.codePointAt(delimiters, index)); } isDelimiter = delimiterSet::contains; } return isDelimiter; }",unrelated,unrelated,True,,0.000641309772618115,0.9993587136268616
98,@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @NonNull public final Single<@NonNull List<T>> toSortedList() { return toSortedList(Functions.naturalComparator()); },unrelated,unrelated,True,,0.0006617305334657431,0.9993382096290588
99,"@CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) @NonNull public final Observable<T> throttleFirst(long skipDuration, @NonNull TimeUnit unit, @NonNull Scheduler scheduler) { Objects.requireNonNull(unit, ""unit is null""); Objects.requireNonNull(scheduler, ""scheduler is null""); return RxJavaPlugins.onAssembly(new ObservableThrottleFirstTimed<>(this, skipDuration, unit, scheduler, null)); }",unrelated,unrelated,True,,0.0006545711657963693,0.9993453621864319
100,"protected String resolveVariable(final String variableName, final StrBuilder buf, final int startPos, final int endPos) { final StrLookup<?> resolver = getVariableResolver(); if (resolver == null) { return null; } return resolver.apply(variableName); }",unrelated,unrelated,True,,0.0006366072921082377,0.999363362789154
101,"@Override protected void subscribeActual(Observer<? super R> observer) { source.subscribe(new ConcatMapEagerMainObserver<>(observer, mapper, maxConcurrency, prefetch, errorMode)); }",unrelated,unrelated,True,,0.0006716896896250546,0.9993283748626709
102,final void removeSelf() { DisposableContainer c = composite.getAndSet(null); if (c != null) { c.delete(this); } },unrelated,unrelated,True,,0.0006829844205640256,0.9993170499801636
|