File size: 48,673 Bytes
2046dde | 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 | dataset_index,text,true_label,predicted_label,correct,error_type,probability_secure_communication,probability_unrelated
0,"public FtpOperations(FTPClient client, FTPClientConfig clientConfig) { this.client = client; this.clientConfig = clientConfig; }",unrelated,secure_communication,False,true_unrelated_predicted_secure_communication,0.5913175940513611,0.40868234634399414
1,protected FTPClient createFtpClient() throws Exception { FTPClient client = new FTPClient(); ClassResolver cr = getCamelContext().getClassResolver(); client.setParserFactory(new CamelFTPParserFactory(cr)); return client; },unrelated,secure_communication,False,true_unrelated_predicted_secure_communication,0.9586323499679565,0.04136771708726883
2,"KeyPairProvider keyPairProvider = new OpenSSHKeyPairProvider(serverPrivateKeyPath, serverPublicKeyPath, algorithm, keySize, privateKeyPassword); KarafJaasAuthenticator authenticator = new KarafJaasAuthenticator(sshRealm, sshRole, roleClasses); UserAuthFactoriesFactory authFactoriesFactory = new UserAuthFactoriesFactory(); authFactoriesFactory.setAuthMethods(authMethods); SshServer server = SshServer.setUpDefaultServer(); server.setPort(sshPort); server.setHost(sshHost); server.setMacFactories(SshUtils.buildMacs(macs)); server.setCipherFactories(SshUtils.buildCiphers(ciphers)); server.setKeyExchangeFactories(SshUtils.buildKexAlgorithms(kexAlgorithms)); server.setSignatureFactories(SshUtils.buildSigAlgorithms(sigAlgorithms)); server.setShellFactory(new ShellFactoryImpl(sessionFactory)); if (sftpEnabled) { server.setCommandFactory(new ScpCommandFactory.Builder().withDelegate((channel, cmd) -> new ShellCommand(sessionFactory, cmd)).build()); server.setSubsystemFactories(Collections.singletonList(new SftpSubsystemFactory())); server.setFileSystemFactory(new VirtualFileSystemFactory(Paths.get(System.getProperty(""karaf.base"")))); } else { server.setCommandFactory((channel, cmd) -> new ShellCommand(sessionFactory, cmd)); } server.setKeyPairProvider(keyPairProvider); server.setPasswordAuthenticator(authenticator); server.setPublickeyAuthenticator(authenticator);",secure_communication,secure_communication,True,,0.9968631267547607,0.0031369379721581936
3,"protected void extractAndSetFtpClientKeyStoreParameters(Map<String, Object> parameters, FtpsEndpoint endpoint) { if (PropertiesHelper.hasProperties(parameters, ""ftpClient.keyStore."")) { Map<String, Object> param = PropertiesHelper.extractProperties(parameters, ""ftpClient.keyStore.""); endpoint.setFtpClientKeyStoreParameters(param); } }",secure_communication,secure_communication,True,,0.9967923760414124,0.003207582049071789
4,public FTPClient getFtpClient() { return ftpClient; },unrelated,unrelated,True,,0.05345100536942482,0.9465489983558655
5,"protected void extractAndSetFtpClientParameters(Map<String, Object> parameters, FtpEndpoint<FTPFile> answer) { if (PropertiesHelper.hasProperties(parameters, ""ftpClient."")) { Map<String, Object> param = PropertiesHelper.extractProperties(parameters, ""ftpClient.""); answer.setFtpClientParameters(param); } }",unrelated,secure_communication,False,true_unrelated_predicted_secure_communication,0.995826780796051,0.004173241555690765
6,protected FTPClient getFtpClient() { return client; },unrelated,unrelated,True,,0.0005290499539114535,0.9994710087776184
7,"try { String execProt = config.getExecProt(); Long execPbsz = config.getExecPbsz(); if (!config.isDisableSecureDataChannelDefaults()) { if (ObjectHelper.isEmpty(execProt)) { execProt = ""P""; } if (ObjectHelper.isEmpty(execPbsz)) { execPbsz = 0L; } } if (execPbsz != null) { log.debug(""FTPClient initializing with execPbsz={}"", execPbsz); getFtpClient().execPBSZ(execPbsz); } if (execProt != null) { log.debug(""FTPClient initializing with execProt={}"", execProt); getFtpClient().execPROT(execProt); }",secure_communication,secure_communication,True,,0.9968786239624023,0.003121370216831565
8,"LOG.trace(""Channel isn't connected, trying to recreate and connect.""); channel = (ChannelSftp) session.openChannel(""sftp""); if (endpoint.getConfiguration().getFilenameEncoding() != null) { Charset ch = Charset.forName(endpoint.getConfiguration().getFilenameEncoding()); LOG.trace(""Using filename encoding: {}"", ch); channel.setFilenameEncoding(ch); } if (endpoint.getConfiguration().getConnectTimeout() > 0) { LOG.trace(""Connecting use connectTimeout: {} ..."", endpoint.getConfiguration().getConnectTimeout()); channel.connect(endpoint.getConfiguration().getConnectTimeout()); } else { LOG.trace(""Connecting ...""); channel.connect(); }",secure_communication,secure_communication,True,,0.9969105124473572,0.003089484991505742
9,"@ManagedAttribute(description = ""Summary of last FTP activity (download only)"") public String getLastFtpActivity() { FTPClient client = getOperations().getFtpClient(); FtpClientActivityListener listener = (FtpClientActivityListener) client.getCopyStreamListener(); if (listener != null) { String log = listener.getLastLogActivity(); if (log != null) { long since = listener.getLastLogActivityTimestamp(); if (since > 0) { String human = TimeUtils.printSince(since); return log + "" "" + human + "" ago""; } else { return log; } } } return null; }",unrelated,unrelated,True,,0.0005874329945072532,0.9994125366210938
10,"try { String knownHostResource = endpoint.getKnownHostsResource(); if (knownHostResource != null) { client.setServerKeyVerifier(new ResourceBasedSSHKeyVerifier( exchange.getContext(), knownHostResource, endpoint.isFailOnUnknownHost())); } SshResult result = SshHelper.sendExecCommand(exchange.getIn().getHeaders(), command, endpoint, client);",secure_communication,secure_communication,True,,0.9969003200531006,0.003099679248407483
11,"SshClient client = SshClient.setUpDefaultClient(); if (this.session.get(SshAgent.SSH_AUTHSOCKET_ENV_NAME) != null) { client.setAgentFactory(KarafAgentFactory.getInstance()); String agentSocket = this.session.get(SshAgent.SSH_AUTHSOCKET_ENV_NAME).toString(); client.getProperties().put(SshAgent.SSH_AUTHSOCKET_ENV_NAME, agentSocket); } KnownHostsManager knownHostsManager = new KnownHostsManager(new File(System.getProperty(""user.home""), "".sshkaraf/known_hosts"")); ServerKeyVerifier serverKeyVerifier = new ServerKeyVerifierImpl(knownHostsManager, quiet); client.setServerKeyVerifier(serverKeyVerifier); client.setKeyIdentityProvider(new FileKeyPairProvider());",secure_communication,secure_communication,True,,0.9969056248664856,0.003094407496973872
12,"@Override protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authResult) throws IOException, ServletException { if (SystemProperties.getInteger(SecurityRealm.class.getName() + "".sessionFixationProtectionMode"", 1) == 2) { request.getSession().invalidate(); request.getSession(true); } super.successfulAuthentication(request, response, chain, authResult); HttpSession newSession = request.getSession(); if (!UserSeedProperty.DISABLE_USER_SEED) { User user = User.getById(authResult.getName(), true); UserSeedProperty userSeed = user.getProperty(UserSeedProperty.class); String sessionSeed = userSeed.getSeed(); newSession.setAttribute(UserSeedProperty.USER_SESSION_SEED, sessionSeed); } SecurityListener.fireLoggedIn(authResult.getName()); }",unrelated,unrelated,True,,0.001963438931852579,0.9980365633964539
13,"try (SshClient client = SshClient.setUpDefaultClient()) { KnownHostsServerKeyVerifier verifier = new DefaultKnownHostsServerKeyVerifier((clientSession, remoteAddress, serverKey) -> { CLI.LOGGER.log(Level.WARNING, ""Unknown host key for {0}"", remoteAddress.toString()); return !strictHostKey; }, true); client.setServerKeyVerifier(verifier); client.start(); ConnectFuture cf = client.connect(user, sshHost, sshPort); cf.await(); try (ClientSession session = cf.getSession()) { for (KeyPair pair : provider.getKeys()) { CLI.LOGGER.log(FINE, ""Offering {0} private key"", pair.getPrivate().getAlgorithm()); session.addPublicKeyIdentity(pair); } session.auth().verify(10000L);",secure_communication,secure_communication,True,,0.9969232678413391,0.003076668130233884
14,"private void createAndRunSshServer() { server = createSshServer(sessionFactory); this.bundleContext.registerService(SshServer.class, server, null); if (server == null) { return; } ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(SshServer.class.getClassLoader()); server.start(); } catch (Exception e) { LOGGER.warn(""Exception caught while starting SSH server"", e); } finally { Thread.currentThread().setContextClassLoader(originalClassLoader); }",secure_communication,secure_communication,True,,0.9968908429145813,0.003109224373474717
15,"@Override public @Nullable Object getAttribute(String name, int scope) { if (scope == SCOPE_REQUEST) { if (!isRequestActive()) { throw new IllegalStateException( ""Cannot ask for request attribute - request is not active anymore!""); } return this.request.getAttribute(name); } else { HttpSession session = getSession(false); if (session != null) { try { Object value = session.getAttribute(name); if (value != null) { this.sessionAttributesToUpdate.put(name, value); } return value; } catch (IllegalStateException ex) { } } return null; } }",unrelated,unrelated,True,,0.0005087140598334372,0.9994912147521973
16,"protected void registerSessionDestructionCallback(String name, Runnable callback) { HttpSession session = obtainSession(); session.setAttribute(DESTRUCTION_CALLBACK_NAME_PREFIX + name, new DestructionCallbackBindingListener(callback)); }",unrelated,unrelated,True,,0.0005607433849945664,0.9994392991065979
17,"@Override public String getSessionId() { Object session = getExternalContext().getSession(true); try { Method getIdMethod = session.getClass().getMethod(""getId""); return String.valueOf(ReflectionUtils.invokeMethod(getIdMethod, session)); } catch (NoSuchMethodException ex) { throw new IllegalStateException(""Session object ["" + session + ""] does not have a getId() method""); } }",unrelated,unrelated,True,,0.0005198402795940638,0.9994801878929138
18,public static SshClient createAndStartClient(SshConfiguration configuration) throws Exception { SshClient client; if (configuration == null || configuration.getClientBuilder() == null) { client = SshClient.setUpDefaultClient(); } else { client = configuration.getClientBuilder().build(true); },secure_communication,secure_communication,True,,0.9968894124031067,0.003110602032393217
19,"private static void putUserSeedInSession(String username, boolean overwriteSessionSeed) { StaplerRequest2 req = Stapler.getCurrentRequest2(); if (req == null) { return; } HttpSession session = req.getSession(false); if (session == null) { return; } if (!UserSeedProperty.DISABLE_USER_SEED) { if (!overwriteSessionSeed && session.getAttribute(UserSeedProperty.USER_SESSION_SEED) != null) { return; } User user = User.getById(username, true); UserSeedProperty userSeed = user.getProperty(UserSeedProperty.class); if (userSeed == null) { return; } String sessionSeed = userSeed.getSeed(); session.setAttribute(UserSeedProperty.USER_SESSION_SEED, sessionSeed); } }",unrelated,unrelated,True,,0.01954038441181183,0.9804596900939941
20,"@Override public void setAttribute(String name, Object value, int scope) { if (scope == SCOPE_REQUEST) { if (!isRequestActive()) { throw new IllegalStateException( ""Cannot set request attribute - request is not active anymore!""); } this.request.setAttribute(name, value); } else { HttpSession session = obtainSession(); this.sessionAttributesToUpdate.remove(name); session.setAttribute(name, value); } }",unrelated,unrelated,True,,0.0005702308844774961,0.9994297623634338
21,"try { String knownHostResource = endpoint.getKnownHostsResource(); if (knownHostResource != null) { client.setServerKeyVerifier(new ResourceBasedSSHKeyVerifier( exchange.getContext(), knownHostResource, endpoint.isFailOnUnknownHost())); } SshResult result = SshHelper.sendExecCommand(headers, command, endpoint, client);",secure_communication,secure_communication,True,,0.9968898892402649,0.0031101659405976534
22,"@Override protected UserDetails processAutoLoginCookie(String[] cookieTokens, HttpServletRequest request, HttpServletResponse response) { Jenkins j = Jenkins.getInstanceOrNull(); if (j == null) { throw new InvalidCookieException(""Jenkins is not yet running""); } if (j.isDisableRememberMe()) { cancelCookie(request, response); throw new InvalidCookieException(""rememberMe is disabled""); } if (cookieTokens.length != 3) { throw new InvalidCookieException( ""Cookie token did not contain 3"" + "" tokens, but contained '"" + Arrays.asList(cookieTokens) + ""'""); } long tokenExpiryTime = getTokenExpiryTime(cookieTokens); if (isTokenExpired(tokenExpiryTime)) { throw new InvalidCookieException(""Cookie token[1] has expired (expired on '"" + new Date(tokenExpiryTime) + ""'; current time is '"" + new Date() + ""')""); } UserDetails userDetails = getUserDetailsService().loadUserByUsername(cookieTokens[0]); Objects.requireNonNull(userDetails, ""UserDetailsService "" + getUserDetailsService() + "" returned null for username "" + cookieTokens[0] + "". "" + ""This is an interface contract violation""); String expectedTokenSignature = makeTokenSignature(tokenExpiryTime, userDetails.getUsername()); if (!equals(expectedTokenSignature, cookieTokens[2])) { throw new InvalidCookieException(""Cookie token[2] contained signature '"" + cookieTokens[2] + ""' but expected '"" + expectedTokenSignature + ""'""); } return userDetails; }",unrelated,unrelated,True,,0.0005526589811779559,0.9994472861289978
23,"protected final @Nullable HttpSession getSession(boolean allowCreate) { if (isRequestActive()) { HttpSession session = this.request.getSession(allowCreate); this.session = session; return session; } else { HttpSession session = this.session; if (session == null) { if (allowCreate) { throw new IllegalStateException( ""No session found and request already completed - cannot create new session!""); } else { session = this.request.getSession(false); this.session = session; } } return session; } }",unrelated,unrelated,True,,0.0005430562305264175,0.9994569420814514
24,SftpConfiguration config = new SftpConfiguration(new URI(baseUri)); if (strictHostKeyChecking != null) { config.setStrictHostKeyChecking(strictHostKeyChecking); } if (knownHostsFile != null) { config.setKnownHostsFile(knownHostsFile); } if (knownHostsUri != null) { config.setKnownHostsUri(knownHostsUri); } if (knownHosts != null) { config.setKnownHosts(knownHosts); } config.setUseUserKnownHostsFile(useUserKnownHostsFile); config.setAutoCreateKnownHostsFile(autoCreateKnownHostsFile);,secure_communication,secure_communication,True,,0.9968819618225098,0.003118029097095132
25,public void setKnownHosts(byte[] knownHosts) { this.knownHosts = knownHosts; },secure_communication,secure_communication,True,,0.9964113831520081,0.0035886000841856003
26,"final Session session = jsch.getSession(configuration.getUsername(), configuration.getHost(), configuration.getPort()); if (isNotEmpty(sftpConfig.getCiphers())) { LOG.debug(""Using ciphers: {}"", sftpConfig.getCiphers()); session.setConfig(""cipher.s2c"", sftpConfig.getCiphers()); session.setConfig(""cipher.c2s"", sftpConfig.getCiphers()); } if (isNotEmpty(sftpConfig.getKeyExchangeProtocols())) { LOG.debug(""Using KEX: {}"", sftpConfig.getKeyExchangeProtocols()); session.setConfig(""kex"", sftpConfig.getKeyExchangeProtocols()); } if (isNotEmpty(sftpConfig.getStrictHostKeyChecking())) { LOG.debug(""Using StrictHostKeyChecking: {}"", sftpConfig.getStrictHostKeyChecking()); session.setConfig(""StrictHostKeyChecking"", sftpConfig.getStrictHostKeyChecking()); }",secure_communication,secure_communication,True,,0.9968836903572083,0.003116319188848138
27,"private static SSLEngine createSSLEngine(SSLContext sslContext, OptionMap optionMap, InetSocketAddress peerAddress, boolean client) { final SSLEngine engine = sslContext.createSSLEngine( optionMap.get(Options.SSL_PEER_HOST_NAME, peerAddress.getHostString()), optionMap.get(Options.SSL_PEER_PORT, peerAddress.getPort()) ); engine.setUseClientMode(client); engine.setEnableSessionCreation(optionMap.get(Options.SSL_ENABLE_SESSION_CREATION, true)); final Sequence<String> cipherSuites = optionMap.get(Options.SSL_ENABLED_CIPHER_SUITES); if (cipherSuites != null) { final Set<String> supported = new HashSet<>(Arrays.asList(engine.getSupportedCipherSuites())); final List<String> finalList = new ArrayList<>(); for (String name : cipherSuites) { if (supported.contains(name)) { finalList.add(name); } } engine.setEnabledCipherSuites(finalList.toArray(new String[finalList.size()])); }",secure_communication,secure_communication,True,,0.9968632459640503,0.003136757295578718
28,"@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { bufferedMessages.add(msg); if (!sslHandlerChecked) { sslHandlerChecked = true; if (ctx.pipeline().get(SslHandler.class) == null) { removeSelfIfPresent(ctx); } }",secure_communication,secure_communication,True,,0.9964619278907776,0.0035381182096898556
29,"final InetSocketAddress peerAddress = tcpConnection.getPeerAddress(InetSocketAddress.class); final SSLEngine engine = ssl.getSslContext().createSSLEngine(getHostNameNoResolve(peerAddress), peerAddress.getPort()); if(useCipherSuitesOrder) { SSLParameters sslParameters = engine.getSSLParameters(); sslParameters.setUseCipherSuitesOrder(true); engine.setSSLParameters(sslParameters); } final boolean clientMode = useClientMode != 0; engine.setUseClientMode(clientMode);",secure_communication,secure_communication,True,,0.9968872666358948,0.003112706821411848
30,"if (sslContextParameters != null) { SSLContext context = sslContextParameters.createSSLContext(getCamelContext()); client = new FTPSClient(getFtpsConfiguration().isImplicit(), context); try (SSLSocket socket = (SSLSocket) context.getSocketFactory().createSocket()) { client.setEnabledCipherSuites(socket.getEnabledCipherSuites()); client.setEnabledProtocols(socket.getEnabledProtocols()); client.setNeedClientAuth(socket.getNeedClientAuth()); client.setWantClientAuth(socket.getWantClientAuth()); client.setEnabledSessionCreation(socket.getEnableSessionCreation()); }",secure_communication,secure_communication,True,,0.9968762397766113,0.0031237585935741663
31,"try { if (trustCertCollection != null) { trustManagerFactory = buildTrustManagerFactory(trustCertCollection, trustManagerFactory, keyStore); } else if (trustManagerFactory == null) { trustManagerFactory = TrustManagerFactory.getInstance( TrustManagerFactory.getDefaultAlgorithm()); trustManagerFactory.init((KeyStore) null); } final X509TrustManager manager = chooseTrustManager( trustManagerFactory.getTrustManagers(), resumptionController); setVerifyCallback(ctx, engines, manager);",secure_communication,secure_communication,True,,0.9968950748443604,0.0031048746313899755
32,"public static SslContextBuilder forServer( InputStream keyCertChainInputStream, InputStream keyInputStream, String keyPassword) { return new SslContextBuilder(true).keyManager(keyCertChainInputStream, keyInputStream, keyPassword); }",secure_communication,secure_communication,True,,0.9968786239624023,0.0031213762704283
33,"public SSLContextBuilder loadTrustMaterial( final File file, final char[] storePassword) throws NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException { return loadTrustMaterial(file, storePassword, null); }",secure_communication,secure_communication,True,,0.99683678150177,0.0031632445752620697
34,"public SslConnection wrapExistingConnection(StreamConnection connection, OptionMap optionMap, URI destinationURI) { SSLEngine sslEngine = createSSLEngine(sslContext, optionMap, getPeerAddress(destinationURI), true); SSLParameters sslParameters = sslEngine.getSSLParameters(); if (sslParameters.getServerNames() == null || sslParameters.getServerNames().isEmpty()) { setSNIHostName(connection.getPeerAddress(InetSocketAddress.class), optionMap, sslParameters); sslEngine.setSSLParameters(sslParameters); } return new UndertowSslConnection(connection, sslEngine, bufferPool, delegatedTaskExecutor); }",secure_communication,secure_communication,True,,0.9969164133071899,0.003083597170189023
35,"public SSLContextBuilder loadTrustMaterial( final Path file, final char[] storePassword) throws NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException { return loadTrustMaterial(file, storePassword, null); }",secure_communication,secure_communication,True,,0.9968392848968506,0.0031607525888830423
36,"this.appEventMask = session.getEventMask(); if (this.sslMode == SSLMode.CLIENT && targetEndpoint != null) { this.sslEngine = sslContext.createSSLEngine(targetEndpoint.getHostName(), targetEndpoint.getPort()); } else { this.sslEngine = sslContext.createSSLEngine(); } final SSLSession sslSession = this.sslEngine.getSession(); final int netBufferSize = sslSession.getPacketBufferSize(); this.inEncrypted = SSLManagedBuffer.create(sslBufferMode, netBufferSize); this.outEncrypted = SSLManagedBuffer.create(sslBufferMode, netBufferSize); final int appBufferSize = sslSession.getApplicationBufferSize(); this.inPlain = SSLManagedBuffer.create(sslBufferMode, appBufferSize);",secure_communication,secure_communication,True,,0.9968692660331726,0.0031307365279644728
37,@Override protected @Nullable SslInfo initSslInfo() { Channel channel = ((Connection) this.request).channel(); SslHandler sslHandler = channel.pipeline().get(SslHandler.class); if (sslHandler == null && channel.parent() != null) { sslHandler = channel.parent().pipeline().get(SslHandler.class); } if (sslHandler != null) { SSLSession session = sslHandler.engine().getSession(); return new DefaultSslInfo(session); } return null; },unrelated,secure_communication,False,true_unrelated_predicted_secure_communication,0.9969082474708557,0.0030917252879589796
38,"@Override protected SslHandler newHandler(ByteBufAllocator alloc, String peerHost, int peerPort, boolean startTls, Executor executor) { SslHandler handler = ctx.newHandler(alloc, peerHost, peerPort, startTls, executor); initHandler(handler); return handler; }",secure_communication,secure_communication,True,,0.9968565702438354,0.003143352922052145
39,"public SSLContext build() throws NoSuchAlgorithmException, KeyManagementException { final SSLContext sslContext; final String protocolStr = this.protocol != null ? this.protocol : TLS; if (this.provider != null) { sslContext = SSLContext.getInstance(protocolStr, this.provider); } else { sslContext = SSLContext.getInstance(protocolStr); } initSSLContext(sslContext, keyManagers, trustManagers, secureRandom); return sslContext; }",secure_communication,secure_communication,True,,0.9969407916069031,0.003059190697968006
40,"protected void initSSLContext( final SSLContext sslContext, final Collection<KeyManager> keyManagers, final Collection<TrustManager> trustManagers, final SecureRandom secureRandom) throws KeyManagementException { sslContext.init( !keyManagers.isEmpty() ? keyManagers.toArray(EMPTY_KEY_MANAGER_ARRAY) : null, !trustManagers.isEmpty() ? trustManagers.toArray(EMPTY_TRUST_MANAGER_ARRAY) : null, secureRandom); }",secure_communication,secure_communication,True,,0.996918797492981,0.003081167582422495
41,"@Override public HttpHandler registerHandler( UndertowConsumer consumer, HttpHandlerRegistrationInfo registrationInfo, HttpHandler handler) { lock.lock(); try { if (undertow == null) { Undertow.Builder builder = Undertow.builder(); if (key.getSslContext() != null) { builder.addHttpsListener(key.getPort(), key.getHost(), key.getSslContext()); } else { builder.addHttpListener(key.getPort(), key.getHost()); } if (options != null) { if (options.getIoThreads() != null) { builder.setIoThreads(options.getIoThreads()); } if (options.getWorkerThreads() != null) { builder.setWorkerThreads(options.getWorkerThreads()); } if (options.getBufferSize() != null) { builder.setBufferSize(options.getBufferSize()); } if (options.getDirectBuffers() != null) { builder.setDirectBuffers(options.getDirectBuffers()); } if (options.getHttp2Enabled() != null) { builder.setServerOption(UndertowOptions.ENABLE_HTTP2, options.getHttp2Enabled()); } if (options.getMaxEntitySize() != null) { builder.setServerOption(UndertowOptions.MAX_ENTITY_SIZE, options.getMaxEntitySize()); } if (options.getMultipartMaxEntitySize() != null) { builder.setServerOption(UndertowOptions.MULTIPART_MAX_ENTITY_SIZE, options.getMultipartMaxEntitySize()); } if (options.getMaxHeaderSize() != null) { builder.setServerOption(UndertowOptions.MAX_HEADER_SIZE, options.getMaxHeaderSize()); } if (options.getNoRequestTimeout() != null) { builder.setServerOption(UndertowOptions.NO_REQUEST_TIMEOUT, options.getNoRequestTimeout()); } if (options.getIdleTimeout() != null) { builder.setServerOption(UndertowOptions.IDLE_TIMEOUT, options.getIdleTimeout()); } if (options.getRequestParseTimeout() != null) { builder.setServerOption(UndertowOptions.REQUEST_PARSE_TIMEOUT, options.getRequestParseTimeout()); } if (options.getMaxParameters() != null) { builder.setServerOption(UndertowOptions.MAX_PARAMETERS, options.getMaxParameters()); } if (options.getMaxHeaders() != null) { builder.setServerOption(UndertowOptions.MAX_HEADERS, options.getMaxHeaders()); } } if (consumer != null && consumer.isRest()) { undertow = registerHandler(consumer, builder, restHandler); } else { undertow = registerHandler(consumer, builder, rootHandler); } LOG.info(""Starting Undertow server on {}://{}:{}"", key.getSslContext() != null ? ""https"" : ""http"", key.getHost(), key.getPort()); try { undertow.start(); } catch (RuntimeException e) { LOG.warn(""Failed to start Undertow server on {}://{}:{}, reason: {}"", key.getSslContext() != null ? ""https"" : ""http"", key.getHost(), key.getPort(), e.getMessage()); undertow.stop(); undertow = null; throw e; } } if (consumer != null && consumer.isRest()) { restHandler.addConsumer(consumer, handler); return restHandler; } else { return rootHandler.add(registrationInfo.getUri().getPath(), registrationInfo.getMethodRestrict(), registrationInfo.isMatchOnUriPrefix(), handler); } } finally { lock.unlock(); } }",unrelated,unrelated,True,,0.06697927415370941,0.9330207109451294
42,"SSLContext ctx = sslContextProvider == null ? SSLContext.getInstance(PROTOCOL) : SSLContext.getInstance(PROTOCOL, sslContextProvider); ctx.init(keyManagerFactory.getKeyManagers(), wrapTrustManagerIfNeeded(trustManagerFactory.getTrustManagers(), resumptionController), secureRandom);",secure_communication,secure_communication,True,,0.9968799352645874,0.0031200291123241186
43,"@Override protected SslHandler newHandler(ByteBufAllocator alloc, boolean startTls, Executor executor) { SslHandler handler = ctx.newHandler(alloc, startTls, executor); initHandler(handler); return handler; }",secure_communication,secure_communication,True,,0.9968499541282654,0.0031500181648880243
44,"public SSLContextBuilder loadTrustMaterial( final URL url, final char[] storePassword, final TrustStrategy trustStrategy) throws NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException { Args.notNull(url, ""Truststore URL""); return loadTrustMaterial(loadKeyStore(url, storePassword), trustStrategy); }",secure_communication,secure_communication,True,,0.9968907237052917,0.0031093263532966375
45,"protected SslHandler newHandler(ByteBufAllocator alloc, boolean startTls, Executor executor) { return new SslHandler(newEngine(alloc), startTls, executor, resumptionController); }",secure_communication,secure_communication,True,,0.9968710541725159,0.0031289225444197655
46,"SSLContext context = getSSLContext(BouncyCastleUtil.getBcProviderJsse(), new SecureRandom()); SSLEngine engine = context.createSSLEngine(); Class<? extends SSLEngine> engineClass = engine.getClass(); final Class<? extends SSLEngine> bcEngineClass = BouncyCastleUtil.getBcSSLEngineClass(); if (bcEngineClass == null || !bcEngineClass.isAssignableFrom(engineClass)) { throw new IllegalStateException(""Unexpected engine class: "" + engineClass); } final SSLParameters bcSslParameters = engine.getSSLParameters(); final Class<?> bCSslParametersClass = bcSslParameters.getClass(); setApplicationProtocols = AccessController.doPrivileged(new PrivilegedExceptionAction<Method>() { @Override public Method run() throws Exception { return bCSslParametersClass.getMethod(""setApplicationProtocols"", String[].class); } }); setApplicationProtocols.invoke(bcSslParameters, new Object[]{EmptyArrays.EMPTY_STRINGS});",secure_communication,secure_communication,True,,0.9968137145042419,0.003186299465596676
47,"public SSLContextBuilder loadTrustMaterial( final Path file, final char[] storePassword, final TrustStrategy trustStrategy, final OpenOption... openOptions) throws NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException { Args.notNull(file, ""Truststore file""); return loadTrustMaterial(loadKeyStore(file, storePassword, openOptions), trustStrategy); }",secure_communication,secure_communication,True,,0.9968963861465454,0.0031036159489303827
48,"SSLContext ctx = sslContextProvider == null ? SSLContext.getInstance(PROTOCOL) : SSLContext.getInstance(PROTOCOL, sslContextProvider); ctx.init(keyManagerFactory == null ? null : keyManagerFactory.getKeyManagers(), trustManagerFactory == null ? null : wrapIfNeeded(trustManagerFactory.getTrustManagers(), resumptionController), secureRandom);",secure_communication,secure_communication,True,,0.9968937635421753,0.0031062387861311436
49,"@Override protected void decode(ChannelHandlerContext context, ByteBuf in, List<Object> out) throws Exception { if (in.readableBytes() < SslUtils.SSL_RECORD_HEADER_LENGTH) { return; } if (SslHandler.isEncrypted(in, false)) { handleSsl(context); } else { handleNonSsl(context); } }",secure_communication,secure_communication,True,,0.9965639710426331,0.0034360738936811686
50,"private static X509Certificate[] getCertificatesFromBuffers(ByteBuf[] certs) throws CertificateException { CertificateFactory cf = CertificateFactory.getInstance(""X.509""); X509Certificate[] x509Certs = new X509Certificate[certs.length]; try { for (int i = 0; i < certs.length; i++) { try (InputStream is = new ByteBufInputStream(certs[i], false)) { x509Certs[i] = (X509Certificate) cf.generateCertificate(is); } catch (IOException e) { throw new RuntimeException(e); }",secure_communication,secure_communication,True,,0.9968857169151306,0.0031142726074904203
51,"private static final Recycler<CertFactoryHandle> CERT_FACTORIES = new Recycler<CertFactoryHandle>() { @Override protected CertFactoryHandle newObject(Handle<CertFactoryHandle> handle) { try { return new CertFactoryHandle(CertificateFactory.getInstance(""X.509""), handle); } catch (CertificateException e) { throw new IllegalStateException(e); } } };",unrelated,secure_communication,False,true_unrelated_predicted_secure_communication,0.9966496825218201,0.003350302577018738
52,"public SslHandler(SSLEngine engine, boolean startTls, Executor delegatedTaskExecutor) { this(engine, startTls, delegatedTaskExecutor, null); }",secure_communication,secure_communication,True,,0.9968641400337219,0.003135847859084606
53,"protected ResultSetType resolveResultSetType(String alias) { try { return alias == null ? null : ResultSetType.valueOf(alias); } catch (IllegalArgumentException e) { throw new BuilderException(""Error resolving ResultSetType. Cause: "" + e, e); } }",unrelated,unrelated,True,,0.0005019176169298589,0.9994980096817017
54,@Override public RandomProviderState saveState() { return new RandomProviderDefaultState(getStateInternal()); },unrelated,unrelated,True,,0.000522573129273951,0.9994774460792542
55,"private GuideTableDiscreteSampler(UniformRandomProvider rng, double[] cumulativeProbabilities, int[] guideTable) { this.rng = rng; this.cumulativeProbabilities = cumulativeProbabilities; this.guideTable = guideTable; }",unrelated,unrelated,True,,0.0005240094033069909,0.9994760155677795
56,"private int skipWS(String expression, int p) { for (int i = p; i < expression.length(); i++) { if (expression.charAt(i) > 0x20) { return i; } } return expression.length(); }",unrelated,unrelated,True,,0.0005119249690324068,0.9994879961013794
57,"private BoxMullerGaussianSampler(double mean, double standardDeviation, UniformRandomProvider rng) { super(null); this.rng = rng; this.mean = mean; this.standardDeviation = standardDeviation; }",unrelated,unrelated,True,,0.0005091865896247327,0.9994907379150391
58,"private PoissonSamplerCache(int minN, int maxN, LargeMeanPoissonSamplerState[] states) { this.minN = minN; this.maxN = maxN; this.values = states; }",unrelated,unrelated,True,,0.0005045390571467578,0.9994953870773315
59,@Override public long next() { final int p = bufferPosition; if (bufferPosition < PHILOX_BUFFER_SIZE) { bufferPosition = p + 1; return buffer[p]; } incrementCounter(); rand10(); bufferPosition = 1; return buffer[0]; },unrelated,unrelated,True,,0.0005012829788029194,0.999498724937439
60,public void setLogImpl(Class<? extends Log> logImpl) { if (logImpl != null) { this.logImpl = logImpl; LogFactory.useCustomLogging(this.logImpl); } },unrelated,unrelated,True,,0.0014833523891866207,0.9985166192054749
61,@Override public UniformRandomProvider jump() { final UniformRandomProvider copy = new L32X64Mix(this); ls = M * ls + la; resetCachedState(); return copy; },unrelated,unrelated,True,,0.0005221126484684646,0.9994779229164124
62,"private static void putInt(int v, byte[] buffer, int index) { buffer[index ] = (byte) (v & INT_LOWEST_BYTE_MASK); buffer[index + 1] = (byte)((v >>> 8) & INT_LOWEST_BYTE_MASK); buffer[index + 2] = (byte)((v >>> 16) & INT_LOWEST_BYTE_MASK); buffer[index + 3] = (byte) (v >>> 24); }",unrelated,unrelated,True,,0.0005126931937411427,0.9994872808456421
63,"private <E> List<E> selectList() throws SQLException { Executor localExecutor = executor; if (Thread.currentThread().getId() != this.creatorThreadId || localExecutor.isClosed()) { localExecutor = newExecutor(); } try { return localExecutor.query(mappedStatement, parameterObject, RowBounds.DEFAULT, Executor.NO_RESULT_HANDLER, cacheKey, boundSql); } finally { if (localExecutor != executor) { localExecutor.close(false); } } }",unrelated,unrelated,True,,0.0005026148282922804,0.9994974136352539
64,public List<ResultMapping> resolveWithConstructor() { if (constructorResultMappings.isEmpty()) { return constructorResultMappings; } final List<ConstructorMetaInfo> matchingConstructorCandidates = retrieveConstructorCandidates( constructorResultMappings.size()); if (matchingConstructorCandidates.isEmpty()) { return constructorResultMappings; } final Set<String> constructorArgsByName = constructorResultMappings.stream().map(ResultMapping::getProperty) .filter(Objects::nonNull).collect(Collectors.toCollection(LinkedHashSet::new)); final boolean allMappingsHavePropertyNames = verifyPropertyNaming(constructorArgsByName);,unrelated,unrelated,True,,0.0005066996673122048,0.9994932413101196
65,@Override public Class<?> getSetterType(String name) { PropertyTokenizer prop = new PropertyTokenizer(name); if (prop.hasNext()) { MetaObject metaValue = metaObject.metaObjectForProperty(prop.getIndexedName()); if (metaValue == SystemMetaObject.NULL_META_OBJECT) { return Object.class; } else { return metaValue.getSetterType(prop.getChildren()); } } if (map.get(name) != null) { return map.get(name).getClass(); } else { return Object.class; } },unrelated,unrelated,True,,0.0005069414619356394,0.9994930028915405
66,"private void applyConstructorArgs(Arg[] args, Class<?> resultType, List<ResultMapping> resultMappings, String resultMapId) { final List<ResultMapping> mappings = new ArrayList<>(); for (Arg arg : args) { List<ResultFlag> flags = new ArrayList<>(); flags.add(ResultFlag.CONSTRUCTOR); if (arg.id()) { flags.add(ResultFlag.ID); } @SuppressWarnings(""unchecked"") Class<? extends TypeHandler<?>> typeHandler = (Class<? extends TypeHandler<?>>) (arg .typeHandler() == UnknownTypeHandler.class ? null : arg.typeHandler()); ResultMapping resultMapping = assistant.buildResultMapping(resultType, nullOrEmpty(arg.name()), nullOrEmpty(arg.column()), arg.javaType() == void.class ? null : arg.javaType(), arg.jdbcType() == JdbcType.UNDEFINED ? null : arg.jdbcType(), nullOrEmpty(arg.select()), nullOrEmpty(arg.resultMap()), null, nullOrEmpty(arg.columnPrefix()), typeHandler, flags, null, null, false); mappings.add(resultMapping); } final ResultMappingConstructorResolver resolver = new ResultMappingConstructorResolver(configuration, mappings,",unrelated,unrelated,True,,0.0005133924423716962,0.9994865655899048
67,private MetaObject getParamMetaObject() { if (paramMetaObject != null) { return paramMetaObject; } paramMetaObject = configuration.newMetaObject(parameterObject); return paramMetaObject; },unrelated,unrelated,True,,0.00050294806715101,0.9994970560073853
68,public int getActiveConnectionCount() { lock.lock(); try { return activeConnections.size(); } finally { lock.unlock(); } },unrelated,unrelated,True,,0.000515983731020242,0.9994839429855347
69,"@Override public BigDecimal getNullableResult(ResultSet rs, String columnName) throws SQLException { return rs.getBigDecimal(columnName); }",unrelated,unrelated,True,,0.000504994997754693,0.9994950294494629
70,"@Override public void error(String s, Throwable e) { logger.log(MARKER, FQCN, LocationAwareLogger.ERROR_INT, s, null, e); }",unrelated,unrelated,True,,0.0005015320493839681,0.9994984865188599
71,"public PreparedStatementHandler(Executor executor, MappedStatement mappedStatement, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) { super(executor, mappedStatement, parameter, rowBounds, resultHandler, boundSql); }",unrelated,unrelated,True,,0.0005058221868239343,0.999494194984436
72,"private void parseSelectKeyNodes(String parentId, List<XNode> list, Class<?> parameterTypeClass, LanguageDriver langDriver, String skRequiredDatabaseId) { for (XNode nodeToHandle : list) { String id = parentId + SelectKeyGenerator.SELECT_KEY_SUFFIX; String databaseId = nodeToHandle.getStringAttribute(""databaseId""); if (databaseIdMatchesCurrent(id, databaseId, skRequiredDatabaseId)) { parseSelectKeyNode(id, nodeToHandle, parameterTypeClass, langDriver, databaseId); } } }",unrelated,unrelated,True,,0.0005187265342101455,0.9994812607765198
73,private void setState(long[] state) { key0 = state[0]; key1 = state[1]; counter0 = state[2]; counter1 = state[3]; counter2 = state[4]; counter3 = state[5]; },unrelated,unrelated,True,,0.0005059012328274548,0.9994940757751465
74,"public Class<?> getGetterType(String propertyName) { Class<?> clazz = getTypes.getOrDefault(propertyName, nullEntry).getValue(); if (clazz == null) { throw new ReflectionException(""There is no getter for property named '"" + propertyName + ""' in '"" + clazz + ""'""); } return clazz; }",unrelated,unrelated,True,,0.0005083088763058186,0.9994916915893555
75,"@Override protected void setStateInternal(byte[] s) { final byte[][] c = splitStateInternal(s, (N + 1) * 4); final int[] tmp = NumberFactory.makeIntArray(c[0]); System.arraycopy(tmp, 0, mt, 0, N); mti = tmp[N]; super.setStateInternal(c[1]); }",unrelated,unrelated,True,,0.0004953508614562452,0.9995046854019165
76,"@Override public <E> List<E> query(MappedStatement ms, Object parameterObject, RowBounds rowBounds, ResultHandler resultHandler) throws SQLException { BoundSql boundSql = ms.getBoundSql(parameterObject); CacheKey key = createCacheKey(ms, parameterObject, rowBounds, boundSql); return query(ms, parameterObject, rowBounds, resultHandler, key, boundSql); }",unrelated,unrelated,True,,0.0005021031247451901,0.9994978904724121
77,private boolean isLazy(Result result) { boolean isLazy = configuration.isLazyLoadingEnabled(); if (!result.one().select().isEmpty() && FetchType.DEFAULT != result.one().fetchType()) { isLazy = result.one().fetchType() == FetchType.LAZY; } else if (!result.many().select().isEmpty() && FetchType.DEFAULT != result.many().fetchType()) { isLazy = result.many().fetchType() == FetchType.LAZY; } return isLazy; },unrelated,unrelated,True,,0.0005153088713996112,0.999484658241272
78,public CacheBuilder addDecorator(Class<? extends Cache> decorator) { if (decorator != null) { this.decorators.add(decorator); } return this; },unrelated,unrelated,True,,0.0005355546018108726,0.9994644522666931
79,@Override public void clear() { lastClear = System.currentTimeMillis(); delegate.clear(); },unrelated,unrelated,True,,0.0005837073549628258,0.9994163513183594
80,"@Override protected Statement instantiateStatement(Connection connection) throws SQLException { String sql = boundSql.getSql(); if (mappedStatement.getResultSetType() == ResultSetType.DEFAULT) { return connection.prepareCall(sql); } return connection.prepareCall(sql, mappedStatement.getResultSetType().getValue(), ResultSet.CONCUR_READ_ONLY); }",unrelated,unrelated,True,,0.0005109056946821511,0.9994890689849854
81,"private static <T> SharedStateDiscreteSampler createSampler(UniformRandomProvider rng, List<T> collection, double[] probabilities) { if (probabilities.length != collection.size()) { throw new IllegalArgumentException(""Size mismatch: "" + probabilities.length + "" != "" + collection.size()); } return GuideTableDiscreteSampler.of(rng, probabilities); }",unrelated,unrelated,True,,0.0004989333683624864,0.99950110912323
82,"private ResultMapping buildResultMappingFromContext(XNode context, Class<?> resultType, List<ResultFlag> flags) { String property; if (flags.contains(ResultFlag.CONSTRUCTOR)) { property = context.getStringAttribute(""name""); } else { property = context.getStringAttribute(""property""); } String column = context.getStringAttribute(""column""); String javaType = context.getStringAttribute(""javaType""); String jdbcType = context.getStringAttribute(""jdbcType""); String nestedSelect = context.getStringAttribute(""select""); String nestedResultMap = context.getStringAttribute(""resultMap"", () -> processNestedResultMappings(context, List.of(), resultType)); String notNullColumn = context.getStringAttribute(""notNullColumn""); String columnPrefix = context.getStringAttribute(""columnPrefix""); String typeHandler = context.getStringAttribute(""typeHandler""); String resultSet = context.getStringAttribute(""resultSet""); String foreignColumn = context.getStringAttribute(""foreignColumn""); boolean lazy = ""lazy"" .equals(context.getStringAttribute(""fetchType"", configuration.isLazyLoadingEnabled() ? ""lazy"" : ""eager""));",unrelated,unrelated,True,,0.0005264663486741483,0.999473512172699
83,@Override public <E> Cursor<E> queryCursor(Statement statement) throws SQLException { return delegate.queryCursor(statement); },unrelated,unrelated,True,,0.0004996357602067292,0.9995003938674927
84,"private JdbcType safeGetJdbcTypeForColumn(ResultSetMetaData rsmd, Integer columnIndex) { try { return JdbcType.forCode(rsmd.getColumnType(columnIndex)); } catch (Exception e) { return null; } }",unrelated,unrelated,True,,0.0005008025327697396,0.9994992017745972
85,@Override public int next() { final int indexRm1 = TABLE.getIndexPred(index); final int v0 = v[index]; final int vM1 = v[TABLE.getIndexM1(index)]; final int vM2 = v[TABLE.getIndexM2(index)]; final int vM3 = v[TABLE.getIndexM3(index)]; final int z0 = v[indexRm1]; final int z1 = v0 ^ (vM1 ^ (vM1 >>> 8)); final int z2 = (vM2 ^ (vM2 << 19)) ^ (vM3 ^ (vM3 << 14)); final int z3 = z1 ^ z2; final int z4 = (z0 ^ (z0 << 11)) ^ (z1 ^ (z1 << 7)) ^ (z2 ^ (z2 << 13)); v[index] = z3; v[indexRm1] = z4; index = indexRm1; return z4;,unrelated,unrelated,True,,0.0005071894265711308,0.9994927644729614
86,"private void linkToParents(ResultSet rs, ResultMapping parentMapping, Object rowValue) throws SQLException { CacheKey parentKey = createKeyForMultipleResults(rs, parentMapping, parentMapping.getColumn(), parentMapping.getForeignColumn()); List<PendingRelation> parents = pendingRelations.get(parentKey); if (parents != null) { for (PendingRelation parent : parents) { if (parent != null && rowValue != null) { linkObjects(parent.metaObject, parent.propertyMapping, rowValue); } } } }",unrelated,unrelated,True,,0.0005281025660224259,0.9994719624519348
87,PendingCreationKey(ResultMapping constructorMapping) { this.resultMapId = constructorMapping.getNestedResultMapId(); this.constructorColumnPrefix = constructorMapping.getColumnPrefix(); },unrelated,unrelated,True,,0.00051127839833498,0.9994887113571167
88,"private static long sum(long[] frequencies) { if (frequencies == null || frequencies.length == 0) { throw new IllegalArgumentException(""frequencies must contain at least 1 value""); } long m = 0; long signFlag = 0; for (final long o : frequencies) { m += o; signFlag |= o | m; } if (signFlag < 0) { for (final long o : frequencies) { if (o < 0) {",unrelated,unrelated,True,,0.0005037401570007205,0.9994962215423584
89,@Override public String[] getSetterNames() { return map.keySet().toArray(new String[0]); },unrelated,unrelated,True,,0.0005067308084107935,0.9994932413101196
90,"private InverseTransformParetoSampler(double scale, double shape, UniformRandomProvider rng) { super(null); this.rng = rng; this.scale = scale; this.oneOverShape = 1 / shape; nextDouble = shape >= 1 ? InternalUtils::makeNonZeroDouble : InternalUtils::makeDouble; }",unrelated,unrelated,True,,0.000501649163197726,0.9994983673095703
91,public long getClaimedOverdueConnectionCount() { lock.lock(); try { return claimedOverdueConnectionCount; } finally { lock.unlock(); } },unrelated,unrelated,True,,0.0005094381049275398,0.99949049949646
92,"public static double[] shuffle(UniformRandomProvider rng, double[] array) { int i = array.length; for (; i > BATCH_2; --i) { swap(array, i - 1, rng.nextInt(i)); } final int[] productBound = {i * (i - 1)}; for (; i > 1; i -= 2) { final int[] indices = randomBounded2(i, i - 1, productBound, rng); final int index1 = indices[0]; final int index2 = indices[1]; swap(array, i - 1, index1); swap(array, i - 2, index2); } return array; }",unrelated,unrelated,True,,0.0005051269545219839,0.9994949102401733
93,"@Override public Reader getNullableResult(ResultSet rs, String columnName) throws SQLException { return toReader(rs.getClob(columnName)); }",unrelated,unrelated,True,,0.0005021715187467635,0.9994977712631226
94,"@Override public int next() { z = computeNew(36969, z); w = computeNew(18000, w); final int mwc = (z << 16) + w; jsr ^= jsr << 13; jsr ^= jsr >>> 17; jsr ^= jsr << 5; jcong = 69069 * jcong + 1234567; return (mwc ^ jcong) + jsr; }",unrelated,unrelated,True,,0.0005079160328023136,0.9994920492172241
95,"@SuppressWarnings({""rawtypes"", ""unchecked""}) public static <T> void shuffle(UniformRandomProvider rng, List<T> list) { if (list instanceof RandomAccess || list.size() < RANDOM_ACCESS_SIZE_THRESHOLD) { ArraySampler.shuffle(rng, list); } else { final Object[] array = list.toArray(); ArraySampler.shuffle(rng, array); final ListIterator it = list.listIterator(); for (final Object item : array) { it.next(); it.set(item); } } }",unrelated,unrelated,True,,0.0005064908182248473,0.9994934797286987
96,"private void cacheElement(XNode context) { if (context != null) { String type = context.getStringAttribute(""type"", ""PERPETUAL""); Class<? extends Cache> typeClass = typeAliasRegistry.resolveAlias(type); String eviction = context.getStringAttribute(""eviction"", ""LRU""); Class<? extends Cache> evictionClass = typeAliasRegistry.resolveAlias(eviction); Long flushInterval = context.getLongAttribute(""flushInterval""); Integer size = context.getIntAttribute(""size""); boolean readWrite = !context.getBooleanAttribute(""readOnly"", false); boolean blocking = context.getBooleanAttribute(""blocking"", false); Properties props = context.getChildrenAsProperties(); builderAssistant.useNewCache(typeClass, evictionClass, flushInterval, size, readWrite, blocking, props); } }",unrelated,unrelated,True,,0.0005198442377150059,0.9994801878929138
97,"@Override protected void setStateInternal(byte[] s) { final byte[][] c = splitStateInternal(s, SEED_SIZE * 8); setState(NumberFactory.makeLongArray(c[0])); super.setStateInternal(c[1]); }",unrelated,unrelated,True,,0.0004993424518033862,0.9995006322860718
98,"public static Type resolveFieldType(Field field, Type srcType) { Type fieldType = field.getGenericType(); Class<?> declaringClass = field.getDeclaringClass(); return resolveType(fieldType, srcType, declaringClass); }",unrelated,unrelated,True,,0.0005082996794953942,0.9994916915893555
99,private void finishJump() { resetCachedState(); if (bufferPosition < PHILOX_BUFFER_SIZE) { rand10(); } },unrelated,unrelated,True,,0.0005072089843451977,0.9994927644729614
|