| dataset_index,text,true_label,predicted_label,correct,error_type,probability_encryption_key_operations,probability_unrelated |
| 0,@Override protected OutputStream doGetOutputStream(final boolean bAppend) throws Exception { return new GZIPOutputStream(getContainer().getContent().getOutputStream(false)); },unrelated,unrelated,True,,0.020648004487156868,0.9793519973754883 |
| 1,"public StrongBinaryEncryptor() { super(); this.encryptor = new StandardPBEByteEncryptor(); this.encryptor.setAlgorithm(""PBEWithMD5AndTripleDES""); }",encryption_key_operations,encryption_key_operations,True,,0.690953254699707,0.3090467154979706 |
| 2,"public static final String ALGO_SUITE_TRIPLE_DES = ""TripleDes"";",unrelated,unrelated,True,,0.02436165139079094,0.9756383895874023 |
| 3,"@Override public QueryResult<String> evaluate(final EvaluationContext evaluationContext) { final String subjectValue = subject.evaluate(evaluationContext).getValue(); if (subjectValue == null) { return new StringQueryResult(null); } return new StringQueryResult(new String(Base64.getDecoder().decode(subjectValue), StandardCharsets.UTF_8)); }",unrelated,unrelated,True,,0.017871825024485588,0.9821281433105469 |
| 4,"public static byte[] encrypt3DES( final byte[] data, final byte[] key, final String transformation, final byte[] iv ) { return symmetricTemplate(data, key, ""DESede"", transformation, iv, true); }",encryption_key_operations,unrelated,False,true_encryption_key_operations_predicted_unrelated,0.19894783198833466,0.8010521531105042 |
| 5,"@Override public byte[] encrypt(byte[] data) { if (data == null) return null; if (mCipher != null) { data = mCipher.encrypt(data); } if (data == null) return null; return Base64.encode(data, mFlags); }",encryption_key_operations,unrelated,False,true_encryption_key_operations_predicted_unrelated,0.25756314396858215,0.7424368858337402 |
| 6,"public String doPasswordDigest(String nonce, String created, byte[] password) { String passwdDigest = null; try { byte[] b1 = nonce != null ? new Base64().decode(nonce) : new byte[0]; byte[] b2 = created != null ? created.getBytes(StandardCharsets.UTF_8) : new byte[0]; byte[] b3 = password; byte[] b4 = new byte[b1.length + b2.length + b3.length]; int offset = 0; System.arraycopy(b1, 0, b4, offset, b1.length); offset += b1.length; System.arraycopy(b2, 0, b4, offset, b2.length); offset += b2.length; System.arraycopy(b3, 0, b4, offset, b3.length); byte[] digestBytes = generateDigest(b4); passwdDigest = new String(Base64.encodeBase64(digestBytes)); } catch (Exception e) { LOGGER.debug(e.getMessage(), e); } return passwdDigest; }",unrelated,unrelated,True,,0.2491382658481598,0.7508617639541626 |
| 7,"public static byte[] initKey() { try { KeyGenerator keyGen = KeyGenerator.getInstance(""DESede""); keyGen.init(168); SecretKey secretKey = keyGen.generateKey(); return secretKey.getEncoded(); } catch (Exception e) { JCLogUtils.eTag(TAG, e, ""initKey""); } return null; }",encryption_key_operations,encryption_key_operations,True,,0.7092022895812988,0.29079774022102356 |
| 8,"if (data == null || key == null) return null; try { SecretKey secretKey = new SecretKeySpec(key, ""DESede""); Cipher cipher = Cipher.getInstance(""DESede/ECB/PKCS5Padding""); cipher.init(Cipher.DECRYPT_MODE, secretKey); return cipher.doFinal(data); } catch (Exception e) { JCLogUtils.eTag(TAG, e, ""decrypt""); }",encryption_key_operations,encryption_key_operations,True,,0.7082801461219788,0.29171982407569885 |
| 9,"private static Cipher createCipher(int mode) { try { SecretKey key = new SecretKeySpec(secretKey, ""DESede""); Cipher cipher = Cipher.getInstance(""DESede""); cipher.init(mode, key); return cipher; } catch (Exception e) { Log.error(e); return null; } }",encryption_key_operations,encryption_key_operations,True,,0.7111154794692993,0.2888845205307007 |
| 10,"public static final String KEYWRAP_TRIPLEDES = ""http://www.w3.org/2001/04/xmlenc#kw-tripledes"";",unrelated,unrelated,True,,0.023166878148913383,0.9768331050872803 |
| 11,"byte[] digestBytes = null; if (this.stringOutputTypeBase64) { digestBytes = processedDigest.getBytes(DIGEST_CHARSET); digestBytes = this.base64.decode(digestBytes); } else { digestBytes = CommonUtils.fromHexadecimal(processedDigest); } return this.byteDigester.matches(messageBytes, digestBytes);",encryption_key_operations,encryption_key_operations,True,,0.6403592824935913,0.3596406877040863 |
| 12,"public static final String DEFAULT_ALGORITHM = FIPSUtils.isFIPSEnabled() ? ""PBEWithHmacSHA512AndAES_256"" : ""PBEWithMD5AndTripleDES"";",unrelated,unrelated,True,,0.034986261278390884,0.9650137424468994 |
| 13,"private SecretKey generateDataEncryptionKey() throws Exception { KeyGenerator keyGenerator = null; if (xmlCipherAlgorithm.equalsIgnoreCase(XMLCipher.TRIPLEDES)) { keyGenerator = KeyGenerator.getInstance(""DESede""); } else { keyGenerator = KeyGenerator.getInstance(""AES""); if (xmlCipherAlgorithm.equalsIgnoreCase(XMLCipher.AES_128) || xmlCipherAlgorithm.equalsIgnoreCase(XMLCipher.AES_128_GCM) || xmlCipherAlgorithm.equalsIgnoreCase(XMLCipher.SEED_128) || xmlCipherAlgorithm.equalsIgnoreCase(XMLCipher.CAMELLIA_128)) { keyGenerator.init(128); } else if (xmlCipherAlgorithm.equalsIgnoreCase(XMLCipher.AES_192) || xmlCipherAlgorithm.equalsIgnoreCase(XMLCipher.AES_192_GCM)",encryption_key_operations,encryption_key_operations,True,,0.7024902701377869,0.29750967025756836 |
| 14,"public StrongIntegerNumberEncryptor() { super(); this.encryptor = new StandardPBEBigIntegerEncryptor(); this.encryptor.setAlgorithm(""PBEWithMD5AndTripleDES""); }",encryption_key_operations,encryption_key_operations,True,,0.688035249710083,0.31196483969688416 |
| 15,"FormValidation resultSha512 = null; try { MessageDigest digest = MessageDigest.getInstance(""SHA-512""); Signature sig = Signature.getInstance(""SHA512withRSA""); sig.initVerify(certs.getFirst()); resultSha512 = checkSpecificSignature(o, signature, digest, ""correct_digest512"", sig, ""correct_signature512"", ""SHA-512"");",encryption_key_operations,encryption_key_operations,True,,0.7007248997688293,0.29927513003349304 |
| 16,"public StrongDecimalNumberEncryptor() { super(); this.encryptor = new StandardPBEBigDecimalEncryptor(); this.encryptor.setAlgorithm(""PBEWithMD5AndTripleDES""); }",encryption_key_operations,encryption_key_operations,True,,0.6870627999305725,0.31293725967407227 |
| 17,"private byte[] getSignatureFromExchange(Exchange exchange) throws Exception { String encodedSignature = ExchangeHelper.getMandatoryHeader(exchange, config.getSignatureHeaderName(), String.class); if (encodedSignature == null) { throw new IllegalStateException( ""Cannot verify exchange as no "" + config.getSignatureHeaderName() + "" header is present.""); } return new Base64().decode(encodedSignature); }",encryption_key_operations,unrelated,False,true_encryption_key_operations_predicted_unrelated,0.1866343766450882,0.813365638256073 |
| 18,"@Override public void process(Exchange exchange) throws Exception { Signature service = initSignatureService(exchange); calculateSignature(exchange, service); byte[] signature = service.sign(); Message in = exchange.getIn(); clearMessageHeaders(in); Message out = exchange.getOut(); out.copyFrom(in); out.setHeader(config.getSignatureHeaderName(), new Base64().encode(signature)); }",encryption_key_operations,unrelated,False,true_encryption_key_operations_predicted_unrelated,0.24904239177703857,0.7509576082229614 |
| 19,"private static void checkBSPCompliance( Element keyInfoElement, String encAlgo, BSPEnforcer bspEnforcer ) throws WSSecurityException { int result = 0; Node node = keyInfoElement.getFirstChild(); Element child = null; while (node != null) { if (Node.ELEMENT_NODE == node.getNodeType()) { result++; child = (Element)node; } node = node.getNextSibling(); } if (result != 1) { bspEnforcer.handleBSPRule(BSPRule.R5424); } if (child == null || !WSConstants.WSSE_NS.equals(child.getNamespaceURI()) || !SecurityTokenReference.SECURITY_TOKEN_REFERENCE.equals(child.getLocalName())) { bspEnforcer.handleBSPRule(BSPRule.R5426); } if (encAlgo == null) { bspEnforcer.handleBSPRule(BSPRule.R5601); } if (!WSConstants.TRIPLE_DES.equals(encAlgo) && !WSConstants.AES_128.equals(encAlgo) && !WSConstants.AES_128_GCM.equals(encAlgo) && !WSConstants.AES_256.equals(encAlgo) && !WSConstants.AES_256_GCM.equals(encAlgo)) { bspEnforcer.handleBSPRule(BSPRule.R5620); } }",unrelated,unrelated,True,,0.12886545062065125,0.8711345791816711 |
| 20,"SecretKey symmetricKey = null; try { symmetricKey = KeyUtils.prepareSecretKey(symEncAlgo, decryptedData); } catch (IllegalArgumentException ex) { throw new WSSecurityException( WSSecurityException.ErrorCode.UNSUPPORTED_ALGORITHM, ex, ""badEncAlgo"", new Object[] {symEncAlgo}); } AlgorithmSuite algorithmSuite = data.getAlgorithmSuite(); if (algorithmSuite != null) { AlgorithmSuiteValidator algorithmSuiteValidator = new AlgorithmSuiteValidator(algorithmSuite); algorithmSuiteValidator.checkSymmetricKeyLength(symmetricKey.getEncoded().length); algorithmSuiteValidator.checkSymmetricEncryptionAlgorithm(symEncAlgo); } return EncryptionUtils.decryptEncryptedData( doc, dataRefURI, encryptedDataElement, symmetricKey, symEncAlgo, data.getAttachmentCallbackHandler(), data.getEncryptionSerializer() );",encryption_key_operations,encryption_key_operations,True,,0.700463056564331,0.2995370030403137 |
| 21,"public StrongTextEncryptor() { super(); this.encryptor = new StandardPBEStringEncryptor(); this.encryptor.setAlgorithm(""PBEWithMD5AndTripleDES""); }",encryption_key_operations,encryption_key_operations,True,,0.6875235438346863,0.3124764859676361 |
| 22,"KeyFactory keyFactory = KeyFactory.getInstance(""EC""); AlgorithmParameters parameters = AlgorithmParameters.getInstance(""EC""); parameters.init(new ECGenParameterSpec(nistSecMap.get(ecIdentifier))); ECParameterSpec ecParameters = parameters.getParameterSpec(ECParameterSpec.class); ECPoint pubPoint = new ECPoint(x, y); KeySpec keySpec = new ECPublicKeySpec(pubPoint, ecParameters); PublicKey generatedPublicKey = keyFactory.generatePublic(keySpec);",encryption_key_operations,encryption_key_operations,True,,0.7044974565505981,0.29550260305404663 |
| 23,"protected static byte[] getRandomKey(Element refList, WSDocInfo wsDocInfo) throws WSSecurityException { try { String alg = ""AES""; int size = 16; String uri = getFirstDataRefURI(refList); if (uri != null) { Element ee = EncryptionUtils.findEncryptedDataElement(wsDocInfo, uri); String algorithmURI = X509Util.getEncAlgo(ee); alg = JCEMapper.getJCEKeyAlgorithmFromURI(algorithmURI); size = KeyUtils.getKeyLength(algorithmURI); } KeyGenerator kgen = KeyGenerator.getInstance(alg); kgen.init(size * 8); SecretKey k = kgen.generateKey(); return k.getEncoded();",encryption_key_operations,encryption_key_operations,True,,0.6615822911262512,0.3384177088737488 |
| 24,"if (data == null || key == null) return null; try { SecretKey secretKey = new SecretKeySpec(key, ""AES""); Cipher cipher = Cipher.getInstance(""AES""); cipher.init(Cipher.DECRYPT_MODE, secretKey); return cipher.doFinal(data); } catch (Exception e) { JCLogUtils.eTag(TAG, e, ""decrypt""); }",encryption_key_operations,encryption_key_operations,True,,0.7061401009559631,0.29385995864868164 |
| 25,"final byte[] input = plainKey.getBytes(StandardCharsets.UTF_8); final SecretKeySpec key = new SecretKeySpec(KEY_BYTES, ""AES""); final Cipher cipher = Cipher.getInstance(""AES""); cipher.init(Cipher.ENCRYPT_MODE, key); final byte[] cipherText = new byte[cipher.getOutputSize(input.length)]; int ctLength = cipher.update(input, 0, input.length, cipherText, 0); ctLength += cipher.doFinal(cipherText, ctLength);",encryption_key_operations,encryption_key_operations,True,,0.7049738168716431,0.2950262427330017 |
| 26,"private static final String ALGORITHM = ""AES/CBC/PKCS5Padding"";",unrelated,unrelated,True,,0.022519437596201897,0.9774805307388306 |
| 27,"MessageDigest digest = MessageDigest.getInstance(""SHA-256""); digest.reset(); digest.update(s.getBytes(StandardCharsets.UTF_8)); return new SecretKeySpec(digest.digest(), 0, 128 / 8, ""AES"");",encryption_key_operations,encryption_key_operations,True,,0.6998131275177002,0.3001869022846222 |
| 28,"private static final String ALGORITHM_MODE = ""AES/CBC/PKCS5Padding"";",unrelated,unrelated,True,,0.022094320505857468,0.9779056906700134 |
| 29,"byte[] iv = new byte[128 / 8]; RANDOM.nextBytes(iv); byte[] jnlpMac; if (it instanceof SlaveComputer) { jnlpMac = Util.fromHexString(((SlaveComputer) it).getJnlpMac()); } else { jnlpMac = JnlpAgentReceiver.SLAVE_SECRET.mac(slaveName.getBytes(StandardCharsets.UTF_8)); } SecretKey key = new SecretKeySpec(jnlpMac, 0, 128 / 8, ""AES""); byte[] encrypted; try { Cipher c = Secret.getCipher(""AES/CFB8/NoPadding""); c.init(Cipher.ENCRYPT_MODE, key, new IvParameterSpec(iv)); encrypted = c.doFinal(csos.getBytes()); } catch (GeneralSecurityException x) { throw new IOException(x); }",encryption_key_operations,encryption_key_operations,True,,0.7022433280944824,0.29775670170783997 |
| 30,"DESedeKeySpec keySpec; SecretKey secretKey; try { if (algorithm.equalsIgnoreCase(""DESede"")) { keySpec = new DESedeKeySpec(passPhrase); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(algorithm); secretKey = keyFactory.generateSecret(keySpec); } else if (algorithm.equalsIgnoreCase(""SEED"")) { secretKey = new SecretKeySpec(passPhrase, ""SEED""); } else if (algorithm.equalsIgnoreCase(""CAMELLIA"")) { secretKey = new SecretKeySpec(passPhrase, ""CAMELLIA""); } else { secretKey = new SecretKeySpec(passPhrase, ""AES""); }",encryption_key_operations,encryption_key_operations,True,,0.7103999853134155,0.28960007429122925 |
| 31,"@Override public String decrypt(final String encryptedKey) throws Exception { final SecretKeySpec key = new SecretKeySpec(KEY_BYTES, ""AES""); final Cipher cipher = Cipher.getInstance(""AES""); cipher.init(Cipher.DECRYPT_MODE, key); final byte[] decoded = decode(encryptedKey); final byte[] plainText = new byte[cipher.getOutputSize(decoded.length)]; int ptLength = cipher.update(decoded, 0, decoded.length, plainText, 0); ptLength += cipher.doFinal(plainText, ptLength); return new String(plainText, StandardCharsets.UTF_8).substring(0, ptLength); }",encryption_key_operations,encryption_key_operations,True,,0.7072225213050842,0.29277753829956055 |
| 32,"if (!KEY.checkMac( encodedContext.getBytes(StandardCharsets.UTF_8), Base64.getUrlDecoder().decode(mac))) { throw new IllegalArgumentException(""Mac check failed for "" + encodedContext); }",encryption_key_operations,encryption_key_operations,True,,0.6367595791816711,0.36324042081832886 |
| 33,"public static String encodeObject(java.io.Serializable serializableObject, int options) throws java.io.IOException { checkNotNullParamWithNullPointerException(""serializableObject"", serializableObject); java.io.ByteArrayOutputStream baos = null; java.io.OutputStream b64os = null; java.util.zip.GZIPOutputStream gzos = null; java.io.ObjectOutputStream oos = null; try { baos = new java.io.ByteArrayOutputStream(); b64os = new Base64.OutputStream(baos, ENCODE | options); if ((options & GZIP) != 0) { gzos = new java.util.zip.GZIPOutputStream(b64os); oos = new java.io.ObjectOutputStream(gzos); } else { oos = new java.io.ObjectOutputStream(b64os); } oos.writeObject(serializableObject); } catch (java.io.IOException e) { throw e; } finally { safeClose(oos); safeClose(gzos); safeClose(b64os); safeClose(baos); } return new String(baos.toByteArray(), StandardCharsets.US_ASCII); }",unrelated,unrelated,True,,0.059145357459783554,0.9408546090126038 |
| 34,"@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse rsp = (HttpServletResponse) response; String authorization = req.getHeader(""Authorization""); String path = req.getServletPath(); if (authorization == null || req.getUserPrincipal() != null || path.startsWith(""/secured/"") || !Jenkins.get().isUseSecurity()) { if (req.getUserPrincipal() != null) { SecurityContextHolder.getContext().setAuthentication(new ContainerAuthentication(req)); } try { chain.doFilter(request, response); } finally { SecurityContextHolder.clearContext(); } return; } String username = null; String password = null; String uidpassword = null; try { uidpassword = new String(Base64.getDecoder().decode(authorization.substring(6).getBytes(StandardCharsets.UTF_8)), StandardCharsets.UTF_8); } catch (IllegalArgumentException ex) { LOGGER.log(Level.FINE, ex, () -> ""Failed to decode authentication from: "" + authorization); uidpassword = """"; } int idx = uidpassword.indexOf(':'); if (idx >= 0) { username = uidpassword.substring(0, idx); password = uidpassword.substring(idx + 1); } if (username == null) { rsp.setStatus(HttpServletResponse.SC_UNAUTHORIZED); rsp.setHeader(""WWW-Authenticate"", ""Basic realm=\""Jenkins user\""""); return; } { User u = BasicApiTokenHelper.isConnectingUsingApiToken(username, password); if (u != null) { UserDetails userDetails = u.getUserDetailsForImpersonation2(); Authentication auth = u.impersonate(userDetails); SecurityListener.fireAuthenticated2(userDetails); SecurityContextHolder.getContext().setAuthentication(auth); try { chain.doFilter(request, response); } finally { SecurityContextHolder.clearContext(); } return; } } path = req.getContextPath() + ""/secured"" + path; String q = req.getQueryString(); if (q != null) path += '?' + q; prepareRedirect(rsp, path); RequestDispatcher d = servletContext.getRequestDispatcher(""/j_security_check?j_username="" + URLEncoder.encode(username, StandardCharsets.UTF_8) + ""&j_password="" + URLEncoder.encode(password, StandardCharsets.UTF_8)); d.include(req, rsp); }",unrelated,unrelated,True,,0.1299099177122116,0.8700900673866272 |
| 35,"PublicKey loadKey(String key) throws NoSuchAlgorithmException, InvalidKeySpecException { SSHPublicKeyHolder sshPublicKeyHolder = new SSHPublicKeyHolder(); byte[] keyByteArray = Base64.getDecoder().decode(key); int keyByteArrayCursor = 0;",encryption_key_operations,encryption_key_operations,True,,0.6820474863052368,0.3179525136947632 |
| 36,final byte[] messageBytes = normalizedMessage.getBytes(MESSAGE_CHARSET); byte[] digest = this.byteDigester.digest(messageBytes);,encryption_key_operations,encryption_key_operations,True,,0.6184113621711731,0.38158857822418213 |
| 37,final byte[] messageBytes = message.getBytes(MESSAGE_CHARSET); byte[] encryptedMessage = this.byteEncryptor.encrypt(messageBytes);,encryption_key_operations,encryption_key_operations,True,,0.6623278260231018,0.3376721441745758 |
| 38,"if (!INSECURE) { if (mac == null) { throw new IOException(""Refusing to deserialize unsigned note from an old log.""); } else if (!MAC.checkMac(buf, mac)) { throw new IOException(""MAC mismatch""); } }",encryption_key_operations,encryption_key_operations,True,,0.6551957726478577,0.34480422735214233 |
| 39,"public static byte[] base64Encode( final byte[] input, final int flags ) { if (input == null) return null; return Base64.encode(input, flags); }",unrelated,unrelated,True,,0.02331341803073883,0.9766865968704224 |
| 40,"try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try (OutputStream cipheros = new CombinedCipherOutputStream(baos, getKey(), ""AES""); OutputStream zipos = new GZIPOutputStream(cipheros); OutputStreamWriter w = new OutputStreamWriter(zipos, StandardCharsets.UTF_8)) { o.write(w); } return Base64.getEncoder().encodeToString(baos.toByteArray());",encryption_key_operations,encryption_key_operations,True,,0.687349259853363,0.3126506805419922 |
| 41,"byte[] iv = Arrays.copyOfRange(payload, 9, 9 + ivLength); byte[] code = Arrays.copyOfRange(payload, 9 + ivLength, payload.length); String text; try { text = new String(KEY.decrypt(iv).doFinal(code), UTF_8); } catch (GeneralSecurityException e) { return null; } return new Secret(text, iv);",encryption_key_operations,encryption_key_operations,True,,0.6701709628105164,0.32982903718948364 |
| 42,"public PKCS10CertificationRequest createCSR(KeyPair keyPair) throws OperatorCreationException { X500Principal principal = new X500Principal(createX500NameString()); PKCS10CertificationRequestBuilder p10Builder = new JcaPKCS10CertificationRequestBuilder(principal, keyPair.getPublic()); JcaContentSignerBuilder csBuilder = new JcaContentSignerBuilder(""SHA256withRSA""); ContentSigner signer = csBuilder.build(keyPair.getPrivate()); return p10Builder.build(signer); }",encryption_key_operations,encryption_key_operations,True,,0.7051594257354736,0.29484057426452637 |
| 43,"} else if (privateKey instanceof ECPrivateKey) { ECPrivateKey ecPrivateKey = (ECPrivateKey)privateKey; ECParameterSpec paramSpec = EC5Util.convertSpec(ecPrivateKey.getParams()); ECPoint q = paramSpec.getG().multiply(ecPrivateKey.getS()); KeySpec keySpec = new ECPublicKeySpec(q, paramSpec); KeyFactory keyFactory = KeyFactory.getInstance(""EC""); return keyFactory.generatePublic(keySpec);",encryption_key_operations,encryption_key_operations,True,,0.7043980956077576,0.29560190439224243 |
| 44,"private static Cipher toCipher(RSAKey key, int mode) throws GeneralSecurityException { Cipher cipher = Cipher.getInstance(""RSA""); cipher.init(mode, (Key) key); return cipher; }",encryption_key_operations,encryption_key_operations,True,,0.702942967414856,0.29705706238746643 |
| 45,"Key rsaKey; if (isPublicKey) { X509EncodedKeySpec keySpec = new X509EncodedKeySpec(key); rsaKey = KeyFactory.getInstance(""RSA"").generatePublic(keySpec); } else { PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(key); rsaKey = KeyFactory.getInstance(""RSA"").generatePrivate(keySpec); } if (rsaKey == null) return null; Cipher cipher = Cipher.getInstance(transformation); cipher.init(isEncrypt ? Cipher.ENCRYPT_MODE : Cipher.DECRYPT_MODE, rsaKey);",encryption_key_operations,encryption_key_operations,True,,0.7023329734802246,0.2976670265197754 |
| 46,"protected static RSAPrivateKey generatePrivateKeyFromDER(byte[] keyBytes) throws InvalidKeySpecException, NoSuchAlgorithmException { Security.addProvider(new BouncyCastleProvider()); PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(keyBytes); KeyFactory factory = KeyFactory.getInstance(""RSA""); return (RSAPrivateKey)factory.generatePrivate(spec); }",encryption_key_operations,encryption_key_operations,True,,0.7070382237434387,0.29296180605888367 |
| 47,"JcaContentSignerBuilder csBuilder = new JcaContentSignerBuilder(""SHA256withRSA""); ContentSigner signer = csBuilder.build(keyPair.getPrivate()); X509CertificateHolder certHolder = certBuilder.build(signer); return new JcaX509CertificateConverter().getCertificate(certHolder);",encryption_key_operations,encryption_key_operations,True,,0.6951032876968384,0.30489668250083923 |
| 48,"public KeyPair createKeyPair() throws NoSuchAlgorithmException, NoSuchProviderException { KeyPairGenerator generator = KeyPairGenerator.getInstance(""RSA"", ""BC""); generator.initialize(2048, new SecureRandom()); keyPair = generator.generateKeyPair(); return keyPair; }",encryption_key_operations,encryption_key_operations,True,,0.7085947394371033,0.2914053201675415 |
| 49,"private RSAPublicKey getKey() { try { if (key == null) { KeyFactory keyFactory = KeyFactory.getInstance(""RSA""); key = (RSAPublicKey) keyFactory.generatePublic(new X509EncodedKeySpec(Util.fromHexString(keyImage))); } return key; } catch (GeneralSecurityException e) { throw new Error(e); } }",encryption_key_operations,encryption_key_operations,True,,0.7065479755401611,0.2934519946575165 |
| 50,"if (SSH_RSA.equals(keyType)) { RSAPublicKeySpec dsaPublicKeySpec = new RSAPublicKeySpec(m, e); KeyFactory factory = KeyFactory.getInstance(""RSA""); returnValue = factory.generatePublic(dsaPublicKeySpec); } if (SSH_DSS.equals(keyType)) { DSAPublicKeySpec dsaPublicKeySpec = new DSAPublicKeySpec(y, p, q, g); KeyFactory factory = KeyFactory.getInstance(""DSA""); returnValue = factory.generatePublic(dsaPublicKeySpec); }",encryption_key_operations,encryption_key_operations,True,,0.7016869187355042,0.2983131408691406 |
| 51,"@UriParam(defaultValue = ""SHA256withRSA"") private String algorithm = ""SHA256withRSA"";",unrelated,unrelated,True,,0.0402270145714283,0.9597730040550232 |
| 52,"if (privateKey instanceof RSAPrivateCrtKey) { KeySpec keySpec = new RSAPublicKeySpec( ((RSAPrivateCrtKey) privateKey).getModulus(), ((RSAPrivateCrtKey) privateKey).getPublicExponent()); KeyFactory keyFactory = KeyFactory.getInstance(""RSA""); return keyFactory.generatePublic(keySpec);",encryption_key_operations,encryption_key_operations,True,,0.7050821185112,0.29491785168647766 |
| 53,"@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.024219226092100143,0.9757807850837708 |
| 54,public void setMillis(ReadableInstant instant) { long instantMillis = DateTimeUtils.getInstantMillis(instant); setMillis(instantMillis); },unrelated,unrelated,True,,0.01900964416563511,0.9809902906417847 |
| 55,"public Interval gap(ReadableInterval interval) { interval = DateTimeUtils.getReadableInterval(interval); long otherStart = interval.getStartMillis(); long otherEnd = interval.getEndMillis(); long thisStart = getStartMillis(); long thisEnd = getEndMillis(); if (thisStart > otherEnd) { return new Interval(otherEnd, thisStart, getChronology()); } else if (otherStart > thisEnd) { return new Interval(thisEnd, otherStart, getChronology()); } else { return null; } }",unrelated,unrelated,True,,0.020613642409443855,0.9793863892555237 |
| 56,"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.01780705712735653,0.982192873954773 |
| 57,"@Override protected void subscribeActual(MaybeObserver<? super R> observer) { source.subscribe(new MapOptionalSingleObserver<>(observer, mapper)); }",unrelated,unrelated,True,,0.02110597863793373,0.978894054889679 |
| 58,"@Override protected void subscribeActual(Observer<? super R> observer) { source.subscribe(new ConcatMapEagerMainObserver<>(observer, mapper, maxConcurrency, prefetch, errorMode)); }",unrelated,unrelated,True,,0.019614169374108315,0.9803858995437622 |
| 59,@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GJCacheKey)) { return false; } GJCacheKey other = (GJCacheKey) obj; if (cutoverInstant == null) { if (other.cutoverInstant != null) { return false; } } else if (!cutoverInstant.equals(other.cutoverInstant)) { return false; } if (minDaysInFirstWeek != other.minDaysInFirstWeek) {,unrelated,unrelated,True,,0.02009361796081066,0.9799063801765442 |
| 60,public void setZone(DateTimeZone zone) { iSavedState = null; iZone = zone; },unrelated,unrelated,True,,0.020089764147996902,0.9799102544784546 |
| 61,"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.018409132957458496,0.9815908670425415 |
| 62,public Seconds minus(Seconds seconds) { if (seconds == null) { return this; } return minus(seconds.getValue()); },unrelated,unrelated,True,,0.020066197961568832,0.9799338579177856 |
| 63,"@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.01835908740758896,0.9816408753395081 |
| 64,"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.020600855350494385,0.9793992042541504 |
| 65,"public DateMidnight plusMonths(int months) { if (months == 0) { return this; } long instant = getChronology().months().add(getMillis(), months); return withMillis(instant); }",unrelated,unrelated,True,,0.0202524084597826,0.9797476530075073 |
| 66,"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.021799782291054726,0.9782002568244934 |
| 67,"@Override public int hashCode() { int total = 157; for (int i = 0, isize = size(); i < isize; i++) { total = 23 * total + getValue(i); total = 23 * total + getFieldType(i).hashCode(); } total += getChronology().hashCode(); return total; }",unrelated,unrelated,True,,0.018559755757451057,0.9814401865005493 |
| 68,"@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.01922466978430748,0.9807753562927246 |
| 69,"@CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) @NonNull public final Observable<T> observeOn(@NonNull Scheduler scheduler) { return observeOn(scheduler, StandardBufferedConfig.DEFAULT); }",unrelated,unrelated,True,,0.019069738686084747,0.9809303283691406 |
| 70,public MpscLinkedQueue() { producerNode = new AtomicReference<>(); consumerNode = new AtomicReference<>(); LinkedQueueNode<T> node = new LinkedQueueNode<>(); spConsumerNode(node); xchgProducerNode(node); },unrelated,unrelated,True,,0.01773572713136673,0.9822643399238586 |
| 71,"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.020310841500759125,0.9796891808509827 |
| 72,"public void printTo(StringBuffer buf, long instant) { try { printTo((Appendable) buf, instant); } catch (IOException ex) { } }",unrelated,unrelated,True,,0.018477031961083412,0.9815230369567871 |
| 73,public boolean isGreaterThan(Seconds other) { if (other == null) { return getValue() > 0; } return getValue() > other.getValue(); },unrelated,unrelated,True,,0.019550839439034462,0.9804491400718689 |
| 74,"@Override public long set(long instant, int value) { FieldUtils.verifyValueBounds(this, value, iMin, iMax); int remainder = getRemainder(getWrappedField().get(instant)); return getWrappedField().set(instant, value * iDivisor + remainder); }",unrelated,unrelated,True,,0.019709499552845955,0.9802905321121216 |
| 75,final void removeSelf() { DisposableContainer c = composite.getAndSet(null); if (c != null) { c.delete(this); } },unrelated,unrelated,True,,0.019684718921780586,0.9803153276443481 |
| 76,"@Override int getMonthOfYear(long millis, int year) { long monthZeroBased = (millis - getYearMillis(year)) / MILLIS_PER_MONTH; return ((int) monthZeroBased) + 1; }",unrelated,unrelated,True,,0.018688417971134186,0.9813116192817688 |
| 77,"int getDayOfMonth(long millis, int year) { int month = getMonthOfYear(millis, year); return getDayOfMonth(millis, year, month); }",unrelated,unrelated,True,,0.018955666571855545,0.981044352054596 |
| 78,"private GJChronology(Chronology base, JulianChronology julian, GregorianChronology gregorian, Instant cutoverInstant) { super(base, new Object[] {julian, gregorian, cutoverInstant}); }",unrelated,unrelated,True,,0.020265143364667892,0.9797348380088806 |
| 79,"public static void appendPaddedInteger(Appendable appendable, long value, int size) throws IOException { int intValue = (int)value; if (intValue == value) { appendPaddedInteger(appendable, intValue, size); } else if (size <= 19) { appendable.append(Long.toString(value)); } else { if (value < 0) { appendable.append('-'); if (value != Long.MIN_VALUE) { value = -value; } else { for (; size > 19; size--) { appendable.append('0'); } appendable.append(""9223372036854775808""); return; } } int digits = (int)(Math.log(value) / LOG_10) + 1;",unrelated,unrelated,True,,0.027622045949101448,0.9723778963088989 |
| 80,"@Override public void onNext(T t) { if (fusionMode == QueueSubscription.NONE) { parent.innerNext(this, t); } else { parent.drain(); } }",unrelated,unrelated,True,,0.0184969212859869,0.9815030097961426 |
| 81,"public static Years yearsBetween(ReadableInstant start, ReadableInstant end) { int amount = BaseSingleFieldPeriod.between(start, end, DurationFieldType.years()); return Years.years(amount); }",unrelated,unrelated,True,,0.020303087309002876,0.9796969294548035 |
| 82,private Chronology selectChronology(Chronology chrono) { chrono = DateTimeUtils.getChronology(chrono); if (iChrono != null) { chrono = iChrono; } if (iZone != null) { chrono = chrono.withZone(iZone); } return chrono; },unrelated,unrelated,True,,0.02417299896478653,0.9758269786834717 |
| 83,"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.018505282700061798,0.9814947843551636 |
| 84,"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.01960938610136509,0.9803905487060547 |
| 85,public boolean isGreaterThan(Minutes other) { if (other == null) { return getValue() > 0; } return getValue() > other.getValue(); },unrelated,unrelated,True,,0.019689301028847694,0.9803107380867004 |
| 86,"protected int convertText(String text, Locale locale) { try { return Integer.parseInt(text); } catch (NumberFormatException ex) { throw new IllegalFieldValueException(getType(), text); } }",unrelated,unrelated,True,,0.01921592280268669,0.9807840585708618 |
| 87,"@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.01977713406085968,0.9802228808403015 |
| 88,"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.019570203498005867,0.9804297685623169 |
| 89,"@Override public String toString() { String str = ""BuddhistChronology""; DateTimeZone zone = getZone(); if (zone != null) { str = str + '[' + zone.getID() + ']'; } return str; }",unrelated,unrelated,True,,0.02071193791925907,0.9792880415916443 |
| 90,"@Override public long set(long millis, int value) { FieldUtils.verifyValueBounds(this, value, iMinValue, getMaximumValue()); if (value <= iSkip) { value--; } return super.set(millis, value); }",unrelated,unrelated,True,,0.019574858248233795,0.9804251790046692 |
| 91,"public Interval withDurationAfterStart(ReadableDuration duration) { long durationMillis = DateTimeUtils.getDurationMillis(duration); if (durationMillis == toDurationMillis()) { return this; } Chronology chrono = getChronology(); long startMillis = getStartMillis(); long endMillis = chrono.add(startMillis, durationMillis, 1); return new Interval(startMillis, endMillis, chrono); }",unrelated,unrelated,True,,0.020441442728042603,0.979558527469635 |
| 92,"@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.020160440355539322,0.9798395037651062 |
| 93,"@SuppressWarnings(""unchecked"") @NonNull public static <T> Predicate<T> alwaysFalse() { return (Predicate<T>)ALWAYS_FALSE; }",unrelated,unrelated,True,,0.020697657018899918,0.9793023467063904 |
| 94,"@Override public long set(long instant, int value) { FieldUtils.verifyValueBounds(this, value, getMinimumValue(), getMaximumValue()); return instant + (value - get(instant)) * iUnitMillis; }",unrelated,unrelated,True,,0.019651519134640694,0.980348527431488 |
| 95,"public DelegatedDateTimeField(DateTimeField field, DurationField rangeField, DateTimeFieldType type) { super(); if (field == null) { throw new IllegalArgumentException(""The field must not be null""); } iField = field; iRangeDurationField = rangeField; iType = (type == null ? field.getType() : type); }",unrelated,unrelated,True,,0.018412018194794655,0.9815880060195923 |
| 96,"public Calendar toCalendar(Locale locale) { if (locale == null) { locale = Locale.getDefault(); } DateTimeZone zone = getZone(); Calendar cal = Calendar.getInstance(zone.toTimeZone(), locale); cal.setTime(toDate()); return cal; }",unrelated,unrelated,True,,0.020555194467306137,0.9794448018074036 |
| 97,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.018711520358920097,0.9812884330749512 |
| 98,@Override public int getMinimumValue(ReadablePartial instant) { return getMinimumValue(); },unrelated,unrelated,True,,0.021044405177235603,0.9789556264877319 |
| 99,"@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.018646124750375748,0.9813538789749146 |
| 100,"public LocalDateTime withTime(int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond) { Chronology chrono = getChronology(); long instant = getLocalMillis(); instant = chrono.hourOfDay().set(instant, hourOfDay); instant = chrono.minuteOfHour().set(instant, minuteOfHour); instant = chrono.secondOfMinute().set(instant, secondOfMinute); instant = chrono.millisOfSecond().set(instant, millisOfSecond); return withLocalMillis(instant); }",unrelated,unrelated,True,,0.02003433182835579,0.9799656867980957 |
| 101,"public void printTo(StringBuilder buf, ReadablePartial partial) { try { printTo((Appendable) buf, partial); } catch (IOException ex) { } }",unrelated,unrelated,True,,0.01885417476296425,0.9811457991600037 |
| 102,"public MaybeToSingle(MaybeSource<T> source, T defaultValue) { this.source = source; this.defaultValue = defaultValue; }",unrelated,unrelated,True,,0.020726019516587257,0.9792739748954773 |
| 103,"public DeferredExecutorScheduler(@NonNull Supplier<? extends Executor> executorSupplier, boolean interruptibleWorker, boolean fair) { this.executorSupplier = executorSupplier; this.interruptibleWorker = interruptibleWorker; this.fair = fair; }",unrelated,unrelated,True,,0.0177778247743845,0.9822221994400024 |
| 104,"@Override public long add(long instant, int years) { if (years == 0) { return instant; } return set(instant, get(instant) + years); }",unrelated,unrelated,True,,0.01798919402062893,0.9820107817649841 |
| 105,@Override public boolean equals(Object period) { if (this == period) { return true; } if (period instanceof ReadablePeriod == false) { return false; } ReadablePeriod other = (ReadablePeriod) period; return (other.getPeriodType() == getPeriodType() && other.getValue(0) == getValue()); },unrelated,unrelated,True,,0.01898149773478508,0.9810185432434082 |
| 106,"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.01783955655992031,0.9821604490280151 |
| 107,@Override public Object clone() { try { return cloneReset(); } catch (final CloneNotSupportedException ex) { return null; } },unrelated,unrelated,True,,0.018560010939836502,0.981440007686615 |
| 108,"BasicDayOfYearDateTimeField(BasicChronology chronology, DurationField days) { super(DateTimeFieldType.dayOfYear(), days); iChronology = chronology; }",unrelated,unrelated,True,,0.019546285271644592,0.9804537296295166 |
| 109,"public LocalTime(Object instant, Chronology chronology) { PartialConverter converter = ConverterManager.getInstance().getPartialConverter(instant); chronology = converter.getChronology(instant, chronology); chronology = DateTimeUtils.getChronology(chronology); iChronology = chronology.withUTC(); int[] values = converter.getPartialValues(this, instant, chronology, ISODateTimeFormat.localTimeParser()); iLocalMillis = iChronology.getDateTimeMillis(0L, values[0], values[1], values[2], values[3]); }",unrelated,unrelated,True,,0.09240937978029251,0.9075906276702881 |
| 110,"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.018404638394713402,0.9815953969955444 |
| 111,static long readMillis(DataInput in) throws IOException { int v = in.readUnsignedByte(); switch (v >> 6) { case 0: default: v = (v << (32 - 6)) >> (32 - 6); return v * (30 * 60000L); case 1: v = (v << (32 - 6)) >> (32 - 30); v |= (in.readUnsignedByte()) << 16; v |= (in.readUnsignedByte()) << 8; v |= (in.readUnsignedByte()); return v * 60000L; case 2: long w = (((long)v) << (64 - 6)) >> (64 - 38); w |= (in.readUnsignedByte()) << 24;,unrelated,unrelated,True,,0.06688487529754639,0.9331151247024536 |
| 112,public boolean isGreaterThan(Weeks other) { if (other == null) { return getValue() > 0; } return getValue() > other.getValue(); },unrelated,unrelated,True,,0.019271042197942734,0.9807289242744446 |
| 113,"@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.019554631784558296,0.9804453253746033 |
| 114,"@Override public int getMaximumValue(ReadablePartial partial) { if (partial.isSupported(DateTimeFieldType.monthOfYear())) { int month = partial.get(DateTimeFieldType.monthOfYear()); if (partial.isSupported(DateTimeFieldType.year())) { int year = partial.get(DateTimeFieldType.year()); return iChronology.getDaysInYearMonth(year, month); } return iChronology.getDaysInMonthMax(month); } return getMaximumValue(); }",unrelated,unrelated,True,,0.021175431087613106,0.9788246154785156 |
| 115,"public static Hours hoursBetween(ReadableInstant start, ReadableInstant end) { int amount = BaseSingleFieldPeriod.between(start, end, DurationFieldType.hours()); return Hours.hours(amount); }",unrelated,unrelated,True,,0.02059265226125717,0.9794073104858398 |
| 116,"public int get(DateTimeField field) { if (field == null) { throw new IllegalArgumentException(""The DateTimeField must not be null""); } return field.get(getMillis()); }",unrelated,unrelated,True,,0.019238749518990517,0.9807612895965576 |
| 117,@Override public long roundHalfFloor(long instant) { return getWrappedField().roundHalfFloor(instant); },unrelated,unrelated,True,,0.0193845983594656,0.9806154370307922 |
| |