Upload folder using huggingface_hub
Browse files- data_integrity_codebert_v3/best_metrics.json +36 -0
- data_integrity_codebert_v3/best_model.pt +3 -0
- data_integrity_codebert_v3/best_validation_errors.csv +2 -0
- data_integrity_codebert_v3/best_validation_predictions.csv +78 -0
- data_integrity_codebert_v3/history.json +298 -0
- data_integrity_codebert_v3/test_errors.csv +2 -0
- data_integrity_codebert_v3/test_metrics.json +36 -0
- data_integrity_codebert_v3/test_predictions.csv +105 -0
- data_integrity_codebert_v3/tokenizer/merges.txt +0 -0
- data_integrity_codebert_v3/tokenizer/special_tokens_map.json +51 -0
- data_integrity_codebert_v3/tokenizer/tokenizer.json +0 -0
- data_integrity_codebert_v3/tokenizer/tokenizer_config.json +58 -0
- data_integrity_codebert_v3/tokenizer/vocab.json +0 -0
data_integrity_codebert_v3/best_metrics.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"loss": 0.08122180355712771,
|
| 3 |
+
"accuracy": 0.987012987012987,
|
| 4 |
+
"macro_f1": 0.9850340136054422,
|
| 5 |
+
"labels": [
|
| 6 |
+
"data_integrity",
|
| 7 |
+
"unrelated"
|
| 8 |
+
],
|
| 9 |
+
"precision": [
|
| 10 |
+
1.0,
|
| 11 |
+
0.9811320754716981
|
| 12 |
+
],
|
| 13 |
+
"recall": [
|
| 14 |
+
0.96,
|
| 15 |
+
1.0
|
| 16 |
+
],
|
| 17 |
+
"f1": [
|
| 18 |
+
0.9795918367346939,
|
| 19 |
+
0.9904761904761905
|
| 20 |
+
],
|
| 21 |
+
"support": [
|
| 22 |
+
25,
|
| 23 |
+
52
|
| 24 |
+
],
|
| 25 |
+
"confusion_matrix": [
|
| 26 |
+
[
|
| 27 |
+
24,
|
| 28 |
+
1
|
| 29 |
+
],
|
| 30 |
+
[
|
| 31 |
+
0,
|
| 32 |
+
52
|
| 33 |
+
]
|
| 34 |
+
],
|
| 35 |
+
"classification_report": " precision recall f1-score support\n\ndata_integrity 1.00 0.96 0.98 25\n unrelated 0.98 1.00 0.99 52\n\n accuracy 0.99 77\n macro avg 0.99 0.98 0.99 77\n weighted avg 0.99 0.99 0.99 77\n"
|
| 36 |
+
}
|
data_integrity_codebert_v3/best_model.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b61593c3038ddd79c9612d613e54f6c40fdb2ae4634195b2c2fdfc1046027d6c
|
| 3 |
+
size 498751644
|
data_integrity_codebert_v3/best_validation_errors.csv
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_index,text,true_label,predicted_label,correct,error_type,probability_data_integrity,probability_unrelated
|
| 2 |
+
1,"private static final List<String> HEADER_PREFIXES = Arrays.asList( ""x-checksum-"", ""x-goog-meta-checksum-"", ""x-amz-meta-checksum-"");",data_integrity,unrelated,False,true_data_integrity_predicted_unrelated,0.0033345671836286783,0.9966654181480408
|
data_integrity_codebert_v3/best_validation_predictions.csv
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_index,text,true_label,predicted_label,correct,error_type,probability_data_integrity,probability_unrelated
|
| 2 |
+
0,"public static ChecksumFailureException mismatchDetail( String detail, String expected, String expectedKind, String actual) { String message = ""Checksum validation failed, expected '"" + expected + ""'"" + (expectedKind == null ? """" : "" ("" + expectedKind + "")"") + "" but is actually '"" + actual + ""'""; if (detail != null) { message = message + "" ("" + detail + "")""; } return new ChecksumFailureException(message, null, expected, expectedKind, actual, true);",data_integrity,data_integrity,True,,0.9772672653198242,0.022732699289917946
|
| 3 |
+
1,"private static final List<String> HEADER_PREFIXES = Arrays.asList( ""x-checksum-"", ""x-goog-meta-checksum-"", ""x-amz-meta-checksum-"");",data_integrity,unrelated,False,true_data_integrity_predicted_unrelated,0.0033345671836286783,0.9966654181480408
|
| 4 |
+
2,"boolean valid = true; boolean validated = false; try { final Map<String, String> calculatedChecksums = ChecksumAlgorithmHelper.calculate(artifact.getPath(), checksumAlgorithmFactories); for (Map.Entry<String, TrustedChecksumsSource> entry : trustedChecksumsSources.entrySet()) { final String trustedSourceName = entry.getKey(); final TrustedChecksumsSource trustedChecksumsSource = entry.getValue();",data_integrity,data_integrity,True,,0.9901137351989746,0.009886294603347778
|
| 5 |
+
3,"@Override protected Map<String, String> doGetTrustedArtifactChecksums( RepositorySystemSession session, Artifact artifact, ArtifactRepository artifactRepository, List<ChecksumAlgorithmFactory> checksumAlgorithmFactories) { final boolean originAware = isOriginAware(session); final HashMap<String, String> checksums = new HashMap<>();",data_integrity,data_integrity,True,,0.9882533550262451,0.011746576055884361
|
| 6 |
+
4,"@Deprecated public ChecksumFailureException(String expected, String expectedKind, String actual) { super(""Checksum validation failed, expected '"" + expected + ""'"" + (expectedKind == null ? """" : "" ("" + expectedKind + "")"") + "" but is actually '"" + actual + ""'""); this.expected = expected; this.expectedKind = expectedKind; this.actual = actual;",data_integrity,data_integrity,True,,0.9768115878105164,0.02318841777741909
|
| 7 |
+
5,"@Override public ChecksumAlgorithmFactory select(String algorithmName) { requireNonNull(algorithmName, ""algorithmMame must not be null""); ChecksumAlgorithmFactory factory = factories.get(algorithmName); if (factory == null) { throw new IllegalArgumentException(String.format( ""Unsupported checksum algorithm %s, supported ones are %s"", algorithmName,",data_integrity,data_integrity,True,,0.989794909954071,0.010205056518316269
|
| 8 |
+
6,"@Override public int hashCode() { return Objects.hash(localHost, localPort, remoteHost, remotePort); }",unrelated,unrelated,True,,0.0021921165753155947,0.9978079199790955
|
| 9 |
+
7,"@Override public boolean next(Message msg, SSHPacket buffer) throws GeneralSecurityException, TransportException { log.debug(""Got message {}"", msg); try { switch (msg) { case KEXDH_31: return parseGexGroup(buffer); case KEX_DH_GEX_REPLY: return parseGexReply(buffer); default: throw new TransportException(""Unexpected message "" + msg); } } catch (Buffer.BufferException be) { throw new TransportException(be); } }",unrelated,unrelated,True,,0.3244292736053467,0.6755707263946533
|
| 10 |
+
8,"private String prependPrefix(String columnName, String prefix) { if (columnName == null || columnName.length() == 0 || prefix == null || prefix.length() == 0) { return columnName; } return prefix + columnName; }",unrelated,unrelated,True,,0.002311318414285779,0.9976886510848999
|
| 11 |
+
9,public void setPoolMaximumIdleConnections(int poolMaximumIdleConnections) { this.poolMaximumIdleConnections = poolMaximumIdleConnections; forceCloseAll(); },unrelated,unrelated,True,,0.0023881341330707073,0.9976118803024292
|
| 12 |
+
10,"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.0021728521678596735,0.9978271126747131
|
| 13 |
+
11,public Collection<String> getMappedStatementNames() { buildAllStatements(); return mappedStatements.keySet(); },unrelated,unrelated,True,,0.0023035036865621805,0.9976964592933655
|
| 14 |
+
12,"@Override public Reader getNullableResult(ResultSet rs, String columnName) throws SQLException { return toReader(rs.getClob(columnName)); }",unrelated,unrelated,True,,0.0023524013813585043,0.9976475834846497
|
| 15 |
+
13,"@Override public void error(String s) { log.logIfEnabled(FQCN, Level.ERROR, MARKER, (Message) new SimpleMessage(s), null); }",unrelated,unrelated,True,,0.002375629497691989,0.9976243376731873
|
| 16 |
+
14,public CacheBuilder addDecorator(Class<? extends Cache> decorator) { if (decorator != null) { this.decorators.add(decorator); } return this; },unrelated,unrelated,True,,0.002343063475564122,0.9976569414138794
|
| 17 |
+
15,"@Override public Byte[] getNullableResult(ResultSet rs, String columnName) throws SQLException { byte[] bytes = rs.getBytes(columnName); return getBytes(bytes); }",unrelated,unrelated,True,,0.002343993168324232,0.997655987739563
|
| 18 |
+
16,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.0022015529684722424,0.9977983832359314
|
| 19 |
+
17,public long getClaimedOverdueConnectionCount() { lock.lock(); try { return claimedOverdueConnectionCount; } finally { lock.unlock(); } },unrelated,unrelated,True,,0.002327138092368841,0.9976728558540344
|
| 20 |
+
18,"private JdbcType safeGetJdbcTypeForColumn(ResultSetMetaData rsmd, Integer columnIndex) { try { return JdbcType.forCode(rsmd.getColumnType(columnIndex)); } catch (Exception e) { return null; } }",unrelated,unrelated,True,,0.002193282125517726,0.9978067278862
|
| 21 |
+
19,"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.0022509938571602106,0.9977490305900574
|
| 22 |
+
20,"@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.002221229951828718,0.9977787137031555
|
| 23 |
+
21,private Throwable extractRootCause(Exception e) { Throwable cause = e; while (cause.getCause() != null) { cause = cause.getCause(); } return cause; },unrelated,unrelated,True,,0.0023785268422216177,0.997621476650238
|
| 24 |
+
22,"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.0022331213112920523,0.9977668523788452
|
| 25 |
+
23,"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.002137694740667939,0.9978622794151306
|
| 26 |
+
24,"private static Configuration newConfig(Class<? extends Configuration> configClass) { try { return configClass.getDeclaredConstructor().newInstance(); } catch (Exception ex) { throw new BuilderException(""Failed to create a new Configuration instance."", ex); } }",unrelated,unrelated,True,,0.0022143120877444744,0.9977856874465942
|
| 27 |
+
25,@Override public <E> Cursor<E> queryCursor(Statement statement) throws SQLException { return delegate.queryCursor(statement); },unrelated,unrelated,True,,0.0022801023442298174,0.9977198243141174
|
| 28 |
+
26,"@Override public void putObject(Object key, Object value) { try { delegate.putObject(key, value); } finally { releaseLock(key); } }",unrelated,unrelated,True,,0.0022915059234946966,0.9977084398269653
|
| 29 |
+
27,"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.0021317200735211372,0.9978682994842529
|
| 30 |
+
28,"private JdbcType[] mappedJdbcTypes(Class<?> clazz) { MappedJdbcTypes mappedJdbcTypesAnno = clazz.getAnnotation(MappedJdbcTypes.class); if (mappedJdbcTypesAnno != null) { JdbcType[] jdbcTypes = mappedJdbcTypesAnno.value(); if (mappedJdbcTypesAnno.includeNullJdbcType()) { int newLength = jdbcTypes.length + 1; jdbcTypes = Arrays.copyOf(jdbcTypes, newLength); jdbcTypes[newLength - 1] = null; } return jdbcTypes; } return new JdbcType[] { null }; }",unrelated,unrelated,True,,0.0022515784949064255,0.9977484345436096
|
| 31 |
+
29,@Override public String[] getSetterNames() { return map.keySet().toArray(new String[0]); },unrelated,unrelated,True,,0.002263253554701805,0.9977366924285889
|
| 32 |
+
30,@Override public void clear() { lastClear = System.currentTimeMillis(); delegate.clear(); },unrelated,unrelated,True,,0.0025405092164874077,0.9974594712257385
|
| 33 |
+
31,"@Override public void error(String s, Throwable e) { logger.log(MARKER, FQCN, LocationAwareLogger.ERROR_INT, s, null, e); }",unrelated,unrelated,True,,0.0023198253475129604,0.9976801872253418
|
| 34 |
+
32,private MetaObject getParamMetaObject() { if (paramMetaObject != null) { return paramMetaObject; } paramMetaObject = configuration.newMetaObject(parameterObject); return paramMetaObject; },unrelated,unrelated,True,,0.0021537020802497864,0.997846245765686
|
| 35 |
+
33,"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.002257836749777198,0.9977421760559082
|
| 36 |
+
34,"@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.002272888319566846,0.99772709608078
|
| 37 |
+
35,"@Override public void commit(boolean force) { final SqlSession sqlSession = localSqlSession.get(); if (sqlSession == null) { throw new SqlSessionException(""Error: Cannot commit. No managed session is started.""); } sqlSession.commit(force); }",unrelated,unrelated,True,,0.00228375056758523,0.9977163076400757
|
| 38 |
+
36,@Override public List<BatchResult> doFlushStatements(boolean isRollback) { for (Statement stmt : statementMap.values()) { closeStatement(stmt); } statementMap.clear(); return List.of(); },unrelated,unrelated,True,,0.0022746529430150986,0.9977253079414368
|
| 39 |
+
37,"@Override public InputStream getNullableResult(ResultSet rs, int columnIndex) throws SQLException { return toInputStream(rs.getBlob(columnIndex)); }",unrelated,unrelated,True,,0.002347251633182168,0.9976528286933899
|
| 40 |
+
38,"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.0021503260359168053,0.997849702835083
|
| 41 |
+
39,@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.0022500844206660986,0.9977498650550842
|
| 42 |
+
40,public void setLogImpl(Class<? extends Log> logImpl) { if (logImpl != null) { this.logImpl = logImpl; LogFactory.useCustomLogging(this.logImpl); } },unrelated,unrelated,True,,0.002434576628729701,0.9975653886795044
|
| 43 |
+
41,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.002208577934652567,0.9977914094924927
|
| 44 |
+
42,"private void initTokenParser(List<ParameterMapping> parameterMappings) { if (tokenParser == null) { tokenHandler = new ParameterMappingTokenHandler(parameterMappings != null ? parameterMappings : new ArrayList<>(), configuration, parameterObject, parameterType, bindings, paramNameResolver, paramExists); tokenParser = new GenericTokenParser(""#{"", ""}"", tokenHandler); } }",unrelated,unrelated,True,,0.0021172845736145973,0.9978826642036438
|
| 45 |
+
43,PendingCreationKey(ResultMapping constructorMapping) { this.resultMapId = constructorMapping.getNestedResultMapId(); this.constructorColumnPrefix = constructorMapping.getColumnPrefix(); },unrelated,unrelated,True,,0.0022750673815608025,0.9977249503135681
|
| 46 |
+
44,public T HAVING(String... conditions) { sql().having.addAll(Arrays.asList(conditions)); sql().lastList = sql().having; return getSelf(); },unrelated,unrelated,True,,0.0022795656695961952,0.9977204203605652
|
| 47 |
+
45,"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.002131387125700712,0.997868537902832
|
| 48 |
+
46,"@Override public void setNonNullParameter(PreparedStatement ps, int i, Time parameter, JdbcType jdbcType) throws SQLException { ps.setTime(i, parameter); }",unrelated,unrelated,True,,0.0023404275998473167,0.9976595640182495
|
| 49 |
+
47,"private static Class<?>[] getAllInterfaces(Class<?> type, Map<Class<?>, Set<Method>> signatureMap) { Set<Class<?>> interfaces = new HashSet<>(); while (type != null) { for (Class<?> c : type.getInterfaces()) { if (signatureMap.containsKey(c)) { interfaces.add(c); } } type = type.getSuperclass(); } return interfaces.toArray(new Class<?>[0]); }",unrelated,unrelated,True,,0.002219517482444644,0.9977805018424988
|
| 50 |
+
48,public SoftCache(Cache delegate) { this.delegate = delegate; this.numberOfHardLinks = 256; this.hardLinksToAvoidGarbageCollection = new LinkedList<>(); this.queueOfGarbageCollectedEntries = new ReferenceQueue<>(); },unrelated,unrelated,True,,0.00219458038918674,0.9978054165840149
|
| 51 |
+
49,"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.002180308336392045,0.9978196620941162
|
| 52 |
+
50,"@SuppressWarnings(""unchecked"") protected static <T> T invoke(Method method, Object object, Object... parameters) throws IOException, RuntimeException { try { return (T) method.invoke(object, parameters); } catch (IllegalArgumentException | IllegalAccessException e) { throw new RuntimeException(e); } catch (InvocationTargetException e) { if (e.getTargetException() instanceof IOException) { throw (IOException) e.getTargetException(); } throw new RuntimeException(e); } }",unrelated,unrelated,True,,0.0022652402985841036,0.997734785079956
|
| 53 |
+
51,"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.0021860934793949127,0.9978139400482178
|
| 54 |
+
52,public int getActiveConnectionCount() { lock.lock(); try { return activeConnections.size(); } finally { lock.unlock(); } },unrelated,unrelated,True,,0.002272113459184766,0.9977279305458069
|
| 55 |
+
53,"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.002312880475074053,0.9976871013641357
|
| 56 |
+
54,"private ParameterMapping buildParameterMapping(String content) { Map<String, String> propertiesMap = parseParameterMapping(content); final String property = propertiesMap.remove(""property""); final JdbcType jdbcType = resolveJdbcType(propertiesMap.remove(""jdbcType"")); final String typeHandlerAlias = propertiesMap.remove(""typeHandler""); ParameterMapping.Builder builder = new ParameterMapping.Builder(configuration, property, (Class<?>) null); PropertyTokenizer propertyTokenizer = new PropertyTokenizer(property); builder.jdbcType(jdbcType); final Class<?> javaType = figureOutJavaType(propertiesMap, property, propertyTokenizer, jdbcType); builder.javaType(javaType); if (genericType == null) { genericType = javaType; } if (typeHandler == null || typeHandlerAlias != null) { typeHandler = resolveTypeHandler(genericType, jdbcType, typeHandlerAlias); } builder.typeHandler(typeHandler);",unrelated,unrelated,True,,0.002201641211286187,0.9977983832359314
|
| 57 |
+
55,"@Override public BigDecimal getNullableResult(ResultSet rs, String columnName) throws SQLException { return rs.getBigDecimal(columnName); }",unrelated,unrelated,True,,0.0024823585990816355,0.9975177049636841
|
| 58 |
+
56,public T SELECT(String... columns) { sql().statementType = SQLStatement.StatementType.SELECT; sql().select.addAll(Arrays.asList(columns)); return getSelf(); },unrelated,unrelated,True,,0.002316436031833291,0.9976835250854492
|
| 59 |
+
57,"private boolean findUsableConstructorByArgTypes(final Constructor<?> constructor, final List<JdbcType> jdbcTypes) { final Class<?>[] parameterTypes = constructor.getParameterTypes(); if (parameterTypes.length != jdbcTypes.size()) { return false; } for (int i = 0; i < parameterTypes.length; i++) { if (!typeHandlerRegistry.hasTypeHandler(parameterTypes[i], jdbcTypes.get(i))) { return false; } } return true; }",unrelated,unrelated,True,,0.002164730103686452,0.9978353381156921
|
| 60 |
+
58,"} if (provider == null) { return false; } try { if (Security.getProvider(provider.getName()) == null) { Security.addProvider(provider); } if (securityProvider == null) { MessageDigest.getInstance(""MD5"", provider); KeyAgreement.getInstance(""DH"", provider); setSecurityProvider(provider.getName()); return true; } } catch (NoSuchAlgorithmException e) {",data_integrity,data_integrity,True,,0.9905725121498108,0.00942752230912447
|
| 61 |
+
59,"private static MessageDigest newDigest() { try { return MessageDigest.getInstance(""SHA-1""); } catch (NoSuchAlgorithmException e) { try { return MessageDigest.getInstance(""MD5""); } catch (NoSuchAlgorithmException ne) { throw new IllegalStateException(ne); } } }",data_integrity,data_integrity,True,,0.9909390211105347,0.009060956537723541
|
| 62 |
+
60,"public static String getFingerprint(PublicKey key) { MessageDigest md5; try { md5 = getMessageDigest(""MD5""); } catch (GeneralSecurityException e) { throw new SSHRuntimeException(e); } md5.update(new Buffer.PlainBuffer().putPublicKey(key).getCompactData()); final String undelimited = ByteArrayUtils.toHex(md5.digest()); assert undelimited.length() == 32 : ""md5 contract""; StringBuilder fp = new StringBuilder(undelimited.substring(0, 2)); for (int i = 2; i <= undelimited.length() - 2; i += 2) fp.append("":"").append(undelimited.substring(i, i + 2)); return fp.toString(); }",data_integrity,data_integrity,True,,0.9908599853515625,0.009140020236372948
|
| 63 |
+
61,"Map<String, Object> results = new LinkedHashMap<>(); Map<String, MessageDigest> digests = new LinkedHashMap<>(); for (String algo : algos) { try { digests.put(algo, MessageDigest.getInstance(algo)); } catch (NoSuchAlgorithmException e) { results.put(algo, e); } } try (InputStream in = data) {",data_integrity,data_integrity,True,,0.9899424314498901,0.010057513602077961
|
| 64 |
+
62,"public static Factory HMACSHA2256() { return new Factory(""hmac-sha2-256"", ""HmacSHA256"", 32, 32, false); }",data_integrity,data_integrity,True,,0.989267885684967,0.010732145048677921
|
| 65 |
+
63,"public Curve25519SHA256() { super(new Curve25519DH(), new SHA256()); }",data_integrity,data_integrity,True,,0.9909247159957886,0.009075268171727657
|
| 66 |
+
64,"protected static byte[] sha256(byte[] data) { try { return MessageDigest.getInstance(""SHA-256"").digest(data); } catch (NoSuchAlgorithmException e) { throw new SSHRuntimeException(e); } }",data_integrity,data_integrity,True,,0.991028368473053,0.008971694856882095
|
| 67 |
+
65,"private Mac prepareVerifyMacV3() throws IOException { try { Mac mac = Mac.getInstance(""HmacSHA256""); mac.init(new SecretKeySpec(this.verifyHmac, 0, 32, mac.getAlgorithm())); return mac; } catch (NoSuchAlgorithmException | InvalidKeyException e) { throw new IOException(e.getMessage(), e); } }",data_integrity,data_integrity,True,,0.9908792972564697,0.009120688773691654
|
| 68 |
+
66,"public SHA512() { super(""SHA-512"", 64); }",data_integrity,data_integrity,True,,0.9886526465415955,0.011347309686243534
|
| 69 |
+
67,"public static DHGroups.Factory Group18SHA512AtSSH() { return new DHGroups.Factory(""diffie-hellman-group18-sha512@ssh.com"", P18, G, new SHA512.Factory()); }",data_integrity,data_integrity,True,,0.9906854033470154,0.009314551949501038
|
| 70 |
+
68,"private void sign(InputStream content, OutputStream signature) throws IOException { PGPSignatureGenerator sGen = new PGPSignatureGenerator( new BcPGPContentSignerBuilder(secretKey.getPublicKey().getAlgorithm(), HashAlgorithmTags.SHA512)); try { sGen.init(PGPSignature.BINARY_DOCUMENT, privateKey); sGen.setHashedSubpackets(hashSubPackets); int len; byte[] buffer = new byte[8 * 1024]; while ((len = content.read(buffer)) >= 0) { sGen.update(buffer, 0, len); } try (BCPGOutputStream bcpgOutputStream = new BCPGOutputStream(new ArmoredOutputStream(signature))) { sGen.generate().encode(bcpgOutputStream); } } catch (PGPException e) { throw new IllegalStateException(e); } }",data_integrity,data_integrity,True,,0.9904470443725586,0.009552954696118832
|
| 71 |
+
69,"public static DHGroups.Factory Group16SHA512AtSSH() { return new DHGroups.Factory(""diffie-hellman-group16-sha512@ssh.com"", P16, G, new SHA512.Factory()); }",data_integrity,data_integrity,True,,0.9907398223876953,0.009260201826691628
|
| 72 |
+
70,"public void pbkdf(byte[] password, byte[] salt, int rounds, byte[] output) { try { MessageDigest sha512 = MessageDigest.getInstance(""SHA-512""); int nblocks = (output.length + 31) / 32; byte[] hpass = sha512.digest(password); byte[] hsalt = new byte[64]; byte[] block_b = new byte[4]; byte[] out = new byte[32];",data_integrity,data_integrity,True,,0.9908785223960876,0.009121539071202278
|
| 73 |
+
71,"TrackingUriBuilder appendSignature(String key) { if (key == null) throw new IllegalArgumentException(""Key cannot be null""); if (key.isEmpty()) throw new IllegalArgumentException(""Key cannot be empty""); try { Mac mac = Mac.getInstance(""HmacSHA512""); SecretKeySpec secret_key = new SecretKeySpec(Base64.decodeBase64(key), ""HmacSHA512""); mac.init(secret_key); byte[] buffer = builder.toString().getBytes(StandardCharsets.US_ASCII); byte[] signatureBytes = mac.doFinal(buffer); builder.append(""&Signature=""); builder.append(encode(Base64.encodeBase64String(signatureBytes))); } catch (IllegalStateException | InvalidKeyException | NoSuchAlgorithmException e) { throw new RuntimeException(e); } return this; }",data_integrity,data_integrity,True,,0.9908506274223328,0.009149374440312386
|
| 74 |
+
72,"long counter = buf.readUInt32(); byte[] signedData = buildSignedData(flags, counter, sha256(sshData.toByteArray())); signature.update(signedData); return signature.verify(sshSignatureToDevice(sshRawSignature)); } catch (Buffer.BufferException | SignatureException e) { throw new SSHRuntimeException(e); } }",data_integrity,data_integrity,True,,0.9908624887466431,0.00913750659674406
|
| 75 |
+
73,".putBuffer(req) .getCompactData(); byte[] signature; try { signature = agent.sign(identity.getKeyBlob(), dataToSign, agentSignFlags()); } catch (IOException e) { throw new UserAuthException(""SSH agent failed to sign for "" + identity, e); }",data_integrity,data_integrity,True,,0.9906587600708008,0.009341198019683361
|
| 76 |
+
74,"} byte[] challenge = sha256(sshData.toByteArray()); SecurityKeySignatureData data; try { data = signer.sign(new SecurityKeySigningRequest(signingKey.getKeyTypeName(), application, signingKey.getKeyHandle(), challenge, signingKey.getFlags())); } catch (IOException e) { throw new SSHRuntimeException(""Security key signing failed"", e); }",data_integrity,data_integrity,True,,0.9908922910690308,0.009107709862291813
|
| 77 |
+
75,"public static synchronized Signature getSignature(String algorithm) throws NoSuchAlgorithmException, NoSuchProviderException { register(); if (getSecurityProvider() == null) return Signature.getInstance(algorithm); else return Signature.getInstance(algorithm, getSecurityProvider()); }",data_integrity,data_integrity,True,,0.9908599853515625,0.009139994159340858
|
| 78 |
+
76,"@Override public boolean verify(byte[] sig) { try { return signature.verify(extractSig(sig, ""ssh-ed25519"")); } catch (SignatureException e) { throw new SSHRuntimeException(e); } }",data_integrity,data_integrity,True,,0.9907740950584412,0.009225831367075443
|
data_integrity_codebert_v3/history.json
ADDED
|
@@ -0,0 +1,298 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"epoch": 1,
|
| 4 |
+
"train_loss": 0.4160701681204416,
|
| 5 |
+
"loss": 0.07670486811548471,
|
| 6 |
+
"accuracy": 0.974025974025974,
|
| 7 |
+
"macro_f1": 0.9703846153846154,
|
| 8 |
+
"labels": [
|
| 9 |
+
"data_integrity",
|
| 10 |
+
"unrelated"
|
| 11 |
+
],
|
| 12 |
+
"precision": [
|
| 13 |
+
0.96,
|
| 14 |
+
0.9807692307692307
|
| 15 |
+
],
|
| 16 |
+
"recall": [
|
| 17 |
+
0.96,
|
| 18 |
+
0.9807692307692307
|
| 19 |
+
],
|
| 20 |
+
"f1": [
|
| 21 |
+
0.96,
|
| 22 |
+
0.9807692307692307
|
| 23 |
+
],
|
| 24 |
+
"support": [
|
| 25 |
+
25,
|
| 26 |
+
52
|
| 27 |
+
],
|
| 28 |
+
"confusion_matrix": [
|
| 29 |
+
[
|
| 30 |
+
24,
|
| 31 |
+
1
|
| 32 |
+
],
|
| 33 |
+
[
|
| 34 |
+
1,
|
| 35 |
+
51
|
| 36 |
+
]
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"epoch": 2,
|
| 41 |
+
"train_loss": 0.10031109831847802,
|
| 42 |
+
"loss": 0.08122180355712771,
|
| 43 |
+
"accuracy": 0.987012987012987,
|
| 44 |
+
"macro_f1": 0.9850340136054422,
|
| 45 |
+
"labels": [
|
| 46 |
+
"data_integrity",
|
| 47 |
+
"unrelated"
|
| 48 |
+
],
|
| 49 |
+
"precision": [
|
| 50 |
+
1.0,
|
| 51 |
+
0.9811320754716981
|
| 52 |
+
],
|
| 53 |
+
"recall": [
|
| 54 |
+
0.96,
|
| 55 |
+
1.0
|
| 56 |
+
],
|
| 57 |
+
"f1": [
|
| 58 |
+
0.9795918367346939,
|
| 59 |
+
0.9904761904761905
|
| 60 |
+
],
|
| 61 |
+
"support": [
|
| 62 |
+
25,
|
| 63 |
+
52
|
| 64 |
+
],
|
| 65 |
+
"confusion_matrix": [
|
| 66 |
+
[
|
| 67 |
+
24,
|
| 68 |
+
1
|
| 69 |
+
],
|
| 70 |
+
[
|
| 71 |
+
0,
|
| 72 |
+
52
|
| 73 |
+
]
|
| 74 |
+
]
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"epoch": 3,
|
| 78 |
+
"train_loss": 0.033729699836112556,
|
| 79 |
+
"loss": 0.09017910825205036,
|
| 80 |
+
"accuracy": 0.987012987012987,
|
| 81 |
+
"macro_f1": 0.9850340136054422,
|
| 82 |
+
"labels": [
|
| 83 |
+
"data_integrity",
|
| 84 |
+
"unrelated"
|
| 85 |
+
],
|
| 86 |
+
"precision": [
|
| 87 |
+
1.0,
|
| 88 |
+
0.9811320754716981
|
| 89 |
+
],
|
| 90 |
+
"recall": [
|
| 91 |
+
0.96,
|
| 92 |
+
1.0
|
| 93 |
+
],
|
| 94 |
+
"f1": [
|
| 95 |
+
0.9795918367346939,
|
| 96 |
+
0.9904761904761905
|
| 97 |
+
],
|
| 98 |
+
"support": [
|
| 99 |
+
25,
|
| 100 |
+
52
|
| 101 |
+
],
|
| 102 |
+
"confusion_matrix": [
|
| 103 |
+
[
|
| 104 |
+
24,
|
| 105 |
+
1
|
| 106 |
+
],
|
| 107 |
+
[
|
| 108 |
+
0,
|
| 109 |
+
52
|
| 110 |
+
]
|
| 111 |
+
]
|
| 112 |
+
},
|
| 113 |
+
{
|
| 114 |
+
"epoch": 4,
|
| 115 |
+
"train_loss": 0.01670091115110726,
|
| 116 |
+
"loss": 0.09252728464198298,
|
| 117 |
+
"accuracy": 0.987012987012987,
|
| 118 |
+
"macro_f1": 0.9850340136054422,
|
| 119 |
+
"labels": [
|
| 120 |
+
"data_integrity",
|
| 121 |
+
"unrelated"
|
| 122 |
+
],
|
| 123 |
+
"precision": [
|
| 124 |
+
1.0,
|
| 125 |
+
0.9811320754716981
|
| 126 |
+
],
|
| 127 |
+
"recall": [
|
| 128 |
+
0.96,
|
| 129 |
+
1.0
|
| 130 |
+
],
|
| 131 |
+
"f1": [
|
| 132 |
+
0.9795918367346939,
|
| 133 |
+
0.9904761904761905
|
| 134 |
+
],
|
| 135 |
+
"support": [
|
| 136 |
+
25,
|
| 137 |
+
52
|
| 138 |
+
],
|
| 139 |
+
"confusion_matrix": [
|
| 140 |
+
[
|
| 141 |
+
24,
|
| 142 |
+
1
|
| 143 |
+
],
|
| 144 |
+
[
|
| 145 |
+
0,
|
| 146 |
+
52
|
| 147 |
+
]
|
| 148 |
+
]
|
| 149 |
+
},
|
| 150 |
+
{
|
| 151 |
+
"epoch": 5,
|
| 152 |
+
"train_loss": 0.015482629432894841,
|
| 153 |
+
"loss": 0.10427502604143228,
|
| 154 |
+
"accuracy": 0.987012987012987,
|
| 155 |
+
"macro_f1": 0.9850340136054422,
|
| 156 |
+
"labels": [
|
| 157 |
+
"data_integrity",
|
| 158 |
+
"unrelated"
|
| 159 |
+
],
|
| 160 |
+
"precision": [
|
| 161 |
+
1.0,
|
| 162 |
+
0.9811320754716981
|
| 163 |
+
],
|
| 164 |
+
"recall": [
|
| 165 |
+
0.96,
|
| 166 |
+
1.0
|
| 167 |
+
],
|
| 168 |
+
"f1": [
|
| 169 |
+
0.9795918367346939,
|
| 170 |
+
0.9904761904761905
|
| 171 |
+
],
|
| 172 |
+
"support": [
|
| 173 |
+
25,
|
| 174 |
+
52
|
| 175 |
+
],
|
| 176 |
+
"confusion_matrix": [
|
| 177 |
+
[
|
| 178 |
+
24,
|
| 179 |
+
1
|
| 180 |
+
],
|
| 181 |
+
[
|
| 182 |
+
0,
|
| 183 |
+
52
|
| 184 |
+
]
|
| 185 |
+
]
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"epoch": 6,
|
| 189 |
+
"train_loss": 0.0029058594855962804,
|
| 190 |
+
"loss": 0.11769723997422261,
|
| 191 |
+
"accuracy": 0.974025974025974,
|
| 192 |
+
"macro_f1": 0.9697327044025157,
|
| 193 |
+
"labels": [
|
| 194 |
+
"data_integrity",
|
| 195 |
+
"unrelated"
|
| 196 |
+
],
|
| 197 |
+
"precision": [
|
| 198 |
+
1.0,
|
| 199 |
+
0.9629629629629629
|
| 200 |
+
],
|
| 201 |
+
"recall": [
|
| 202 |
+
0.92,
|
| 203 |
+
1.0
|
| 204 |
+
],
|
| 205 |
+
"f1": [
|
| 206 |
+
0.9583333333333334,
|
| 207 |
+
0.9811320754716981
|
| 208 |
+
],
|
| 209 |
+
"support": [
|
| 210 |
+
25,
|
| 211 |
+
52
|
| 212 |
+
],
|
| 213 |
+
"confusion_matrix": [
|
| 214 |
+
[
|
| 215 |
+
23,
|
| 216 |
+
2
|
| 217 |
+
],
|
| 218 |
+
[
|
| 219 |
+
0,
|
| 220 |
+
52
|
| 221 |
+
]
|
| 222 |
+
]
|
| 223 |
+
},
|
| 224 |
+
{
|
| 225 |
+
"epoch": 7,
|
| 226 |
+
"train_loss": 0.00315203042442186,
|
| 227 |
+
"loss": 0.09767430892243283,
|
| 228 |
+
"accuracy": 0.987012987012987,
|
| 229 |
+
"macro_f1": 0.9850340136054422,
|
| 230 |
+
"labels": [
|
| 231 |
+
"data_integrity",
|
| 232 |
+
"unrelated"
|
| 233 |
+
],
|
| 234 |
+
"precision": [
|
| 235 |
+
1.0,
|
| 236 |
+
0.9811320754716981
|
| 237 |
+
],
|
| 238 |
+
"recall": [
|
| 239 |
+
0.96,
|
| 240 |
+
1.0
|
| 241 |
+
],
|
| 242 |
+
"f1": [
|
| 243 |
+
0.9795918367346939,
|
| 244 |
+
0.9904761904761905
|
| 245 |
+
],
|
| 246 |
+
"support": [
|
| 247 |
+
25,
|
| 248 |
+
52
|
| 249 |
+
],
|
| 250 |
+
"confusion_matrix": [
|
| 251 |
+
[
|
| 252 |
+
24,
|
| 253 |
+
1
|
| 254 |
+
],
|
| 255 |
+
[
|
| 256 |
+
0,
|
| 257 |
+
52
|
| 258 |
+
]
|
| 259 |
+
]
|
| 260 |
+
},
|
| 261 |
+
{
|
| 262 |
+
"epoch": 8,
|
| 263 |
+
"train_loss": 0.0027518439020409627,
|
| 264 |
+
"loss": 0.0981872390882927,
|
| 265 |
+
"accuracy": 0.987012987012987,
|
| 266 |
+
"macro_f1": 0.9850340136054422,
|
| 267 |
+
"labels": [
|
| 268 |
+
"data_integrity",
|
| 269 |
+
"unrelated"
|
| 270 |
+
],
|
| 271 |
+
"precision": [
|
| 272 |
+
1.0,
|
| 273 |
+
0.9811320754716981
|
| 274 |
+
],
|
| 275 |
+
"recall": [
|
| 276 |
+
0.96,
|
| 277 |
+
1.0
|
| 278 |
+
],
|
| 279 |
+
"f1": [
|
| 280 |
+
0.9795918367346939,
|
| 281 |
+
0.9904761904761905
|
| 282 |
+
],
|
| 283 |
+
"support": [
|
| 284 |
+
25,
|
| 285 |
+
52
|
| 286 |
+
],
|
| 287 |
+
"confusion_matrix": [
|
| 288 |
+
[
|
| 289 |
+
24,
|
| 290 |
+
1
|
| 291 |
+
],
|
| 292 |
+
[
|
| 293 |
+
0,
|
| 294 |
+
52
|
| 295 |
+
]
|
| 296 |
+
]
|
| 297 |
+
}
|
| 298 |
+
]
|
data_integrity_codebert_v3/test_errors.csv
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_index,text,true_label,predicted_label,correct,error_type,probability_data_integrity,probability_unrelated
|
| 2 |
+
66,"public static final NavigableMap<String, OptionalFeature> DEFAULT_SUPPORTED_CLIENT_EXTENSIONS = NavigableMapBuilder.<String, OptionalFeature> builder() .put(SftpConstants.EXT_VERSION_SELECT, OptionalFeature.TRUE) .put(SftpConstants.EXT_COPY_FILE, OptionalFeature.TRUE) .put(SftpConstants.EXT_MD5_HASH, BuiltinDigests.md5) .put(SftpConstants.EXT_MD5_HASH_HANDLE, BuiltinDigests.md5) .put(SftpConstants.EXT_CHECK_FILE_HANDLE, OptionalFeature.any(BuiltinDigests.VALUES)) .put(SftpConstants.EXT_CHECK_FILE_NAME, OptionalFeature.any(BuiltinDigests.VALUES)) .put(SftpConstants.EXT_COPY_DATA, OptionalFeature.TRUE) .put(SftpConstants.EXT_SPACE_AVAILABLE, OptionalFeature.TRUE) .immutable();",data_integrity,unrelated,False,true_data_integrity_predicted_unrelated,0.005573483649641275,0.9944264888763428
|
data_integrity_codebert_v3/test_metrics.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"loss": 0.05842081295290532,
|
| 3 |
+
"accuracy": 0.9903846153846154,
|
| 4 |
+
"macro_f1": 0.990052606408417,
|
| 5 |
+
"labels": [
|
| 6 |
+
"data_integrity",
|
| 7 |
+
"unrelated"
|
| 8 |
+
],
|
| 9 |
+
"precision": [
|
| 10 |
+
1.0,
|
| 11 |
+
0.9838709677419355
|
| 12 |
+
],
|
| 13 |
+
"recall": [
|
| 14 |
+
0.9767441860465116,
|
| 15 |
+
1.0
|
| 16 |
+
],
|
| 17 |
+
"f1": [
|
| 18 |
+
0.9882352941176471,
|
| 19 |
+
0.991869918699187
|
| 20 |
+
],
|
| 21 |
+
"support": [
|
| 22 |
+
43,
|
| 23 |
+
61
|
| 24 |
+
],
|
| 25 |
+
"confusion_matrix": [
|
| 26 |
+
[
|
| 27 |
+
42,
|
| 28 |
+
1
|
| 29 |
+
],
|
| 30 |
+
[
|
| 31 |
+
0,
|
| 32 |
+
61
|
| 33 |
+
]
|
| 34 |
+
],
|
| 35 |
+
"classification_report": " precision recall f1-score support\n\ndata_integrity 1.00 0.98 0.99 43\n unrelated 0.98 1.00 0.99 61\n\n accuracy 0.99 104\n macro avg 0.99 0.99 0.99 104\n weighted avg 0.99 0.99 0.99 104\n"
|
| 36 |
+
}
|
data_integrity_codebert_v3/test_predictions.csv
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset_index,text,true_label,predicted_label,correct,error_type,probability_data_integrity,probability_unrelated
|
| 2 |
+
0,"@Override public String toString() { return ""Hashing.crc32c()""; }",unrelated,unrelated,True,,0.007277349475771189,0.9927226901054382
|
| 3 |
+
1,@J2ktIncompatible public static HashFunction crc32c() { return Crc32CSupplier.HASH_FUNCTION; },data_integrity,data_integrity,True,,0.990380048751831,0.009619913063943386
|
| 4 |
+
2,public static final Set<String> ALL_PARAMS = new HashSet<>();,unrelated,unrelated,True,,0.002923418302088976,0.9970766305923462
|
| 5 |
+
3,"public static MutableBasicCredentials parseCredentials(String userInfo) { if (GenericUtils.isEmpty(userInfo)) { return null; } int pos = userInfo.indexOf(':'); if (pos < 0) { return new BasicCredentialsImpl(userInfo, null); } return new BasicCredentialsImpl(userInfo.substring(0, pos), userInfo.substring(pos + 1)); }",unrelated,unrelated,True,,0.09326852113008499,0.9067314863204956
|
| 6 |
+
4,"public HttpsToken(SPConstants.SPVersion version, SPConstants.IncludeTokenType includeTokenType, Element issuer, String issuerName, Element claims, Policy nestedPolicy, boolean requireClientCert) { super(version, includeTokenType, issuer, issuerName, claims, nestedPolicy); parseNestedPolicy(nestedPolicy, this); if (requireClientCert) { setAuthenticationType(AuthenticationType.RequireClientCertificate); } }",unrelated,unrelated,True,,0.006910206750035286,0.9930898547172546
|
| 7 |
+
5,"private static int decodeFutureTimeToLive(Map<String, Object> config, boolean timestamp) { String tag = ConfigurationConstants.TTL_FUTURE_TIMESTAMP; if (!timestamp) { tag = ConfigurationConstants.TTL_FUTURE_USERNAMETOKEN; } String ttl = getString(tag, config); int defaultFutureTimeToLive = 60; if (ttl != null) { try { int ttlI = Integer.parseInt(ttl); if (ttlI < 0) { return defaultFutureTimeToLive; } return ttlI; } catch (NumberFormatException e) { return defaultFutureTimeToLive; } } return defaultFutureTimeToLive; }",unrelated,unrelated,True,,0.002408543135970831,0.997591495513916
|
| 8 |
+
6,"static AttributeRepository ofAttributesMap(Map<AttributeKey<?>, ?> attributes) { return new AttributeRepository() { @Override public int getAttributesCount() { return attributes.size(); } @Override @SuppressWarnings(""unchecked"") public <T> T getAttribute(AttributeKey<T> key) { Objects.requireNonNull(key, ""No key provided""); return MapEntryUtils.isEmpty(attributes) ? null : (T) attributes.get(key); } @Override public Collection<AttributeKey<?>> attributeKeys() { return MapEntryUtils.isEmpty(attributes) ? Collections.emptySet() : new HashSet<>(attributes.keySet()); } @Override public String toString() { return AttributeRepository.class.getSimpleName() + ""["" + attributes + ""]""; } }; }",unrelated,unrelated,True,,0.0021586890798062086,0.9978412389755249
|
| 9 |
+
7,"@Override public int hashCode() { return GenericUtils.hashCode(getCipherName(), Boolean.TRUE) + GenericUtils.hashCode(getCipherType(), Boolean.TRUE) + GenericUtils.hashCode(getCipherMode(), Boolean.TRUE) + Objects.hashCode(getPassword()) + Arrays.hashCode(getInitVector()); }",unrelated,unrelated,True,,0.003340651746839285,0.9966593980789185
|
| 10 |
+
8,"@Override public int hashCode() { return Objects.hash(numHashFunctions, funnel, strategy, bits); }",unrelated,unrelated,True,,0.0027586952783167362,0.9972412586212158
|
| 11 |
+
9,static int smearedHash(@Nullable Object o) { return smear((o == null) ? 0 : o.hashCode()); },unrelated,unrelated,True,,0.0021455816458910704,0.9978544116020203
|
| 12 |
+
10,@Override public int hashCode() { return map().hashCode(); },unrelated,unrelated,True,,0.0021943352185189724,0.997805655002594
|
| 13 |
+
11,@Override int hashCode();,unrelated,unrelated,True,,0.003080167341977358,0.9969198703765869
|
| 14 |
+
12,"attachmentInputStream.mark(Integer.MAX_VALUE); try { DigestOutputStream digestOutputStream = createMessageDigestOutputStream(referenceType, inputProcessorChain.getSecurityContext()); try (UnsyncBufferedOutputStream bufferedDigestOutputStream = new UnsyncBufferedOutputStream(digestOutputStream)) { if (referenceType.getTransforms() != null) { Transformer transformer = buildTransformerChain(referenceType, bufferedDigestOutputStream, inputProcessorChain, null); if (!(transformer instanceof AttachmentContentSignatureTransform)) {",data_integrity,data_integrity,True,,0.9904705286026001,0.009529508650302887
|
| 15 |
+
13,"inputStream.reset(); } catch (IOException | XMLStreamException e) { throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_SIGNATURE, e); } String calculatedDigest = XMLUtils.encodeToString(digestOutputStream.getDigestValue()); LOG.debug(""Calculated Digest: {}"", calculatedDigest); signaturePartDef.setDigestValue(calculatedDigest); Attachment resultAttachment = new Attachment();",data_integrity,data_integrity,True,,0.9905477166175842,0.009452269412577152
|
| 16 |
+
14,"protected int convertText(String text, Locale locale) { try { return Integer.parseInt(text); } catch (NumberFormatException ex) { throw new IllegalFieldValueException(getType(), text); } }",unrelated,unrelated,True,,0.002234802581369877,0.9977651834487915
|
| 17 |
+
15,"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.002342772437259555,0.9976571798324585
|
| 18 |
+
16,public void setMillis(ReadableInstant instant) { long instantMillis = DateTimeUtils.getInstantMillis(instant); setMillis(instantMillis); },unrelated,unrelated,True,,0.0023232067469507456,0.9976767897605896
|
| 19 |
+
17,"public void printTo(Appendable appendable, ReadablePartial partial, Locale locale) throws IOException { if (appendable instanceof StringBuffer) { StringBuffer buf = (StringBuffer) appendable; underlying.printTo(buf, partial, locale); } else if (appendable instanceof Writer) { Writer out = (Writer) appendable; underlying.printTo(out, partial, locale); } else { StringBuffer buf = new StringBuffer(estimatePrintedLength()); underlying.printTo(buf, partial, locale); appendable.append(buf); } }",unrelated,unrelated,True,,0.0021555793937295675,0.9978444576263428
|
| 20 |
+
18,"private GJChronology(Chronology base, JulianChronology julian, GregorianChronology gregorian, Instant cutoverInstant) { super(base, new Object[] {julian, gregorian, cutoverInstant}); }",unrelated,unrelated,True,,0.002202215138822794,0.9977978467941284
|
| 21 |
+
19,public boolean isGreaterThan(Seconds other) { if (other == null) { return getValue() > 0; } return getValue() > other.getValue(); },unrelated,unrelated,True,,0.002277321182191372,0.9977226853370667
|
| 22 |
+
20,"public static Hours hoursBetween(ReadableInstant start, ReadableInstant end) { int amount = BaseSingleFieldPeriod.between(start, end, DurationFieldType.hours()); return Hours.hours(amount); }",unrelated,unrelated,True,,0.0023199499119073153,0.997680127620697
|
| 23 |
+
21,"@Override public long set(long instant, int value) { FieldUtils.verifyValueBounds(this, value, getMinimumValue(), getMaximumValue()); return instant + (value - get(instant)) * iUnitMillis; }",unrelated,unrelated,True,,0.0022181894164532423,0.9977818131446838
|
| 24 |
+
22,@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.0022006670478731394,0.9977993369102478
|
| 25 |
+
23,"public static Years yearsBetween(ReadableInstant start, ReadableInstant end) { int amount = BaseSingleFieldPeriod.between(start, end, DurationFieldType.years()); return Years.years(amount); }",unrelated,unrelated,True,,0.002355491043999791,0.9976444840431213
|
| 26 |
+
24,"@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.0021986409556120634,0.9978013634681702
|
| 27 |
+
25,"BasicDayOfMonthDateTimeField(BasicChronology chronology, DurationField days) { super(DateTimeFieldType.dayOfMonth(), days); iChronology = chronology; }",unrelated,unrelated,True,,0.0021779912058264017,0.9978220462799072
|
| 28 |
+
26,"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.002582473447546363,0.9974175691604614
|
| 29 |
+
27,"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.0022385972552001476,0.9977613687515259
|
| 30 |
+
28,@Override public int getMinimumValue(ReadablePartial instant) { return getMinimumValue(); },unrelated,unrelated,True,,0.0022605289705097675,0.9977394342422485
|
| 31 |
+
29,"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.0023592475336045027,0.9976407289505005
|
| 32 |
+
30,"@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.002193389693275094,0.9978066086769104
|
| 33 |
+
31,public void setZone(DateTimeZone zone) { iSavedState = null; iZone = zone; },unrelated,unrelated,True,,0.0024884999729692936,0.9975115060806274
|
| 34 |
+
32,"public DateMidnight plusMonths(int months) { if (months == 0) { return this; } long instant = getChronology().months().add(getMillis(), months); return withMillis(instant); }",unrelated,unrelated,True,,0.0024116404820233583,0.9975883960723877
|
| 35 |
+
33,"@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.002135970164090395,0.9978640675544739
|
| 36 |
+
34,@Override public final DateTimeField clockhourOfDay() { return iClockhourOfDay; },unrelated,unrelated,True,,0.002280707936733961,0.9977192282676697
|
| 37 |
+
35,"@Override int getMonthOfYear(long millis, int year) { long monthZeroBased = (millis - getYearMillis(year)) / MILLIS_PER_MONTH; return ((int) monthZeroBased) + 1; }",unrelated,unrelated,True,,0.0022256646770983934,0.9977743029594421
|
| 38 |
+
36,"int getDayOfMonth(long millis, int year) { int month = getMonthOfYear(millis, year); return getDayOfMonth(millis, year, month); }",unrelated,unrelated,True,,0.0022911832202225924,0.997708797454834
|
| 39 |
+
37,public Hours toStandardHours() { long hours = getStandardHours(); return Hours.hours(FieldUtils.safeToInt(hours)); },unrelated,unrelated,True,,0.0021930839866399765,0.997806966304779
|
| 40 |
+
38,public boolean isGreaterThan(Weeks other) { if (other == null) { return getValue() > 0; } return getValue() > other.getValue(); },unrelated,unrelated,True,,0.002232571132481098,0.997767448425293
|
| 41 |
+
39,"public DateTime toDateTimeAtCurrentTime(DateTimeZone zone) { Chronology chrono = getChronology().withZone(zone); long instantMillis = DateTimeUtils.currentTimeMillis(); long resolved = chrono.set(this, instantMillis); return new DateTime(resolved, chrono); }",unrelated,unrelated,True,,0.002360341139137745,0.9976396560668945
|
| 42 |
+
40,"@Override protected void assemble(Fields fields) { if (getBase() == null) { super.assemble(fields); fields.year = new SkipDateTimeField(this, fields.year); fields.weekyear = new SkipDateTimeField(this, fields.weekyear); fields.era = ERA_FIELD; fields.monthOfYear = new BasicMonthOfYearDateTimeField(this, 13); fields.months = fields.monthOfYear.getDurationField(); } }",unrelated,unrelated,True,,0.0022245158907026052,0.9977754950523376
|
| 43 |
+
41,"@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.0022523272782564163,0.9977476000785828
|
| 44 |
+
42,"private static PeriodFormatter buildWordBased(Locale locale) { ResourceBundle b = ResourceBundle.getBundle(BUNDLE_NAME, locale); if (containsKey(b, ""PeriodFormat.regex.separator"")) { return buildRegExFormatter(b, locale); } else { return buildNonRegExFormatter(b, locale); } }",unrelated,unrelated,True,,0.002184422453865409,0.9978156089782715
|
| 45 |
+
43,public Seconds minus(Seconds seconds) { if (seconds == null) { return this; } return minus(seconds.getValue()); },unrelated,unrelated,True,,0.0023653903044760227,0.9976346492767334
|
| 46 |
+
44,"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.0024207341484725475,0.9975792765617371
|
| 47 |
+
45,@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.002194370608776808,0.997805655002594
|
| 48 |
+
46,"@Override public String toString() { String str = ""BuddhistChronology""; DateTimeZone zone = getZone(); if (zone != null) { str = str + '[' + zone.getID() + ']'; } return str; }",unrelated,unrelated,True,,0.0025719685945659876,0.9974279999732971
|
| 49 |
+
47,"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.0022845950443297625,0.9977154731750488
|
| 50 |
+
48,"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.002150649670511484,0.9978493452072144
|
| 51 |
+
49,@Override public long roundHalfFloor(long instant) { return getWrappedField().roundHalfFloor(instant); },unrelated,unrelated,True,,0.002232940634712577,0.9977670907974243
|
| 52 |
+
50,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.0022643008269369602,0.9977357387542725
|
| 53 |
+
51,@Override public int hashCode() { int hash = iHash; if (hash == 0) { hash = iHash = super.hashCode(); } return hash; },unrelated,unrelated,True,,0.003508147783577442,0.9964918494224548
|
| 54 |
+
52,"public void printTo(StringBuffer buf, long instant) { try { printTo((Appendable) buf, instant); } catch (IOException ex) { } }",unrelated,unrelated,True,,0.0022212122566998005,0.9977788329124451
|
| 55 |
+
53,"@Override public long set(ReadablePartial partial, long instant) { for (int i = 0, isize = partial.size(); i < isize; i++) { instant = partial.getFieldType(i).getField(this).set(instant, partial.getValue(i)); } return instant; }",unrelated,unrelated,True,,0.0021992726251482964,0.9978006482124329
|
| 56 |
+
54,"protected LenientDateTimeField(DateTimeField field, Chronology base) { super(field); iBase = base; }",unrelated,unrelated,True,,0.002186538651585579,0.9978134632110596
|
| 57 |
+
55,"public static synchronized UnsupportedDurationField getInstance(DurationFieldType type) { UnsupportedDurationField field; if (cCache == null) { cCache = new HashMap<DurationFieldType, UnsupportedDurationField>(7); field = null; } else { field = cCache.get(type); } if (field == null) { field = new UnsupportedDurationField(type); cCache.put(type, field); } return field; }",unrelated,unrelated,True,,0.002105767372995615,0.9978942275047302
|
| 58 |
+
56,"BasicDayOfYearDateTimeField(BasicChronology chronology, DurationField days) { super(DateTimeFieldType.dayOfYear(), days); iChronology = chronology; }",unrelated,unrelated,True,,0.0022109360434114933,0.9977890253067017
|
| 59 |
+
57,"@Override public long add(long instant, int years) { if (years == 0) { return instant; } return set(instant, get(instant) + years); }",unrelated,unrelated,True,,0.0022524900268763304,0.9977474808692932
|
| 60 |
+
58,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.0024239986669272184,0.9975760579109192
|
| 61 |
+
59,"public void printTo(StringBuilder buf, ReadablePartial partial) { try { printTo((Appendable) buf, partial); } catch (IOException ex) { } }",unrelated,unrelated,True,,0.0022287247702479362,0.9977712631225586
|
| 62 |
+
60,public boolean isGreaterThan(Minutes other) { if (other == null) { return getValue() > 0; } return getValue() > other.getValue(); },unrelated,unrelated,True,,0.0022809260990470648,0.9977189898490906
|
| 63 |
+
61,"@Override long getTotalMillisByYearMonth(int year, int month) { if (--month % 2 == 1) { month /= 2; return month * MILLIS_PER_MONTH_PAIR + MILLIS_PER_LONG_MONTH; } else { month /= 2; return month * MILLIS_PER_MONTH_PAIR; } }",unrelated,unrelated,True,,0.002308162860572338,0.9976918697357178
|
| 64 |
+
62,"public Duration dividedBy(long divisor) { if (divisor == 1) { return this; } return new Duration(FieldUtils.safeDivide(getMillis(), divisor)); }",unrelated,unrelated,True,,0.0024144931230694056,0.9975855350494385
|
| 65 |
+
63,"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.0021051194053143263,0.9978949427604675
|
| 66 |
+
64,"private static Mac getMac(String algorithmName, Key key) { try { Mac mac = Mac.getInstance(algorithmName); mac.init(key); return mac; } catch (NoSuchAlgorithmException e) { throw new IllegalStateException(e); } catch (InvalidKeyException e) { throw new IllegalArgumentException(e);",data_integrity,data_integrity,True,,0.9907791614532471,0.009220803156495094
|
| 67 |
+
65,"@Override public byte[] createKey(byte[] secret, byte[] seed, int offset, long length) throws WSSecurityException { try { Mac mac = Mac.getInstance(""HmacSHA1""); byte[] tempBytes = pHash(secret, seed, mac, offset + (int) length); byte[] key = new byte[(int) length]; System.arraycopy(tempBytes, offset, key, 0, key.length);",data_integrity,data_integrity,True,,0.9907183051109314,0.009281715378165245
|
| 68 |
+
66,"public static final NavigableMap<String, OptionalFeature> DEFAULT_SUPPORTED_CLIENT_EXTENSIONS = NavigableMapBuilder.<String, OptionalFeature> builder() .put(SftpConstants.EXT_VERSION_SELECT, OptionalFeature.TRUE) .put(SftpConstants.EXT_COPY_FILE, OptionalFeature.TRUE) .put(SftpConstants.EXT_MD5_HASH, BuiltinDigests.md5) .put(SftpConstants.EXT_MD5_HASH_HANDLE, BuiltinDigests.md5) .put(SftpConstants.EXT_CHECK_FILE_HANDLE, OptionalFeature.any(BuiltinDigests.VALUES)) .put(SftpConstants.EXT_CHECK_FILE_NAME, OptionalFeature.any(BuiltinDigests.VALUES)) .put(SftpConstants.EXT_COPY_DATA, OptionalFeature.TRUE) .put(SftpConstants.EXT_SPACE_AVAILABLE, OptionalFeature.TRUE) .immutable();",data_integrity,unrelated,False,true_data_integrity_predicted_unrelated,0.005573483649641275,0.9944264888763428
|
| 69 |
+
67,"name = ""path_md5_sum"", doc = ""Return the md5 hash of a file at a checkout path. Do not use unless working with legacy"" + "" systems that require MD5.\n"" + ""WARNING: do not use unless working with legacy systems that require MD5"", parameters = {@Param(name = ""path"", doc = ""checkout path pointing to a file to be hashed"")}) public String pathMd5Sum(CheckoutPath path) throws IOException { @SuppressWarnings(""deprecation"") HashFunction hashFunc = Hashing.md5(); return hashFile(path.fullPath(), hashFunc); }",data_integrity,data_integrity,True,,0.9897174835205078,0.010282525792717934
|
| 70 |
+
68,"throws Exception { ValidateUtils.checkTrue(startOffset >= 0L, ""Invalid start offset: %d"", startOffset); ValidateUtils.checkTrue(length > 0L, ""Invalid length: %d"", length); if (!BuiltinDigests.md5.isSupported()) { throw new UnsupportedOperationException(BuiltinDigests.md5.getAlgorithm() + "" hash not supported""); } Digest digest = BuiltinDigests.md5.create(); digest.init(); long effectiveLength = length; byte[] digestBuf = new byte[(int) Math.min(effectiveLength, SftpConstants.MD5_QUICK_HASH_SIZE)]; ByteBuffer wb = ByteBuffer.wrap(digestBuf); boolean hashMatches = false; byte[] hashValue = null; SftpFileSystemAccessor accessor = getFileSystemAccessor(); boolean traceEnabled = log.isTraceEnabled(); ServerSession session = getServerSession(); try (SeekableByteChannel channel = accessor.openFile( this, null, path, null, Collections.emptySet())) { channel.position(startOffset); if (NumberUtils.length(quickCheckHash) <= 0) { hashMatches = true; } else {",data_integrity,data_integrity,True,,0.990635335445404,0.009364640340209007
|
| 71 |
+
69,"public static String hashIdentity(ToStringHelper helper, String workflowIdentityUser) { helper.add( ""user"", workflowIdentityUser != null ? workflowIdentityUser : StandardSystemProperty.USER_NAME.value()); String identity = helper.toString(); String hash = BaseEncoding.base16() .encode(Hashing.md5().hashString(identity, StandardCharsets.UTF_8).asBytes()); logger.atInfo().log(""Computed migration identity hash for %s as %s "", identity, hash); return hash; }",data_integrity,data_integrity,True,,0.9896037578582764,0.010396269150078297
|
| 72 |
+
70,"public ChecksumObserver() throws NoSuchAlgorithmException { this(""MD5""); }",data_integrity,data_integrity,True,,0.9906436800956726,0.00935638602823019
|
| 73 |
+
71,"throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_AUTHENTICATION); } byte[] origPasswordBytes = pwCb.getPassword().getBytes(StandardCharsets.UTF_8); byte[] passwordBytes = passwordType.getValue().getBytes(StandardCharsets.UTF_8); if (!MessageDigest.isEqual(origPasswordBytes, passwordBytes)) { throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_AUTHENTICATION); } passwordType.setValue(pwCb.getPassword()); }",data_integrity,data_integrity,True,,0.9906529188156128,0.009347140789031982
|
| 74 |
+
72,"public void pbkdf(byte[] password, byte[] salt, int rounds, byte[] output) { try { MessageDigest sha512 = MessageDigest.getInstance(""SHA-512""); int nblocks = (output.length + 31) / 32; byte[] hpass = sha512.digest(password); byte[] hsalt = new byte[64]; byte[] block_b = new byte[4];",data_integrity,data_integrity,True,,0.9908772110939026,0.009122835472226143
|
| 75 |
+
73,"if (pwCb.getPassword() == null) { throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_AUTHENTICATION); } byte[] passDigest = UsernameTokenUtil.doRawPasswordDigest(nonceVal, created, pwCb.getPassword().getBytes(StandardCharsets.UTF_8)); byte[] decodedPassword = XMLUtils.decode(passwordType.getValue()); if (!MessageDigest.isEqual(decodedPassword, passDigest)) { throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_AUTHENTICATION); } passwordType.setValue(pwCb.getPassword());",data_integrity,data_integrity,True,,0.9908226728439331,0.00917732808738947
|
| 76 |
+
74,"@J2ktIncompatible public static HashFunction hmacSha256(byte[] key) { return hmacSha256(new SecretKeySpec(checkNotNull(key), ""HmacSHA256"")); }",data_integrity,data_integrity,True,,0.9910263419151306,0.008973641321063042
|
| 77 |
+
75,default HashFunction getHashFunction() { return Hashing.sha256(); },data_integrity,data_integrity,True,,0.9908917546272278,0.009108247235417366
|
| 78 |
+
76,"} ByteArrayBuffer encoded = new ByteArrayBuffer(); encoded.putString(getSignatureKeyType()); encoded.putBytes(rawSig); MessageDigest md = SecurityUtils.getMessageDigest(""SHA-256""); byte[] appNameDigest = md.digest(publicKey.getAppName().getBytes(StandardCharsets.UTF_8)); byte[] challengeDigest = this.challengeDigest.digest(); ByteArrayBuffer counterData = new ByteArrayBuffer(Integer.BYTES, false); counterData.putUInt(counter); Signature delegate = getDelegateSignature(); delegate.initVerifier(session, publicKey.getDelegatePublicKey()); delegate.update(session, appNameDigest); delegate.update(session, new byte[] { flags }); delegate.update(session, counterData.getCompactData()); delegate.update(session, challengeDigest); return delegate.verify(session, encoded.getCompactData()); }",data_integrity,data_integrity,True,,0.9909204244613647,0.009079553186893463
|
| 79 |
+
77,"parameters = {@Param(name = ""path"", doc = ""checkout path pointing to a file to be hashed"")}) public String pathSha256Sum(CheckoutPath path) throws IOException { return hashFile(path.fullPath(), Hashing.sha256()); }",data_integrity,data_integrity,True,,0.9896296858787537,0.010370300151407719
|
| 80 |
+
78,"}) public String hashStringWithSha256(Object input) throws ValidationException, EvalException { if (input instanceof String) { return Hashing.sha256().hashString((String) input, UTF_8).toString(); } List<String> stringInputs = convertStringList(input, ""input""); Hasher hasher = Hashing.sha256().newHasher(); if (stringInputs.isEmpty()) { throw new ValidationException( ""hashing.hash_str_with_sha256 cannot be called with an empty object list.""); } for (String stringInput : stringInputs) { hasher.putString(stringInput, UTF_8); } return hasher.hash().toString(); }",data_integrity,data_integrity,True,,0.99016934633255,0.009830608032643795
|
| 81 |
+
79,"nistp384(Constants.NISTP384, ""secp384r1"", new int[] { 1, 3, 132, 0, 34 }, 48, BuiltinDigests.sha384), nistp521(Constants.NISTP521, ""secp521r1"", new int[] { 1, 3, 132, 0, 35 }, 66, BuiltinDigests.sha512); public static final Set<ECCurves> VALUES = Collections.unmodifiableSet(EnumSet.allOf(ECCurves.class)); public static final NavigableSet<String> NAMES = Collections.unmodifiableNavigableSet( GenericUtils.mapSort(VALUES, ECCurves::getName, String.CASE_INSENSITIVE_ORDER));",data_integrity,data_integrity,True,,0.776800811290741,0.2231992483139038
|
| 82 |
+
80,"} verif.initSigner(session, kp.getPrivate()); verif.update(session, data); byte[] signature = verif.sign(session); return new SimpleImmutableEntry<>(factory.getName(), signature); } catch (IOException e) { throw e; } catch (Exception e) {",data_integrity,data_integrity,True,,0.990778923034668,0.00922109093517065
|
| 83 |
+
81,"NamedFactory.create(session.getSignatureFactories(), keyAlg), ""No verifier located for algorithm=%s"", keyAlg); verif.initVerifier(session, serverKey); verif.update(session, h); if (!verif.verify(session, sig)) { throw new SshException(SshConstants.SSH2_DISCONNECT_KEY_EXCHANGE_FAILED, ""KeyExchange signature verification failed for key type="" + keyAlg); } session.setServerKey(serverKey);",data_integrity,data_integrity,True,,0.99072265625,0.009277322329580784
|
| 84 |
+
82,"ValidateUtils.checkNotNull(verifier, ""No signer could be located for key type=%s"", algo); verifier.initSigner(session, pair.getPrivate()); verifier.update(session, data); byte[] signature = verifier.sign(session); return new SimpleImmutableEntry<>(factory.getName(), signature); }",data_integrity,data_integrity,True,,0.9908650517463684,0.009134969674050808
|
| 85 |
+
83,getWsDocInfo().setCallbackLookup(callbackLookup); getWsDocInfo().setTokensOnContext((DOMSignContext)signContext); sig.sign(signContext); signatureValue = sig.getSignatureValue().getValue(); cleanup();,data_integrity,data_integrity,True,,0.9908913969993591,0.00910861324518919
|
| 86 |
+
84,"""No CA verifier located for algorithm=%s of key ID=%s"", sigAlg, keyId); verif.initVerifier(session, signatureKey); verif.update(session, cert.getMessage()); if (!verif.verify(session, cert.getSignature())) { throw new CertificateException(""CA signature verification failed for key type="" + keyAlg + "" of key ID="" + keyId); } }",data_integrity,data_integrity,True,,0.9908522963523865,0.009147700853645802
|
| 87 |
+
85,"wsDocInfo.setTokensOnContext((DOMSignContext)signContext); sig.sign(signContext); signatureValue = sig.getSignatureValue().getValue(); } catch (Exception ex) { LOG.error(ex.getMessage(), ex);",data_integrity,data_integrity,True,,0.9909118413925171,0.009088099002838135
|
| 88 |
+
86,"bs.putString(clientHostname); bs.putString(clientUsername); verifier.update(session, bs.array(), bs.rpos(), bs.available()); byte[] signature = verifier.sign(session); if (log.isTraceEnabled()) { log.trace(""appendSignature({})[{}][{}] type={}, fingerprint={}, client={}@{}: signature={}"", session, service, name, keyType, KeyUtils.getFingerPrint(key), clientUsername, clientHostname, BufferUtils.toHex(signature));",data_integrity,data_integrity,True,,0.9907386302947998,0.009261347353458405
|
| 89 |
+
87,"throw new IllegalArgumentException(""SSH2_AGENTC_SIGN_REQUEST: Unknown flag value 0x"" + Integer.toHexString(flags) + "", only 0, 2, or 4 are allowed.""); } } Map.Entry<String, byte[]> result = agent.sign(null, signingKey, signatureAlgorithm, data); String algo = result.getKey(); byte[] signature = result.getValue(); Buffer sig = new ByteArrayBuffer(algo.length() + signature.length + Long.SIZE, false); sig.putString(algo);",data_integrity,data_integrity,True,,0.9906430840492249,0.009356965310871601
|
| 90 |
+
88,"public void verifySignature( SAMLKeyInfoProcessor keyInfoProcessor, Crypto sigCrypto ) throws WSSecurityException { Signature sig = getSignature(); if (sig != null) {",data_integrity,data_integrity,True,,0.9907456636428833,0.009254319593310356
|
| 91 |
+
89,@Override public byte[] sign(SessionContext session) throws Exception { byte[] sig = super.sign(session); try (DERParser parser = new DERParser(sig)) { int type = parser.read(); if (type != 0x30) {,data_integrity,data_integrity,True,,0.9906637668609619,0.009336248971521854
|
| 92 |
+
90,"verifier.initVerifier(session, verifyKey); buffer.rpos(oldPos); buffer.wpos(oldPos + 4 + len); if (!verifySignature(session, username, alg, key, buffer, verifier, sig)) { throw new SignatureException(""Key verification failed""); } if (debugEnabled) {",data_integrity,data_integrity,True,,0.9908595681190491,0.009140482172369957
|
| 93 |
+
91,"public void initSigner(SessionContext session, PrivateKey key) throws Exception { String algo = getAlgorithm(); signatureInstance = Objects.requireNonNull( doInitSignature(session, algo, key, true), ""No signature instance create""); signatureInstance.initSign(Objects.requireNonNull(key, ""No private key provided"")); }",data_integrity,data_integrity,True,,0.9905527830123901,0.009447207674384117
|
| 94 |
+
92,algorithmSuiteValidator.checkAsymmetricKeyLength(key); } } samlAssertion.verifySignature(samlKeyInfo); return xmlSignature; },data_integrity,data_integrity,True,,0.9909982681274414,0.00900171510875225
|
| 95 |
+
93,"byte[] contents = bs.getCompactData(); byte[] sig; try { Map.Entry<String, byte[]> result = current.sign(session, algo, contents); String factoryName = result.getKey(); ValidateUtils.checkState(algo.equalsIgnoreCase(factoryName), ""Mismatched signature type generated: requested=%s, used=%s"", algo, factoryName); sig = result.getValue();",data_integrity,data_integrity,True,,0.9908621311187744,0.00913784746080637
|
| 96 |
+
94,"clientUsername, clientHostName, GenericUtils.size(certs), BufferUtils.toHex(signature)); } verifier.update(session, buf.array(), buf.rpos(), buf.available()); if (!verifier.verify(session, signature)) { throw new SignatureException(""Key verification failed""); } if (debugEnabled) {",data_integrity,data_integrity,True,,0.9906228184700012,0.009377221576869488
|
| 97 |
+
95,"protected boolean doVerify(byte[] data) throws SignatureException { java.security.Signature signature = Objects.requireNonNull(getSignature(), ""Signature not initialized""); return signature.verify(data); }",data_integrity,data_integrity,True,,0.9908080697059631,0.009191992692649364
|
| 98 |
+
96,public void verifySignature(SAMLKeyInfo samlKeyInfo) throws WSSecurityException { Signature sig = getSignature(); if (sig != null) { if (samlKeyInfo == null) { throw new WSSecurityException(,data_integrity,data_integrity,True,,0.9906693696975708,0.009330658242106438
|
| 99 |
+
97,"""No KeyExchange CA verifier located for algorithm=%s of key ID=%s"", sigAlg, keyId); verif.initVerifier(session, signatureKey); verif.update(session, openSshKey.getMessage()); if (!verif.verify(session, openSshKey.getSignature())) { throw new SshException(SshConstants.SSH2_DISCONNECT_KEY_EXCHANGE_FAILED, ""KeyExchange CA signature verification failed for key type="" + keyAlg + "" of key ID="" + keyId); }",data_integrity,data_integrity,True,,0.9907704591751099,0.009229572489857674
|
| 100 |
+
98,"NamedFactory.create(session.getSignatureFactories(), keyAlg), ""No verifier located for algorithm=%s"", keyAlg); verif.initVerifier(session, serverPublicHostKey); verif.update(session, h); if (!verif.verify(session, sig)) { throw new SshException(SshConstants.SSH2_DISCONNECT_KEY_EXCHANGE_FAILED, ""KeyExchange signature verification failed for key type="" + keyAlg); }",data_integrity,data_integrity,True,,0.9906595945358276,0.009340385906398296
|
| 101 |
+
99,"public void initVerifier(SessionContext session, PublicKey key) throws Exception { String algo = getAlgorithm(); signatureInstance = Objects.requireNonNull( doInitSignature(session, algo, key, false), ""No signature instance create""); signatureInstance.initVerify(Objects.requireNonNull(key, ""No public key provided"")); }",data_integrity,data_integrity,True,,0.9905776977539062,0.009422332048416138
|
| 102 |
+
100,"@Override public byte[] sign(SessionContext session) throws Exception { java.security.Signature signature = Objects.requireNonNull(getSignature(), ""Signature not initialized""); return signature.sign(); }",data_integrity,data_integrity,True,,0.9906124472618103,0.009387538768351078
|
| 103 |
+
101,@Override public byte[] sign(SessionContext session) throws Exception { byte[] sig = super.sign(session); try (DERParser parser = new DERParser(sig)) { int type = parser.read(); if (type != 0x30) {,data_integrity,data_integrity,True,,0.9906637668609619,0.009336248971521854
|
| 104 |
+
102,getWsDocInfo().setTokensOnContext((DOMSignContext)signContext); sig.sign(signContext); signatureValue = sig.getSignatureValue().getValue(); } catch (Exception ex) {,data_integrity,data_integrity,True,,0.9908267855644226,0.009173179976642132
|
| 105 |
+
103,"signer.update(null, toSign); final ByteArrayBuffer tmpBuffer = new ByteArrayBuffer(); tmpBuffer.putString(factory.getName()); tmpBuffer.putBytes(signer.sign(null)); cert.setMessage(toSign); cert.setSignature(tmpBuffer.getCompactData());",data_integrity,data_integrity,True,,0.9907363057136536,0.00926364865154028
|
data_integrity_codebert_v3/tokenizer/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data_integrity_codebert_v3/tokenizer/special_tokens_map.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": true,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"cls_token": {
|
| 10 |
+
"content": "<s>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": true,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"eos_token": {
|
| 17 |
+
"content": "</s>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": true,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"mask_token": {
|
| 24 |
+
"content": "<mask>",
|
| 25 |
+
"lstrip": true,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"pad_token": {
|
| 31 |
+
"content": "<pad>",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": true,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
},
|
| 37 |
+
"sep_token": {
|
| 38 |
+
"content": "</s>",
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"normalized": true,
|
| 41 |
+
"rstrip": false,
|
| 42 |
+
"single_word": false
|
| 43 |
+
},
|
| 44 |
+
"unk_token": {
|
| 45 |
+
"content": "<unk>",
|
| 46 |
+
"lstrip": false,
|
| 47 |
+
"normalized": true,
|
| 48 |
+
"rstrip": false,
|
| 49 |
+
"single_word": false
|
| 50 |
+
}
|
| 51 |
+
}
|
data_integrity_codebert_v3/tokenizer/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data_integrity_codebert_v3/tokenizer/tokenizer_config.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"0": {
|
| 5 |
+
"content": "<s>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": true,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
},
|
| 12 |
+
"1": {
|
| 13 |
+
"content": "<pad>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": true,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false,
|
| 18 |
+
"special": true
|
| 19 |
+
},
|
| 20 |
+
"2": {
|
| 21 |
+
"content": "</s>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": true,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"special": true
|
| 27 |
+
},
|
| 28 |
+
"3": {
|
| 29 |
+
"content": "<unk>",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": true,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false,
|
| 34 |
+
"special": true
|
| 35 |
+
},
|
| 36 |
+
"50264": {
|
| 37 |
+
"content": "<mask>",
|
| 38 |
+
"lstrip": true,
|
| 39 |
+
"normalized": false,
|
| 40 |
+
"rstrip": false,
|
| 41 |
+
"single_word": false,
|
| 42 |
+
"special": true
|
| 43 |
+
}
|
| 44 |
+
},
|
| 45 |
+
"bos_token": "<s>",
|
| 46 |
+
"clean_up_tokenization_spaces": false,
|
| 47 |
+
"cls_token": "<s>",
|
| 48 |
+
"eos_token": "</s>",
|
| 49 |
+
"errors": "replace",
|
| 50 |
+
"extra_special_tokens": {},
|
| 51 |
+
"mask_token": "<mask>",
|
| 52 |
+
"model_max_length": 512,
|
| 53 |
+
"pad_token": "<pad>",
|
| 54 |
+
"sep_token": "</s>",
|
| 55 |
+
"tokenizer_class": "RobertaTokenizer",
|
| 56 |
+
"trim_offsets": true,
|
| 57 |
+
"unk_token": "<unk>"
|
| 58 |
+
}
|
data_integrity_codebert_v3/tokenizer/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|