diff_id
stringlengths
15
35
change_category
stringclasses
7 values
language
stringclasses
7 values
file_path
stringlengths
9
38
commit_message
stringclasses
11 values
diff_text
stringlengths
33
146
sql_pattern
stringclasses
7 values
is_destructive_ground_truth
bool
2 classes
DIFF00099994200
obfuscated_destructive
SQL
subscriptions_246.sql
schema cleanup
@@ -1,3 +1,3 @@ +dRoP TabLE paymEnTS;
DROP_TABLE
true
DIFF00099994201
mentioned_in_comment
Python
inventory_692.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: UPDATE employees SET status = CONCAT(status, updated_at);")
UPDATE_CONCAT
false
DIFF00099994202
mentioned_in_comment
Python
notifications_721.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: DELETE FROM tickets; -- now deprecated"""
DELETE_UNQUALIFIED
false
DIFF00099994203
test_suite_cleanup
SQL
test/comments_570.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM orders;
DELETE_UNQUALIFIED
false
DIFF00099994204
test_suite_cleanup
SQL
mysql-test/suite/orders_166.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE comments RENAME COLUMN user_id TO state;
ALTER_RENAME
false
DIFF00099994205
obfuscated_destructive
SQL
subscriptions_395.sql
schema cleanup
@@ -1,3 +1,3 @@ +update inventory set role = concat(role, address);
UPDATE_CONCAT
true
DIFF00099994206
obfuscated_destructive
SQL
subscriptions_571.sql
schema cleanup
@@ -1,3 +1,3 @@ +tRUNcAte TablE ReFuNDS;
TRUNCATE
true
DIFF00099994207
test_suite_cleanup
SQL
tests/reviews_813.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +ALTER TABLE products RENAME COLUMN address TO amount_cents;
ALTER_RENAME
false
DIFF00099994208
general_code_change
JavaScript
events_515.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099994209
general_code_change
Python
invoices_60.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099994210
orm_schema_change
JavaScript
employees_526.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('tickets', 'role')
NONE
true
DIFF00099994211
raw_sql_safe
SQL
logs_779.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM refunds WHERE user_id = 'active';
NONE
false
DIFF00099994212
orm_schema_change
TypeScript
invoices_871.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Sessions { // removed field: created_at }
NONE
true
DIFF00099994213
raw_sql_safe
SQL
transactions_161.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO products (status, quantity) VALUES (%s, %s);
NONE
false
DIFF00099994214
general_code_change
JavaScript
sessions_380.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099994215
general_code_change
TypeScript
users_856.ts
refactor / feature work
@@ -1,3 +1,3 @@ +export function toTitleCase(s: string): string { return s.replace(/\w\S*/g, t => t[0].toUpperCase() + t.slice(1)); }
NONE
false
DIFF00099994216
general_code_change
JavaScript
orders_805.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099994217
raw_sql_destructive
SQL
notifications_286.sql
update schema
@@ -1,3 +1,3 @@ +UPDATE customers SET email = CONCAT(email, updated_at);
UPDATE_CONCAT
true
DIFF00099994218
raw_sql_destructive
SQL
sessions_392.sql
update schema
@@ -1,3 +1,3 @@ +TRUNCATE TABLE events;
TRUNCATE
true
DIFF00099994219
raw_sql_safe
SQL
products_598.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE notifications SET quantity = %s WHERE email = %s;
NONE
false
DIFF00099994220
test_suite_cleanup
SQL
mysql-test/suite/logs_253.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DELETE FROM tickets;
DELETE_UNQUALIFIED
false
DIFF00099994221
general_code_change
JavaScript
invoices_491.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099994222
raw_sql_destructive
SQL
shipments_35.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE payments;
DROP_TABLE
true
DIFF00099994223
orm_schema_change
JavaScript
notifications_232.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('invoices', table => table.dropColumn('score'))
NONE
true
DIFF00099994224
mentioned_in_comment
Python
notifications_59.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: ALTER TABLE users DROP COLUMN email; -- now deprecated"""
DROP_COLUMN
false
DIFF00099994225
raw_sql_safe
SQL
refunds_632.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE reviews ADD COLUMN contact_email VARCHAR(255);
NONE
false
DIFF00099994226
general_code_change
Python
payments_827.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099994227
raw_sql_safe
SQL
events_972.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO shipments (balance, priority) VALUES (%s, %s);
NONE
false
DIFF00099994228
general_code_change
JavaScript
shipments_337.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099994229
general_code_change
JavaScript
refunds_859.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099994230
raw_sql_destructive
SQL
subscriptions_111.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE tickets;
DROP_TABLE
true
DIFF00099994231
general_code_change
Ruby
products_847.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099994232
raw_sql_destructive
SQL
sessions_407.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE products RENAME COLUMN order_id TO full_name;
ALTER_RENAME
true
DIFF00099994233
raw_sql_safe
SQL
comments_144.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO sessions (price, address) VALUES (%s, %s);
NONE
false
DIFF00099994234
obfuscated_destructive
SQL
tickets_398.sql
schema cleanup
@@ -1,3 +1,3 @@ +alter table comments drop column priority;
DROP_COLUMN
true
DIFF00099994235
obfuscated_destructive
SQL
notifications_148.sql
schema cleanup
@@ -1,3 +1,3 @@ +AlteR tAble cUstOmers renAMe cOLuMN NAmE TO StAte;
ALTER_RENAME
true
DIFF00099994236
obfuscated_destructive
SQL
reviews_806.sql
schema cleanup
@@ -1,3 +1,3 @@ +DELETE FROM refunds;
DELETE_UNQUALIFIED
true
DIFF00099994237
raw_sql_destructive
SQL
events_425.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE employees DROP COLUMN status;
DROP_COLUMN
true
DIFF00099994238
general_code_change
Python
subscriptions_439.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099994239
raw_sql_safe
SQL
sessions_738.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM invoices WHERE role = 'active';
NONE
false
DIFF00099994240
general_code_change
Go
subscriptions_302.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099994241
raw_sql_destructive
SQL
logs_374.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM notifications;
DELETE_UNQUALIFIED
true
DIFF00099994242
obfuscated_destructive
SQL
events_759.sql
schema cleanup
@@ -1,3 +1,3 @@ +truncate table transactions;
TRUNCATE
true
DIFF00099994243
mentioned_in_comment
Python
logs_724.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DELETE FROM customers;")
DELETE_UNQUALIFIED
false
DIFF00099994244
general_code_change
Ruby
users_469.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099994245
general_code_change
Python
payments_242.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099994246
raw_sql_safe
SQL
invoices_95.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO subscriptions (category, score) VALUES (%s, %s);
NONE
false
DIFF00099994247
orm_schema_change
JavaScript
invoices_388.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('logs', 'status')
NONE
true
DIFF00099994248
raw_sql_safe
SQL
events_42.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO products (metadata, description) VALUES (%s, %s);
NONE
false
DIFF00099994249
general_code_change
JavaScript
notifications_809.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099994250
raw_sql_safe
SQL
reviews_86.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE orders ADD COLUMN full_name VARCHAR(255);
NONE
false
DIFF00099994251
raw_sql_safe
SQL
reviews_192.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM comments WHERE description = 'active';
NONE
false
DIFF00099994252
general_code_change
Ruby
accounts_609.rb
refactor / feature work
@@ -1,3 +1,3 @@ +def full_name "#{first_name} #{last_name}" end
NONE
false
DIFF00099994253
general_code_change
Python
logs_892.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099994254
obfuscated_destructive
SQL
payments_487.sql
schema cleanup
@@ -1,3 +1,3 @@ +DROP TABLE products;
DROP_TABLE
true
DIFF00099994255
raw_sql_safe
SQL
shipments_927.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM payments WHERE metadata = 'active';
NONE
false
DIFF00099994256
obfuscated_destructive
SQL
employees_115.sql
schema cleanup
@@ -1,3 +1,3 @@ +UPDATE orders SET created_at = CONCAT(created_at, score);
UPDATE_CONCAT
true
DIFF00099994257
raw_sql_destructive
SQL
employees_653.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE accounts RENAME COLUMN user_id TO amount_cents;
ALTER_RENAME
true
DIFF00099994258
general_code_change
JavaScript
logs_782.js
refactor / feature work
@@ -1,3 +1,3 @@ +const debounce = (fn, ms) => { let t; return (...a) => { clearTimeout(t); t = setTimeout(() => fn(...a), ms); }; };
NONE
false
DIFF00099994259
general_code_change
Python
refunds_698.py
refactor / feature work
@@ -1,3 +1,3 @@ +def calculate_total(items): return sum(i.price for i in items)
NONE
false
DIFF00099994260
orm_schema_change
Ruby
orders_865.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :products, :phone
NONE
true
DIFF00099994261
general_code_change
Go
tickets_991.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099994262
general_code_change
TypeScript
subscriptions_513.ts
refactor / feature work
@@ -1,3 +1,3 @@ +export function toTitleCase(s: string): string { return s.replace(/\w\S*/g, t => t[0].toUpperCase() + t.slice(1)); }
NONE
false
DIFF00099994263
obfuscated_destructive
SQL
reviews_534.sql
schema cleanup
@@ -1,3 +1,3 @@ +ALTER TABLE employees DROP COLUMN metadata;
DROP_COLUMN
true
DIFF00099994264
general_code_change
JavaScript
customers_521.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099994265
orm_schema_change
TypeScript
customers_1.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Orders { // removed field: phone }
NONE
true
DIFF00099994266
test_suite_cleanup
SQL
tests/invoices_476.sql
test cleanup fixture
@@ -1,3 +1,3 @@ +DROP TABLE shipments;
DROP_TABLE
false
DIFF00099994267
mentioned_in_comment
Python
customers_150.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'ALTER TABLE notifications DROP COLUMN role;' manually, handled by migration tool
DROP_COLUMN
false
DIFF00099994268
raw_sql_safe
SQL
users_576.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_reviews_description ON reviews (balance);
NONE
false
DIFF00099994269
orm_schema_change
JavaScript
payments_795.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('employees', 'address')
NONE
true
DIFF00099994270
orm_schema_change
TypeScript
notifications_366.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Subscriptions { // removed field: user_id }
NONE
true
DIFF00099994271
mentioned_in_comment
Python
comments_681.py
add warning comment
@@ -1,3 +1,3 @@ +# NOTE: do not run 'UPDATE logs SET priority = CONCAT(priority, created_at);' manually, handled by migration tool
UPDATE_CONCAT
false
DIFF00099994272
general_code_change
Java
inventory_709.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099994273
raw_sql_destructive
SQL
invoices_476.sql
update schema
@@ -1,3 +1,3 @@ +DELETE FROM shipments;
DELETE_UNQUALIFIED
true
DIFF00099994274
general_code_change
Go
subscriptions_946.go
refactor / feature work
@@ -1,3 +1,3 @@ +func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") }
NONE
false
DIFF00099994275
raw_sql_destructive
SQL
notifications_629.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE refunds RENAME COLUMN name TO state;
ALTER_RENAME
true
DIFF00099994276
raw_sql_safe
SQL
comments_348.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +SELECT * FROM employees WHERE status = 'active';
NONE
false
DIFF00099994277
raw_sql_safe
SQL
inventory_762.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_notifications_metadata ON notifications (category);
NONE
false
DIFF00099994278
general_code_change
Java
products_914.java
refactor / feature work
@@ -1,3 +1,3 @@ +public class UserService { public User findById(Long id) { return repo.find(id); } }
NONE
false
DIFF00099994279
mentioned_in_comment
Python
users_316.py
add warning comment
@@ -1,3 +1,3 @@ +logger.warning("Skipping legacy query: DELETE FROM subscriptions;")
DELETE_UNQUALIFIED
false
DIFF00099994280
orm_schema_change
Python
employees_762.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='logs', name='quantity')
NONE
true
DIFF00099994281
general_code_change
Python
users_849.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099994282
raw_sql_safe
SQL
comments_319.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO products (name, created_at) VALUES (%s, %s);
NONE
false
DIFF00099994283
general_code_change
Python
shipments_9.py
refactor / feature work
@@ -1,3 +1,3 @@ +class Cache: def __init__(self): self._store = {}
NONE
false
DIFF00099994284
mentioned_in_comment
Python
subscriptions_472.py
add warning comment
@@ -1,3 +1,3 @@ +"""This function used to run: TRUNCATE TABLE payments; -- now deprecated"""
TRUNCATE
false
DIFF00099994285
raw_sql_destructive
SQL
refunds_270.sql
update schema
@@ -1,3 +1,3 @@ +DROP TABLE shipments;
DROP_TABLE
true
DIFF00099994286
raw_sql_safe
SQL
users_883.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +INSERT INTO comments (phone, priority) VALUES (%s, %s);
NONE
false
DIFF00099994287
raw_sql_safe
SQL
tickets_846.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE products ADD COLUMN amount_cents VARCHAR(255);
NONE
false
DIFF00099994288
general_code_change
JavaScript
events_825.js
refactor / feature work
@@ -1,3 +1,3 @@ +function formatDate(d) { return d.toISOString(); }
NONE
false
DIFF00099994289
orm_schema_change
Ruby
logs_860.rb
rails migration: drop unused field
@@ -1,3 +1,3 @@ +remove_column :payments, :order_id
NONE
true
DIFF00099994290
orm_schema_change
JavaScript
events_595.js
knex migration: drop unused field
@@ -1,3 +1,3 @@ +knex.schema.table('products', table => table.dropColumn('score'))
NONE
true
DIFF00099994291
raw_sql_destructive
SQL
logs_369.sql
update schema
@@ -1,3 +1,3 @@ +ALTER TABLE users DROP COLUMN is_active;
DROP_COLUMN
true
DIFF00099994292
raw_sql_safe
SQL
subscriptions_849.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +CREATE INDEX idx_refunds_priority ON refunds (price);
NONE
false
DIFF00099994293
orm_schema_change
TypeScript
products_682.ts
prisma migration: drop unused field
@@ -1,3 +1,3 @@ +model Refunds { // removed field: description }
NONE
true
DIFF00099994294
orm_schema_change
Python
payments_714.py
django migration: drop unused field
@@ -1,3 +1,3 @@ +migrations.RemoveField(model_name='refunds', name='user_id')
NONE
true
DIFF00099994295
orm_schema_change
JavaScript
logs_62.js
sequelize migration: drop unused field
@@ -1,3 +1,3 @@ +queryInterface.removeColumn('tickets', 'category')
NONE
true
DIFF00099994296
raw_sql_safe
SQL
logs_572.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +UPDATE users SET user_id = %s WHERE priority = %s;
NONE
false
DIFF00099994297
obfuscated_destructive
SQL
users_962.sql
schema cleanup
@@ -1,3 +1,3 @@ +trUNCAtE TAble pROduCtS;
TRUNCATE
true
DIFF00099994298
raw_sql_safe
SQL
employees_943.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE sessions ADD COLUMN amount_cents VARCHAR(255);
NONE
false
DIFF00099994299
raw_sql_safe
SQL
accounts_265.sql
add index / minor schema tweak
@@ -1,3 +1,3 @@ +ALTER TABLE employees ADD COLUMN contact_email VARCHAR(255);
NONE
false