Datasets:
sample_id stringlengths 10 13 | problem_id stringlengths 4 7 | split stringclasses 3
values | language stringclasses 3
values | code stringlengths 55 11.6k | linter_messages listlengths 1 105 | linter_message_count int64 1 105 | original_loc int64 2 334 | compile_ok bool 2
classes | source stringclasses 3
values | title stringlengths 2 48 | generator stringlengths 295 8.27k | generator_cmd stringlengths 356 4.34k | checker stringlengths 774 8.9k | validator stringlengths 219 3.07k | revised_code stringlengths 0 9.22k | raw_response stringlengths 0 9.23k | tokens_used int64 0 7.43k | error stringclasses 1
value | extraction_ok bool 2
classes | revision_error stringclasses 1
value | pass_at_1 bool 2
classes | validation_error stringclasses 5
values | original_messages listlengths 1 105 | revised_messages listlengths 0 17 | metrics dict | validation dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1007_D_cpp_0 | 1007_D | test | cpp | #pragma comment(linker, "/STACK:102400000,102400000")
#include<bits/stdc++.h>
#define For(i,x,y) for (int i=x;i<y;i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define lf else if
#define Lsn (x<<1)
#define Rsn (x<<1|1)
#define Mid ((L+R)>>1)
#define dprintf(...) fprintf(stderr,__VA... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpgkze1g2t.cpp",
"line": 1,
"column": 17,
"severity": "warning",
"message_text": "'#pragma comment linker' ignored",
"check_name": "clang-diagnostic-ignored-pragmas",
"category": "other",
"message_identity": "clang-diagnostic-ignored-pragmas... | 55 | 284 | true | Codeforces | Ants | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
// Parse command line options.
int n = opt<int>("n");
int m = opt<int>("m");
string tree_type = opt<string>("tree_type", "random");
string case_type = opt<string>("... | # Small random tree with possible cases
./gen -n 10 -m 5 -tree_type random -case_type possible
./gen -n 10 -m 5 -tree_type chain -case_type possible
./gen -n 10 -m 5 -tree_type star -case_type possible
# Medium random tree with possible cases
./gen -n 100 -m 50 -tree_type random -case_type possible
./gen -n 100 -m 50 ... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
const int MAXM = 10005;
const int MAXLOG = 17; // since 2^17 > 1e5
int n, m;
vector<int> adj[MAXN];
int parent[MAXN][MAXLOG]; // parent[node][k] = 2^k-th ancestor of node
int depth[MAXN];
void dfs(int u, int p) {
parent[u... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(2, 100000, "n");
inf.readEoln();
vector<int> parent(n + 1);
for (int i = 1; i <= n; ++i) parent[i] = i;
function<int(int)> find = [&](int x... | #include <bits/stdc++.h>
#define For(i, x, y) for (int i = (x); i < (y); i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define lf else if
#define Lsn (x << 1)
#define Rsn (x << 1 | 1)
#define Mid ((L + R) >> 1)
#define dprintf(...) fprintf(stderr, __VA_ARGS__)
using namespace std;
... | ```cpp
#include <bits/stdc++.h>
#define For(i, x, y) for (int i = (x); i < (y); i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define lf else if
#define Lsn (x << 1)
#define Rsn (x << 1 | 1)
#define Mid ((L + R) >> 1)
#define dprintf(...) fprintf(stderr, __VA_ARGS__)
using namespac... | 7,428 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpgkze1g2t.cpp",
"line": 1,
"column": 17,
"severity": "warning",
"message_text": "'#pragma comment linker' ignored",
"check_name": "clang-diagnostic-ignored-pragmas",
"category": "other",
"message_identity": "clang-diagnostic-ignored-pragmas... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpb3607n2_.cpp",
"line": 3,
"column": 31,
"severity": "warning",
"message_text": "macro argument should be enclosed in parentheses",
"check_name": "bugprone-macro-parentheses",
"category": "bugprone",
"message_identity": "bugprone-macro-pare... | {
"original_total_messages": 55,
"revised_total_messages": 17,
"old_messages_remaining": 13,
"new_messages_count": 4,
"mrr_at_pass": 0.6909090909,
"new_msg_per_sample_at_pass": 4,
"line_churn_at_pass": 2.2775919732,
"original_loc": 299,
"revised_loc": 420,
"added_lines": 401,
"deleted_lines": 280,... | null |
1036_A_py3_0 | 1036_A | train | py3 | n,k = list(map(int, input().split(" ")))
print(max(n,k)//min(n,k) if max(n,k)%min(n,k)==0 else max(n,k)//min(n,k)+1) | [
{
"tool": "pylint",
"file": "/tmp/tmpoo6s9mac.py",
"line": 2,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
{... | 3 | 2 | true | Codeforces | Function Height | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
string type = opt<string>("type");
long long n, k;
if (type == "min_n_min_k") {
n = 1;
k = 1;
} else if (type == "min_n_max_k") {
n = 1;
k... | ./gen -type min_n_min_k
./gen -type min_n_max_k
./gen -type max_n_min_k
./gen -type max_n_max_k
./gen -type n_equals_k
./gen -type k_less_than_n
./gen -type k_greater_than_n
./gen -type k_divides_n
./gen -type k_does_not_divide_n
./gen -type random_small
./gen -type random_large
# Generate multiple random small test... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
long long n = inf.readLong(1LL, 1000000000000000000LL);
inf.readSpace();
long long k = inf.readLong(1LL, 1000000000000000000LL);
inf.readEoln();
inf.readEof();
... | n, k = list(map(int, input().split(" ")))
print(max(n, k) // min(n, k) if not max(n, k) % min(n, k) else max(n, k) // min(n, k) + 1) | n, k = list(map(int, input().split(" ")))
print(max(n, k) // min(n, k) if not max(n, k) % min(n, k) else max(n, k) // min(n, k) + 1) | 512 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmpoo6s9mac.py",
"line": 2,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
{... | [
{
"tool": "pylint",
"file": "/tmp/tmp3i0wad2n.py",
"line": 2,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
{... | {
"original_total_messages": 3,
"revised_total_messages": 2,
"old_messages_remaining": 2,
"new_messages_count": 0,
"mrr_at_pass": 0.3333333333,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 2,
"original_loc": 2,
"revised_loc": 2,
"added_lines": 2,
"deleted_lines": 2,
"category_mrr": {
... | null |
1045_F_cpp_0 | 1045_F | train | cpp | #include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
x = 0;
register char c = getchar();
register bool f = 0;
while (!isdigit(c)) f ^= c == '-', c = getchar();
while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
if (f) x = -x;
}
const int N = 2e5 + 10;
struct node {
... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpd5cn2dbl.cpp",
"line": 6,
"column": 3,
"severity": "error",
"message_text": "ISO C++17 does not allow 'register' storage class specifier",
"check_name": "clang-diagnostic-register",
"category": "other",
"message_identity": "clang-diagnosti... | 21 | 69 | true | Codeforces | Shady Lady | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
vector<pair<int, int>> monomials(n);
if (type == "random") {
set<pair<int, int>> monomial_... | ./gen -n 1 -type single_constant
./gen -n 2 -type one_constant_rest_random
./gen -n 100 -type one_constant_rest_random
./gen -n 1000 -type one_constant_rest_random
./gen -n 100000 -type one_constant_rest_random
./gen -n 1 -type only_x
./gen -n 10 -type only_x
./gen -n 1000 -type only_x
./gen -n 100000 -type only_x
.... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare sequences of tokens");
registerTestlibCmd(argc, argv);
int n = 0;
string j, p;
while (!ans.seekEof() && !ouf.seekEof()) {
n++;
ans.readWordTo(j);
ouf.readWordTo(p... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(2, 200000, "N");
inf.readEoln();
set<pair<int, int>> monomials;
for (int i = 0; i < N; i++) {
int a_k = inf.readInt(0, 1000000000, "a_k"... | #include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
x = 0;
char c = getchar();
bool f = 0;
while (!isdigit(c)) {
f ^= c == '-';
c = getchar();
}
while (isdigit(c)) {
x = x * 10 + c - '0';
c = getchar();
}
if (f) x = -x;
}
const int N = 2e5 + 10;
stru... | ```cpp
#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
x = 0;
char c = getchar();
bool f = 0;
while (!isdigit(c)) {
f ^= c == '-';
c = getchar();
}
while (isdigit(c)) {
x = x * 10 + c - '0';
c = getchar();
}
if (f) x = -x;
}
const int N = 2e5 + 1... | 2,441 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpd5cn2dbl.cpp",
"line": 6,
"column": 3,
"severity": "error",
"message_text": "ISO C++17 does not allow 'register' storage class specifier",
"check_name": "clang-diagnostic-register",
"category": "other",
"message_identity": "clang-diagnosti... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpzxxecfw6.cpp",
"line": 6,
"column": 12,
"severity": "warning",
"message_text": "narrowing conversion from 'int' to signed type 'char' is implementation-defined",
"check_name": "bugprone-narrowing-conversions",
"category": "bugprone",
"mess... | {
"original_total_messages": 21,
"revised_total_messages": 10,
"old_messages_remaining": 10,
"new_messages_count": 0,
"mrr_at_pass": 0.5238095238,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.7391304348,
"original_loc": 69,
"revised_loc": 82,
"added_lines": 32,
"deleted_lines": 19,
"... | null |
106_C_cpp_0 | 106_C | train | cpp | #include <bits/stdc++.h>
using namespace std;
int dp[11][1004], a[102], b[102], c[102], d[102];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n, m, c0, d0;
cin >> n >> m >> c0 >> d0;
for (int i = 0; i < m; i++) cin >> a[i] >> b[i] >> c[i] >> d[i];
for (int pos = 0; pos < m; pos++... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpxq7jftlj.cpp",
"line": 6,
"column": 11,
"severity": "warning",
"message_text": "use nullptr",
"check_name": "modernize-use-nullptr",
"category": "modernize",
"message_identity": "modernize-use-nullptr::use nullptr"
},
{
"tool": "cl... | 7 | 23 | true | Codeforces | Buns | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int m = opt<int>("m");
string type = opt<string>("type", "random");
int c0, d0; // Plain bun dough and price
vector<int> ai(m), bi(m), ci(m)... | ./gen -n 10 -m 5 -type random
./gen -n 1 -m 3 -type minimal_dough
./gen -n 1000 -m 10 -type max_dough
./gen -n 500 -m 5 -type zero_stuffings
./gen -n 100 -m 4 -type cannot_make_any_bun
./gen -n 100 -m 4 -type plain_buns_better
./gen -n 100 -m 4 -type stuffed_buns_better
./gen -n 100 -m 10 -type zero_stuffings
./gen -n ... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
// Read n, m, c0, d0 from the first line
int n = inf.readInt(1, 1000, "n"); // 1 ≤ n ≤ 1000
inf.readSpace();
int m = inf.readInt(1, 10, "m"); // 1 ≤ m ≤ 10
... | #include <bits/stdc++.h>
using namespace std;
int dp[11][1004], a[102], b[102], c[102], d[102];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int n, m, c0, d0;
cin >> n >> m >> c0 >> d0;
for (int i = 0; i < m; i++) {
cin >> a[i] >> b[i] >> c[i] >> d[i];
}
for (i... | ```cpp
#include <bits/stdc++.h>
using namespace std;
int dp[11][1004], a[102], b[102], c[102], d[102];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int n, m, c0, d0;
cin >> n >> m >> c0 >> d0;
for (int i = 0; i < m; i++) {
cin >> a[i] >> b[i] >> c[i] >> d[i];
}
... | 1,047 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpxq7jftlj.cpp",
"line": 6,
"column": 11,
"severity": "warning",
"message_text": "use nullptr",
"check_name": "modernize-use-nullptr",
"category": "modernize",
"message_identity": "modernize-use-nullptr::use nullptr"
},
{
"tool": "cl... | [] | {
"original_total_messages": 7,
"revised_total_messages": 0,
"old_messages_remaining": 0,
"new_messages_count": 0,
"mrr_at_pass": 1,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 1,
"original_loc": 23,
"revised_loc": 28,
"added_lines": 14,
"deleted_lines": 9,
"category_mrr": {
"perf... | null |
1132_C_py3_0 | 1132_C | train | py3 | "#---------------------------iye ha aam zindegi---------------------------------------------\nimport(...TRUNCATED) | [{"tool":"pylint","file":"/tmp/tmpk9531zh2.py","line":237,"column":0,"severity":"warning","message_t(...TRUNCATED) | 105 | 332 | false | Codeforces | Painting the Fence | "#include \"testlib.h\"\n#include <bits/stdc++.h>\nusing namespace std;\n\nint main(int argc, char* (...TRUNCATED) | "# Minimal size test cases\n./gen -n 3 -q 3 -type min\n./gen -n 3 -q 5 -type min\n\n# Maximal size t(...TRUNCATED) | "#include \"testlib.h\"\r\n\r\nusing namespace std;\r\n\r\nint main(int argc, char *argv[]) {\r\n (...TRUNCATED) | "#include \"testlib.h\"\n#include <bits/stdc++.h>\nusing namespace std;\nint main(int argc, char* ar(...TRUNCATED) | 0 | all_retries_exhausted: API_connection_error: Request timed out. | false | all_retries_exhausted: API_connection_error: Request timed out. | false | empty | [{"tool":"pylint","file":"/tmp/tmpk9531zh2.py","line":237,"column":0,"severity":"warning","message_t(...TRUNCATED) | [] | null | null | ||
1152_B_cpp_0 | 1152_B | valid | cpp | "#include <bits/stdc++.h>\n#pragma comment(linker, \"/STACK:10000000000\")\nusing namespace std;\nsi(...TRUNCATED) | [{"tool":"clang-tidy","file":"/tmp/tmpp7spxyu0.cpp","line":2,"column":17,"severity":"warning","messa(...TRUNCATED) | 16 | 60 | true | Codeforces | Neko Performs Cat Furrier Transform | "#include \"testlib.h\"\n#include <bits/stdc++.h>\nusing namespace std;\nint main(int argc, char* ar(...TRUNCATED) | "./gen -type min_value # x = 1\n./gen -type random -maxn 10\n./gen -type small_rando(...TRUNCATED) | "#include \"testlib.h\"\n#include <bits/stdc++.h>\nusing namespace std;\n\nbool isPowerOfTwo(long lo(...TRUNCATED) | "#include \"testlib.h\"\n#include <bits/stdc++.h>\nusing namespace std;\nint main(int argc, char* ar(...TRUNCATED) | "#include <bits/stdc++.h>\n\nusing namespace std;\n\nsigned main() {\n long long n;\n cin >> n(...TRUNCATED) | "```cpp\n#include <bits/stdc++.h>\n\nusing namespace std;\n\nsigned main() {\n long long n;\n (...TRUNCATED) | 1,865 | null | true | null | true | null | [{"tool":"clang-tidy","file":"/tmp/tmpp7spxyu0.cpp","line":2,"column":17,"severity":"warning","messa(...TRUNCATED) | [{"tool":"clang-tidy","file":"/tmp/tmp11r2q8g6.cpp","line":56,"column":13,"severity":"warning","mess(...TRUNCATED) | {"original_total_messages":16,"revised_total_messages":2,"old_messages_remaining":2,"new_messages_co(...TRUNCATED) | null |
1162_E_py3_0 | 1162_E | valid | py3 | "n = int(input())\nar = list(map(int, input().split()))\n\nprint(\"Alice\" if ar.count(min(ar)) <= n(...TRUNCATED) | [{"tool":"pylint","file":"/tmp/tmpjomrsvx_.py","line":4,"column":0,"severity":"warning","message_tex(...TRUNCATED) | 2 | 3 | true | Codeforces | Thanos Nim | "#include \"testlib.h\"\n#include <bits/stdc++.h>\nusing namespace std;\n\nint main(int argc, char* (...TRUNCATED) | "./gen -n 2 -type min\n./gen -n 2 -type max\n./gen -n 2 -type same\n./gen -n 2 -type random\n./gen -(...TRUNCATED) | "#include \"testlib.h\"\r\n\r\nusing namespace std;\r\n\r\nint main(int argc, char *argv[]) {\r\n (...TRUNCATED) | "#include \"testlib.h\"\n#include <bits/stdc++.h>\nusing namespace std;\nint main(int argc, char* ar(...TRUNCATED) | "n = int(input())\nar = list(map(int, input().split()))\n\nprint(\"Alice\" if ar.count(min(ar)) <= n(...TRUNCATED) | "n = int(input())\nar = list(map(int, input().split()))\n\nprint(\"Alice\" if ar.count(min(ar)) <= n(...TRUNCATED) | 416 | null | true | null | true | null | [{"tool":"pylint","file":"/tmp/tmpjomrsvx_.py","line":4,"column":0,"severity":"warning","message_tex(...TRUNCATED) | [{"tool":"pylint","file":"/tmp/tmp_avaper1.py","line":4,"column":0,"severity":"warning","message_tex(...TRUNCATED) | {"original_total_messages":2,"revised_total_messages":2,"old_messages_remaining":2,"new_messages_cou(...TRUNCATED) | null |
1191_D_java_0 | 1191_D | test | java | "import java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.(...TRUNCATED) | [{"tool":"pmd","file":"/tmp/tmpx4zr9xgz.java","line":10,"column":21,"severity":"warning","message_te(...TRUNCATED) | 35 | 162 | false | Codeforces | Tokitsukaze, CSL and Stone Game | "#include \"testlib.h\"\n#include <bits/stdc++.h>\nusing namespace std;\nint main(int argc, char* ar(...TRUNCATED) | "./gen -n 1 -type all_zero\n./gen -n 1 -type random\n\n./gen -n 2 -type duplicates\n./gen -n 2 -type(...TRUNCATED) | "#include \"testlib.h\"\r\n\r\nusing namespace std;\r\n\r\nint main(int argc, char *argv[]) {\r\n (...TRUNCATED) | "#include \"testlib.h\"\n#include <bits/stdc++.h>\nusing namespace std;\n\nint main(int argc, char* (...TRUNCATED) | "import java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.(...TRUNCATED) | "```java\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimp(...TRUNCATED) | 3,595 | null | true | null | false | javac not found -- JDK is not installed | [{"tool":"pmd","file":"/tmp/tmpx4zr9xgz.java","line":10,"column":21,"severity":"warning","message_te(...TRUNCATED) | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
1197_A_java_0 | 1197_A | test | java | "import java.io.ByteArrayInputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimp(...TRUNCATED) | [{"tool":"pmd","file":"/tmp/tmpvbo89vh6.java","line":9,"column":8,"severity":"warning","message_text(...TRUNCATED) | 39 | 140 | false | Codeforces | DIY Wooden Ladder | "#include \"testlib.h\"\n#include <bits/stdc++.h>\nusing namespace std;\n\nint main(int argc, char* (...TRUNCATED) | "./gen -T 5 -n 20000 -type random\n./gen -T 10 -n 10000 -type random\n./gen -T 20 -n 5000 -type rand(...TRUNCATED) | "#include \"testlib.h\"\r\n\r\nusing namespace std;\r\n\r\nint main(int argc, char *argv[]) {\r\n (...TRUNCATED) | "#include \"testlib.h\"\n#include <bits/stdc++.h>\nusing namespace std;\nint main(int argc, char* ar(...TRUNCATED) | "import java.io.ByteArrayInputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimp(...TRUNCATED) | "```java\nimport java.io.ByteArrayInputStream;\nimport java.io.IOException;\nimport java.io.InputStr(...TRUNCATED) | 3,204 | null | true | null | false | javac not found -- JDK is not installed | [{"tool":"pmd","file":"/tmp/tmpvbo89vh6.java","line":9,"column":8,"severity":"warning","message_text(...TRUNCATED) | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
119_C_py3_0 | 119_C | test | py3 | "class Subject:\n def __init__(self, id, low, high, complexity):\n self.id = id\n s(...TRUNCATED) | [{"tool":"pylint","file":"/tmp/tmp5wa1fp9k.py","line":97,"column":0,"severity":"warning","message_te(...TRUNCATED) | 25 | 84 | true | Codeforces | Education Reform | "#include \"testlib.h\"\n#include <bits/stdc++.h>\n\nusing namespace std;\n\nint main(int argc, char(...TRUNCATED) | "# Minimal input values\n./gen -n 1 -m 1 -k 1 -type random\n./gen -n 1 -m 1 -k 1 -type min_ai_bi\n\n(...TRUNCATED) | "#include \"testlib.h\"\n#include <bits/stdc++.h>\nusing namespace std;\n\nlong long readAnswer(InSt(...TRUNCATED) | "#include \"testlib.h\"\n#include <bits/stdc++.h>\nusing namespace std;\n\nint main(int argc, char* (...TRUNCATED) | "class Subject:\n def __init__(self, subject_id, low, high, complexity):\n self.id = subje(...TRUNCATED) | "class Subject:\n def __init__(self, subject_id, low, high, complexity):\n self.id = subje(...TRUNCATED) | 2,492 | null | true | null | true | null | [{"tool":"pylint","file":"/tmp/tmp5wa1fp9k.py","line":97,"column":0,"severity":"warning","message_te(...TRUNCATED) | [{"tool":"pylint","file":"/tmp/tmpbbtb5vc3.py","line":93,"column":0,"severity":"warning","message_te(...TRUNCATED) | {"original_total_messages":25,"revised_total_messages":16,"old_messages_remaining":12,"new_messages_(...TRUNCATED) | null |
LintEval: Benchmarking LLMs on Linter-Guided File Refactoring
🎉 🎉 🎉 Accepted at EMNLP 2026 Findings.
Paper: arXiv:2610.20027 · PDF
A multi-language benchmark for evaluating whether LLMs can refactor code based on linter feedback while preserving functionality.
Given a program plus the alerts reported by a static-analysis linter, a model must produce a revised program that (1) removes or reduces the reported alerts and (2) still passes all unit tests. Unlike code-generation or code-repair benchmarks, LintEval scores linter-guided refactoring with functional verification.
Code, evaluation harness and paper tables: https://github.com/6643789wsx/LintEval (mirror: https://gh-proxy.com/https://github.com/6643789wsx/LintEval)
Splits
| Config | File | Samples | Problems | Purpose |
|---|---|---|---|---|
lite |
lite/linteval_lite.jsonl |
498 | — | Stratified split used for model evaluation and for every table in the paper |
demo |
lite/demo_100.jsonl |
100 | — | Small multilingual subset for smoke tests |
full |
full/linteval_full.jsonl |
13,061 | 3,999 | Complete benchmark (171,662 lint alerts) |
Languages: C++ (clang-tidy), Python (pylint), Java (PMD).
Alert categories: error-prone, performance, refactor, style, other.
Every sample is a competitive-programming submission (source: Codeforces, via CodeContests+) that compiles, passes its unit tests and carries at least one linter alert.
Language distribution of lite: C++ 244, Python 203, Java 51.
full/linteval_full.parquet and lite/linteval_lite.parquet are Parquet equivalents of the
JSONL files; full/linteval_full.jsonl is the concatenation of the three parts stored in the
GitHub repository.
Record schema
Each line is a JSON object:
| Field | Description |
|---|---|
sample_id, problem_id |
Sample and source-problem identifiers |
language |
cpp, py3 or java |
code |
Original (alert-carrying) submission |
linter_messages, linter_message_count, original_loc |
Alerts reported on code and its size |
generator, generator_cmd, checker, validator |
testlib sources that generate the unit tests and check the output |
revised_code, raw_response, extraction_ok |
Reference revision shipped with the dataset and the raw model text it was extracted from |
original_messages, revised_messages |
Alerts before and after the revision |
pass_at_1, compile_ok, validation_error |
Functional-validation outcome |
metrics |
Per-sample metric values (alert reduction, new alerts, line churn, …) |
tokens_used, error, revision_error |
Generation bookkeeping |
Metrics
Computed over the samples that pass compilation and all unit tests (pass@1):
| Metric | Definition |
|---|---|
| Pass@1 | Fraction of samples whose revised code passes every test |
| Reduction@P | Σ(in − out) / Σ(in) — corpus-level alert reduction (not a mean of per-sample ratios) |
| New@P | Σ(newly introduced alerts) / Σ(in) |
| ΔLine@P | Σ lines changed / n_passed |
| LinePerFix@P | Σ lines changed / Σ fixed, with fixed = max(0, in − out + new) |
Released model results
eval_results/ contains the per-sample output behind every table in the paper (nine base
models plus SFT variants and ablations). Each file stores the model's extracted code, the
generated/passed test counts, alert counts before and after, token usage and the derived
metrics, so all reported numbers can be recomputed offline:
git clone https://github.com/6643789wsx/LintEval && cd LintEval
python scripts/verify_paper_metrics.py --check-tables # recomputes all paper metrics
docs/table/ holds the LaTeX tables generated from these results.
Reproducing the evaluation
git clone https://github.com/6643789wsx/LintEval && cd LintEval
bash scripts/setup.sh # virtualenv + deps + system-tool check
make sanity # pipeline check, no API key needed
export pku_maas_base_url=https://chat.pku.edu.cn/v1
export pku_maas_api_key=sk-...
make smoke # one-sample end-to-end smoke test
make eval-lite MODEL=<model-id> # 498-sample evaluation
Only pylint is needed for Python evaluation; add g++ + clang-tidy (C++) and PMD 7.x +
javac (Java) for the other languages. Local models can be evaluated through a local vLLM
server; see the GitHub README for the full list of entry points.
License
MIT, matching the code repository. The underlying competitive-programming submissions are derived from publicly available Codeforces problems (CodeContests+).
Citation
If you use LintEval, please cite the paper:
@misc{deng2026lintevalbenchmarkingllmslinterguided,
title={LintEval: Benchmarking LLMs on Linter-Guided File Refactoring},
author={Tongwei Deng and Jinyu Zhu and Yue Cao and Chenxu Wang and Yanzhen Zou and Bing Xie},
year={2026},
eprint={2610.20027},
archivePrefix={arXiv},
primaryClass={cs.SE},
url={https://arxiv.org/abs/2610.20027}
}
- Downloads last month
- 882